tabkey.th

来自「EPIC IRC客户端。来源于IRCII客户端但做了很多性能和功能的优化。」· TH 代码 · 共 88 行

TH
88
字号
## These are my tabkey routines. Pressing the tabkey with nothing in your buffer# will cycle through people you are talking to or if you type part of a# nickname and then tab it will complete the nickname. Enjoy.## - whitefang (thall@epicsol.org)#bind ^i parse_command proc.tabkeyalias proc.tabkey{        ^local text,word,comp,comm,nick,temp        @ text = L, word = rightw(1 $text), comp = pattern($^\word* $chanusers())        unless (text)        {                type /msg                @ text = L        }        @ comm = word(0 $text), nick = word(1 $text)        /* msg buffer routine */        if (comm == [/msg])        {                if (finditem(TK $nick) >= 0)                {                        parsekey erase_line                        @ temp = getitem(TK ${finditem(TK $nick)-1})                        xtype -l /msg ${temp?temp:getitem(TK ${numitems(TK)-1})}$chr(32)                } {                        parsekey erase_line                        xtype -l /msg $getitem(TK ${numitems(TK)-1})$chr(32)                }                return        }        /* nick completion routine */        if (!word || !numwords($comp) || right(1 $word) == [:])        {                return        }        if (numwords($comp) > 1)        {                xecho -b Matches:                echo $comp                return        }        if (numwords($text) == 1)        {                parsekey erase_line                xtype -l $comp:$chr(32)        } {                pop text                parsekey erase_line                xtype -l $text $comp        }}alias proc.add_tabkey (nick){        if (nick)        {                if (finditem(TK $nick) >= 0) {@ delitem(TK $finditem(TK $nick))}                @ setitem(TK $numitems(TK) $nick)                if (numitems(TK) == 10) {@ delitem(TK 0)}        }}on #-dcc_chat -420 * proc.add_tabkey =$0on #-dcc_connect -420 "% CHAT *" proc.add_tabkey =$0on #-msg -420 * proc.add_tabkey $0on #-send_dcc_chat -420 * proc.add_tabkey =$0on #-send_msg -420 * proc.add_tabkey $0alias m msgalias msg{        //msg $*        if (@)        {                proc.add_tabkey $0        }}# tjbh/2000

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?