|

楼主 |
发表于 2004-8-14 00:35:44
|
显示全部楼层
- *'imsearch'* *'ims'*
- 'imsearch' 'ims'number (default 0, 2 when an input method is supported)
- local to buffer
- {not in Vi}
- Specifies whether :lmap or an Input Method (IM) is to be used when
- entering a search pattern. Valid values:
- -1the value of 'iminsert' is used, makes it look like
- 'iminsert' is also used when typing a search pattern
- 0:lmap is off and IM is off
- 1:lmap is ON and IM is off
- 2:lmap is off and IM is ON
- Note that this option changes when using CTRL-^ in Insert mode
- |c_CTRL-^|.
- The value is set to 1 when it is not -1 and setting the 'keymap'
- option to a valid keymap name.
- The value 0 may not work correctly with Athena and Motif with some XIM
- methods. Use 'imdisable' to disable XIM then.
- *'include'* *'inc'*
- 'include' 'inc'string(default "^\s*#\s*include")
- global or local to buffer |global-local|
- {not in Vi}
- {not available when compiled without the
- |+find_in_path| feature}
- Pattern to be used to find an include command.It is a search
- pattern, just like for the "/" command (See |pattern|). The default
- value is for C programs. This option is used for the commands "[i",
- "]I", "[d", etc.. The 'isfname' option is used to recognize the file
- name that comes after the matched pattern. See |option-backslash|
- about including spaces and backslashes.
- *'includeexpr'* *'inex'*
- 'includeexpr' 'inex'string(default "")
- local to buffer
- {not in Vi}
- {not available when compiled without the
- |+find_in_path| or |+eval| feature}
- Expression to be used to transform the string found with the 'include'
- option to a file name.Mostly useful to change "." to "/" for Java:
- :set includeexpr=substitute(v:fname,'\\.','/','g')
- The "v:fname" variable will be set to the file name that was detected.
- Evaluated in the |sandbox|.
- Also used for the |gf| command if an unmodified file name can't be
- found.Allows doing "gf" on the name after an 'include' statement.
- Also used for |<cfile>|.
- *'incsearch'* *'is'* *'noincsearch'* *'nois'*
- 'incsearch' 'is'boolean(default off)
- global
- {not in Vi}
- {not available when compiled without the
- |+extra_search| feature}
- While typing a search pattern, show immediately where the so far
- typed pattern matches.The matched string is highlighted. If the
- pattern is invalid or not found, nothing is shown. The screen will
- be updated often, this is only useful on fast terminals. Note that
- the match will be shown, but the cursor is not actually positioned
- there.You still need to finish the search command with <CR> to move
- the cursor. The highlighting can be set with the 'i' flag in
- 'highlight'. See also: 'hlsearch'.
- NOTE: This option is reset when 'compatible' is set.
- *'indentexpr'* *'inde'*
- 'indentexpr' 'inde'string(default "")
- local to buffer
- {not in Vi}
- {not available when compiled without the |+cindent|
- or |+eval| features}
- Expression which is evaluated to obtain the proper indent for a line.
- It is used when a new line is created, for the |=| operator and
- in Insert mode as specified with the 'indentkeys' option.
- When this option is not empty, it overrules the 'cindent' and
- 'smartindent' indenting.
- When 'paste' is set this option is not used for indenting.
- The expression is evaluated with |v:lnum| set to the line number for
- which the indent is to be computed.
- The expression must return the number of spaces worth of indent. It
- can return "-1" to keep the current indent (this means 'autoindent' is
- used for the indent).
- Functions useful for computing the indent are |indent()|, |cindent()|
- and |lispindent()|.
- The evaluation of the expression must not have side effects! It must
- not change the text, jump to another window, etc. Afterwards the
- cursor position is always restored, thus the cursor may be moved.
- Normally this option would be set to call a function:
- :set indentexpr=GetMyIndent()
- Error messages will be suppressed, unless the 'debug' option contains
- "msg".
- See |indent-expression|. Also see |eval-sandbox|.
- NOTE: This option is made empty when 'compatible' is set.
- *'indentkeys'* *'indk'*
- 'indentkeys' 'indk'string(default "0{,0},:,0#,!^F,o,O,e")
- local to buffer
- {not in Vi}
- {not available when compiled without the |+cindent|
- feature}
- A list of keys that, when typed in Insert mode, cause reindenting of
- the current line. Only happens if 'indentexpr' isn't empty.
- The format is identical to 'cinkeys', see |indentkeys-format|.
- See |C-indenting| and |indent-expression|.
- *'infercase'* *'inf'* *'noinfercase'* *'noinf'*
- 'infercase' 'inf'boolean(default off)
- local to buffer
- {not in Vi}
- When doing keyword completion in insert mode |ins-completion|, and
- 'ignorecase' is also on, the case of the match is adjusted. If the
- typed text contains a lowercase letter where the match has an upper
- case letter, the completed part is made lowercase. If the typed text
- has no lowercase letters and the match has a lowercase letter where
- the typed text has an uppercase letter, and there is a letter before
- it, the completed part is made uppercase.
- *'insertmode'* *'im'* *'noinsertmode'* *'noim'*
- 'insertmode' 'im'boolean(default off)
- global
- {not in Vi}
- Makes Vim work in a way that Insert mode is the default mode. Useful
- if you want to use Vim as a modeless editor. Used for |evim|.
- These Insert mode commands will be useful:
- - Use the cursor keys to move around.
- - Use CTRL-O to execute one Normal mode command |i_CTRL-O|). When
- this is a mapping, it is executed as if 'insertmode' was off.
- Normal mode remains active until the mapping is finished.
- *i_CTRL-L*
- - Use CTRL-L to execute a number of Normal mode commands, then use
- <Esc> to get back to Insert mode.
- These items change when 'insertmode' is set:
- - when starting to edit of a file, Vim goes to Insert mode.
- - <Esc> in Insert mode is a no-op and beeps.
- - <Esc> in Normal mode makes Vim go to Insert mode.
- - CTRL-L in Insert mode is a command, it is not inserted.
- - CTRL-Z in Insert mode suspends Vim, see |CTRL-Z|.*i_CTRL-Z*
- However, when <Esc> is used inside a mapping, it behaves like
- 'insertmode' was not set. This was done to be able to use the same
- mappings with 'insertmode' set or not set.
- When executing commands with |:normal| 'insertmode' is not used.
- NOTE: This option is reset when 'compatible' is set.
- *'isfname'* *'isf'*
- 'isfname' 'isf'string(default for MS-DOS, Win32 and OS/2:
- "@,48-57,/,\,.,-,_,+,,,#,$,%,{,},[,],:,@-@,!,~,="
- for AMIGA: "@,48-57,/,.,-,_,+,,,$,:"
- for VMS: "@,48-57,/,.,-,_,+,,,#,$,%,<,>,[,],:,;,~"
- for OS/390: "@,240-249,/,.,-,_,+,,,#,$,%,~,="
- otherwise: "@,48-57,/,.,-,_,+,,,#,$,%,~,=")
- global
- {not in Vi}
- The characters specified by this option are included in file names and
- path names. Filenames are used for commands like "gf", "[i" and in
- the tags file.It is also used for "\f" in a |pattern|.
- Multi-byte characters 256 and above are always included, only the
- characters up to 255 are specified with this option.
- For UTF-8 the characters 0xa0 to 0xff are included as well.
- Note that on systems using a backslash as path separator, Vim tries to
- do its best to make it work as you would expect. That is a bit
- tricky, since Vi originally used the backslash to escape special
- characters. Vim will not remove a backslash in front of a normal file
- name character on these systems, but it will on Unix and alikes. The
- '&' and '^' are not included by default, because these are special for
- cmd.exe.
- The format of this option is a list of parts, separated with commas.
- Each part can be a single character number or a range.A range is two
- character numbers with '-' in between.A character number can be a
- decimal number between 0 and 255 or the ASCII character itself (does
- not work for digits). Example:
- "_,-,128-140,#-43"(include '_' and '-' and the range
- 128 to 140 and '#' to 43)
- If a part starts with '^', the following character number or range
- will be excluded from the option. The option is interpreted from left
- to right. Put the excluded character after the range where it is
- included. To include '^' itself use it as the last character of the
- option or the end of a range. Example:
- "^a-z,#,^"(exclude 'a' to 'z', include '#' and '^')
- If the character is '@', all characters where isalpha() returns TRUE
- are included. Normally these are the characters a to z and A to Z,
- plus accented characters. To include '@' itself use "@-@". Examples:
- "@,^a-z"All alphabetic characters, excluding lower
- case letters.
- "a-z,A-Z,@-@"All letters plus the '@' character.
- A comma can be included by using it where a character number is
- expected. Example:
- "48-57,,,_"Digits, comma and underscore.
- A comma can be excluded by prepending a '^'. Example:
- " -~,^,,9"All characters from space to '~', excluding
- comma, plus <Tab>.
- See |option-backslash| about including spaces and backslashes.
- *'isident'* *'isi'*
- 'isident' 'isi'string(default for MS-DOS, Win32 and OS/2:
- "@,48-57,_,128-167,224-235"
- otherwise: "@,48-57,_,192-255")
- global
- {not in Vi}
- The characters given by this option are included in identifiers.
- Identifiers are used in recognizing environment variables and after a
- match of the 'define' option. It is also used for "\i" in a
- |pattern|. See 'isfname' for a description of the format of this
- option.
- Careful: If you change this option, it might break expanding
- environment variables.E.g., when '/' is included and Vim tries to
- expand "$HOME/.viminfo". Maybe you should change 'iskeyword' instead.
- *'iskeyword'* *'isk'*
- 'iskeyword' 'isk'string (Vim default for MS-DOS and Win32:
- "@,48-57,_,128-167,224-235"
- otherwise: "@,48-57,_,192-255"
- Vi default: "@,48-57,_")
- local to buffer
- {not in Vi}
- Keywords are used in searching and recognizing with many commands:
- "w", "*", "[i", etc. It is also used for "\k" in a |pattern|.See
- 'isfname' for a description of the format of this option. For C
- programs you could use "a-z,A-Z,48-57,_,.,-,>".
- For a help file it is set to all non-blank printable characters except
- '*', '"' and '|' (so that CTRL-] on a command finds the help for that
- command).
- When the 'lisp' option is on the '-' character is always included.
- NOTE: This option is set to the Vi default value when 'compatible' is
- set and to the Vim default value when 'compatible' is reset.
- *'isprint'* *'isp'*
- 'isprint' 'isp'string(default for MS-DOS, Win32, OS/2 and Macintosh:
- "@,~-255"; otherwise: "@,161-255")
- global
- {not in Vi}
- The characters given by this option are displayed directly on the
- screen. It is also used for "\p" in a |pattern|. The characters from
- space (ascii 32) to '~' (ascii 126) are always displayed directly,
- even when they are not included in 'isprint' or excluded. See
- 'isfname' for a description of the format of this option.
- Non-printable characters are displayed with two characters:
- 0 - 31"^@" - "^_"
- 32 - 126always single characters
- 127"^?"
- 128 - 159"~@" - "~_"
- 160 - 254"| " - "|~"
- 255"~?"
- When 'encoding' is a Unicode one, illegal bytes from 128 to 255 are
- displayed as <xx>, with the hexadecimal value of the byte.
- When 'display' contains "uhex" all unprintable characters are
- displayed as <xx>.
- The NonText highlighting will be used for unprintable characters.
- |hl-NonText|
- Multi-byte characters 256 and above are always included, only the
- characters up to 255 are specified with this option. When a character
- is printable but it is not available in the current font, a
- replacement character will be shown.
- Unprintable and zero-width Unicode characters are displayed as <xxxx>.
- There is no option to specify these characters.
- *'joinspaces'* *'js'* *'nojoinspaces'* *'nojs'*
- 'joinspaces' 'js'boolean(default on)
- global
- {not in Vi}
- Insert two spaces after a '.', '?' and '!' with a join command.
- When 'cpoptions' includes the 'j' flag, only do this after a '.'.
- Otherwise only one space is inserted.
- NOTE: This option is set when 'compatible' is set.
- *'key'*
- 'key'string(default "")
- local to buffer
- {not in Vi}
- The key that is used for encrypting and decrypting the current buffer.
- See |encryption|.
- Careful: Do not set the key value by hand, someone might see the typed
- key. Use the |:X| command. But you can make 'key' empty:
- :set key=
- It is not possible to get the value of this option with ":set key" or
- "echo &key". This is to avoid showing it to someone who shouldn't
- know. It also means you cannot see it yourself once you have set it,
- be careful not to make a typing error!
- *'keymap'* *'kmp'* *E544*
- 'keymap' 'kmp'string(default "")
- local to buffer
- {not in Vi}
- {only available when compiled with the |+keymap|
- feature}
- Name of a keyboard mapping. See |mbyte-keymap|.
- Setting this option to a valid keymap name has the side effect of
- setting 'iminsert' to one, so that the keymap becomes effective.
- 'imsearch' is also set to one, unless it was -1
- *'keymodel'* *'km'*
- 'keymodel' 'km'string(default "")
- global
- {not in Vi}
- List of comma separated words, which enable special things that keys
- can do. These values can be used:
- startselUsing a shifted special key starts selection (either
- Select mode or Visual mode, depending on "key" being
- present in 'selectmode').
- stopselUsing a not-shifted special key stops selection.
- Special keys in this context are the cursor keys, <End>, <Home>,
- <PageUp> and <PageDown>.
- The 'keymodel' option is set by the |:behave| command.
- *'keywordprg'* *'kp'*
- 'keywordprg' 'kp'string(default "man" or "man -s", DOS: ":help",
- OS/2: "view /", VMS: "help")
- global or local to buffer |global-local|
- {not in Vi}
- Program to use for the |K| command. Environment variables are
- expanded |:set_env|. ":help" may be used to access the Vim internal
- help. (Note that previously setting the global option to the empty
- value did this, which is now deprecated.)
- When "man" is used, Vim will automatically translate a count for the
- "K" command to a section number. Also for "man -s", in which case the
- "-s" is removed when there is no count.
- See |option-backslash| about including spaces and backslashes.
- Example:
- :set keywordprg=man\ -s
- This option cannot be set from a |modeline|, for security reasons.
- *'langmap'* *'lmap'* *E357* *E358*
- 'langmap' 'lmap'string(default "")
- global
- {not in Vi}
- {only available when compiled with the |+langmap|
- feature}
- This option allows switching your keyboard into a special language
- mode.When you are typing text in Insert mode the characters are
- inserted directly. When in command mode the 'langmap' option takes
- care of translating these special characters to the original meaning
- of the key. This means you don't have to change the keyboard mode to
- be able to execute Normal mode commands.
- This is the opposite of the 'keymap' option, where characters are
- mapped in Insert mode.
- This only works for 8-bit characters. The value of 'langmap' may be
- specified with multi-byte characters (e.g., UTF-8), but only the lower
- 8 bits of each character will be used.
- Example (for Greek):*greek*
- :set langmap=罙,翨,谻,腄,臙,諪,肎,荋,蒊,蜫,蔏,薒,蘉,蚇,螼,蠵,QQ,裄,覵,訲,萓,賄,WW,譞,誝,芞,醓,鈈,鴆,鋎,錯,鰂,鉭,鏷,閕,頹,阫,雔,靘,韓,飋,餻,qq,駌,髎,魌,鑥,鵹,騱,鱴,鮵,鎧
- <Example (exchanges meaning of z and y for commands):
- :set langmap=zy,yz,ZY,YZ
- The 'langmap' option is a list of parts, separated with commas. Each
- part can be in one of two forms:
- 1. A list of pairs. Each pair is a "from" character immediately
- followed by the "to" character. Examples: "aA", "aAbBcC".
- 2. A list of "from" characters, a semi-colon and a list of "to"
- characters. Example: "abc;ABC"
- Example: "aA,fgh;FGH,cCdDeE"
- Special characters need to be preceded with a backslash. These are
- ";", ',' and backslash itself.
- This will allow you to activate vim actions without having to switch
- back and forth between the languages. Your language characters will
- be understood as normal vim English characters (according to the
- langmap mappings) in the following cases:
- o Normal/Visual mode (commands, buffer/register names, user mappings)
- o Insert/Replace Mode: Register names after CTRL-R
- o Insert/Replace Mode: Mappings
- Characters entered in Command-line mode will NOT be affected by
- this option. Note that this option can be changed at any time
- allowing to switch between mappings for different languages/encodings.
- Use a mapping to avoid having to type it each time!
- *'langmenu'* *'lm'*
- 'langmenu' 'lm'string(default "")
- global
- {not in Vi}
- {only available when compiled with the |+menu| and
- |+multi_lang| features}
- Language to use for menu translation. Tells which file is loaded
- from the "lang" directory in 'runtimepath':
- "lang/menu_" . &langmenu . ".vim"
- (without the spaces). For example, to always use the Dutch menus, no
- matter what $LANG is set to:
- :set langmenu=nl_NL.ISO_8859-1
- When 'langmenu' is empty, |v:lang| is used.
- If your $LANG is set to a non-English language but you do want to use
- the English menus:
- :set langmenu=none
- This option must be set before loading menus, switching on filetype
- detection or syntax highlighting. Once the menus are defined setting
- this option has no effect. But you could do this:
- :source $VIMRUNTIME/delmenu.vim
- :set langmenu=de_DE.ISO_8859-1
- :source $VIMRUNTIME/menu.vim
- Warning: This deletes all menus that you defined yourself!
- *'laststatus'* *'ls'*
- 'laststatus' 'ls'number(default 1)
- global
- {not in Vi}
- The value of this option influences when the last window will have a
- status line:
- 0: never
- 1: only if there are at least two windows
- 2: always
- The screen looks nicer with a status line if you have several
- windows, but it takes another screen line. |status-line|
- *'lazyredraw'* *'lz'* *'nolazyredraw'* *'nolz'*
- 'lazyredraw' 'lz'boolean(default off)
- global
- {not in Vi}
- When this option is set, the screen will not be redrawn while
- executing macros, registers and other commands that have not been
- typed.To force an update use |:redraw|.
- *'linebreak'* *'lbr'* *'nolinebreak'* *'nolbr'*
- 'linebreak' 'lbr'boolean(default off)
- local to window
- {not in Vi}
- {not available when compiled without the |+linebreak|
- feature}
- If on Vim will wrap long lines at a character in 'breakat' rather
- than at the last character that fits on the screen. Unlike
- 'wrapmargin' and 'textwidth', this does not insert <EOL>s in the file,
- it only affects the way the file is displayed, not its contents. The
- value of 'showbreak' is used to put in front of wrapped lines.This
- option is not used when the 'wrap' option is off or 'list' is on.
- Note that <Tab> characters after an <EOL> are mostly not displayed
- with the right amount of white space.
- *'lines'* *E593*
- 'lines'number(default 24 or terminal height)
- global
- Number of lines in the display. Normally you don't need to set this.
- That is done automatically by the terminal initialization code.
- When Vim is running in the GUI or in a resizable window, setting this
- option will cause the window size to be changed. When you only want
- to use the size for the GUI, put the command in your |gvimrc| file.
- When you set this option and Vim is unable to change the physical
- number of lines of the display, the display may be messed up.
- *'linespace'* *'lsp'*
- 'linespace' 'lsp'number(default 0, 1 for Win32 GUI)
- global
- {not in Vi}
- {only in the GUI}
- Number of pixel lines inserted between characters. Useful if the font
- uses the full character cell height, making lines touch each other.
- When non-zero there is room for underlining.
- *'lisp'* *'nolisp'*
- 'lisp'boolean(default off)
- local to buffer
- {not available when compiled without the |+lispindent|
- feature}
- Lisp mode: When <Enter> is typed in insert mode set the indent for
- the next line to Lisp standards (well, sort of). Also happens with
- "cc" or "S". 'autoindent' must also be on for this to work. The 'p'
- flag in 'cpoptions' changes the method of indenting: Vi compatible or
- better. Also see 'lispwords'.
- The '-' character is included in keyword characters. Redefines the
- "=" operator to use this same indentation algorithm rather than
- calling an external program if 'equalprg' is empty.
- This option is not used when 'paste' is set.
- {Vi: Does it a little bit differently}
- *'lispwords'* *'lw'*
- 'lispwords' 'lw'string(default is very long)
- global
- {not in Vi}
- {not available when compiled without the |+lispindent|
- feature}
- Comma separated list of words that influence the Lisp indenting.
- |'lisp'|
- *'list'* *'nolist'*
- 'list'boolean(default off)
- local to window
- List mode: Show tabs as CTRL-I, show end of line with $. Useful to
- see the difference between tabs and spaces and for trailing blanks.
- Note that this will also affect formatting (set with 'textwidth' or
- 'wrapmargin') when 'cpoptions' includes 'L'. See 'listchars' for
- changing the way tabs are displayed.
- *'listchars'* *'lcs'*
- 'listchars' 'lcs'string(default "eol:$")
- global
- {not in Vi}
- Strings to use in 'list' mode.It is a comma separated list of string
- settings.
- eol:cCharacter to show at the end of each line. When
- omitted, there is no extra character at the end of the
- line.
- tab:xyTwo characters to be used to show a Tab. The first
- char is used once. The second char is repeated to
- fill the space that the Tab normally occupies.
- "tab:>-" will show a Tab that takes four spaces as
- ">---". When omitted, a Tab is show as ^I.
- trail:cCharacter to show for trailing spaces.When omitted,
- trailing spaces are blank.
- extends:cCharacter to show in the last column, when 'wrap' is
- off and the line continues beyond the right of the
- screen.
- precedes:cCharacter to show in the first column, when 'wrap'
- is off and there is text preceeding the character
- visible in the first column.
- The characters ':' and ',' should not be used.UTF-8 characters can
- be used when 'encoding' is "utf-8", otherwise only printable
- characters are allowed.
- Examples:
- :set lcs=tab:>-,trail:-
- :set lcs=tab:>-,eol:<
- :set lcs=extends:>,precedes:<
- The "NonText" highlighting will be used for "eol", "extends" and
- "precedes". "SpecialKey" for "tab" and "trail".
- *'lpl'* *'nolpl'* *'loadplugins'* *'noloadplugins'*
- 'loadplugins' 'lpl'boolean(default on)
- global
- {not in Vi}
- When on the plugin scripts are loaded when starting up |load-plugins|.
- This option can be reset in your |vimrc| file to disable the loading
- of plugins.
- Note that using the "-u NONE" and "--noplugin" command line arguments
- reset this option. |-u| |--noplugin|
- *'magic'* *'nomagic'*
- 'magic'boolean(default on)
- global
- Changes the special characters that can be used in search patterns.
- See |pattern|.
- NOTE: To avoid portability problems with using patterns, always keep
- this option at the default "on". Only switch it off when working with
- old Vi scripts. In any other situation write patterns that work when
- 'magic' is on.
- *'makeef'* *'mef'*
- 'makeef' 'mef'string(default: "")
- global
- {not in Vi}
- {not available when compiled without the |+quickfix|
- feature}
- Name of the errorfile for the |:make| command (see |:make_makeprg|)
- and the |:grep| command.
- When it is empty, an internally generated temp file will be used.
- When "##" is included, it is replaced by a number to make the name
- unique. This makes sure that the ":make" command doesn't overwrite an
- existing file.
- NOT used for the ":cf" command. See 'errorfile' for that.
- Environment variables are expanded |:set_env|.
- See |option-backslash| about including spaces and backslashes.
- This option cannot be set from a |modeline|, for security reasons.
- *'makeprg'* *'mp'*
- 'makeprg' 'mp'string(default "make", VMS: "MMS")
- global or local to buffer |global-local|
- {not in Vi}
- Program to use for the ":make" command. See |:make_makeprg|. This
- option may contain '%' and '#' characters, which are expanded like
- when used in a command-line. Environment variables are expanded
- |:set_env|. See |option-backslash| about including spaces and
- backslashes. Note that a '|' must be escaped twice: once for ":set"
- and once for the interpretation of a command. When you use a filter
- called "myfilter" do it like this:
- :set makeprg=gmake\ \\\|\ myfilter
- The placeholder "$*" can be given (even multiple times) to specify
- where the arguments will be included, for example:
- :set makeprg=latex\ \\\\nonstopmode\ \\\\input\\{$*}
- This option cannot be set from a |modeline|, for security reasons.
- *'matchpairs'* *'mps'*
- 'matchpairs' 'mps'string(default "(:),{:},[:]")
- local to buffer
- {not in Vi}
- Characters that form pairs. The |%| command jumps from one to the
- other.Currently only single character pairs are allowed, and they
- must be different. The characters must be separated by a colon. The
- pairs must be separated by a comma. Example for including '<' and '>'
- (HTML):
- :set mps+=<:>
- A more exotic example, to jump between the '=' and ';' in an
- assignment, useful for languages like C and Java:
- :au FileType c,cpp,java set mps+==:;
- For a more advanced way of using "%", see the matchit.vim plugin in
- the $VIMRUNTIME/macros directory. |add-local-help|
- *'matchtime'* *'mat'*
- 'matchtime' 'mat'number(default 5)
- global
- {not in Vi}{in Nvi}
- Tenths of a second to show the matching paren, when 'showmatch' is
- set. Note that this is not in milliseconds, like other options that
- set a time. This is to be compatible with Nvi.
- *'maxfuncdepth'* *'mfd'*
- 'maxfuncdepth' 'mfd'number(default 100)
- global
- {not in Vi}
- Maximum depth of function calls for user functions. This normally
- catches endless recursion. When using a recursive function with
- more depth, set 'maxfuncdepth' to a bigger number. But this will use
- more memory, there is the danger of failing when memory is exhausted.
- See also |:function|.
- *'maxmapdepth'* *'mmd'* *E223*
- 'maxmapdepth' 'mmd'number(default 1000)
- global
- {not in Vi}
- Maximum number of times a mapping is done without resulting in a
- character to be used. This normally catches endless mappings, like
- ":map x y" with ":map y x". It still does not catch ":map g wg",
- because the 'w' is used before the next mapping is done. See also
- |key-mapping|.
- *'maxmem'* *'mm'*
- 'maxmem' 'mm'number(default between 256 to 5120 (system
- dependent) or half the amount of memory
- available)
- global
- {not in Vi}
- Maximum amount of memory (in Kbyte) to use for one buffer. When this
- limit is reached allocating extra memory for a buffer will cause
- other memory to be freed. Maximum value 2000000. Use this to work
- without a limit. Also see 'maxmemtot'.
- *'maxmemtot'* *'mmt'*
- 'maxmemtot' 'mmt'number(default between 2048 and 10240 (system
- dependent) or half the amount of memory
- available)
- global
- {not in Vi}
- Maximum amount of memory (in Kbyte) to use for all buffers together.
- Maximum value 2000000.Use this to work without a limit. Also see
- 'maxmem'.
- *'menuitems'* *'mis'*
- 'menuitems' 'mis'number(default 25)
- global
- {not in Vi}
- {not available when compiled without the |+menu|
- feature}
- Maximum number of items to use in a menu. Used for menus that are
- generated from a list of items, e.g., the Buffers menu. Changing this
- option has no direct effect, the menu must be refreshed first.
- *'modeline'* *'ml'* *'nomodeline'* *'noml'*
- 'modeline' 'ml'boolean(Vim default: on, Vi default: off)
- local to buffer
- *'modelines'* *'mls'*
- 'modelines' 'mls'number(default 5)
- global
- {not in Vi}
- If 'modeline' is on 'modelines' gives the number of lines that is
- checked for set commands. If 'modeline' is off or 'modelines' is zero
- no lines are checked. See |modeline|.
- NOTE: 'modeline' is set to the Vi default value when 'compatible' is
- set and to the Vim default value when 'compatible' is reset.
- *'modifiable'* *'ma'* *'nomodifiable'* *'noma'*
- 'modifiable' 'ma'boolean(default on)
- local to buffer
- {not in Vi}*E21*
- When off the buffer contents cannot be changed. The 'fileformat' and
- 'fileencoding' options also can't be changed.
- Can be reset with the |-M| command line argument.
- *'modified'* *'mod'* *'nomodified'* *'nomod'*
- 'modified' 'mod'boolean(default off)
- local to buffer
- {not in Vi}
- When on, the buffer is considered to be modified. This option is set
- when:
- 1. A change was made to the text since it was last written. Using the
- |undo| command to go back to the original text will reset the
- option. But undoing changes that were made before writing the
- buffer will set the option again, since the text is different from
- when it was written.
- 2. 'fileformat' or 'fileencoding' is different from its original
- value. The original value is set when the buffer is read or
- written. A ":set nomodified" command also resets the original
- values to the current values and the 'modified' option will be
- reset.
- When 'buftype' is "nowrite" or "nofile" this option may be set, but
- will be ignored.
- *'more'* *'nomore'*
- 'more'boolean(Vim default: on, Vi default: off)
- global
- {not in Vi}
- When on, listings pause when the whole screen is filled. You will get
- the |more-prompt|. When this option is off there are no pauses, the
- listing continues until finished.
- NOTE: This option is set to the Vi default value when 'compatible' is
- set and to the Vim default value when 'compatible' is reset.
- *'mouse'* *E538*
- 'mouse'string(default "", "a" for GUI, MS-DOS and Win32)
- global
- {not in Vi}
- Enable the use of the mouse. Only works for certain terminals
- (xterm, MS-DOS, Win32 |win32-mouse|, qnx pterm, and Linux console
- with gpm). For using the mouse in the GUI, see |gui-mouse|.
- The mouse can be enabled for different modes:
- nNormal mode
- vVisual mode
- iInsert mode
- cCommand-line mode
- hall previous modes when editing a help file
- aall previous modes
- rfor |hit-enter| and |more-prompt| prompt
- Aauto-select in Visual mode
- Normally you would enable the mouse in all four modes with:
- :set mouse=a
- When the mouse is not enabled, the GUI will still use the mouse for
- modeless selection. This doesn't move the text cursor.
- See |mouse-using|. Also see |'clipboard'|.
- Note: When enabling the mouse in a terminal, copy/paste will use the
- "* register if there is access to an X-server.The xterm handling of
- the mouse buttons can still be used by keeping the shift key pressed.
- Also see the 'clipboard' option.
- *'mousefocus'* *'mousef'* *'nomousefocus'* *'nomousef'*
- 'mousefocus' 'mousef'boolean(default off)
- global
- {not in Vi}
- {only works in the GUI}
- The window that the mouse pointer is on is automatically activated.
- When changing the window layout or window focus in another way, the
- mouse pointer is moved to the window with keyboard focus. Off is the
- default because it makes using the pull down menus a little goofy, as
- a pointer transit may activate a window unintentionally.
- *'mousehide'* *'mh'* *'nomousehide'* *'nomh'*
- 'mousehide' 'mh'boolean(default on)
- global
- {not in Vi}
- {only works in the GUI}
- When on, the mouse pointer is hidden when characters are typed.
- The mouse pointer is restored when the mouse is moved.
- *'mousemodel'* *'mousem'*
- 'mousemodel' 'mousem'string(default "extend", "popup" for MS-DOS and Win32)
- global
- {not in Vi}
- Sets the model to use for the mouse. The name mostly specifies what
- the right mouse button is used for:
- extendRight mouse button extends a selection. This works
- like in an xterm.
- popupRight mouse button pops up a menu. The shifted left
- mouse button extends a selection. This works like
- with Microsoft Windows
- popup_setpos Like "popup", but the cursor will be moved to the
- position where the mouse was clicked, and thus the
- selected operation will act upon the clicked object.
- If clicking inside a selection, that selection will
- be acted upon, ie. no cursor move. This implies of
- course, that right clicking outside a selection will
- end Visual mode.
- Overview of what button does what for each model:
- mouse extendpopup(_setpos)
- left click place cursorplace cursor
- left drag start selectionstart selection
- shift-left search wordextend selection
- right click extend selectionpopup menu (place cursor)
- right drag extend selection-
- middle click pastepaste
- In the "popup" model the right mouse button produces a pop-up menu.
- You need to define this first, see |popup-menu|.
- Note that you can further refine the meaning of buttons with mappings.
- See |gui-mouse-mapping|. But mappings are NOT used for modeless
- selection (because that's handled in the GUI code directly).
- The 'mousemodel' option is set by the |:behave| command.
- *'mouseshape'* *'mouses'* *E547*
- 'mouseshape' 'mouses'string(default "i:beam,r:beam,s:updown,sd:cross,
- m:no,ml:up-arrow,v:rightup-arrow"
- global
- {not in Vi}
- {only available when compiled with the |+mouseshape|
- feature}
- This option tells Vim what the mouse pointer should look like in
- different modes. The option is a comma separated list of parts, much
- like used for 'guicursor'. Each part consist of a mode/location-list
- and an argument-list:
- mode-list:shape,mode-list:shape,..
- The mode-list is a dash separated list of these modes/locations:
- In a normal window:
- nNormal mode
- vVisual mode
- veVisual mode with 'selection' "exclusive" (same as 'v',
- if not specified)
- oOperator-pending mode
- iInsert mode
- rReplace mode
- Others:
- cappending to the command-line
- ciinserting in the command-line
- crreplacing in the command-line
- mat the 'Hit ENTER' or 'More' prompts
- mlidem, but cursor in the last line
- eany mode, pointer below last window
- sany mode, pointer on a status line
- sdany mode, while dragging a status line
- vsany mode, pointer on a vertical separator line
- vdany mode, while dragging a vertical separator line
- aeverywhere
- The shape is one of the following:
- availnamelooks like
- w xarrowNormal mouse pointer
- w xblankno pointer at all (use with care!)
- w xbeamI-beam
- w xupdownup-down sizing arrows
- w xleftrightleft-right sizing arrows
- w xbusyThe system's usual busy pointer
- w xnoThe system's usual 'no input' pointer
- xudsizingindicates up-down resizing
- xlrsizingindicates left-right resizing
- xcrosshairlike a big thin +
- xhand1black hand
- xhand2white hand
- xpencilwhat you write with
- xquestionbig ?
- xrightup-arrowarrow pointing right-up
- w xup-arrowarrow pointing up
- x<number>any X11 pointer number (see X11/cursorfont.h)
- The "avail" column contains a 'w' if the shape is available for Win32,
- x for X11.
- Any modes not specifed or shapes not available use the normal mouse
- pointer.
- Example:
- :set mouseshape=s:udsizing,m:no
- will make the mouse turn to a sizing arrow over the status lines and
- indicate no input when the hit-enter prompt is displayed (since
- clicking the mouse has no effect in this state.)
- *'mousetime'* *'mouset'*
- 'mousetime' 'mouset'number(default 500)
- global
- {not in Vi}
- Only for GUI, MS-DOS, Win32 and Unix with xterm. Defines the maximum
- time in msec between two mouse clicks for the second click to be
- recognized as a multi click.
- *'nrformats'* *'nf'*
- 'nrformats' 'nf'string(default "octal,hex")
- local to buffer
- {not in Vi}
- This defines what bases Vim will consider for numbers when using the
- CTRL-A and CTRL-X commands for adding to and subtracting from a number
- respectively; see |CTRL-A| for more info on these commands.
- alphaif included, single alphabetical characters will be
- incremented or decremented. This is useful for a list with a
- letter index a), b), etc.
- octalif included, numbers that start with a zero will be considered
- to be octal. Example: Using CTRL-A on "007" results in "010".
- hexif included, numbers starting with "0x" or "0X" will be
- considered to be hexadecimal. Example: Using CTRL-X on
- "0x100" results in "0x0ff".
- Numbers which simply begin with a digit in the range 1-9 are always
- considered decimal. This also happens for numbers that are not
- recognized as octal or hex.
- *'number'* *'nu'* *'nonumber'* *'nonu'*
- 'number' 'nu'boolean(default off)
- local to window
- Print the line number in front of each line. When the 'n' option is
- excluded from 'cpoptions' a wrapped line will not use the column of
- line numbers (this is the default when 'compatible' isn't set).
- When a long, wrapped line doesn't start with the first character, '-'
- characters are put before the number.
- See |hl-LineNr| for the highlighting used for the number.
- *'osfiletype'* *'oft'* *E366*
- 'osfiletype' 'oft'string (RISC-OS default: "Text",
- others default: "")
- local to buffer
- {not in Vi}
- {only available when compiled with the |+osfiletype|
- feature}
- Some operating systems store extra information about files besides
- name, datestamp and permissions. This option contains the extra
- information, the nature of which will vary between systems.
- The value of this option is usually set when the file is loaded, and
- use to set the file type when file is written.
- It can affect the pattern matching of the automatic commands.
- |autocmd-osfiletypes|
- *'paragraphs'* *'para'*
- 'paragraphs' 'para'string(default "IPLPPPQPP LIpplpipbp")
- global
- Specifies the nroff macros that separate paragraphs. These are pairs
- of two letters (see |object-motions|).
- *'paste'* *'nopaste'*
- 'paste'boolean(default off)
- global
- {not in Vi}
- Put Vim in Paste mode.This is useful if you want to cut or copy
- some text from one window and paste it in Vim.This will avoid
- unexpected effects.
- Setting this option is useful when using Vim in a terminal, where Vim
- cannot distinguish between typed text and pasted text.In the GUI, Vim
- knows about pasting and will mostly do the right thing without 'paste'
- being set. The same is true for a terminal where Vim handles the
- mouse clicks itself.
- When the 'paste' option is switched on (also when it was already on):
- - mapping in Insert mode and Command-line mode is disabled
- - abbreviations are disabled
- - 'textwidth' is set to 0
- - 'wrapmargin' is set to 0
- - 'autoindent' is reset
- - 'smartindent' is reset
- - 'softtabstop' is set to 0
- - 'revins' is reset
- - 'ruler' is reset
- - 'showmatch' is reset
- - 'formatoptions' is used like it is empty
- These options keep their value, but their effect is disabled:
- - 'lisp'
- - 'indentexpr'
- - 'cindent'
- NOTE: When you start editing another file while the 'paste' option is
- on, settings from the modelines or autocommands may change the
- settings again, causing trouble when pasting text. You might want to
- set the 'paste' option again.
- When the 'paste' option is reset the mentioned options are restored to
- the value before the moment 'paste' was switched from off to on.
- Resetting 'paste' before ever setting it does not have any effect.
- Since mapping doesn't work while 'paste' is active, you need to use
- the 'pastetoggle' option to toggle the 'paste' option with some key.
- *'pastetoggle'* *'pt'*
- 'pastetoggle' 'pt'string(default "")
- global
- {not in Vi}
- When non-empty, specifies the key sequence that toggles the 'paste'
- option. This is like specifying a mapping:
- :map {keys} :set invpaste<CR>
- Where {keys} is the value of 'pastetoggle'.
- The difference is that it will work even when 'paste' is set.
- 'pastetoggle' works in Insert mode and Normal mode, but not in
- Command-line mode.
- Mappings are checked first, thus overrule 'pastetoggle'. However,
- when 'paste' is on mappings are ignored in Insert mode, thus you can do
- this:
- :map <F10> :set paste<CR>
- :map <F11> :set nopaste<CR>
- :imap <F10> <C-O>:set paste<CR>
- :imap <F11> <nop>
- :set pastetoggle=<F11>
- This will make <F10> start paste mode and <F11> stop paste mode.
- Note that typing <F10> in paste mode inserts "<F10>", since in paste
- mode everything is inserted literally, except the 'pastetoggle' key
- sequence.
- *'pex'* *'patchexpr'*
- 'patchexpr' 'pex'string(default "")
- global
- {not in Vi}
- {not available when compiled without the |+diff|
- feature}
- Expression which is evaluated to apply a patch to a file and generate
- the resulting new version of the file.See |diff-patchexpr|.
- *'patchmode'* *'pm'* *E206*
- 'patchmode' 'pm'string(default "")
- global
- {not in Vi}
- When non-empty the oldest version of a file is kept. This can be used
- to keep the original version of a file if you are changing files in a
- source distribution. Only the first time that a file is written a
- copy of the original file will be kept. The name of the copy is the
- name of the original file with the string in the 'patchmode' option
- appended. This option should start with a dot. Use a string like
- ".org". 'backupdir' must not be empty for this to work (Detail: The
- backup file is renamed to the patchmode file after the new file has
- been successfully written, that's why it must be possible to write a
- backup file). If there was no file to be backed up, an empty file is
- created.
- When the 'backupskip' pattern matches, a patchmode file is not made.
- Using 'patchmode' for compressed files appends the extension at the
- end (e.g., "file.gz.orig"), thus the resulting name isn't always
- recognized as a compressed file.
- *'path'* *'pa'* *E343* *E345* *E347*
- 'path' 'pa'string(default on Unix: ".,/usr/include,,"
- on OS/2: ".,/emx/include,,"
- other systems: ".,,")
- global or local to buffer |global-local|
- {not in Vi}
- This is a list of directories which will be searched when using the
- |gf|, [f, ]f, ^Wf, |:find| and other commands, provided that the file
- being searched for has a relative path (not starting with '/'). The
- directories in the 'path' option may be relative or absolute.
- - Use commas to separate directory names:
- :set path=.,/usr/local/include,/usr/include
- - Spaces can also be used to separate directory names (for backwards
- compatibility with version 3.0). To have a space in a directory
- name, precede it with an extra backslash, and escape the space:
- :set path=.,/dir/with\\\ space
- - To include a comma in a directory name precede it with an extra
- backslash:
- :set path=.,/dir/with\\,comma
- <- To search relative to the directory of the current file, use:
- :set path=.
- - To search in the current directory use an empty string between two
- commas:
- :set path=,,
- - A directory name may end in a ':' or '/'.
- - Environment variables are expanded |:set_env|.
- - When using |netrw.vim| URLs can be used. For example, adding
- "http://www.vim.org" will make ":find index.html" work.
- - Search upwards and downwards in a directory tree:
- 1) "*" matches a sequence of characters, e.g.:
- :set path=/usr/include/*
- means all subdirectories in /usr/include (but not /usr/include
- itself).
- :set path=/usr/*c
- matches /usr/doc and /usr/src.
- 2) "**" matches a subtree, up to 100 directories deep. Example:
- :set path=/home/user_x/src/**
- means search in the whole subtree under "/home/usr_x/src".
- 3) If the path ends with a ';', this path is the startpoint
- for upward search.
- See |file-searching| for more info and exact syntax.
- {not available when compiled without the |+path_extra| feature}
- - Careful with '\' characters, type two to get one in the option:
- :set path=.,c:\\include
- < Or just use '/' instead:
- :set path=.,c:/include
- Don't forget "." or files won't even be found in the same directory as
- the file!
- The maximum length is limited.How much depends on the system, mostly
- it is something like 256 or 1024 characters.
- You can check if all the include files are found, using the value of
- 'path', see |:checkpath|.
- The use of |:set+=| and |:set-=| is preferred when adding or removing
- directories from the list. This avoids problems when a future version
- uses another default. To remove the current directory use:
- :set path-=
- <To add the current directory use:
- :set path+=
- To use an environment variable, you probably need to replace the
- separator. Here is an example to append $INCL, in which directory
- names are separated with a semi-colon:
- :let &path = &path . "," . substitute($INCL, ';', ',', 'g')
- Replace the ';' with a ':' or whatever separator is used. Note that
- this doesn't work when $INCL contains a comma or white space.
- *'preserveindent'* *'pi'* *'nopreserveindent'* *'nopi'*
- 'preserveindent' 'pi'boolean(default off)
- local to buffer
- {not in Vi}
- When changing the indent of the current line, preserve as much of the
- indent structure as possible. Normally the indent is replaced by a
- series of tabs followed by spaces as required (unless |'expandtab'| is
- enabled, in which case only spaces are used). Enabling this option
- means the indent will preserve as many existing characters as possible
- for indenting, and only add additional tabs or spaces as required.
- NOTE: When using ">>" multiple times the resulting indent is a mix of
- tabs and spaces. You might not like this.
- NOTE: 'preserveindent' is reset when 'compatible' is set.
- Also see 'copyindent'.
- Use |:retab| to clean up white space.
- *'previewheight'* *'pvh'*
- 'previewheight' 'pvh'number (default 12)
- global
- {not in Vi}
- {not available when compiled without the |+windows| or
- |+quickfix| feature}
- Default height for a preview window. Used for |:ptag| and associated
- commands. Used for |CTRL-W_}| when no count is given.
- *'previewwindow'* *'nopreviewwindow'*
- *'pvw'* *'nopvw'* *E590*
- 'previewwindow' 'pvw'boolean (default off)
- local to window
- {not in Vi}
- {not available when compiled without the |+windows| or
- |+quickfix| feature}
- Identifies the preview window.Only one window can have this option
- set. It's normally not set directly, but by using one of the commands
- |:ptag|, |:pedit|, etc.
- *'printdevice'* *'pdev'*
- 'printdevice' 'pdev'string(default empty)
- global
- {not in Vi}
- {only available when compiled with the |+printer|
- feature}
- This defines the name of the printer to be used when the |:hardcopy|
- command is issued with a bang (!) to skip the printer selection
- dialog. On Win32, it should be the printer name exactly as it appears
- in the standard printer dialog.
- If the option is empty, then vim will use the system default printer
- for ":hardcopy!"
- *'printencoding'* *'penc'* *E620*
- 'printencoding' 'penc'String(default empty, except for:
- Windows, OS/2: cp1252,
- Macintosh: mac-roman,
- VMS: dec-mcs,
- HPUX: hp-roman8,
- EBCDIC: ebcdic-uk)
- global
- {not in Vi}
- {only available when compiled with the |+printer|
- and |+postscript| features}
- Sets the character encoding used when printing. This option tells VIM
- which print character encoding file from the "print" directory in
- 'runtimepath' to use.
- This option will accept any value from |encoding-names|. Any
- recognized names are converted to VIM standard names - see 'encoding'
- for more details. Names not recognized by VIM will just be converted
- to lower case and underscores replaced with '-' signs.
- If 'printencoding' is empty or VIM cannot find the file then it will
- use 'encoding' (if VIM is compiled with |+multi_byte| and it is set an
- 8-bit encoding) to find the print character encoding file. If VIM is
- unable to find a character encoding file then it will use the "latin1"
- print character encoding file.
- When 'encoding' is set to a multi-byte encoding, VIM will try to
- convert characters to the printing encoding for printing (if
- 'printencoding' is empty then the conversion will be to latin1).
- Conversion to a printing encoding other than latin1 will require VIM
- to be compiled with the |+iconv| feature. If no conversion is
- possible then printing will fail. Any characters that cannot be
- converted will be replaced with upside down question marks.
- Four print character encoding files are provided to support default
- Mac, VMS, HPUX, and EBCDIC character encodings and are used by default
- on these platforms. Code page 1252 print character encoding is used
- by default on Windows and OS/2 platforms.
- *'printexpr'* *'pexpr'*
- 'printexpr' 'pexpr'String(default: see below)
- global
- {not in Vi}
- {only available when compiled with the |+printer|
- and |+postscript| features}
- Expression that is evaluated to print the PostScript produced with
- ":hardcopy".
- The file name to be printed is in |v:fname_in|.
- The arguments to the ":hardcopy" command are in |v:cmdarg|.
- The expression must take care of deleting the file after printing it.
- When there is an error, the expression must return a non-zero number.
- If there is no error, return zero or an empty string.
- The default for non MS-Windows or VMS systems is to simply use "lpr"
- to print the file:
- system('lpr' . (&printdevice == '' ? '' : ' -P' . &printdevice)
- . ' ' . v:fname_in) . delete(v:fname_in) + v:shell_error
- On MS-Windows machines the default is to copy the file to the
- currently specified printdevice:
- system('copy' . ' ' . v:fname_in . ' "' . &printdevice . '"')
- . delete(v:fname_in)
- On VMS machines the default is to send the file to either the default
- or currently specified printdevice:
- system('print' . (&printdevice == '' ? '' : ' /queue=' .
- &printdevice) . ' ' . v:fname_in) . delete(v:fname_in)
- If you change this option, using a function is an easy way to avoid
- having to escape all the spaces. Example:
- :set printexpr=PrintFile(v:fname_in)
- :function PrintFile(fname)
- : call system("ghostview " . a:fname)
- : call delete(a:fname)
- : return v:shell_error
- :endfunc
- Be aware that some print programs return control before they have read
- the file. If you delete the file too soon it will not be printed.
- These programs usually offer an option to have them remove the file
- when printing is done.
- *E365*
- If evaluating the expression fails or it results in a non-zero number,
- you get an error message. In that case Vim will delete the
- file. In the default value for non-MS-Windows a trick is used: Adding
- "v:shell_error" will result in a non-zero number when the system()
- call fails.
- This option cannot be set from a |modeline|, for security reasons.
- *'printfont'* *'pfn'* *E613*
- 'printfont' 'pfn'string(default "courier")
- global
- {not in Vi}
- {only available when compiled with the |+printer|
- feature}
- This is the name of the font that will be used for the |:hardcopy|
- command's output. It has the same format as the 'guifont' option,
- except that only one font may be named, and the special "guifont=*"
- syntax is not available.
- In the Win32 GUI version this specifies a font name with its extra
- attributes, as with the 'guifont' option.
- For other systems, only ":h11" is recognized, where "11" is the point
- size of the font. When omitted, the points size is 10.
- *'printheader'* *'pheader'*
- 'printheader' 'pheader' string (default "%<%f%h%m%=Page %N")
- global
- {not in Vi}
- {only available when compiled with the |+printer|
- feature}
- This defines the format of the header produced in |:hardcopy| output.
- The option is defined in the same way as the 'statusline' option.
- If Vim has not been compiled with the |+statusline| feature, this
- option has no effect and a simple default header is used, which shows
- the page number.
- *'printoptions'* *'popt'*
- 'printoptions' 'popt' string (default "")
- global
- {not in Vi}
- {only available when compiled with |+printer| feature}
- This is a comma-separated list of items that control the format of
- the output of |:hardcopy|:
- left:{spec}left margin (default: 10pc)
- right:{spec}right margin (default: 5pc)
- top:{spec}top margin (default: 5pc)
- bottom:{spec}bottom margin (default: 5pc)
- {spec} is a number followed by "in" for
- inches, "pt" for points (1 point is 1/72 of an
- inch), "mm" for millimetres or "pc" for a
- percentage of the media size.
- Weird example:
- left:2in,top:30pt,right:16mm,bottom:3pc
- If the unit is not recognized there is no
- error and the default value is used.
- header:{nr}Number of lines to reserve for the header.
- Only the first line is actually filled, thus
- when {nr} is 2 there is one empty line. The
- header is formatted according to
- 'printheader'.
- header:0Do not print a header.
- header:2 (default)Use two lines for the header
- syntax:nDo not use syntax highlighting. This is
- faster and thus useful when printing large
- files.
- syntax:yDo syntax highlighting.
- syntax:a (default)Use syntax highlighting if the printer appears
- to be able to print color or grey.
- number:yInclude line numbers in the printed output.
- number:n (default)No line numbers.
- wrap:y (default)Wrap long lines.
- wrap:nTruncate long lines.
- duplex:offPrint on one side.
- duplex:long (default)Print on both sides (when possible), bind on
- long side.
- duplex:shortPrint on both sides (when possible), bind on
- short side.
- collate:y (default)Collating: 1 2 3, 1 2 3, 1 2 3
- collate:nNo collating: 1 1 1, 2 2 2, 3 3 3
- jobsplit:n (default)Do all copies in one print job
- jobsplit:yDo each copy as a separate print job. Useful
- when doing N-up postprocessing.
- portrait:y (default)Orientation is portrait.
- portrait:nOrientation is landscape.
- *a4* *letter*
- paper:A4 (default)Paper size: A4
- paper:{name}Paper size from this table:
- {name} size in cm size in inch
- 10x14 25.4 x 35.57 10 x 14
- A3 29.7 x 42 11.69 x 16.54
- A4 21 x 29.7 8.27 x 11.69
- A5 14.8 x 21 5.83 x 8.27
- B4 25 x 35.3 10.12 x 14.33
- B5 17.6 x 25 7.17 x 10.12
- executive 18.42 x 26.67 7.25 x 10.5
- folio 21 x 33 8.27 x 13
- ledger 43.13 x 27.96 17 x 11
- legal 21.59 x 35.57 8.5 x 14
- letter 21.59 x 27.96 8.5 x 11
- quarto 21.59 x 27.5 8.5 x 10.83
- statement 13.97 x 21.59 5.5 x 8.5
- tabloid 27.96 x 43.13 11 x 17
- formfeed:n (default)Treat form feed characters (0x0c) as a normal
- print character.
- formfeed:yWhen a form feed character is encountered,
- continue printing of the current line at the
- beginning of the first line on a new page.
- The item indicated with (default) is used when the item is not
- present. The values are not always used, especially when using a
- dialog to select the printer and options.
- Example:
- :set printoptions=paper:letter,duplex:off
- *'readonly'* *'ro'* *'noreadonly'* *'noro'*
- 'readonly' 'ro'boolean(default off)
- local to buffer
- If on, writes fail unless you use a '!'. Protects you from
- accidentally overwriting a file. Default on when Vim is started
- in read-only mode ("vim -R") or when the executable is called "view".
- {not in Vi:} When using the ":view" command the 'readonly' option is
- set for the newly edited buffer. When using ":w!" the 'readonly'
- option is reset for the current buffer.
- *'remap'* *'noremap'*
- 'remap'boolean(default on)
- global
- Allows for mappings to work recursively. If you do not want this for
- a single entry, use the :noremap[!] command.
- *'report'*
- 'report'number(default 2)
- global
- Threshold for reporting number of lines changed. When the number of
- changed lines is more than 'report' a message will be given for most
- ":" commands. If you want it always, set 'report' to 0.
- For the ":substitute" command the number of substitutions is used
- instead of the number of lines.
- *'restorescreen'* *'rs'* *'norestorescreen'* *'nors'*
- 'restorescreen' 'rs'boolean(default on)
- global
- {not in Vi} {Windows 95/NT console version only}
- When set, the screen contents is restored when exiting Vim. This also
- happens when executing external commands.
- For non-Windows Vim: You can set or reset the 't_ti' and 't_te'
- options in your .vimrc. To disable restoring:
- set t_ti= t_te=
- To enable restoring (for an xterm):
- set t_ti=^[7^[[r^[[?47h t_te=^[[?47l^[8
- (Where ^[ is an <Esc>, type CTRL-V <Esc> to insert it)
- *'revins'* *'ri'* *'norevins'* *'nori'*
- 'revins' 'ri'boolean(default off)
- global
- {not in Vi}
- {only available when compiled with the |+rightleft|
- feature}
- Inserting characters in Insert mode will work backwards. See "typing
- backwards" |ins-reverse|. This option can be toggled with the CTRL-_
- command in Insert mode, when 'allowrevins' is set.
- NOTE: This option is reset when 'compatible' or 'paste' is set.
- *'rightleft'* *'rl'* *'norightleft'* *'norl'*
- 'rightleft' 'rl'boolean(default off)
- local to window
- {not in Vi}
- {only available when compiled with the |+rightleft|
- feature}
- When on, display orientation becomes right-to-left, i.e., character
- that are stored in the file appear from the right to the left.
- Using this option, it is possible to edit files for languages that
- are written from the right to the left such as Hebrew and Arabic.
- This option is per window, so it is possible to edit mixed files
- simultaneously, or to view the same file in both ways (this is
- useful whenever you have a mixed text file with both right-to-left
- and left-to-right strings so that both sets are displayed properly
- in different windows). Also see |rileft|.
- *'rightleftcmd'* *'rlc'* *'norightleftcmd'* *'norlc'*
- 'rightleftcmd' 'rlc'string(default "search")
- local to window
- {not in Vi}
- {only available when compiled with the |+rightleft|
- feature}
- Each word in this option enables the command line editing to work in
- right-to-left mode for a group of commands:
- search"/" and "?" commands
- This is useful for languages such as Hebrew, Arabic and Farsi.
- The 'rightleft' option must be set for 'rightleftcmd' to take effect.
- *'ruler'* *'ru'* *'noruler'* *'noru'*
- 'ruler' 'ru'boolean(default off)
- global
- {not in Vi}
- {not available when compiled without the
- |+cmdline_info| feature}
- Show the line and column number of the cursor position, separated by a
- comma.When there is room, the relative position of the displayed
- text in the file is shown on the far right:
- Topfirst line is visible
- Botlast line is visible
- Allfirst and last line are visible
- 45%relative position in the file
- If 'rulerformat' is set, it will determine the contents of the ruler.
- Each window has its own ruler.If a window has a status line, the
- ruler is shown there. Otherwise it is shown in the last line of the
- screen. If the statusline is given by 'statusline' (ie. not empty),
- this option takes precedence over 'ruler' and 'rulerformat'
- If the number of characters displayed is different from the number of
- bytes in the text (e.g., for a TAB or a multi-byte character), both
- the text column (byte number) and the screen column are shown,
- separated with a dash.
- For an empty line "0-1" is shown.
- For an empty buffer the line number will also be zero: "0,0-1".
- This option is reset when the 'paste' option is set.
- If you don't want to see the ruler all the time but want to know where
- you are, use "g CTRL-G" |g_CTRL-G|.
- NOTE: This option is reset when 'compatible' is set.
- *'rulerformat'* *'ruf'*
- 'rulerformat' 'ruf'string(default empty)
- global
- {not in Vi}
- {not available when compiled without the |+statusline|
- feature}
- When this option is not empty, it determines the content of the ruler
- string, as displayed for the 'ruler' option.
- The format of this option, is like that of 'statusline'.
- The default ruler width is 17 characters. To make the ruler 15
- characters wide, put "%15(" at the start and "%)" at the end.
- Example:
- :set rulerformat=%15(%c%V\ %p%%%)
- *'runtimepath'* *'rtp'* *vimfiles*
- 'runtimepath' 'rtp'string(default:
- Unix: "$HOME/.vim,
- $VIM/vimfiles,
- $VIMRUNTIME,
- $VIM/vimfiles/after,
- $HOME/.vim/after"
- Amiga: "home:vimfiles,
- $VIM/vimfiles,
- $VIMRUNTIME,
- $VIM/vimfiles/after,
- home:vimfiles/after"
- PC, OS/2: "$HOME/vimfiles,
- $VIM/vimfiles,
- $VIMRUNTIME,
- $VIM/vimfiles/after,
- $HOME/vimfiles/after"
- Macintosh: "$VIM:vimfiles,
- $VIMRUNTIME,
- $VIM:vimfiles:after"
- RISC-OS: "Choices:vimfiles,
- $VIMRUNTIME,
- Choices:vimfiles/after"
- VMS: "sys$login:vimfiles,
- $VIM/vimfiles,
- $VIMRUNTIME,
- $VIM/vimfiles/after,
- sys$login:vimfiles/after"
- global
- {not in Vi}
- This is a list of directories which will be searched for runtime
- files:
- filetype.vimfiletypes by file name |new-filetype|
- scripts.vimfiletypes by file contents |new-filetype-scripts|
- colors/color scheme files |:colorscheme|
- compiler/compiler files |:compiler|
- doc/documentation |write-local-help|
- ftplugin/filetype plugins |write-filetype-plugin|
- indent/indent scripts |indent-expression|
- keymap/key mapping files |mbyte-keymap|
- lang/menu translations |:menutrans|
- menu.vimGUI menus |menu.vim|
- plugin/plugin scripts |write-plugin|
- syntax/syntax files |mysyntaxfile|
- tutor/files for vimtutor |tutor|
- And any other file searched for with the |:runtime| command.
- The defaults for most systems are setup to search five locations:
- 1. In your home directory, for your personal preferences.
- 2. In a system-wide Vim directory, for preferences from the system
- administrator.
- 3. In $VIMRUNTIME, for files distributed with Vim.
- *after-directory*
- 4. In the "after" directory in the system-wide Vim directory. This is
- for the system administrator to overrule or add to the distributed
- defaults (rarely needed)
- 5. In the "after" directory in your home directory. This is for
- personal preferences to overrule or add to the distributed defaults
- or system-wide settings (rarely needed).
复制代码 |
|