⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gl_get_line.3

📁 BCAST Implementation for NS2
💻 3
📖 第 1 页 / 共 5 页
字号:
  ^V     ->   literal-next  M-^C   ->   user-interrupt  M-^\\   ->   abort  M-^Z   ->   suspend  M-^Q   ->   start-output  M-^S   ->   stop-output.fiNote that above, most of the bindings are defined twice, onceas a raw control code like \f3^C\f1 and then a second time asa meta character like \f3M-^C\f1. The former is the bindingfor vi input mode, whereas the latter is the binding for vicommand mode. Once in command mode all key-sequences that theuser types that they don't explicitly start with an escape ora meta key, have their first key secretly converted to a metacharacter before the key sequence is looked up in the keybinding table. Thus, once in command mode, when you type theletter \f3i\f1, for example, the tecla library actually looksup the binding for \f3M-i\f1.The cursor keys are refered to by name, as follows. This is necessarybecause different types of terminals generate different key sequenceswhen their cursor keys are pressed.  right  ->   cursor-right  left   ->   cursor-left  up     ->   up-history  down   ->   down-historyThe cursor keys normally generate a keysequence that startwith an escape character, so beware that using the arrow keyswill put you into command mode (if you aren't already incommand mode)..spThe following are the terminal-independent key bindings for vi inputmode..nf  ^D     ->   list-or-eof  ^G     ->   list-glob  ^H     ->   backward-delete-char  ^I     ->   complete-word  \\r     ->   newline  \\n     ->   newline  ^L     ->   clear-screen  ^N     ->   down-history  ^P     ->   up-history  ^R     ->   redisplay  ^U     ->   backward-kill-line  ^W     ->   backward-delete-word  ^X*    ->   expand-filename  ^X^F   ->   read-from-file  ^X^R   ->   read-init-files  ^?     ->   backward-delete-char.fiThe following are the key bindings that are defined in vicommand mode, this being specified by them all starting witha meta character. As mentioned above, once in command modethe initial meta character is optional. For example, youmight enter command mode by typing Esc, and then press htwice to move the cursor two positions to the left. Both hcharacters get quietly converted to M-h before being comparedto the key-binding table, the first one because Escapefollowed by a character is always converted to the equivalentmeta character, and the second because command mode wasalready active..nf  M-\\     ->   cursor-right     (Meta-space)  M-$     ->   end-of-line  M-*     ->   expand-filename  M-+     ->   down-history  M--     ->   up-history  M-<     ->   beginning-of-history  M->     ->   end-of-history  M-^     ->   beginning-of-line  M-;     ->   repeat-find-char  M-,     ->   invert-refind-char  M-|     ->   goto-column  M-~     ->   change-case  M-.     ->   vi-repeat-change  M-%     ->   find-parenthesis  M-a     ->   vi-append  M-A     ->   vi-append-at-eol  M-b     ->   backward-word  M-B     ->   backward-word  M-C     ->   vi-change-rest-of-line  M-cb    ->   vi-backward-change-word  M-cB    ->   vi-backward-change-word  M-cc    ->   vi-change-line  M-ce    ->   vi-forward-change-word  M-cE    ->   vi-forward-change-word  M-cw    ->   vi-forward-change-word  M-cW    ->   vi-forward-change-word  M-cF    ->   vi-backward-change-find  M-cf    ->   vi-forward-change-find  M-cT    ->   vi-backward-change-to  M-ct    ->   vi-forward-change-to  M-c;    ->   vi-change-refind  M-c,    ->   vi-change-invert-refind  M-ch    ->   vi-backward-change-char  M-c^H   ->   vi-backward-change-char  M-c^?   ->   vi-backward-change-char  M-cl    ->   vi-forward-change-char  M-c\\    ->   vi-forward-change-char  (Meta-c-space)  M-c^    ->   vi-change-to-bol  M-c0    ->   vi-change-to-bol  M-c$    ->   vi-change-rest-of-line  M-c|    ->   vi-change-to-column  M-c%    ->   vi-change-to-parenthesis  M-dh    ->   backward-delete-char  M-d^H   ->   backward-delete-char  M-d^?   ->   backward-delete-char  M-dl    ->   forward-delete-char  M-d     ->   forward-delete-char    (Meta-d-space)  M-dd    ->   delete-line  M-db    ->   backward-delete-word  M-dB    ->   backward-delete-word  M-de    ->   forward-delete-word  M-dE    ->   forward-delete-word  M-dw    ->   forward-delete-word  M-dW    ->   forward-delete-word  M-dF    ->   backward-delete-find  M-df    ->   forward-delete-find  M-dT    ->   backward-delete-to  M-dt    ->   forward-delete-to  M-d;    ->   delete-refind  M-d,    ->   delete-invert-refind  M-d^    ->   backward-kill-line  M-d0    ->   backward-kill-line  M-d$    ->   kill-line  M-D     ->   kill-line  M-d|    ->   delete-to-column  M-d%    ->   delete-to-parenthesis  M-e     ->   forward-word  M-E     ->   forward-word  M-f     ->   forward-find-char  M-F     ->   backward-find-char  M--     ->   up-history  M-h     ->   cursor-left  M-H     ->   beginning-of-history  M-i     ->   vi-insert  M-I     ->   vi-insert-at-bol  M-j     ->   down-history  M-J     ->   history-search-forward  M-k     ->   up-history  M-K     ->   history-search-backward  M-l     ->   cursor-right  M-L     ->   end-of-history  M-n     ->   history-re-search-forward  M-N     ->   history-re-search-backward  M-p     ->   append-yank  M-P     ->   yank  M-r     ->   vi-replace-char  M-R     ->   vi-overwrite  M-s     ->   vi-forward-change-char  M-S     ->   vi-change-line  M-t     ->   forward-to-char  M-T     ->   backward-to-char  M-u     ->   vi-undo  M-w     ->   forward-to-word  M-W     ->   forward-to-word  M-x     ->   forward-delete-char  M-X     ->   backward-delete-char  M-yh    ->   backward-copy-char  M-y^H   ->   backward-copy-char  M-y^?   ->   backward-copy-char  M-yl    ->   forward-copy-char  M-y\\    ->   forward-copy-char  (Meta-y-space)  M-ye    ->   forward-copy-word  M-yE    ->   forward-copy-word  M-yw    ->   forward-copy-word  M-yW    ->   forward-copy-word  M-yb    ->   backward-copy-word  M-yB    ->   backward-copy-word  M-yf    ->   forward-copy-find  M-yF    ->   backward-copy-find  M-yt    ->   forward-copy-to  M-yT    ->   backward-copy-to  M-y;    ->   copy-refind  M-y,    ->   copy-invert-refind  M-y^    ->   copy-to-bol  M-y0    ->   copy-to-bol  M-y$    ->   copy-rest-of-line  M-yy    ->   copy-line  M-Y     ->   copy-line  M-y|    ->   copy-to-column  M-y%    ->   copy-to-parenthesis  M-^E    ->   emacs-mode  M-^H    ->   cursor-left  M-^?    ->   cursor-left  M-^L    ->   clear-screen  M-^N    ->   down-history  M-^P    ->   up-history  M-^R    ->   redisplay  M-^D    ->   list-or-eof  M-^I    ->   complete-word  M-\\r    ->   newline  M-\\n    ->   newline  M-^X^R  ->   read-init-files  M-^Xh   ->   list-history  M-0, M-1, ... M-9  ->  digit-argument  (see below).fiNote that ^I is what the TAB key generates..SH ENTERING REPEAT COUNTSMany of the key binding functions described previously, takean optional count, typed in before the targetkeysequence. This is interpreted as a repeat count by mostbindings. A notable exception is the goto-column binding,which interprets the count as a column number..spBy default you can specify this count argument by pressingthe meta key while typing in the numeric count. This relieson the \f3digit-argument\f1 action being bound to Meta-0,Meta-1 etc.  Once any one of these bindings has beenactivated, you can optionally take your finger off the metakey to type in the rest of the number, since every numericdigit thereafter is treated as part of the number, unless itis preceded by the \f3literal-next\f1 binding. As soon as anon-digit, or literal digit key is pressed the repeat countis terminated and either causes the just typed character tobe added to the line that many times, or causes the nextkey-binding function to be given that argument..spFor example, in emacs mode, typing:.sp.nf  M-12a.fi.spcauses the letter 'a' to be added to the line 12 times,whereas.sp.nf  M-4M-c.fi.spCapitalizes the next 4 words..spIn vi command mode the Meta modifier is automatically addedto all characters typed in, so to enter a count in vicommand-mode, just involves typing in the number, just as atit does in the vi editor itself. So for example, in vicommand mode, typing:.sp.nf  4w2x.fi.spmoves the cursor four words to the right, then deletes two characters..spYou can also bind \f3digit-argument\f1 to other key sequences. Ifthese end in a numeric digit, that digit gets appended to the currentrepeat count. If it doesn't end in a numeric digit, a new repeat countis started with a value of zero, and can be completed by typing in thenumber, after letting go of the key which triggered the digit-argumentaction..SH THE TECLA CONFIGURATION FILEBy default, the first call to \f3gl_get_line()\f1 looks for a filecalled \f3\&.teclarc\f1 in your home directory (ie. \f3~/.teclarc\f1).If it finds this file, it reads it, interpreting each line as defininga new key binding or an editing configuration option. Since the emacskeybindings are installed by default, if you want to use thenon-default vi editing mode, the most important item to go in thisfile is the following line:.nf  edit-mode vi.fiThis will re-configure the default bindings for vi-mode. Thecomplete set of arguments that this command accepts are:.sp.nf  vi     -  Install key-bindings like those of the vi            editor.  emacs  -  Install key-bindings like those of the emacs            editor. This is the default.  none   -  Use just the native line editing facilities            provided by the terminal driver..fi.spTo prevent the terminal bell from being rung, such as whenan unrecognized control-sequence is typed, place thefollowing line in the configuration file:.nf  nobeep.fi

⌨️ 快捷键说明

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