Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update documentation files.

  • Loading branch information...
commit dee4beca2ae7bba2cc0ea8183ae7e65616734b65 1 parent 2c99695
Bram Moolenaar authored
Showing with 2,371 additions and 1,036 deletions.
  1. +10 −10 runtime/doc/autocmd.txt
  2. +46 −13 runtime/doc/change.txt
  3. +12 −13 runtime/doc/cmdline.txt
  4. +22 −3 runtime/doc/debug.txt
  5. +3 −3 runtime/doc/develop.txt
  6. +11 −6 runtime/doc/diff.txt
  7. +18 −4 runtime/doc/editing.txt
  8. +82 −63 runtime/doc/eval.txt
  9. +5 −5 runtime/doc/evim-pl.1
  10. +5 −5 runtime/doc/evim-pl.UTF-8.1
  11. +2 −2 runtime/doc/fold.txt
  12. +23 −23 runtime/doc/ft_ada.txt
  13. +52 −39 runtime/doc/ft_sql.txt
  14. +8 −6 runtime/doc/gui.txt
  15. +10 −7 runtime/doc/gui_x11.txt
  16. +6 −2 runtime/doc/hangulin.txt
  17. +1 −0  runtime/doc/help.txt
  18. +2 −2 runtime/doc/if_ole.txt
  19. +2 −2 runtime/doc/if_pyth.txt
  20. +2 −2 runtime/doc/if_ruby.txt
  21. +10 −10 runtime/doc/if_tcl.txt
  22. +3 −2 runtime/doc/indent.txt
  23. +6 −4 runtime/doc/index.txt
  24. +10 −11 runtime/doc/insert.txt
  25. +5 −1 runtime/doc/intro.txt
  26. +15 −8 runtime/doc/map.txt
  27. +24 −8 runtime/doc/mbyte.txt
  28. +8 −8 runtime/doc/message.txt
  29. +12 −11 runtime/doc/motion.txt
  30. +80 −41 runtime/doc/options.txt
  31. +3 −3 runtime/doc/os_390.txt
  32. +20 −20 runtime/doc/os_vms.txt
  33. +26 −17 runtime/doc/pattern.txt
  34. +33 −15 runtime/doc/pi_getscript.txt
  35. +453 −134 runtime/doc/pi_netrw.txt
  36. +36 −5 runtime/doc/pi_tar.txt
  37. +50 −20 runtime/doc/pi_vimball.txt
  38. +2 −2 runtime/doc/print.txt
  39. +9 −3 runtime/doc/quickfix.txt
  40. +4 −4 runtime/doc/quickref.txt
  41. +1 −1  runtime/doc/quotes.txt
  42. +2 −2 runtime/doc/recover.txt
  43. +7 −1 runtime/doc/repeat.txt
  44. +2 −2 runtime/doc/spell.txt
  45. +23 −21 runtime/doc/starting.txt
  46. +65 −22 runtime/doc/syntax.txt
  47. +80 −6 runtime/doc/tags
  48. +6 −2 runtime/doc/tagsrch.txt
  49. +16 −1 runtime/doc/term.txt
  50. +28 −2 runtime/doc/tips.txt
  51. +628 −101 runtime/doc/todo.txt
  52. +7 −6 runtime/doc/uganda.txt
  53. +5 −1 runtime/doc/undo.txt
  54. +2 −2 runtime/doc/usr_04.txt
  55. +3 −3 runtime/doc/usr_05.txt
  56. +6 −2 runtime/doc/usr_06.txt
  57. +7 −5 runtime/doc/usr_11.txt
  58. +2 −2 runtime/doc/usr_25.txt
  59. +1 −1  runtime/doc/usr_31.txt
  60. +3 −2 runtime/doc/usr_43.txt
  61. +7 −7 runtime/doc/usr_44.txt
  62. +3 −3 runtime/doc/usr_45.txt
  63. +7 −7 runtime/doc/usr_90.txt
  64. +5 −5 runtime/doc/various.txt
  65. +4 −4 runtime/doc/version5.txt
  66. +5 −5 runtime/doc/version7.txt
  67. +3 −1 runtime/doc/vim-fr.1
  68. +3 −1 runtime/doc/vim-fr.UTF-8.1
  69. +25 −22 runtime/doc/vim-pl.1
  70. +25 −22 runtime/doc/vim-pl.UTF-8.1
  71. +72 −72 runtime/doc/vim-ru.1
  72. +72 −72 runtime/doc/vim-ru.UTF-8.1
  73. +4 −4 runtime/doc/vimdiff-fr.1
  74. +4 −4 runtime/doc/vimdiff-fr.UTF-8.1
  75. +7 −7 runtime/doc/vimdiff-pl.1
  76. +7 −7 runtime/doc/vimdiff-pl.UTF-8.1
  77. +2 −2 runtime/doc/vimdiff-ru.1
  78. +2 −2 runtime/doc/vimdiff-ru.UTF-8.1
  79. +5 −1 runtime/doc/vimtutor-fr.1
  80. +5 −1 runtime/doc/vimtutor-fr.UTF-8.1
  81. +7 −4 runtime/doc/vimtutor-pl.1
  82. +7 −4 runtime/doc/vimtutor-pl.UTF-8.1
  83. +2 −2 runtime/doc/vimtutor.1
  84. +2 −2 runtime/doc/vimtutor.man
  85. +6 −4 runtime/doc/visual.txt
  86. +11 −5 runtime/doc/windows.txt
  87. +2 −2 runtime/doc/xxd-fr.1
  88. +2 −2 runtime/doc/xxd-fr.UTF-8.1
  89. +20 −20 runtime/doc/xxd-pl.1
  90. +20 −20 runtime/doc/xxd-pl.UTF-8.1
View
20 runtime/doc/autocmd.txt
@@ -1,4 +1,4 @@
-*autocmd.txt* For Vim version 7.2. Last change: 2008 Jun 27
+*autocmd.txt* For Vim version 7.2. Last change: 2009 Nov 25
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -59,10 +59,10 @@ Note: The ":autocmd" command cannot be followed by another command, since any
:au[tocmd] [group] {event} {pat} [nested] {cmd}
Add {cmd} to the list of commands that Vim will
execute automatically on {event} for a file matching
- {pat}. Vim always adds the {cmd} after existing
- autocommands, so that the autocommands execute in the
- order in which they were given. See |autocmd-nested|
- for [nested].
+ {pat} |autocmd-patterns|.
+ Vim always adds the {cmd} after existing autocommands,
+ so that the autocommands execute in the order in which
+ they were given. See |autocmd-nested| for [nested].
The special pattern <buffer> or <buffer=N> defines a buffer-local autocommand.
See |autocmd-buflocal|.
@@ -551,7 +551,7 @@ FileChangedShell When Vim notices that the modification time of
buffer that was changed "<afile>".
NOTE: The commands must not change the current
buffer, jump to another buffer or delete a
- buffer. *E246*
+ buffer. *E246* *E811*
NOTE: This event never nests, to avoid an
endless loop. This means that while executing
commands for the FileChangedShell event no
@@ -835,9 +835,9 @@ The file pattern {pat} is tested for a match against the file name in one of
two ways:
1. When there is no '/' in the pattern, Vim checks for a match against only
the tail part of the file name (without its leading directory path).
-2. When there is a '/' in the pattern, Vim checks for a match against the
- both short file name (as you typed it) and the full file name (after
- expanding it to a full path and resolving symbolic links).
+2. When there is a '/' in the pattern, Vim checks for a match against both the
+ short file name (as you typed it) and the full file name (after expanding
+ it to a full path and resolving symbolic links).
The special pattern <buffer> or <buffer=N> is used for buffer-local
autocommands |autocmd-buflocal|. This pattern is not matched against the name
@@ -1052,7 +1052,7 @@ option will not cause any commands to be executed.
*:doautoa* *:doautoall*
:doautoa[ll] [group] {event} [fname]
Like ":doautocmd", but apply the autocommands to each
- loaded buffer. Note that {fname} is used to select
+ loaded buffer. Note that [fname] is used to select
the autocommands, not the buffers to which they are
applied.
Careful: Don't use this for autocommands that delete a
View
59 runtime/doc/change.txt
@@ -1,4 +1,4 @@
-*change.txt* For Vim version 7.2. Last change: 2008 Jul 24
+*change.txt* For Vim version 7.2. Last change: 2009 Nov 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -506,9 +506,9 @@ comment (starting with '"') after the ":!" command.
{filter}. Vim replaces the optional bangs with the
latest given command and appends the optional [arg].
Vim saves the output of the filter command in a
- temporary file and then reads the file into the
- buffer. Vim uses the 'shellredir' option to redirect
- the filter output to the temporary file.
+ temporary file and then reads the file into the buffer
+ |tempfile|. Vim uses the 'shellredir' option to
+ redirect the filter output to the temporary file.
However, if the 'shelltemp' option is off then pipes
are used when possible (on Unix).
When the 'R' flag is included in 'cpoptions' marks in
@@ -524,7 +524,9 @@ comment (starting with '"') after the ":!" command.
option is empty (this is the default), use the
internal formatting function |C-indenting|. But when
'indentexpr' is not empty, it will be used instead
- |indent-expression|.
+ |indent-expression|. When Vim was compiled without
+ internal formatting then the "indent" program is used
+ as a last resort.
*==*
== Filter [count] lines like with ={motion}.
@@ -534,6 +536,22 @@ comment (starting with '"') after the ":!" command.
{not in Vi}
+ *tempfile* *setuid*
+Vim uses temporary files for filtering, generating diffs and also for
+tempname(). For Unix, the file will be in a private directory (only
+accessible by the current user) to avoid security problems (e.g., a symlink
+attack or other people reading your file). When Vim exits the directory and
+all files in it are deleted. When Vim has the setuid bit set this may cause
+problems, the temp file is owned by the setuid user but the filter command
+probably runs as the original user.
+On MS-DOS and OS/2 the first of these directories that works is used: $TMP,
+$TEMP, c:\TMP, c:\TEMP.
+For Unix the list of directories is: $TMPDIR, /tmp, current-dir, $HOME.
+For MS-Windows the GetTempFileName() system function is used.
+For other systems the tmpnam() library function is used.
+
+
+
4.2 Substitute *:substitute*
*:s* *:su*
:[range]s[ubstitute]/{pattern}/{string}/[flags] [count]
@@ -861,7 +879,10 @@ inside of strings can change! Also see 'softtabstop' option. >
*:reg* *:registers*
:reg[isters] Display the contents of all numbered and named
- registers. {not in Vi}
+ registers. If a register is written to for |:redir|
+ it will not be listed.
+ {not in Vi}
+
:reg[isters] {arg} Display the contents of the numbered and named
registers that are mentioned in {arg}. For example: >
@@ -994,6 +1015,11 @@ register. With blockwise selection it also depends on the size of the block
and whether the corners are on an existing character. (Implementation detail:
it actually works by first putting the register after the selection and then
deleting the selection.)
+The previously selected text is put in the unnamed register. If you want to
+put the same text into a Visual selection several times you need to use
+another register. E.g., yank the text to copy, Visually select the text to
+replace and use "0p . You can repeat this as many times as you like, the
+unnamed register will be changed each time.
*blockwise-register*
If you use a blockwise Visual mode command to get the text into the register,
@@ -1031,8 +1057,10 @@ There are nine types of registers: *registers* *E354*
Vim fills this register with text deleted with the "d", "c", "s", "x" commands
or copied with the yank "y" command, regardless of whether or not a specific
register was used (e.g. "xdd). This is like the unnamed register is pointing
-to the last used register. An exception is the '_' register: "_dd does not
-store the deleted text in any register.
+to the last used register. Thus when appending using an uppercase register
+name, the unnamed register contains the same text as the named register.
+An exception is the '_' register: "_dd does not store the deleted text in any
+register.
Vim uses the contents of the unnamed register for any put command (p or P)
which does not specify a register. Additionally you can access it with the
name '"'. This means you have to type two double quotes. Writing to the ""
@@ -1098,11 +1126,16 @@ normal command-line editing commands are available, including a special
history for expressions. When you end the command-line by typing <CR>, Vim
computes the result of the expression. If you end it with <Esc>, Vim abandons
the expression. If you do not enter an expression, Vim uses the previous
-expression (like with the "/" command). The expression must evaluate to a
-string. If the result is a number it's turned into a string. A List,
-Dictionary or FuncRef results in an error message (use string() to convert).
-If the "= register is used for the "p" command, the string is split up at <NL>
-characters. If the string ends in a <NL>, it is regarded as a linewise
+expression (like with the "/" command).
+
+The expression must evaluate to a String. A Number is always automatically
+converted to a String. For the "p" and ":put" command, if the result is a
+Float it's converted into a String. If the result is a List each element is
+turned into a String and used as a line. A Dictionary or FuncRef results in
+an error message (use string() to convert).
+
+If the "= register is used for the "p" command, the String is split up at <NL>
+characters. If the String ends in a <NL>, it is regarded as a linewise
register. {not in Vi}
7. Selection and drop registers "*, "+ and "~
View
25 runtime/doc/cmdline.txt
@@ -1,4 +1,4 @@
-*cmdline.txt* For Vim version 7.2. Last change: 2008 Sep 18
+*cmdline.txt* For Vim version 7.2. Last change: 2009 Oct 25
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -118,8 +118,6 @@ CTRL-U Remove all characters between the cursor position and
preferred behavior, add the following to your .vimrc: >
:cnoremap <C-U> <C-E><C-U>
<
- Note: if the command-line becomes empty with one of the
- delete commands, Command-line mode is quit.
*c_<Insert>*
<Insert> Toggle between insert and overstrike. {not in Vi}
@@ -485,14 +483,14 @@ And this in your .vimrc: >
The Ex commands have a few specialties:
- *:quote*
+ *:quote* *:comment*
'"' at the start of a line causes the whole line to be ignored. '"'
after a command causes the rest of the line to be ignored. This can be used
to add comments. Example: >
:set ai "set 'autoindent' option
It is not possible to add a comment to a shell command ":!cmd" or to the
-":map" command and friends, because they see the '"' as part of their
-argument.
+":map" command and a few others, because they see the '"' as part of their
+argument. This is mentioned where the command is explained.
*:bar* *:\bar*
'|' can be used to separate commands, so you can give multiple commands in one
@@ -744,8 +742,8 @@ characters have a special meaning. These can also be used in the expression
function expand() |expand()|.
% Is replaced with the current file name. *:_%* *c_%*
# Is replaced with the alternate file name. *:_#* *c_#*
- #n (where n is a number) is replaced with the file name of
- buffer n. "#0" is the same as "#".
+ #n (where n is a number) is replaced with *:_#0* *:_#n*
+ the file name of buffer n. "#0" is the same as "#". *c_#n*
## Is replaced with all names in the argument list *:_##* *c_##*
concatenated, separated by spaces. Each space in a name
is preceded with a backslash.
@@ -949,7 +947,7 @@ for the file "$home" in the root directory. A few examples:
==============================================================================
6. Command-line window *cmdline-window* *cmdwin*
-
+ *command-line-window*
In the command-line window the command line can be edited just like editing
text in any window. It is a special kind of window, because you cannot leave
it in a normal way.
@@ -957,12 +955,12 @@ it in a normal way.
feature}
-OPEN
+OPEN *c_CTRL-F* *q:* *q/* *q?*
There are two ways to open the command-line window:
1. From Command-line mode, use the key specified with the 'cedit' option.
The default is CTRL-F when 'compatible' is not set.
-2. From Normal mode, use the "q:", "q/" or "q?" command. *q:* *q/* *q?*
+2. From Normal mode, use the "q:", "q/" or "q?" command.
This starts editing an Ex command-line ("q:") or search string ("q/" or
"q?"). Note that this is not possible while recording is in progress (the
"q" stops recording then).
@@ -992,7 +990,8 @@ nesting.
The command-line window is not a normal window. It is not possible to move to
another window or edit another buffer. All commands that would do this are
disabled in the command-line window. Of course it _is_ possible to execute
-any command that you entered in the command-line window.
+any command that you entered in the command-line window. Other text edits are
+discarded when closing the window.
CLOSE *E199*
@@ -1027,7 +1026,7 @@ VARIOUS
The command-line window cannot be used:
- when there already is a command-line window (no nesting)
-- for entering a encryption key or when using inputsecret()
+- for entering an encryption key or when using inputsecret()
- when Vim was not compiled with the +vertsplit feature
Some options are set when the command-line window is opened:
View
25 runtime/doc/debug.txt
@@ -1,4 +1,4 @@
-*debug.txt* For Vim version 7.2. Last change: 2006 May 01
+*debug.txt* For Vim version 7.2. Last change: 2009 Jul 22
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -10,7 +10,8 @@ This is for debugging Vim itself, when it doesn't work properly.
For debugging Vim scripts, functions, etc. see |debug-scripts|
1. Location of a crash, using gcc and gdb |debug-gcc|
-2. Windows Bug Reporting |debug-win32|
+2. Locating memory leaks |debug-leaks|
+3. Windows Bug Reporting |debug-win32|
==============================================================================
@@ -38,7 +39,25 @@ This also applies when using the MingW tools.
==============================================================================
-2. Windows Bug Reporting *debug-win32*
+2. Locating memory leaks *debug-leaks*
+
+If you suspect Vim is leaking memory and you are using Linux, the valgrind
+tool is very useful to pinpoint memory leaks.
+
+First of all, build Vim with EXITFREE defined. Search for this in MAKEFILE
+and uncomment the line.
+
+Use this command to start Vim: *valgrind*
+>
+ valgrind --log-file=valgrind.log ./vim
+
+Note: Vim will run much slower. If your .vimrc is big or you have several
+plugins you need to be patient for startup, or run with the "-u NONE"
+argument.
+
+==============================================================================
+
+3. Windows Bug Reporting *debug-win32*
If the Windows version of Vim crashes in a reproducible manner, you can take
some steps to provide a useful bug report.
View
6 runtime/doc/develop.txt
@@ -1,4 +1,4 @@
-*develop.txt* For Vim version 7.2. Last change: 2007 May 11
+*develop.txt* For Vim version 7.2. Last change: 2008 Dec 17
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -64,7 +64,7 @@ completely different editor. Extensions are done with a "Vi spirit".
hard time finding and remembering them. Keep in mind that more commands and
options will be added later.
- A feature that people do not know about is a useless feature. Don't add
- obscure features, or at least add hints in documentation that they exists.
+ obscure features, or at least add hints in documentation that they exist.
- Minimize using CTRL and other modifiers, they are more difficult to type.
- There are many first-time and inexperienced Vim users. Make it easy for
them to start using Vim and learn more over time.
@@ -323,7 +323,7 @@ Wrong: var=a*5;
OK: var = a * 5;
In general: Use empty lines to group lines of code together. Put a comment
-just above the group of lines. This makes it more easy to quickly see what is
+just above the group of lines. This makes it easier to quickly see what is
being done.
OK: /* Prepare for building the table. */
View
17 runtime/doc/diff.txt
@@ -1,4 +1,4 @@
-*diff.txt* For Vim version 7.2. Last change: 2008 Jul 21
+*diff.txt* For Vim version 7.2. Last change: 2009 Sep 15
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -64,6 +64,9 @@ In each of the edited files these options are set:
These options are set local to the window. When editing another file they are
reset to the global value.
+The options can still be overruled from a modeline when re-editing the file.
+However, 'foldmethod' and 'wrap' won't be set from a modeline when 'diff' is
+set.
The differences shown are actually the differences in the buffer. Thus if you
make changes after loading a file, these will be included in the displayed
@@ -91,7 +94,7 @@ While already in Vim you can start diff mode in three ways.
:diffthis Make the current window part of the diff windows. This sets
the options like for "vimdiff".
-:diffpatch {patchfile} *:diffp* *:diffpatch*
+:diffpatch {patchfile} *E816* *:diffp* *:diffpatch*
Use the current buffer, patch it with the diff found in
{patchfile} and open a buffer on the result. The options are
set as for "vimdiff".
@@ -121,7 +124,8 @@ file for a moment and come back to the same file and be in diff mode again.
*:diffo* *:diffoff*
:diffoff Switch off diff mode for the current window.
-:diffoff! Switch off diff mode for all windows in the current tab page.
+:diffoff! Switch off diff mode for the current window and in all windows
+ in the current tab page where 'diff' is set.
The ":diffoff" command resets the relevant options to their default value.
This may be different from what the values were before diff mode was started,
@@ -237,7 +241,8 @@ that the buffers will be equal within the specified range.
*:diffg* *:diffget*
:[range]diffg[et] [bufspec]
Modify the current buffer to undo difference with another
- buffer. If [bufspec] is given, that buffer is used.
+ buffer. If [bufspec] is given, that buffer is used. If
+ [bufspec] refers to the current buffer then nothing happens.
Otherwise this only works if there is one other buffer in diff
mode.
See below for [range].
@@ -323,7 +328,7 @@ The "1a2" item appends the line "bbb".
The "4d4" item deletes the line "111".
The '7c7" item replaces the line "GGG" with "ggg".
-When 'diffexpr' is not empty, Vim evaluates to obtain a diff file in the
+When 'diffexpr' is not empty, Vim evaluates it to obtain a diff file in the
format mentioned. These variables are set to the file names used:
v:fname_in original file
@@ -353,7 +358,7 @@ The "-a" argument is used to force comparing the files as text, comparing as
binaries isn't useful. The "--binary" argument makes the files read in binary
mode, so that a CTRL-Z doesn't end the text on DOS.
- *E97*
+ *E810* *E97*
Vim will do a test if the diff output looks alright. If it doesn't, you will
get an error message. Possible causes:
- The "diff" program cannot be executed.
View
22 runtime/doc/editing.txt
@@ -1,4 +1,4 @@
-*editing.txt* For Vim version 7.2. Last change: 2008 Aug 09
+*editing.txt* For Vim version 7.2. Last change: 2009 Jun 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -270,7 +270,7 @@ If you want to keep the changed buffer without saving it, switch on the
Normal mode. Otherwise same as |:edit|.
*:vie* *:view*
-:vie[w] [++opt] [+cmd] file
+:vie[w][!] [++opt] [+cmd] file
When used in Ex mode: Leave |Ex mode|, go back to
Normal mode. Otherwise same as |:edit|, but set
'readonly' option for this buffer. {not in Vi}
@@ -462,7 +462,10 @@ converted and illegal bytes. It can be one of three things:
++bad=drop Remove the bad characters.
The default is like "++bad=?": Replace each bad character with a question
-mark.
+mark. In some places an inverted question mark is used (0xBF).
+
+Note that not all commands use the ++bad argument, even though they do not
+give an error when you add it. E.g. |:write|.
Note that when reading, the 'fileformat' and 'fileencoding' options will be
set to the used format. When writing this doesn't happen, thus a next write
@@ -837,7 +840,7 @@ USING THE ARGUMENT LIST
Example: >
:args *.c
:argdo set ff=unix | update
-This sets the 'fileformat' option to "unix" and writes the file if is now
+This sets the 'fileformat' option to "unix" and writes the file if it is now
changed. This is done for all *.c files.
Example: >
@@ -1456,6 +1459,17 @@ If you don't get warned often enough you can use the following command.
may be specified by name, number or with a pattern.
+ *E813* *E814*
+Vim will reload the buffer if you chose to. If a window is visible that
+contains this buffer, the reloading will happen in the context of this window.
+Otherwise a special window is used, so that most autocommands will work. You
+can't close this window. A few other restrictions apply. Best is to make
+sure nothing happens outside of the current buffer. E.g., setting
+window-local options may end up in the wrong window. Splitting the window,
+doing something there and closing it should be OK (if there are no side
+effects from other autocommands). Closing unrelated windows and buffers will
+get you into trouble.
+
Before writing a file the timestamp is checked. If it has changed, Vim will
ask if you really want to overwrite the file:
View
145 runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 7.2. Last change: 2008 Nov 27
+*eval.txt* For Vim version 7.2. Last change: 2010 Jan 05
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -853,7 +853,8 @@ expr8[expr1] item of String or |List| *expr-[]* *E111*
If expr8 is a Number or String this results in a String that contains the
expr1'th single byte from expr8. expr8 is used as a String, expr1 as a
-Number. Note that this doesn't recognize multi-byte encodings.
+Number. This doesn't recognize multi-byte encodings, see |byteidx()| for
+an alternative.
Index zero gives the first character. This is like it works in C. Careful:
text column numbers start with one! Example, to get the character under the
@@ -878,8 +879,8 @@ expr8[expr1a : expr1b] substring or sublist *expr-[:]*
If expr8 is a Number or String this results in the substring with the bytes
from expr1a to and including expr1b. expr8 is used as a String, expr1a and
-expr1b are used as a Number. Note that this doesn't recognize multi-byte
-encodings.
+expr1b are used as a Number. This doesn't recognize multi-byte encodings, see
+|byteidx()| for computing the indexes.
If expr1a is omitted zero is used. If expr1b is omitted the length of the
string minus one is used.
@@ -895,7 +896,8 @@ Examples: >
:let c = name[-2:-2] " last but one byte of a string
:let s = line(".")[4:] " from the fifth byte to the end
:let s = s[:-3] " remove last two bytes
-
+<
+ *sublist* *slice*
If expr8 is a |List| this results in a new |List| with the items indicated by
the indexes expr1a and expr1b. This works like with a String, as explained
just above, except that indexes out of range cause an error. Examples: >
@@ -1190,6 +1192,7 @@ They can be used in:
Thus not in:
- other scripts sourced from this one
- mappings
+- menus
- etc.
Script variables can be used to avoid conflicts with global variable names.
@@ -1280,7 +1283,8 @@ v:beval_winnr The number of the window, over which the mouse pointer is. Only
valid while evaluating the 'balloonexpr' option.
*v:char* *char-variable*
-v:char Argument for evaluating 'formatexpr'.
+v:char Argument for evaluating 'formatexpr' and used for the typed
+ character when using <expr> in an abbreviation |map-<expr>|.
*v:charconvert_from* *charconvert_from-variable*
v:charconvert_from
@@ -1317,6 +1321,8 @@ v:count The count given for the last Normal mode command. Can be used
:map _x :<C-U>echo "the count is " . v:count<CR>
< Note: The <C-U> is required to remove the line range that you
get when typing ':' after a count.
+ When there are two counts, as in "3d2w", they are multiplied,
+ just like what happens in the command, "d6w" for the example.
Also used for evaluating the 'formatexpr' option.
"count" also works, for backwards compatibility.
@@ -1677,9 +1683,9 @@ ceil( {expr}) Float round {expr} up
changenr() Number current change number
char2nr( {expr}) Number ASCII value of first char in {expr}
cindent( {lnum}) Number C indent for line {lnum}
-clearmatches() None clear all matches
+clearmatches() none clear all matches
col( {expr}) Number column nr of cursor or mark
-complete({startcol}, {matches}) String set Insert mode completion
+complete( {startcol}, {matches}) none set Insert mode completion
complete_add( {expr}) Number add completion match
complete_check() Number check for key typed during completion
confirm( {msg} [, {choices} [, {default} [, {type}]]])
@@ -1704,7 +1710,7 @@ eval( {string}) any evaluate {string} into its value
eventhandler( ) Number TRUE if inside an event handler
executable( {expr}) Number 1 if executable {expr} exists
exists( {expr}) Number TRUE if {expr} exists
-extend({expr1}, {expr2} [, {expr3}])
+extend( {expr1}, {expr2} [, {expr3}])
List/Dict insert items of {expr2} into {expr1}
expand( {expr} [, {flag}]) String expand special keywords in {expr}
feedkeys( {string} [, {mode}]) Number add key sequence to typeahead buffer
@@ -1746,7 +1752,7 @@ getftime( {fname}) Number last modification time of file
getftype( {fname}) String description of type of file {fname}
getline( {lnum}) String line {lnum} of current buffer
getline( {lnum}, {end}) List lines {lnum} to {end} of current buffer
-getloclist({nr}) List list of location list items
+getloclist( {nr}) List list of location list items
getmatches() List list of current matches
getpid() Number process ID of Vim
getpos( {expr}) List position of cursor, mark, etc.
@@ -1815,9 +1821,9 @@ matchlist( {expr}, {pat}[, {start}[, {count}]])
List match and submatches of {pat} in {expr}
matchstr( {expr}, {pat}[, {start}[, {count}]])
String {count}'th match of {pat} in {expr}
-max({list}) Number maximum value of items in {list}
-min({list}) Number minimum value of items in {list}
-mkdir({name} [, {path} [, {prot}]])
+max( {list}) Number maximum value of items in {list}
+min( {list}) Number minimum value of items in {list}
+mkdir( {name} [, {path} [, {prot}]])
Number create directory {name}
mode( [expr]) String current editing mode
nextnonblank( {lnum}) Number line nr of non-blank line >= {lnum}
@@ -1829,7 +1835,7 @@ printf( {fmt}, {expr1}...) String format text
pumvisible() Number whether popup menu is visible
range( {expr} [, {max} [, {stride}]])
List items from {expr} to {max}
-readfile({fname} [, {binary} [, {max}]])
+readfile( {fname} [, {binary} [, {max}]])
List get list of lines from file {fname}
reltime( [{start} [, {end}]]) List get time value
reltimestr( {time}) String turn time value into a String
@@ -1850,7 +1856,7 @@ reverse( {list}) List reverse {list} in-place
round( {expr}) Float round off {expr}
search( {pattern} [, {flags} [, {stopline} [, {timeout}]]])
Number search for {pattern}
-searchdecl({name} [, {global} [, {thisblock}]])
+searchdecl( {name} [, {global} [, {thisblock}]])
Number search for variable declaration
searchpair( {start}, {middle}, {end} [, {flags} [, {skip} [...]]])
Number search for other end of start/end pair
@@ -1867,7 +1873,7 @@ setline( {lnum}, {line}) Number set line {lnum} to {line}
setloclist( {nr}, {list}[, {action}])
Number modify location list using {list}
setmatches( {list}) Number restore a list of matches
-setpos( {expr}, {list}) none set the {expr} position to {list}
+setpos( {expr}, {list}) Number set the {expr} position to {list}
setqflist( {list}[, {action}]) Number modify quickfix list using {list}
setreg( {n}, {v}[, {opt}]) Number set register to value and type
settabwinvar( {tabnr}, {winnr}, {varname}, {val}) set {varname} in window
@@ -1905,7 +1911,7 @@ synID( {lnum}, {col}, {trans}) Number syntax ID at {lnum} and {col}
synIDattr( {synID}, {what} [, {mode}])
String attribute {what} of syntax ID {synID}
synIDtrans( {synID}) Number translated syntax ID of {synID}
-synstack({lnum}, {col}) List stack of syntax IDs at {lnum} and {col}
+synstack( {lnum}, {col}) List stack of syntax IDs at {lnum} and {col}
system( {expr} [, {input}]) String output of shell command/filter {expr}
tabpagebuflist( [{arg}]) List list of buffer numbers in tab page
tabpagenr( [{arg}]) Number number of current or last tab page
@@ -1929,10 +1935,10 @@ winheight( {nr}) Number height of window {nr}
winline() Number window line of the cursor
winnr( [{expr}]) Number number of current window
winrestcmd() String returns command to restore window sizes
-winrestview({dict}) None restore view of current window
+winrestview( {dict}) none restore view of current window
winsaveview() Dict save view of current window
winwidth( {nr}) Number width of window {nr}
-writefile({list}, {fname} [, {binary}])
+writefile( {list}, {fname} [, {binary}])
Number write list of lines to file {fname}
abs({expr}) *abs()*
@@ -2245,7 +2251,7 @@ complete({startcol}, {matches}) *complete()* *E785*
{matches} must be a |List|. Each |List| item is one match.
See |complete-items| for the kind of items that are possible.
Note that the after calling this function you need to avoid
- inserting anything that would completion to stop.
+ inserting anything that would cause completion to stop.
The match can be selected with CTRL-N and CTRL-P as usual with
Insert mode completion. The popup menu will appear if
specified, see |ins-completion-menu|.
@@ -2477,7 +2483,7 @@ empty({expr}) *empty()*
Return the Number 1 if {expr} is empty, zero otherwise.
A |List| or |Dictionary| is empty when it does not have any
items. A Number is empty when its value is zero.
- For a long |List| this is much faster then comparing the
+ For a long |List| this is much faster than comparing the
length with zero.
escape({string}, {chars}) *escape()*
@@ -3053,7 +3059,7 @@ getcharmod() *getcharmod()*
128 Macintosh only: command
Only the modifiers that have not been included in the
character itself are obtained. Thus Shift-a results in "A"
- with no modifier.
+ without a modifier.
getcmdline() *getcmdline()*
Return the current command-line. Only works when the command
@@ -3181,7 +3187,7 @@ getloclist({nr}) *getloclist()*
window {nr}. When {nr} is zero the current window is used.
For a location list window, the displayed location list is
returned. For an invalid window number {nr}, an empty list is
- returned. Otherwise, same as getqflist().
+ returned. Otherwise, same as |getqflist()|.
getmatches() *getmatches()*
Returns a |List| with all matches previously defined by
@@ -3478,7 +3484,9 @@ hostname() *hostname()*
iconv({expr}, {from}, {to}) *iconv()*
The result is a String, which is the text {expr} converted
from encoding {from} to encoding {to}.
- When the conversion fails an empty string is returned.
+ When the conversion completely fails an empty string is
+ returned. When some characters could not be converted they
+ are replaced with "?".
The encoding names are whatever the iconv() library function
can accept, see ":!man 3 iconv".
Most conversions require Vim to be compiled with the |+iconv|
@@ -3503,7 +3511,10 @@ indent({lnum}) The result is a Number, which is indent of line {lnum} in the
index({list}, {expr} [, {start} [, {ic}]]) *index()*
Return the lowest index in |List| {list} where the item has a
- value equal to {expr}.
+ value equal to {expr}. There is no automatic conversion, so
+ the String "4" is different from the Number 4. And the number
+ 4 is different from the Float 4.0. The value of 'ignorecase'
+ is not used here, case always matters.
If {start} is given then start looking at the item with index
{start} (may be negative for an item relative to the end).
When {ic} is given and it is non-zero, ignore case. Otherwise
@@ -3516,9 +3527,9 @@ index({list}, {expr} [, {start} [, {ic}]]) *index()*
input({prompt} [, {text} [, {completion}]]) *input()*
The result is a String, which is whatever the user typed on
- the command-line. The parameter is either a prompt string, or
- a blank string (for no prompt). A '\n' can be used in the
- prompt to start a new line.
+ the command-line. The {prompt} argument is either a prompt
+ string, or a blank string (for no prompt). A '\n' can be used
+ in the prompt to start a new line.
The highlighting set with |:echohl| is used for the prompt.
The input is entered just like a command-line, with the same
editing commands and mappings. There is a separate history
@@ -3528,8 +3539,9 @@ input({prompt} [, {text} [, {completion}]]) *input()*
: echo "Cheers!"
:endif
<
- If the optional {text} is present and not empty, this is used
- for the default reply, as if the user typed this. Example: >
+ If the optional {text} argument is present and not empty, this
+ is used for the default reply, as if the user typed this.
+ Example: >
:let color = input("Color? ", "white")
< The optional {completion} argument specifies the type of
@@ -3559,8 +3571,8 @@ input({prompt} [, {text} [, {completion}]]) *input()*
:endfunction
inputdialog({prompt} [, {text} [, {cancelreturn}]]) *inputdialog()*
- Like input(), but when the GUI is running and text dialogs are
- supported, a dialog window pops up to input the text.
+ Like |input()|, but when the GUI is running and text dialogs
+ are supported, a dialog window pops up to input the text.
Example: >
:let n = inputdialog("value for shiftwidth", &sw)
:if n != ""
@@ -3581,7 +3593,7 @@ inputlist({textlist}) *inputlist()*
above the first item a negative number is returned. When
clicking on the prompt one more than the length of {textlist}
is returned.
- Make sure {textlist} has less then 'lines' entries, otherwise
+ Make sure {textlist} has less than 'lines' entries, otherwise
it won't work. It's a good idea to put the entry number at
the start of the string. And put a prompt in the first item.
Example: >
@@ -3589,7 +3601,7 @@ inputlist({textlist}) *inputlist()*
\ '2. green', '3. blue'])
inputrestore() *inputrestore()*
- Restore typeahead that was saved with a previous inputsave().
+ Restore typeahead that was saved with a previous |inputsave()|.
Should be called the same number of times inputsave() is
called. Calling it more often is harmless though.
Returns 1 when there is nothing to restore, 0 otherwise.
@@ -3719,14 +3731,14 @@ libcall({libname}, {funcname}, {argument})
the DLL is not in the usual places.
For Unix: When compiling your own plugins, remember that the
object code must be compiled as position-independent ('PIC').
- {only in Win32 on some Unix versions, when the |+libcall|
+ {only in Win32 and some Unix versions, when the |+libcall|
feature is present}
Examples: >
:echo libcall("libc.so", "getenv", "HOME")
<
*libcallnr()*
libcallnr({libname}, {funcname}, {argument})
- Just like libcall(), but used for a function that returns an
+ Just like |libcall()|, but used for a function that returns an
int instead of a string.
{only in Win32 on some Unix versions, when the |+libcall|
feature is present}
@@ -3759,7 +3771,7 @@ line({expr}) The result is a Number, which is the line number of the file
< *last-position-jump*
This autocommand jumps to the last known position in a file
just after opening it, if the '" mark is set: >
- :au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
+ :au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g`\"" | endif
line2byte({lnum}) *line2byte()*
Return the byte count from the start of the buffer for line
@@ -3990,8 +4002,8 @@ matchdelete({id}) *matchdelete()* *E802* *E803*
be deleted in one operation by |clearmatches()|.
matchend({expr}, {pat}[, {start}[, {count}]]) *matchend()*
- Same as match(), but return the index of first character after
- the match. Example: >
+ Same as |match()|, but return the index of first character
+ after the match. Example: >
:echo matchend("testing", "ing")
< results in "7".
*strspn()* *strcspn()*
@@ -4001,15 +4013,15 @@ matchend({expr}, {pat}[, {start}[, {count}]]) *matchend()*
:let span = matchend(line, '[^a-zA-Z]')
< Except that -1 is returned when there are no matches.
- The {start}, if given, has the same meaning as for match(). >
+ The {start}, if given, has the same meaning as for |match()|. >
:echo matchend("testing", "ing", 2)
< results in "7". >
:echo matchend("testing", "ing", 5)
< result is "-1".
- When {expr} is a |List| the result is equal to match().
+ When {expr} is a |List| the result is equal to |match()|.
matchlist({expr}, {pat}[, {start}[, {count}]]) *matchlist()*
- Same as match(), but return a |List|. The first item in the
+ Same as |match()|, but return a |List|. The first item in the
list is the matched string, same as what matchstr() would
return. Following items are submatches, like "\1", "\2", etc.
in |:substitute|. When an optional submatch didn't match an
@@ -4023,7 +4035,7 @@ matchstr({expr}, {pat}[, {start}[, {count}]]) *matchstr()*
:echo matchstr("testing", "ing")
< results in "ing".
When there is no match "" is returned.
- The {start}, if given, has the same meaning as for match(). >
+ The {start}, if given, has the same meaning as for |match()|. >
:echo matchstr("testing", "ing", 2)
< results in "ing". >
:echo matchstr("testing", "ing", 5)
@@ -4497,9 +4509,9 @@ remote_send({server}, {string} [, {idvar}])
<
remove({list}, {idx} [, {end}]) *remove()*
Without {end}: Remove the item at {idx} from |List| {list} and
- return it.
+ return the item.
With {end}: Remove items from {idx} to {end} (inclusive) and
- return a list with these items. When {idx} points to the same
+ return a List with these items. When {idx} points to the same
item as {end} a list with one item is returned. When {end}
points to an item before {idx} this is an error.
See |list-index| for possible values of {idx} and {end}.
@@ -4750,7 +4762,7 @@ searchpair({start}, {middle}, {end} [, {flags} [, {skip}
*searchpairpos()*
searchpairpos({start}, {middle}, {end} [, {flags} [, {skip}
[, {stopline} [, {timeout}]]]])
- Same as searchpair(), but returns a |List| with the line and
+ Same as |searchpair()|, but returns a |List| with the line and
column position of the match. The first element of the |List|
is the line number and the second element is the byte index of
the column position of the match. If no match is found,
@@ -4870,7 +4882,8 @@ setpos({expr}, {list})
Does not change the jumplist.
"lnum" and "col" are the position in the buffer. The first
- column is 1. Use a zero "lnum" to delete a mark.
+ column is 1. Use a zero "lnum" to delete a mark. If "col" is
+ smaller than 1 then 1 is used.
The "off" number is only used when 'virtualedit' is set. Then
it is the offset in screen columns from the start of the
@@ -4989,7 +5002,7 @@ setwinvar({nr}, {varname}, {val}) *setwinvar()*
:call setwinvar(2, "myvar", "foobar")
shellescape({string} [, {special}]) *shellescape()*
- Escape {string} for use as shell command argument.
+ Escape {string} for use as a shell command argument.
On MS-Windows and MS-DOS, when 'shellslash' is not set, it
will enclose {string} in double quotes and double all double
quotes within {string}.
@@ -5051,15 +5064,20 @@ sort({list} [, {func}]) *sort()* *E702*
When {func} is given and it is one then case is ignored.
When {func} is a |Funcref| or a function name, this function
is called to compare items. The function is invoked with two
- items as argument and must return zero if they are equal, 1 if
- the first one sorts after the second one, -1 if the first one
- sorts before the second one. Example: >
+ items as argument and must return zero if they are equal, 1 or
+ bigger if the first one sorts after the second one, -1 or
+ smaller if the first one sorts before the second one.
+ Example: >
func MyCompare(i1, i2)
return a:i1 == a:i2 ? 0 : a:i1 > a:i2 ? 1 : -1
endfunc
let sortedlist = sort(mylist, "MyCompare")
+< A shorter compare version for this specific simple case, which
+ ignores overflow: >
+ func MyCompare(i1, i2)
+ return a:i1 - a:i2
+ endfunc
<
-
*soundfold()*
soundfold({word})
Return the sound-folded equivalent of {word}. Uses the first
@@ -5508,10 +5526,7 @@ tempname() *tempname()* *temp-file-name*
is different for at least 26 consecutive calls. Example: >
:let tmpfile = tempname()
:exe "redir > " . tmpfile
-< For Unix, the file will be in a private directory (only
- accessible by the current user) to avoid security problems
- (e.g., a symlink attack or other people reading your file).
- When Vim exits the directory and all files in it are deleted.
+< For Unix, the file will be in a private directory |tempfile|.
For MS-Windows forward slashes are used when the 'shellslash'
option is set or when 'shellcmdflag' starts with '-'.
@@ -6575,15 +6590,19 @@ This would call the function "my_func_whizz(parameter)".
removed without effect. Removing any later item means
it will not be found. Thus the following example
works (an inefficient way to make a list empty): >
- :for item in mylist
- :call remove(mylist, 0)
- :endfor
+ for item in mylist
+ call remove(mylist, 0)
+ endfor
< Note that reordering the list (e.g., with sort() or
reverse()) may have unexpected effects.
Note that the type of each list item should be
identical to avoid errors for the type of {var}
changing. Unlet the variable at the end of the loop
- to allow multiple item types.
+ to allow multiple item types: >
+ for item in ["foo", ["bar"]]
+ echo item
+ unlet item " E706 without this
+ endfor
:for [{var1}, {var2}, ...] in {listlist}
:endfo[r]
@@ -6652,7 +6671,7 @@ This would call the function "my_func_whizz(parameter)".
:try | edit | catch /^Vim(edit):E\d\+/ | echo "error" | endtry
<
*:cat* *:catch* *E603* *E604* *E605*
-:cat[ch] /{pattern}/ The following commands until the next ":catch",
+:cat[ch] /{pattern}/ The following commands until the next |:catch|,
|:finally|, or |:endtry| that belongs to the same
|:try| as the ":catch" are executed when an exception
matching {pattern} is being thrown and has not yet
@@ -6825,7 +6844,7 @@ This would call the function "my_func_whizz(parameter)".
:execute 'while i < 5 | echo i | let i = i + 1 | endwhile'
<
- *:comment*
+ *:exe-comment*
":execute", ":echo" and ":echon" cannot be followed by
a comment directly, because they see the '"' as the
start of a string. But, you can use '|' followed by a
@@ -7831,7 +7850,7 @@ a "E600: Missing :endtry" error message is given, see |except-single-line|.
Printing in Binary ~
>
- :" The function Nr2Bin() returns the Hex string of a number.
+ :" The function Nr2Bin() returns the binary string representation of a number.
:func Nr2Bin(nr)
: let n = a:nr
: let r = ""
View
10 runtime/doc/evim-pl.1
@@ -14,11 +14,11 @@ uruchamia
.B Vima
i ustawia opcje tak by zachowywał się jak edytor bez trybów.
To jest cały czas Vim ale używany jako edytor wskaż-i-kliknij.
-Zachowanie w stlu Notepada dla MS-Windows.
+Zachowanie w stylu Notepada dla MS-Windows.
.B eVim
będzie zawsze uruchomiony w GUI by włączyć menu i pasek narzędzi.
.PP
-Przeznaczony tylko dla ludzi, którzy naprawdę nie potrafią pracować
+Przeznaczony tylko dla ludzi, którzy naprawdę nie mogą pracować
z Vimem w normalny sposób. Edycja będzie o wiele mniej efektywna.
.PP
.B eview
@@ -31,8 +31,8 @@ Opcja 'insertmode' jest ustawiona by mo
tekst.
.br
Mapowania są ustawione tak by Kopiowanie i Wklejanie działało
-z klawiszami MS-Windows. CTRL-X wycina tekst, CTRL-C kopiuje
-a CTRL-V wkleja. Użyj CTRL-Q by uzyskać oryginalne znaczenie
+z klawiszami MS-Windows. CTRL-X wycina, CTRL-C kopiuje a CTRL-V
+wkleja tekst. Użyj CTRL-Q by uzyskać oryginalne przeznaczenie
CTRL-V.
.SH OPCJE
Zobacz vim(1).
@@ -42,7 +42,7 @@ Zobacz vim(1).
Skrypt uruchamiania dla eVima.
.SH ZNANY JAKO
Znany jako "Vim dla frajerów".
-Jeśli używasz evima oczekuje się, że wyjmiesz chusteczkę do nosa,
+Jeśli używasz eVima oczekuje się, że wyjmiesz chusteczkę do nosa,
zrobisz węzęł w każdym rogu i będziesz to nosił na głowie.
.SH ZOBACZ TAKŻE
vim(1)
View
10 runtime/doc/evim-pl.UTF-8.1
@@ -14,11 +14,11 @@ uruchamia
.B Vima
i ustawia opcje tak by zachowywał się jak edytor bez trybów.
To jest cały czas Vim ale używany jako edytor wskaż-i-kliknij.
-Zachowanie w stlu Notepada dla MS-Windows.
+Zachowanie w stylu Notepada dla MS-Windows.
.B eVim
będzie zawsze uruchomiony w GUI by włączyć menu i pasek narzędzi.
.PP
-Przeznaczony tylko dla ludzi, którzy naprawdę nie potrafią pracować
+Przeznaczony tylko dla ludzi, którzy naprawdę nie mogą pracować
z Vimem w normalny sposób. Edycja będzie o wiele mniej efektywna.
.PP
.B eview
@@ -31,8 +31,8 @@ Opcja 'insertmode' jest ustawiona by można było od razu wpisywać
tekst.
.br
Mapowania są ustawione tak by Kopiowanie i Wklejanie działało
-z klawiszami MS-Windows. CTRL-X wycina tekst, CTRL-C kopiuje
-a CTRL-V wkleja. Użyj CTRL-Q by uzyskać oryginalne znaczenie
+z klawiszami MS-Windows. CTRL-X wycina, CTRL-C kopiuje a CTRL-V
+wkleja tekst. Użyj CTRL-Q by uzyskać oryginalne przeznaczenie
CTRL-V.
.SH OPCJE
Zobacz vim(1).
@@ -42,7 +42,7 @@ Zobacz vim(1).
Skrypt uruchamiania dla eVima.
.SH ZNANY JAKO
Znany jako "Vim dla frajerów".
-Jeśli używasz evima oczekuje się, że wyjmiesz chusteczkę do nosa,
+Jeśli używasz eVima oczekuje się, że wyjmiesz chusteczkę do nosa,
zrobisz węzęł w każdym rogu i będziesz to nosił na głowie.
.SH ZOBACZ TAKŻE
vim(1)
View
4 runtime/doc/fold.txt
@@ -1,10 +1,10 @@
-*fold.txt* For Vim version 7.2. Last change: 2007 May 11
+*fold.txt* For Vim version 7.2. Last change: 2009 Dec 22
VIM REFERENCE MANUAL by Bram Moolenaar
-Folding *Folding* *folding*
+Folding *Folding* *folding* *folds*
You can find an introduction on folding in chapter 28 of the user manual.
|usr_28.txt|
View
46 runtime/doc/ft_ada.txt
@@ -82,7 +82,7 @@ The Ada plug-in provides support for:
- comment handling (|'comments'|, |'commentstring'|)
The plug-in only activates the features of the Ada mode whenever an Ada
-files is opened and add adds Ada related entries to the main and pop-up menu.
+file is opened and adds Ada related entries to the main and pop-up menu.
==============================================================================
3. Omni Completion ~
@@ -142,7 +142,7 @@ support yet.
4. Compiler Support ~
*ada-compiler*
-The Ada mode supports more then one Ada compiler and will automatically load the
+The Ada mode supports more than one Ada compiler and will automatically load the
compiler set in|g:ada_default_compiler|whenever an Ada source is opened. The
provided compiler plug-ins are split into the actual compiler plug-in and a
collection of support functions and variables. This allows the easy
@@ -154,7 +154,7 @@ environment.
*compiler-gnat*
GNAT is the only free (beer and speech) Ada compiler available. There are
-several version available which differentiate in the licence terms used.
+several versions available which differ in the licence terms used.
The GNAT compiler plug-in will perform a compile on pressing <F7> and then
immediately shows the result. You can set the project file to be used by
@@ -163,7 +163,7 @@ setting:
> call g:gnat.Set_Project_File ('my_project.gpr')
Setting a project file will also create a Vim session (|views-sessions|) so -
-like with the GPS - opened files, window positions etc. will remembered
+like with the GPS - opened files, window positions etc. will be remembered
separately for all projects.
*gnat_members*
@@ -228,9 +228,9 @@ and HP Ada) is a fairly dated Ada 83 compiler. Support is basic: <F7> will
compile the current unit.
The Dec Ada compiler expects the package name and not the file name to be
-passed a parameter. The compiler plug-in supports the usual file name
-convention to convert the file into a unit name. For separates both '-' and
-'__' are allowed.
+passed as a parameter. The compiler plug-in supports the usual file name
+convention to convert the file into a unit name. Both '-' and '__' are allowed
+as separators.
*decada_members*
DEC ADA OBJECT ~
@@ -262,7 +262,7 @@ g:decada.Error_Format| string
*g:ada_standard_types*
g:ada_standard_types bool (true when exists)
- Highlight types in package Standard (e.g., "Float")
+ Highlight types in package Standard (e.g., "Float").
*g:ada_space_errors*
*g:ada_no_trail_space_error*
@@ -279,13 +279,13 @@ g:ada_space_errors bool (true when exists)
*g:ada_line_errors*
g:ada_line_errors bool (true when exists)
- Highlight lines which are to long. Note: This highlighting
+ Highlight lines which are too long. Note: This highlighting
option is quite CPU intensive.
*g:ada_rainbow_color*
g:ada_rainbow_color bool (true when exists)
Use rainbow colours for '(' and ')'. You need the
- rainbow_parenthesis for this to work
+ rainbow_parenthesis for this to work.
*g:ada_folding*
g:ada_folding set ('sigpft')
@@ -313,7 +313,7 @@ g:ada_folding set ('sigpft')
*g:ada_abbrev*
g:ada_abbrev bool (true when exists)
- Add some abbreviations. This feature more or less superseded
+ Add some abbreviations. This feature is more or less superseded
by the various completion methods.
*g:ada_withuse_ordinary*
@@ -359,12 +359,12 @@ g:ada_with_gnat_project_files bool (true when exists)
*g:ada_default_compiler*
g:ada_default_compiler string
- set default compiler. Currently supported is 'gnat' and
+ set default compiler. Currently supported are 'gnat' and
'decada'.
-An "exists" type is a boolean is considered true when the variable is defined
-and false when the variable is undefined. The value which the variable is
-set makes no difference.
+An "exists" type is a boolean considered true when the variable is defined and
+false when the variable is undefined. The value to which the variable is set
+makes no difference.
------------------------------------------------------------------------------
5.3 Commands ~
@@ -372,10 +372,10 @@ set makes no difference.
:AdaRainbow *:AdaRainbow*
Toggles rainbow colour (|g:ada_rainbow_color|) mode for
- '(' and ')'
+ '(' and ')'.
:AdaLines *:AdaLines*
- Toggles line error (|g:ada_line_errors|) display
+ Toggles line error (|g:ada_line_errors|) display.
:AdaSpaces *:AdaSpaces*
Toggles space error (|g:ada_space_errors|) display.
@@ -424,7 +424,7 @@ All constants are locked. See |:lockvar| for details.
*g:ada#WordRegex*
g:ada#WordRegex string
- Regular expression to search for Ada words
+ Regular expression to search for Ada words.
*g:ada#DotWordRegex*
g:ada#DotWordRegex string
@@ -432,7 +432,7 @@ g:ada#DotWordRegex string
*g:ada#Comment*
g:ada#Comment string
- Regular expression to search for Ada comments
+ Regular expression to search for Ada comments.
*g:ada#Keywords*
g:ada#Keywords list of dictionaries
@@ -454,7 +454,7 @@ ada#Word([{line}, {col}]) *ada#Word()*
ada#List_Tag([{line}, {col}]) *ada#Listtags()*
List all occurrences of the Ada entity under the cursor (or at
- given line/column) inside the quick-fix window
+ given line/column) inside the quick-fix window.
ada#Jump_Tag ({ident}, {mode}) *ada#Jump_Tag()*
List all occurrences of the Ada entity under the cursor (or at
@@ -482,8 +482,8 @@ gnat#New ()
8. Extra Plugins ~
*ada-extra-plugins*
-You can optionally install the following extra plug-in. They work well with Ada
-and enhance the ability of the Ada mode.:
+You can optionally install the following extra plug-ins. They work well with
+Ada and enhance the ability of the Ada mode:
backup.vim
http://www.vim.org/scripts/script.php?script_id=1537
@@ -501,7 +501,7 @@ nerd_comments.vim
matchit.vim
http://www.vim.org/scripts/script.php?script_id=39
'%' jumping for any language. The normal '%' jump only works for '{}'
- style languages. The Ada mode will set the needed search patters.
+ style languages. The Ada mode will set the needed search patterns.
taglist.vim
http://www.vim.org/scripts/script.php?script_id=273
View
91 runtime/doc/ft_sql.txt
@@ -1,4 +1,4 @@
-*ft_sql.txt* For Vim version 7.2. Last change: Wed Apr 26 2006 3:05:33 PM
+*sql.txt* For Vim version 7.2. Last change: 2009 Nov 03
by David Fishburn
@@ -15,7 +15,8 @@ features for navigation, indentation and syntax highlighting.
1.4 Macros |sql-macros|
2. SQL Dialects |sql-dialects|
2.1 SQLSetType |SQLSetType|
- 2.2 SQL Dialect Default |sql-type-default|
+ 2.2 SQLGetType |SQLGetType|
+ 2.3 SQL Dialect Default |sql-type-default|
3. Adding new SQL Dialects |sql-adding-dialects|
4. OMNI SQL Completion |sql-completion|
4.1 Static mode |sql-completion-static|
@@ -204,7 +205,7 @@ Press any of the following keys: >
*sqlanywhere*
*oracle* *plsql* *sqlj*
*sqlserver*
- *mysql* *postgres* *psql*
+ *mysql* *postgress* *psql*
*informix*
All relational databases support SQL. There is a portion of SQL that is
@@ -231,7 +232,7 @@ be nice to specify a default in your |vimrc|.
2.1 SQLSetType *sqlsettype* *SQLSetType*
--------------
-For the people that work with many different databases, it would be nice to be
+For the people that work with many different databases, it is nice to be
able to flip between the various vendors rules (indent, syntax) on a per
buffer basis, at any time. The ftplugin/sql.vim file defines this function: >
SQLSetType
@@ -259,7 +260,17 @@ of available Vim script names: >
:SQL<Tab><space><Tab>
-2.2 SQL Dialect Default *sql-type-default*
+2.2 SQLGetType *sqlgettype* *SQLGetType*
+--------------
+At anytime you can determine which SQL dialect you are using by calling the
+SQLGetType command. The ftplugin/sql.vim file defines this function: >
+ SQLGetType
+
+This will echo: >
+ Current SQL dialect in use:sqlanywhere
+
+
+2.3 SQL Dialect Default *sql-type-default*
-----------------------
As mentioned earlier, the default syntax rules for Vim is based on Oracle
(PL/SQL). You can override this default by placing one of the following in
@@ -331,6 +342,10 @@ The defaults static maps are: >
imap <buffer> <C-C>T <C-\><C-O>:call sqlcomplete#Map('sqlType')<CR><C-X><C-O>
imap <buffer> <C-C>s <C-\><C-O>:call sqlcomplete#Map('sqlStatement')<CR><C-X><C-O>
+The use of "<C-C>" can be user chosen by using the following in your |.vimrc| as it
+may not work properly on all platforms: >
+ let g:ftplugin_sql_omni_key = '<C-C>'
+>
The static maps (which are based on the syntax highlight groups) follow this
format: >
imap <buffer> <C-C>k <C-\><C-O>:call sqlcomplete#Map('sqlKeyword')<CR><C-X><C-O>
@@ -406,21 +421,25 @@ to display a list of tables, procedures, views and columns. >
To enable the popup, while in INSERT mode, use the following key combinations
for each group (where <C-C> means hold the CTRL key down while pressing
the space bar):
- Table List - <C-C>t
- - <C-X><C-O> (the default map assumes tables)
- Stored Procedure List - <C-C>p
- View List - <C-C>v
- Column List - <C-C>c
-
- Windows platform only - When viewing a popup window displaying the list
- of tables, you can press <C-Right>, this will
- replace the table currently highlighted with
- the column list for that table.
- - When viewing a popup window displaying the list
- of columns, you can press <C-Left>, this will
- replace the column list with the list of tables.
- - This allows you to quickly drill down into a
- table to view it's columns and back again.
+ Table List - <C-C>t
+ - <C-X><C-O> (the default map assumes tables)
+ Stored Procedure List - <C-C>p
+ View List - <C-C>v
+ Column List - <C-C>c
+
+ Drilling In / Out - When viewing a popup window displaying the list
+ of tables, you can press <Right>, this will
+ replace the table currently highlighted with
+ the column list for that table.
+ - When viewing a popup window displaying the list
+ of columns, you can press <Left>, this will
+ replace the column list with the list of tables.
+ - This allows you to quickly drill down into a
+ table to view it's columns and back again.
+ - <Right> and <Left> can be also be chosen via
+ your |.vimrc| >
+ let g:ftplugin_sql_omni_key_right = '<Right>'
+ let g:ftplugin_sql_omni_key_left = '<Left>'
The SQL completion plugin caches various lists that are displayed in
the popup window. This makes the re-displaying of these lists very
@@ -498,30 +517,24 @@ beginning with those characters. >
The SQL completion plugin can also display a list of columns for particular
tables. The column completion is trigger via <C-C>c.
-NOTE: The following example uses <C-Right> to trigger a column list while
-the popup window is active. This map is only available on the Windows
-platforms since *nix does not recognize CTRL and the right arrow held down
-together. If you wish to enable this functionality on a *nix platform choose
-a key and create one of these mappings (see |sql-completion-maps| for further
-details on where to create this imap): >
- imap <buffer> <your_keystroke> <C-R>=sqlcomplete#DrillIntoTable()<CR>
- imap <buffer> <your_keystroke> <C-Y><C-\><C-O>:call sqlcomplete#Map('column')<CR><C-X><C-O>
+NOTE: The following example uses <Right> to trigger a column list while
+ the popup window is active.
Example of using column completion:
- Press <C-C>t again to display the list of tables.
- - When the list is displayed in the completion window, press <C-Right>,
+ - When the list is displayed in the completion window, press <Right>,
this will replace the list of tables, with a list of columns for the
table highlighted (after the same short delay).
- - If you press <C-Left>, this will again replace the column list with the
+ - If you press <Left>, this will again replace the column list with the
list of tables. This allows you to drill into tables and column lists
very quickly.
- - Press <C-Right> again while the same table is highlighted. You will
+ - Press <Right> again while the same table is highlighted. You will
notice there is no delay since the column list has been cached. If you
change the schema of a cached table you can press <C-C>R, which
clears the SQL completion cache.
- - NOTE: <C-Right> and <C-Left> have been designed to work while the
+ - NOTE: <Right> and <Left> have been designed to work while the
completion window is active. If the completion popup window is
- not active, a normal <C-Right> or <C-Left> will be executed.
+ not active, a normal <Right> or <Left> will be executed.
Lets look how we can build a SQL statement dynamically. A select statement
requires a list of columns. There are two ways to build a column list using
@@ -529,7 +542,7 @@ the SQL completion plugin. >
One column at a time:
< 1. After typing SELECT press <C-C>t to display a list of tables.
2. Choose a table from the list.
- 3. Press <C-Right> to display a list of columns.
+ 3. Press <Right> to display a list of columns.
4. Choose the column from the list and press enter.
5. Enter a "," and press <C-C>c. Generating a column list
generally requires having the cursor on a table name. The plugin
@@ -632,7 +645,7 @@ your |vimrc|: >
- When completing tables, procedure or views and using dbext.vim 3.00
or higher the list of objects will also include the owner name.
When completing these objects and omni_sql_include_owner is enabled
- the owner name will be replaced. >
+ the owner name will be be replaced. >
omni_sql_precache_syntax_groups
< - Default:
@@ -684,15 +697,15 @@ plugin. >
<C-C>L
< - Displays a comma separated list of columns for a specific table.
This should only be used when the completion window is active. >
- <C-Right>
+ <Right>
< - Displays a list of columns for the table currently highlighted in
- the completion window. <C-Right> is not recognized on most Unix
+ the completion window. <Right> is not recognized on most Unix
systems, so this maps is only created on the Windows platform.
If you would like the same feature on Unix, choose a different key
and make the same map in your vimrc. >
- <C-Left>
+ <Left>
< - Displays the list of tables.
- <C-Left> is not recognized on most Unix systems, so this maps is
+ <Left> is not recognized on most Unix systems, so this maps is
only created on the Windows platform. If you would like the same
feature on Unix, choose a different key and make the same map in
your vimrc. >
View
14 runtime/doc/gui.txt
@@ -1,4 +1,4 @@
-*gui.txt* For Vim version 7.2. Last change: 2008 Jun 14
+*gui.txt* For Vim version 7.2. Last change: 2009 Jan 22
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -35,13 +35,13 @@ GUI version of Vim with:
The X11 version of Vim can run both in GUI and in non-GUI mode. See
|gui-x11-start|.
- *gui-init* *gvimrc* *.gvimrc* *_gvimrc*
+ *gui-init* *gvimrc* *.gvimrc* *_gvimrc* *$MYGVIMRC*
The gvimrc file is where GUI-specific startup commands should be placed. It
is always sourced after the |vimrc| file. If you have one then the $MYGVIMRC
environment variable has its name.
When the GUI starts up initializations are carried out, in this order:
-- The 'term' option is set to "builgin_gui" and terminal options are reset to
+- The 'term' option is set to "builtin_gui" and terminal options are reset to
their default value for the GUI |terminal-options|.
- If the system menu file exists, it is sourced. The name of this file is
normally "$VIMRUNTIME/menu.vim". You can check this with ":version". Also
@@ -473,9 +473,11 @@ this line to your .vimrc file (NOT your .gvimrc file!): >
:let did_install_default_menus = 1
If you also want to avoid the Syntax menu: >
:let did_install_syntax_menu = 1
-If you do want the Syntax menu but not all the entries for each available
-syntax file (which take quite a bit of time to load): >
- :let skip_syntax_sel_menu = 1
+The first item in the Syntax menu can be used to show all available filetypes
+in the menu (which can take a bit of time to load). If you want to have all
+filetypes already present at startup, add: >
+ :let do_syntax_sel_menu = 1
+
<
*console-menus*
Although this documentation is in the GUI section, you can actually use menus
View
17 runtime/doc/gui_x11.txt
@@ -1,4 +1,4 @@
-*gui_x11.txt* For Vim version 7.2. Last change: 2007 Dec 09
+*gui_x11.txt* For Vim version 7.2. Last change: 2009 Oct 28
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -540,13 +540,16 @@ Of these three, Vim uses PRIMARY when reading and writing the "* register
register. Vim does not access the SECONDARY selection.
Examples: (assuming the default option values)
-- Select an URL in Visual mode in Vim. Go to a text field in Netscape and
- click the middle mouse button. The selected text will be inserted
- (hopefully!).
-- Select some text in Netscape by dragging with the mouse. Go to Vim and
+- Select an URL in Visual mode in Vim. Go to your browser and click the
+ middle mouse button in the URL text field. The selected text will be
+ inserted (hopefully!). Note: in Firefox you can set the
+ middlemouse.contentLoadURL preference to true in about:config, then the
+ selected URL will be used when pressing middle mouse button in most places
+ in the window.
+- Select some text in your browser by dragging with the mouse. Go to Vim and
press the middle mouse button: The selected text is inserted.
-- Select some text in Vim and do "+y. Go to Netscape, select some text in a
- textfield by dragging with the mouse. Now use the right mouse button and
+- Select some text in Vim and do "+y. Go to your browser, select some text in
+ a textfield by dragging with the mouse. Now use the right mouse button and
select "Paste" from the popup menu. The selected text is overwritten by the
text from Vim.
Note that the text in the "+ register remains available when making a Visual
View
8 runtime/doc/hangulin.txt
@@ -1,8 +1,12 @@
-*hangulin.txt* For Vim version 7.2. Last change: 2006 Apr 02
+*hangulin.txt* For Vim version 7.2. Last change: 2009 Jun 24
VIM REFERENCE MANUAL by Chi-Deok Hwang and Sung-Hyun Nam
+NOTE: The |+hangul_input| feature is scheduled to be removed. If you want to
+keep it, please send a message to the Vim user maillist.
+
+
Introduction *hangul*
------------
It is to input hangul, the Korean language, with VIM GUI version.
@@ -96,6 +100,6 @@ Bug or Comment
Send comments, patches and suggestions to:
Chi-Deok Hwang <hwang@mizi.co.kr>
- Nam SungHyun <namsh@kldp.org>
+ SungHyun Nam <goweol@gmail.com>
vim:tw=78:ts=8:ft=help:norl:
View
1  runtime/doc/help.txt
@@ -144,6 +144,7 @@ Special issues ~
|hebrew.txt| Hebrew language support and editing
|russian.txt| Russian language support and editing
|ft_ada.txt| Ada (the programming language) support
+|ft_sql.txt| about the SQL filetype plugin
|hangulin.txt| Hangul (Korean) input mode
|rileft.txt| right-to-left editing mode
View
4 runtime/doc/if_ole.txt
@@ -1,4 +1,4 @@
-*if_ole.txt* For Vim version 7.2. Last change: 2007 May 10
+*if_ole.txt* For Vim version 7.2. Last change: 2008 Aug 16
VIM REFERENCE MANUAL by Paul Moore
@@ -115,7 +115,7 @@ Example (Visual Basic syntax) >
3. The "normal" command *ole-normal*
Due to the way Vim processes OLE Automation commands, combined with the method
-of implementation of the ex command :normal, it is not possible to execute the
+of implementation of the Ex command :normal, it is not possible to execute the
:normal command via OLE automation. Any attempt to do so will fail, probably
harmlessly, although possibly in unpredictable ways.
View
4 runtime/doc/if_pyth.txt
@@ -1,4 +1,4 @@
-*if_pyth.txt* For Vim version 7.2. Last change: 2006 Apr 30
+*if_pyth.txt* For Vim version 7.2. Last change: 2008 Aug 16
VIM REFERENCE MANUAL by Paul Moore
@@ -93,7 +93,7 @@ module before using it: >
Overview >
:py print "Hello" # displays a message
- :py vim.command(cmd) # execute an ex command
+ :py vim.command(cmd) # execute an Ex command
:py w = vim.windows[n] # gets window "n"
:py cw = vim.current.window # gets the current window
:py b = vim.buffers[n] # gets buffer "n"
View
4 runtime/doc/if_ruby.txt
@@ -1,4 +1,4 @@
-*if_ruby.txt* For Vim version 7.2. Last change: 2006 Apr 30
+*if_ruby.txt* For Vim version 7.2. Last change: 2008 Aug 16
VIM REFERENCE MANUAL by Shugo Maeda
@@ -79,7 +79,7 @@ Ruby code gets all of its access to vim via the "VIM" module.
Overview >
print "Hello" # displays a message
- VIM.command(cmd) # execute an ex command
+ VIM.command(cmd) # execute an Ex command
num = VIM::Window.count # gets the number of windows
w = VIM::Window[n] # gets window "n"
cw = VIM::Window.current # gets the current window
View
20 runtime/doc/if_tcl.txt
@@ -1,4 +1,4 @@
-*if_tcl.txt* For Vim version 7.2. Last change: 2008 Jun 26
+*if_tcl.txt* For Vim version 7.2. Last change: 2008 Aug 16
VIM REFERENCE MANUAL by Ingo Wilken
@@ -83,7 +83,7 @@ The following commands are implemented: >
::vim::beep # Guess.
::vim::buffer {n} # Create Tcl command for one buffer.
::vim::buffer list # Create Tcl commands for all buffers.
- ::vim::command [-quiet] {cmd} # Execute an ex command.
+ ::vim::command [-quiet] {cmd} # Execute an Ex command.
::vim::expr {expr} # Use Vim's expression evaluator.
::vim::option {opt} # Get vim option.
::vim::option {opt} {val} # Set vim option.
@@ -116,7 +116,7 @@ Commands:
::vim::command {cmd} *tcl-command*
::vim::command -quiet {cmd}
- Execute the vim (ex-mode) command {cmd}. Any ex command that affects
+ Execute the vim (ex-mode) command {cmd}. Any Ex command that affects
a buffer or window uses the current buffer/current window. Does not
return a result other than a standard Tcl error code. After this
command is completed, the "::vim::current" variable is updated.
@@ -210,7 +210,7 @@ Variables:
line *tcl-var-line*
lnum *tcl-var-lnum*
- These global variables are only available if the ":tcldo" ex command
+ These global variables are only available if the ":tcldo" Ex command
is being executed. They contain the text and line number of the
current line. When the Tcl command invoked by ":tcldo" is completed,
the current line is set to the contents of the "line" variable, unless
@@ -233,7 +233,7 @@ Let's assume the name of the window command is stored in the Tcl variable "win",
i.e. "$win" calls the command. The following options are available: >
$win buffer # Create Tcl command for window's buffer.
- $win command {cmd} # Execute ex command in windows context.
+ $win command {cmd} # Execute Ex command in windows context.
$win cursor # Get current cursor position.
$win cursor {var} # Set cursor position from array variable.
$win cursor {row} {col} # Set cursor position.
@@ -312,7 +312,7 @@ Let's assume the name of the buffer command is stored in the Tcl variable "buf",
i.e. "$buf" calls the command. The following options are available: >
$buf append {n} {str} # Append a line to buffer, after line {n}.
- $buf command {cmd} # Execute ex command in buffers context.
+ $buf command {cmd} # Execute Ex command in buffers context.
$buf count # Report number of lines in buffer.
$buf delcmd {cmd} # Call Tcl command when buffer is deleted.
$buf delete {n} # Delete a single line.
@@ -438,7 +438,7 @@ used to display messages in vim.
==============================================================================
7. Known bugs & problems *tcl-bugs*
-Calling one of the Tcl ex commands from inside Tcl (via "::vim::command") may
+Calling one of the Tcl Ex commands from inside Tcl (via "::vim::command") may
have unexpected side effects. The command creates a new interpreter, which
has the same abilities as the standard interpreter - making "::vim::command"
available in a safe child interpreter therefore makes the child unsafe. (It
@@ -487,11 +487,11 @@ This script adds a consecutive number to each line in the current range:
incr i ; incr n
}
-The same can also be done quickly with two ex commands, using ":tcldo":
+The same can also be done quickly with two Ex commands, using ":tcldo":
:tcl set n 1
:[range]tcldo set line "$n\t$line" ; incr n
-This procedure runs an ex command on each buffer (idea stolen from Ron Aaron):
+This procedure runs an Ex command on each buffer (idea stolen from Ron Aaron):
proc eachbuf { cmd } {
foreach b [::vim::buffer list] {
$b command $cmd
@@ -500,7 +500,7 @@ This procedure runs an ex command on each buffer (idea stolen from Ron Aaron):
Use it like this:
:tcl eachbuf %s/foo/bar/g
Be careful with Tcl's string and backslash substitution, tough. If in doubt,
-surround the ex command with curly braces.
+surround the Ex command with curly braces.
If you want to add some Tcl procedures permanently to vim, just place them in
View
5 runtime/doc/indent.txt
@@ -1,4 +1,4 @@
-*indent.txt* For Vim version 7.2. Last change: 2008 Jul 30
+*indent.txt* For Vim version 7.2. Last change: 2009 Nov 12
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -609,8 +609,9 @@ b:sh_indent_options['continuation-line']
b:sh_indent_options['case-labels']
Amount of indent to add for case labels.
+ (not actually implemented)
-b:sh_indent_options['case-statement']
+b:sh_indent_options['case-statements']
Amount of indent to add for case statements.
b:sh_indent_options['case-breaks']
View
10 runtime/doc/index.txt
@@ -1,4 +1,4 @@
-*index.txt* For Vim version 7.2. Last change: 2008 May 04
+*index.txt* For Vim version 7.2. Last change: 2009 Jul 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -522,7 +522,7 @@ tag command action in Normal mode ~
|CTRL-W_+| CTRL-W + increase current window height N lines
|CTRL-W_-| CTRL-W - decrease current window height N lines
|CTRL-W_<| CTRL-W < decrease current window width N columns
-|CTRL-W_=| CTRL-W = make all windows the same height
+|CTRL-W_=| CTRL-W = make all windows the same height & width
|CTRL-W_>| CTRL-W > increase current window width N columns
|CTRL-W_H| CTRL-W H move current window to the far left
|CTRL-W_J| CTRL-W J move current window to the very bottom
@@ -572,7 +572,7 @@ tag command action in Normal mode ~
window N lines high
|CTRL-W_t| CTRL-W t go to top window
|CTRL-W_v| CTRL-W v split current window vertically, new window
- N lines wide
+ N columns wide
|CTRL-W_w| CTRL-W w go to N next window (wrap around)
|CTRL-W_x| CTRL-W x exchange current window with window N
(default: next window)
@@ -1339,6 +1339,7 @@ The commands are sorted on the non-optional part of their name.
|:number| :nu[mber] print lines with line number
|:nunmap| :nun[map] like ":unmap" but for Normal mode
|:nunmenu| :nunme[nu] remove menu for Normal mode
+|:oldfiles| :ol[dfiles] list files that have marks in the viminfo file
|:open| :o[pen] start open mode (not implemented)
|:omap| :om[ap] like ":map" but for Operator-pending mode
|:omapclear| :omapc[lear] remove all mappings for Operator-pending mode
@@ -1436,7 +1437,7 @@ The commands are sorted on the non-optional part of their name.
|:shell| :sh[ell] escape to a shell
|:simalt| :sim[alt] Win32 GUI: simulate Windows ALT key
|:sign| :sig[n] manipulate signs
-|:silent| :sil[ent] Run a command silently
+|:silent| :sil[ent] run a command silently
|:sleep| :sl[eep] do nothing for a few seconds
|:slast| :sla[st] split window and go to last file in the
argument list
@@ -1525,6 +1526,7 @@ The commands are sorted on the non-optional part of their name.
|:unlockvar| :unlo[ckvar] unlock variables
|:unmap| :unm[ap] remove mapping
|:unmenu| :unme[nu] remove menu
+|:unsilent| :uns[ilent] run a command not silently
|:update| :up[date] write buffer if modified
|:vglobal| :v[global] execute commands for not matching lines
|:version| :ve[rsion] print version number and other info
View
21 runtime/doc/insert.txt
@@ -1,4 +1,4 @@
-*insert.txt* For Vim version 7.2. Last change: 2008 Jun 21
+*insert.txt* For Vim version 7.2. Last change: 2009 Jul 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -123,6 +123,7 @@ CTRL-R {0-9a-z"%#*+:.-=} *i_CTRL-R*
':' the last command-line
'.' the last inserted text
'-' the last small (less than a line) delete
+ *i_CTRL-R_=*
'=' the expression register: you are prompted to
enter an expression (see |expression|)
Note that 0x80 (128 decimal) is used for
@@ -133,6 +134,8 @@ CTRL-R {0-9a-z"%#*+:.-=} *i_CTRL-R*
When the result is a |List| the items are used
as lines. They can have line breaks inside
too.
+ When the result is a Float it's automatically
+ converted to a String.
See |registers| about registers. {not in Vi}
CTRL-R CTRL-R {0-9a-z"%#*+/:.-=} *i_CTRL-R_CTRL-R*
@@ -660,7 +663,8 @@ CTRL-X CTRL-L Search backwards for a line that starts with the
CTRL-X CTRL-L After expanding a line you can additionally get the
line next to it by typing CTRL-X CTRL-L again, unless
- a double CTRL-X is used.
+ a double CTRL-X is used. Only works for loaded
+ buffers.
Completing keywords in current file *compl-current*
@@ -1488,7 +1492,7 @@ with data pulled directly from within a database. For detailed instructions
and a tutorial see |omni-sql-completion|.
The SQL completion plugin can be used in conjunction with other completion
-plugins. For example, the PHP filetype has it's own completion plugin.
+plugins. For example, the PHP filetype has its own completion plugin.
Since PHP is often used to generate dynamic website by accessing a database,
the SQL completion plugin can also be enabled. This allows you to complete
PHP code and SQL code at the same time.
@@ -1725,14 +1729,9 @@ too long when appending characters a line break is automatically inserted.
These two commands will keep on asking for lines, until you type a line
containing only a ".". Watch out for lines starting with a backslash, see
|line-continuation|.
-When these commands are used with |:global| or |:vglobal| then the lines are
-obtained from the text following the command. Separate lines with a NL
-escaped with a backslash: >
- :global/abc/insert\
- one line\
- another line
-The final "." is not needed then.
-NOTE: ":append" and ":insert" don't work properly in between ":if" and
+
+NOTE: These commands cannot be used with |:global| or |:vglobal|.
+":append" and ":insert" don't work properly in between ":if" and
":endif", ":for" and ":endfor", ":while" and ":endwhile".
*:start* *:startinsert*
View
6 runtime/doc/intro.txt
@@ -1,4 +1,4 @@
-*intro.txt* For Vim version 7.2. Last change: 2008 Jun 24
+*intro.txt* For Vim version 7.2. Last change: 2009 Apr 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -43,6 +43,10 @@ between different computers and terminals. Besides the remarks given in this
document, there is a separate document for each supported system, see
|sys-file-list|.
+ *pronounce*
+Vim is pronounced as one word, like Jim, not vi-ai-em. It's written with a
+capital, since it's a name, again like Jim.
+
This manual is a reference for all the Vim commands and options. This is not
an introduction to the use of Vi or Vim, it gets a bit complicated here and
there. For beginners, there is a hands-on |tutor|. To learn using Vim, read
View
23 runtime/doc/map.txt
@@ -1,4 +1,4 @@
-*map.txt* For Vim version 7.2. Last change: 2008 Aug 09
+*map.txt* For Vim version 7.2. Last change: 2009 Nov 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -272,9 +272,10 @@ as a special key.
1.3 MAPPING AND MODES *:map-modes*
*mapmode-nvo* *mapmode-n* *mapmode-v* *mapmode-o*
-There are five sets of mappings
+There are six sets of mappings
- For Normal mode: When typing commands.
- For Visual mode: When typing commands while the Visual area is highlighted.
+- For Select mode: like Visual mode but typing text replaces the selection.
- For Operator-pending mode: When an operator is pending (after "d", "y", "c",
etc.). See below: |omap-info|.
- For Insert mode. These are also used in Replace mode.
@@ -299,6 +300,9 @@ Overview of which map command works in which mode:
Some commands work both in Visual and Select mode, some in only one. Note
that quite often "Visual" is mentioned where both Visual and Select mode
apply. |Select-mode-mapping|
+NOTE: Mapping a printable character in Select mode may confuse the user. It's
+better to explicitly use :xmap and :smap for printable characters. Or use
+:sunmap after defining the mapping.
commands: modes: ~
Visual Select ~
@@ -590,11 +594,14 @@ otherwise you would not be able to use those commands anymore. Here are a few
suggestions:
- Function keys <F2>, <F3>, etc.. Also the shifted function keys <S-F1>,
<S-F2>, etc. Note that <F1> is already used for the help command.
-- Meta-keys (with the ALT key pressed). |:map-alt-keys|
+- Meta-keys (with the ALT key pressed). Depending on your keybord accented
+ characters may be used as well. |:map-alt-keys|
- Use the '_' or ',' character and then any other character. The "_" and ","
commands do exist in Vim (see |_| and |,|), but you probably never use them.
- Use a key that is a synonym for another command. For example: CTRL-P and
CTRL-N. Use an extra character to allow more mappings.
+- The key defined by <Leader> and one or more other keys. This is especially
+ useful in scripts. |mapleader|
See the file "index" for keys that are not used and thus can be mapped without
losing any builtin function. You can also use ":help {key}^D" to find out if
@@ -1082,7 +1089,7 @@ feature}.
It is possible to define your own Ex commands. A user-defined command can act
just like a built-in command (it can have a range or arguments, arguments can
be completed as filenames or buffer names, etc), except that when the command
-is executed, it is transformed into a normal ex command and then executed.
+is executed, it is transformed into a normal Ex command and then executed.
For starters: See section |40.2| in the user manual.
@@ -1150,7 +1157,7 @@ See |:verbose-cmd| for more information.
Command attributes
-User-defined commands are treated by Vim just like any other ex commands. They
+User-defined commands are treated by Vim just like any other Ex commands. They
can have arguments, or have a range specified. Arguments are subject to
completion as filenames, buffers, etc. Exactly how this works depends upon the
command's attributes, which are specified when the command is defined.
@@ -1240,7 +1247,7 @@ The function arguments are:
CursorPos the cursor position in it (byte index)
The function may use these for determining context. For the "custom"
argument, it is not necessary to filter candidates against the (implicit
-pattern in) ArgLead. Vim will do filter the candidates with its regexp engine
+pattern in) ArgLead. Vim will filter the candidates with its regexp engine
after function return, and this is probably more efficient in most cases. For
the "customlist" argument, Vim will not filter the returned completion
candidates and the user supplied function should filter the candidates.
@@ -1256,7 +1263,7 @@ the 'path' option: >
:com -nargs=1 -bang -complete=customlist,EditFileComplete
\ EditFile edit<bang> <args>
:fun EditFileComplete(A,L,P)
- : return split(globpath(&path, a:ArgLead), "\n")
+ : return split(globpath(&path, a:A), "\n")
:endfun
<
@@ -1405,7 +1412,7 @@ errors and the "update" command to write modified buffers): >
This will invoke: >
:call Allargs("%s/foo/bar/ge|update")
<
-When defining an user command in a script, it will be able to call functions
+When defining a user command in a script, it will be able to call functions
local to the script and use mappings local to the script. When the user
invokes the user command, it will run in the context of the script it was
defined in. This matters if |<SID>| is used in a command.
View
32 runtime/doc/mbyte.txt
@@ -1,4 +1,4 @@
-*mbyte.txt* For Vim version 7.2. Last change: 2008 Jun 21
+*mbyte.txt* For Vim version 7.2. Last change: 2009 Nov 17
VIM REFERENCE MANUAL by Bram Moolenaar et al.
@@ -555,7 +555,7 @@ Unfortunately, using fonts in X11 is complicated. The name of a single-byte
font is a long string. For multi-byte fonts we need several of these...
Note: Most of this is no longer relevant for GTK+ 2. Selecting a font via
-its XLFD is not supported anymore; see 'guifont' for an example of how to
+its XLFD is not supported; see 'guifont' for an example of how to
set the font. Do yourself a favor and ignore the |XLFD| and |xfontset|
sections below.
@@ -1030,7 +1030,7 @@ For Command-line mode the flag is NOT remembered. You are expected to type an
Ex command first, which is ASCII.
For typing search patterns the 'imsearch' option is used. It can be set to
use the same value as for 'iminsert'.
-
+ *lCursor*
It is possible to give the GUI cursor another color when the language mappings
are being used. This is disabled by default, to avoid that the cursor becomes
invisible when you use a non-standard background color. Here is an example to
@@ -1246,21 +1246,37 @@ character sets. Therefore it is possible to write text in any language using
Unicode (with a few rarely used languages excluded). And it's mostly possible
to mix these languages in one file, which is impossible with other encodings.
-Unicode can be encoded in several ways. The two most popular ones are UCS-2,
-which uses 16-bit words and UTF-8, which uses one or more bytes for each
-character. Vim can support all of these encodings, but always uses UTF-8
+Unicode can be encoded in several ways. The most popular one is UTF-8, which
+uses one or more bytes for each character and is backwards compatible with
+ASCII. On MS-Windows UTF-16 is also used (previously UCS-2), which uses
+16-bit words. Vim can support all of these encodings, but always uses UTF-8
internally.
-Vim has comprehensive UTF-8 support. It appears to work in:
+Vim has comprehensive UTF-8 support. It works well in:
- xterm with utf-8 support enabled
- Athena, Motif and GTK GUI
- MS-Windows GUI
+- several other platforms
Double-width characters are supported. This works best with 'guifontwide' or
'guifontset'. When using only 'guifont' the wide characters are drawn in the
normal width and a space to fill the gap. Note that the 'guifontset' option
is no longer relevant in the GTK+ 2 GUI.
+ *bom-bytes*
+When reading a file a BOM (Byte Order Mark) can be used to recognize the
+Unicode encoding:
+ EF BB BF utf-8
+ FF FE utf-16 big endian
+ FE FF utf-16 little endian
+ 00 00 FE FF utf-32 big endian
+ FF FE 00 00 utf-32 little endian
+
+Utf-8 is the recommended encoding. Note that it's difficult to tell utf-16
+and utf-32 apart. Utf-16 is often used on MS-Windows, utf-32 is not
+widespread as file format.
+
+
*mbyte-combining* *mbyte-composing*
A composing or combining character is used to change the meaning of the
character before it. The combining characters are drawn on top of the
@@ -1402,7 +1418,7 @@ options.txt for detailed information.
Contributions specifically for the multi-byte features by:
Chi-Deok Hwang <hwang@mizi.co.kr>
- Nam SungHyun <namsh@kldp.org>
+ SungHyun Nam <goweol@gmail.com>
K.Nagano <nagano@atese.advantest.co.jp>
Taro Muraoka <koron@tka.att.ne.jp>
Yasuhiro Matsumoto <mattn@mail.goo.ne.jp>
View
16 runtime/doc/message.txt
@@ -1,4 +1,4 @@
-*message.txt* For Vim version 7.2. Last change: 2007 Aug 19
+*message.txt* For Vim version 7.2. Last change: 2009 Oct 28
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -135,8 +135,8 @@ This means that there are not enough colors available for Vim. It will still
run, but some of the colors will not appear in the specified color. Try
stopping other applications that use many colors, or start them after starting
gvim.
-Netscape is known to consume a lot of colors. You can avoid this by telling
-it to use its own colormap: >
+Browsers are known to consume a lot of colors. You can avoid this with
+netscape by telling it to use its own colormap: >
netscape -install
Or tell it to limit to a certain number of colors (64 should work well): >
netscape -ncols 64
@@ -567,7 +567,7 @@ allowed for the command that was used.
Unable to open swap file for "{filename}", recovery impossible
Vim was not able to create a swap file. You can still edit the file, but if
-Vim unexpected exits the changes will be lost. And Vim may consume a lot of
+Vim unexpectedly exits the changes will be lost. And Vim may consume a lot of
memory when editing a big file. You may want to change the 'directory' option
to avoid this error. See |swap-file|.
@@ -758,9 +758,9 @@ and the screen is about to be redrawn:
-> Press 'k', <Up>, 'u', 'b' or 'g' to scroll back in the messages. This
works the same way as at the |more-prompt|. Only works when 'compatible'
is off and 'more' is on.
--> Pressing 'j', 'd' or <Down> is ignored when messages scrolled off the top
- of the screen, 'compatible' is off and 'more' is on, to avoid that typing
- one 'j' too many causes the messages to disappear.
+-> Pressing 'j', 'f', 'd' or <Down> is ignored when messages scrolled off the
+ top of the screen, 'compatible' is off and 'more' is on, to avoid that
+ typing one 'j' or 'f' too many causes the messages to disappear.
-> Press <C-Y> to copy (yank) a modeless selection to the clipboard register.
-> Use a menu. The characters defined for Cmdline-mode are used.
-> When 'mouse' contains the 'r' flag, clicking the left mouse button works
@@ -795,7 +795,7 @@ group.
Type effect ~
<CR> or <NL> or j or <Down> one more line
d down a page (half a screen)
- <Space> or <PageDown> down a screen
+ <Space> or f or <PageDown> down a screen
G down all the way, until the hit-enter
prompt
View
23 runtime/doc/motion.txt
@@ -1,4 +1,4 @@
-*motion.txt* For Vim version 7.2. Last change: 2008 Aug 03
+*motion.txt* For Vim version 7.2. Last change: 2009 Sep 15