📄 various.txt
字号:
*various.txt* For Vim version 5.8. Last change: 2000 Apr 22 VIM REFERENCE MANUAL by Bram MoolenaarVarious commands *various*1. Various commands |various-cmds|2. Online help |online-help|==============================================================================1. Various commands *various-cmds* *CTRL-L*CTRL-L Clear and redraw the screen. *N<Del>*<Del> When entering a number: Remove the last digit. Note: if you like to use <BS> for this, add this mapping to your .vimrc: :map CTRL-V <BS> CTRL-V <Del> See |:fixdel| if your <Del> key does not do what you want.:as[cii] or *ga* *:as* *:ascii*ga Print the ascii value of the character under the cursor in decimal, hexadecimal and octal. For example, when the cursor is on a 'R': <R> 82, Hex 52, Octal 122 When the character is a non-standard ASCII character, but printable according to the 'isprint' option, the non-printable version is also given. When the character is larger than 127, the <M-x> form is also printed. For example: <~A> <M-^A> 129, Hex 81, Octal 201 <p> <|~> <M-~> 254, Hex fe, Octal 376 (where <p> is a special character) The <Nul> character in a file is stored internally as <NL>, but it will be shown as: <^@> 0, Hex 00, Octal 000 Mnemonic: Get Ascii value. {not in Vi} *:p* *:pr* *:print*:[range]p[rint] Print [range] lines (default current line). Note: If you are looking for a way to print your text file, you need an external program for that. In the GUI you can use the File.Print menu entry.:[range]p[rint] {count} Print {count} lines, starting with [range] (default current line |cmdline-ranges|). *:P* *:Print*:[range]P[rint] [count] Just as ":print". Was apparently added to Vi for people that keep the shift key pressed too long... *:l* *:list*:[range]l[ist] [count] Same as :print, but display unprintable characters with '^'. *:nu* *:number*:[range]nu[mber] [count] Same as :print, but precede each line with its line number. (See also 'highlight' option). *:#*:[range]# [count] synonym for :number. *:z*:{range}z[+-^.=]{count} Display several lines of text surrounding the line specified with {range}, or around the current line if there is no {range}. If there is a {count}, that's how many lines you'll see; otherwise, the current window size is used. :z can be used either alone or followed by any of several punctuation marks. These have the following effect: mark first line last line new location ~ ---- ---------- --------- ------------ + current line 1 scr forward 1 scr forward - 1 scr back current line current line ^ 2 scr back 1 scr back 1 scr back . 1/2 scr back 1/2 scr fwd 1/2 src fwd = 1/2 src back 1/2 scr fwd current line Specifying no mark at all is the same as "+". If the mark is "=", a line of dashes is printed around the current line. *:=*:= Print the cursor line number.:norm[al][!] {commands} *:norm* *:normal* Execute Normal mode commands {commands}. This makes it possible to execute Normal mode commands typed on the command-line. {commands} is executed like it is typed. For undo all commands are undone together. If the [!] is given, mappings will not be used. {commands} should be a complete command. If {commands} does not finish a command, more characters need to be typed, but the display isn't updated while doing this. This implies that an insert command must be completed (to start Insert mode, see |:startinsert|). This command cannot be followed by another command, since any '|' is considered part of the command. This command can be used recursively, but the depth is limited by 'maxmapdepth'. When this command is called from a non-remappable mapping |:noremap|, the argument can be mapped anyway. An alternative is to use |:execute|, which uses an expression as argument. This allows the use of printable characters. Example:> :exe "normal \<c-w>\<c-w>" Hint: If the {commands} ends in an <Esc>, Vim may think it's the start of a function key, and 'ttimeout' will apply, which makes things very slow, or even wait indefenitely for anything to be typed. Include the [!] in this case. {not in Vi, of course} Not available when |+ex_extra| feature was disabled at compile time.:{range}norm[al][!] {commands} *:normal-range* Execute Normal mode commands {commands} for each line in the {range}. Before executing the {commands}, the cursor is positioned in the first column of the range, for each line. Otherwise it's the same as the ":normal" command without a range. {not in Vi} Not available when |+ex_extra| feature was disabled at compile time. *:sh* *:shell*:sh[ell] This command starts a shell. When the shell exits (after the "exit" command) you return to Vim. The name for the shell command comes from 'shell' option. Note: This doesn't work when Vim on the Amiga was started in QuickFix mode from a compiler, because the compiler will have set stdin to a non-interactive mode. *:!cmd* *:!*:!{cmd} Execute {cmd} with the shell. See also the 'shell' and 'shelltype' option. Any '!' in {cmd} is replaced with the previous external command (see also 'cpoptions'). But not when there is a backslash before the '!', then that backslash is removed. Example: ":!ls" followed by ":!echo ! \! \\!" executes "echo ls ! \!". After the command has been executed, the timestamp of the current file is checked |timestamp|. There cannot be a '|' in {cmd}, see |:bar|. On Unix the command normally runs in a non-interactive shell. If you want an interactive shell to be used (to use aliases) set 'shellcmdflag' to "-ic". Also see |shell-window|. *:!!*:!! Repeat last ":!{cmd}". *:ve* *:version*:ve[rsion] Print the version number of the editor. If the compiler used understands "__DATE__" the compilation date is mentioned. Otherwise a fixed release-date is shown. The following lines contain information about which features were enabled when Vim was compiled. When there is a preceding '+', the feature is included, when there is a '-' it is excluded. To change this, you have to edit feature.h and recompile Vim. To check for this in an expression, see |has()|. Here is an overview of the features: *+feature-list**+ARP* Amiga only: ARP support included*+autocmd* |:autocmd|, automatic commands*+browse* |:browse| command*+builtin_terms* some terminals builtin |builtin-terms|*++builtin_terms* maximal terminals builtin |builtin-terms|*+byte_offset* support for 'o' flag in 'statusline' option, "go" and ":goto" commands.*+cindent* |'cindent'|, C indenting*+cmdline_compl* command line completion |cmdline-completion|*+cmdline_info* |'showcmd'| and |'ruler'|*+comments* |'comments'| support*+cryptv* encryption support |encryption|*+cscope* |cscope| support*+dialog_gui* Support for |:confirm| with GUI dialog.*+dialog_con* Support for |:confirm| with console dialog.*+dialog_con_gui* Support for |:confirm| with GUI and console dialog.*+digraphs* |digraphs|*+emacs_tags* |emacs-tags| files*+eval* expression evaluation |eval.txt|*+ex_extra* Vim's extra Ex commands: |:center|, |:left|, |:normal|, |:retab| and |:right|*+extra_search* |'hlsearch'| and |'incsearch'| options.*+farsi* |farsi| language
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -