Skip to content
Snippets Groups Projects
Commit 8f3f58f2 authored by Bram Moolenaar's avatar Bram Moolenaar
Browse files

Update documentation files.

parent 28c37959
No related branches found
No related tags found
No related merge requests found
Showing
with 322 additions and 210 deletions
*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 VIM REFERENCE MANUAL by Bram Moolenaar
...@@ -59,10 +59,10 @@ Note: The ":autocmd" command cannot be followed by another command, since any ...@@ -59,10 +59,10 @@ Note: The ":autocmd" command cannot be followed by another command, since any
:au[tocmd] [group] {event} {pat} [nested] {cmd} :au[tocmd] [group] {event} {pat} [nested] {cmd}
Add {cmd} to the list of commands that Vim will Add {cmd} to the list of commands that Vim will
execute automatically on {event} for a file matching execute automatically on {event} for a file matching
{pat}. Vim always adds the {cmd} after existing {pat} |autocmd-patterns|.
autocommands, so that the autocommands execute in the Vim always adds the {cmd} after existing autocommands,
order in which they were given. See |autocmd-nested| so that the autocommands execute in the order in which
for [nested]. they were given. See |autocmd-nested| for [nested].
The special pattern <buffer> or <buffer=N> defines a buffer-local autocommand. The special pattern <buffer> or <buffer=N> defines a buffer-local autocommand.
See |autocmd-buflocal|. See |autocmd-buflocal|.
...@@ -551,7 +551,7 @@ FileChangedShell When Vim notices that the modification time of ...@@ -551,7 +551,7 @@ FileChangedShell When Vim notices that the modification time of
buffer that was changed "<afile>". buffer that was changed "<afile>".
NOTE: The commands must not change the current NOTE: The commands must not change the current
buffer, jump to another buffer or delete a buffer, jump to another buffer or delete a
buffer. *E246* buffer. *E246* *E811*
NOTE: This event never nests, to avoid an NOTE: This event never nests, to avoid an
endless loop. This means that while executing endless loop. This means that while executing
commands for the FileChangedShell event no 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 ...@@ -835,9 +835,9 @@ The file pattern {pat} is tested for a match against the file name in one of
two ways: two ways:
1. When there is no '/' in the pattern, Vim checks for a match against only 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). 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 2. When there is a '/' in the pattern, Vim checks for a match against both the
both short file name (as you typed it) and the full file name (after short file name (as you typed it) and the full file name (after expanding
expanding it to a full path and resolving symbolic links). it to a full path and resolving symbolic links).
The special pattern <buffer> or <buffer=N> is used for buffer-local The special pattern <buffer> or <buffer=N> is used for buffer-local
autocommands |autocmd-buflocal|. This pattern is not matched against the name autocommands |autocmd-buflocal|. This pattern is not matched against the name
...@@ -1052,7 +1052,7 @@ option will not cause any commands to be executed. ...@@ -1052,7 +1052,7 @@ option will not cause any commands to be executed.
*:doautoa* *:doautoall* *:doautoa* *:doautoall*
:doautoa[ll] [group] {event} [fname] :doautoa[ll] [group] {event} [fname]
Like ":doautocmd", but apply the autocommands to each 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 the autocommands, not the buffers to which they are
applied. applied.
Careful: Don't use this for autocommands that delete a Careful: Don't use this for autocommands that delete a
......
*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 VIM REFERENCE MANUAL by Bram Moolenaar
...@@ -506,9 +506,9 @@ comment (starting with '"') after the ":!" command. ...@@ -506,9 +506,9 @@ comment (starting with '"') after the ":!" command.
{filter}. Vim replaces the optional bangs with the {filter}. Vim replaces the optional bangs with the
latest given command and appends the optional [arg]. latest given command and appends the optional [arg].
Vim saves the output of the filter command in a Vim saves the output of the filter command in a
temporary file and then reads the file into the temporary file and then reads the file into the buffer
buffer. Vim uses the 'shellredir' option to redirect |tempfile|. Vim uses the 'shellredir' option to
the filter output to the temporary file. redirect the filter output to the temporary file.
However, if the 'shelltemp' option is off then pipes However, if the 'shelltemp' option is off then pipes
are used when possible (on Unix). are used when possible (on Unix).
When the 'R' flag is included in 'cpoptions' marks in When the 'R' flag is included in 'cpoptions' marks in
...@@ -524,7 +524,9 @@ comment (starting with '"') after the ":!" command. ...@@ -524,7 +524,9 @@ comment (starting with '"') after the ":!" command.
option is empty (this is the default), use the option is empty (this is the default), use the
internal formatting function |C-indenting|. But when internal formatting function |C-indenting|. But when
'indentexpr' is not empty, it will be used instead '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}. == Filter [count] lines like with ={motion}.
...@@ -534,6 +536,22 @@ comment (starting with '"') after the ":!" command. ...@@ -534,6 +536,22 @@ comment (starting with '"') after the ":!" command.
{not in Vi} {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* 4.2 Substitute *:substitute*
*:s* *:su* *:s* *:su*
:[range]s[ubstitute]/{pattern}/{string}/[flags] [count] :[range]s[ubstitute]/{pattern}/{string}/[flags] [count]
...@@ -861,7 +879,10 @@ inside of strings can change! Also see 'softtabstop' option. > ...@@ -861,7 +879,10 @@ inside of strings can change! Also see 'softtabstop' option. >
*:reg* *:registers* *:reg* *:registers*
:reg[isters] Display the contents of all numbered and named :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 :reg[isters] {arg} Display the contents of the numbered and named
registers that are mentioned in {arg}. For example: > 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 ...@@ -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: and whether the corners are on an existing character. (Implementation detail:
it actually works by first putting the register after the selection and then it actually works by first putting the register after the selection and then
deleting the selection.) 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* *blockwise-register*
If you use a blockwise Visual mode command to get the text into the 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* ...@@ -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 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 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 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 to the last used register. Thus when appending using an uppercase register
store the deleted text in any 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) 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 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 "" 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 ...@@ -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 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 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 the expression. If you do not enter an expression, Vim uses the previous
expression (like with the "/" command). The expression must evaluate to a expression (like with the "/" command).
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). The expression must evaluate to a String. A Number is always automatically
If the "= register is used for the "p" command, the string is split up at <NL> converted to a String. For the "p" and ":put" command, if the result is a
characters. If the string ends in a <NL>, it is regarded as a linewise 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} register. {not in Vi}
7. Selection and drop registers "*, "+ and "~ 7. Selection and drop registers "*, "+ and "~
......
*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 VIM REFERENCE MANUAL by Bram Moolenaar
...@@ -118,8 +118,6 @@ CTRL-U Remove all characters between the cursor position and ...@@ -118,8 +118,6 @@ CTRL-U Remove all characters between the cursor position and
preferred behavior, add the following to your .vimrc: > preferred behavior, add the following to your .vimrc: >
:cnoremap <C-U> <C-E><C-U> :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>* *c_<Insert>*
<Insert> Toggle between insert and overstrike. {not in Vi} <Insert> Toggle between insert and overstrike. {not in Vi}
...@@ -485,14 +483,14 @@ And this in your .vimrc: > ...@@ -485,14 +483,14 @@ And this in your .vimrc: >
The Ex commands have a few specialties: The Ex commands have a few specialties:
*:quote* *:quote* *:comment*
'"' at the start of a line causes the whole line to be ignored. '"' '"' 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 after a command causes the rest of the line to be ignored. This can be used
to add comments. Example: > to add comments. Example: >
:set ai "set 'autoindent' option :set ai "set 'autoindent' option
It is not possible to add a comment to a shell command ":!cmd" or to the 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 ":map" command and a few others, because they see the '"' as part of their
argument. argument. This is mentioned where the command is explained.
*:bar* *:\bar* *:bar* *:\bar*
'|' can be used to separate commands, so you can give multiple commands in one '|' 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 ...@@ -744,8 +742,8 @@ characters have a special meaning. These can also be used in the expression
function expand() |expand()|. function expand() |expand()|.
% Is replaced with the current file name. *:_%* *c_%* % Is replaced with the current file name. *:_%* *c_%*
# Is replaced with the alternate file name. *:_#* *c_#* # Is replaced with the alternate file name. *:_#* *c_#*
#n (where n is a number) is replaced with the file name of #n (where n is a number) is replaced with *:_#0* *:_#n*
buffer n. "#0" is the same as "#". the file name of buffer n. "#0" is the same as "#". *c_#n*
## Is replaced with all names in the argument list *:_##* *c_##* ## Is replaced with all names in the argument list *:_##* *c_##*
concatenated, separated by spaces. Each space in a name concatenated, separated by spaces. Each space in a name
is preceded with a backslash. is preceded with a backslash.
...@@ -949,7 +947,7 @@ for the file "$home" in the root directory. A few examples: ...@@ -949,7 +947,7 @@ for the file "$home" in the root directory. A few examples:
============================================================================== ==============================================================================
6. Command-line window *cmdline-window* *cmdwin* 6. Command-line window *cmdline-window* *cmdwin*
*command-line-window*
In the command-line window the command line can be edited just like editing 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 text in any window. It is a special kind of window, because you cannot leave
it in a normal way. it in a normal way.
...@@ -957,12 +955,12 @@ it in a normal way. ...@@ -957,12 +955,12 @@ it in a normal way.
feature} feature}
OPEN OPEN *c_CTRL-F* *q:* *q/* *q?*
There are two ways to open the command-line window: There are two ways to open the command-line window:
1. From Command-line mode, use the key specified with the 'cedit' option. 1. From Command-line mode, use the key specified with the 'cedit' option.
The default is CTRL-F when 'compatible' is not set. 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 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?"). Note that this is not possible while recording is in progress (the
"q" stops recording then). "q" stops recording then).
...@@ -992,7 +990,8 @@ nesting. ...@@ -992,7 +990,8 @@ nesting.
The command-line window is not a normal window. It is not possible to move to 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 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 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* CLOSE *E199*
...@@ -1027,7 +1026,7 @@ VARIOUS ...@@ -1027,7 +1026,7 @@ VARIOUS
The command-line window cannot be used: The command-line window cannot be used:
- when there already is a command-line window (no nesting) - 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 - when Vim was not compiled with the +vertsplit feature
Some options are set when the command-line window is opened: Some options are set when the command-line window is opened:
......
*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 VIM REFERENCE MANUAL by Bram Moolenaar
...@@ -10,7 +10,8 @@ This is for debugging Vim itself, when it doesn't work properly. ...@@ -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| For debugging Vim scripts, functions, etc. see |debug-scripts|
1. Location of a crash, using gcc and gdb |debug-gcc| 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. ...@@ -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 If the Windows version of Vim crashes in a reproducible manner, you can take
some steps to provide a useful bug report. some steps to provide a useful bug report.
......
*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 VIM REFERENCE MANUAL by Bram Moolenaar
...@@ -64,7 +64,7 @@ completely different editor. Extensions are done with a "Vi spirit". ...@@ -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 hard time finding and remembering them. Keep in mind that more commands and
options will be added later. options will be added later.
- A feature that people do not know about is a useless feature. Don't add - 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. - 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 - There are many first-time and inexperienced Vim users. Make it easy for
them to start using Vim and learn more over time. them to start using Vim and learn more over time.
...@@ -323,7 +323,7 @@ Wrong: var=a*5; ...@@ -323,7 +323,7 @@ Wrong: var=a*5;
OK: var = a * 5; OK: var = a * 5;
In general: Use empty lines to group lines of code together. Put a comment 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. being done.
OK: /* Prepare for building the table. */ OK: /* Prepare for building the table. */
......
*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 VIM REFERENCE MANUAL by Bram Moolenaar
...@@ -64,6 +64,9 @@ In each of the edited files these options are set: ...@@ -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 These options are set local to the window. When editing another file they are
reset to the global value. 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 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 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. ...@@ -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 :diffthis Make the current window part of the diff windows. This sets
the options like for "vimdiff". 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 Use the current buffer, patch it with the diff found in
{patchfile} and open a buffer on the result. The options are {patchfile} and open a buffer on the result. The options are
set as for "vimdiff". 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. ...@@ -121,7 +124,8 @@ file for a moment and come back to the same file and be in diff mode again.
*:diffo* *:diffoff* *:diffo* *:diffoff*
:diffoff Switch off diff mode for the current window. :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. 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, 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. ...@@ -237,7 +241,8 @@ that the buffers will be equal within the specified range.
*:diffg* *:diffget* *:diffg* *:diffget*
:[range]diffg[et] [bufspec] :[range]diffg[et] [bufspec]
Modify the current buffer to undo difference with another 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 Otherwise this only works if there is one other buffer in diff
mode. mode.
See below for [range]. See below for [range].
...@@ -323,7 +328,7 @@ The "1a2" item appends the line "bbb". ...@@ -323,7 +328,7 @@ The "1a2" item appends the line "bbb".
The "4d4" item deletes the line "111". The "4d4" item deletes the line "111".
The '7c7" item replaces the line "GGG" with "ggg". 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: format mentioned. These variables are set to the file names used:
v:fname_in original file v:fname_in original file
...@@ -353,7 +358,7 @@ The "-a" argument is used to force comparing the files as text, comparing as ...@@ -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 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. 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 Vim will do a test if the diff output looks alright. If it doesn't, you will
get an error message. Possible causes: get an error message. Possible causes:
- The "diff" program cannot be executed. - The "diff" program cannot be executed.
......
*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 VIM REFERENCE MANUAL by Bram Moolenaar
...@@ -270,7 +270,7 @@ If you want to keep the changed buffer without saving it, switch on the ...@@ -270,7 +270,7 @@ If you want to keep the changed buffer without saving it, switch on the
Normal mode. Otherwise same as |:edit|. Normal mode. Otherwise same as |:edit|.
*:vie* *:view* *:vie* *:view*
:vie[w] [++opt] [+cmd] file :vie[w][!] [++opt] [+cmd] file
When used in Ex mode: Leave |Ex mode|, go back to When used in Ex mode: Leave |Ex mode|, go back to
Normal mode. Otherwise same as |:edit|, but set Normal mode. Otherwise same as |:edit|, but set
'readonly' option for this buffer. {not in Vi} 'readonly' option for this buffer. {not in Vi}
...@@ -462,7 +462,10 @@ converted and illegal bytes. It can be one of three things: ...@@ -462,7 +462,10 @@ converted and illegal bytes. It can be one of three things:
++bad=drop Remove the bad characters. ++bad=drop Remove the bad characters.
The default is like "++bad=?": Replace each bad character with a question 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 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 set to the used format. When writing this doesn't happen, thus a next write
...@@ -837,7 +840,7 @@ USING THE ARGUMENT LIST ...@@ -837,7 +840,7 @@ USING THE ARGUMENT LIST
Example: > Example: >
:args *.c :args *.c
:argdo set ff=unix | update :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. changed. This is done for all *.c files.
Example: > Example: >
...@@ -1456,6 +1459,17 @@ If you don't get warned often enough you can use the following command. ...@@ -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. 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 Before writing a file the timestamp is checked. If it has changed, Vim will
ask if you really want to overwrite the file: ask if you really want to overwrite the file:
......
This diff is collapsed.
...@@ -14,11 +14,11 @@ uruchamia ...@@ -14,11 +14,11 @@ uruchamia
.B Vima .B Vima
i ustawia opcje tak by zachowywa si jak edytor bez trybw. i ustawia opcje tak by zachowywa si jak edytor bez trybw.
To jest cay czas Vim ale uywany jako edytor wska-i-kliknij. To jest cay czas Vim ale uywany jako edytor wska-i-kliknij.
Zachowanie w stlu Notepada dla MS-Windows. Zachowanie w stylu Notepada dla MS-Windows.
.B eVim .B eVim
bdzie zawsze uruchomiony w GUI by wczy menu i pasek narzdzi. bdzie zawsze uruchomiony w GUI by wczy menu i pasek narzdzi.
.PP .PP
Przeznaczony tylko dla ludzi, ktrzy naprawd nie potrafi pracowa Przeznaczony tylko dla ludzi, ktrzy naprawd nie mog pracowa
z Vimem w normalny sposb. Edycja bdzie o wiele mniej efektywna. z Vimem w normalny sposb. Edycja bdzie o wiele mniej efektywna.
.PP .PP
.B eview .B eview
...@@ -31,8 +31,8 @@ Opcja 'insertmode' jest ustawiona by mo ...@@ -31,8 +31,8 @@ Opcja 'insertmode' jest ustawiona by mo
tekst. tekst.
.br .br
Mapowania s ustawione tak by Kopiowanie i Wklejanie dziaao Mapowania s ustawione tak by Kopiowanie i Wklejanie dziaao
z klawiszami MS-Windows. CTRL-X wycina tekst, CTRL-C kopiuje z klawiszami MS-Windows. CTRL-X wycina, CTRL-C kopiuje a CTRL-V
a CTRL-V wkleja. Uyj CTRL-Q by uzyska oryginalne znaczenie wkleja tekst. Uyj CTRL-Q by uzyska oryginalne przeznaczenie
CTRL-V. CTRL-V.
.SH OPCJE .SH OPCJE
Zobacz vim(1). Zobacz vim(1).
...@@ -42,7 +42,7 @@ Zobacz vim(1). ...@@ -42,7 +42,7 @@ Zobacz vim(1).
Skrypt uruchamiania dla eVima. Skrypt uruchamiania dla eVima.
.SH ZNANY JAKO .SH ZNANY JAKO
Znany jako "Vim dla frajerw". Znany jako "Vim dla frajerw".
Jeli uywasz evima oczekuje si, e wyjmiesz chusteczk do nosa, Jeli uywasz eVima oczekuje si, e wyjmiesz chusteczk do nosa,
zrobisz wz w kadym rogu i bdziesz to nosi na gowie. zrobisz wz w kadym rogu i bdziesz to nosi na gowie.
.SH ZOBACZ TAKE .SH ZOBACZ TAKE
vim(1) vim(1)
......
...@@ -14,11 +14,11 @@ uruchamia ...@@ -14,11 +14,11 @@ uruchamia
.B Vima .B Vima
i ustawia opcje tak by zachowywał się jak edytor bez trybów. 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. 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 eVim
będzie zawsze uruchomiony w GUI by włączyć menu i pasek narzędzi. będzie zawsze uruchomiony w GUI by włączyć menu i pasek narzędzi.
.PP .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. z Vimem w normalny sposób. Edycja będzie o wiele mniej efektywna.
.PP .PP
.B eview .B eview
...@@ -31,8 +31,8 @@ Opcja 'insertmode' jest ustawiona by można było od razu wpisywać ...@@ -31,8 +31,8 @@ Opcja 'insertmode' jest ustawiona by można było od razu wpisywać
tekst. tekst.
.br .br
Mapowania są ustawione tak by Kopiowanie i Wklejanie działało Mapowania są ustawione tak by Kopiowanie i Wklejanie działało
z klawiszami MS-Windows. CTRL-X wycina tekst, CTRL-C kopiuje z klawiszami MS-Windows. CTRL-X wycina, CTRL-C kopiuje a CTRL-V
a CTRL-V wkleja. Użyj CTRL-Q by uzyskać oryginalne znaczenie wkleja tekst. Użyj CTRL-Q by uzyskać oryginalne przeznaczenie
CTRL-V. CTRL-V.
.SH OPCJE .SH OPCJE
Zobacz vim(1). Zobacz vim(1).
...@@ -42,7 +42,7 @@ Zobacz vim(1). ...@@ -42,7 +42,7 @@ Zobacz vim(1).
Skrypt uruchamiania dla eVima. Skrypt uruchamiania dla eVima.
.SH ZNANY JAKO .SH ZNANY JAKO
Znany jako "Vim dla frajerów". 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. zrobisz węzęł w każdym rogu i będziesz to nosił na głowie.
.SH ZOBACZ TAKŻE .SH ZOBACZ TAKŻE
vim(1) vim(1)
......
*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 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. You can find an introduction on folding in chapter 28 of the user manual.
|usr_28.txt| |usr_28.txt|
......
...@@ -82,7 +82,7 @@ The Ada plug-in provides support for: ...@@ -82,7 +82,7 @@ The Ada plug-in provides support for:
- comment handling (|'comments'|, |'commentstring'|) - comment handling (|'comments'|, |'commentstring'|)
The plug-in only activates the features of the Ada mode whenever an Ada 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 ~ 3. Omni Completion ~
...@@ -142,7 +142,7 @@ support yet. ...@@ -142,7 +142,7 @@ support yet.
4. Compiler Support ~ 4. Compiler Support ~
*ada-compiler* *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 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 provided compiler plug-ins are split into the actual compiler plug-in and a
collection of support functions and variables. This allows the easy collection of support functions and variables. This allows the easy
...@@ -154,7 +154,7 @@ environment. ...@@ -154,7 +154,7 @@ environment.
*compiler-gnat* *compiler-gnat*
GNAT is the only free (beer and speech) Ada compiler available. There are 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 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 immediately shows the result. You can set the project file to be used by
...@@ -163,7 +163,7 @@ setting: ...@@ -163,7 +163,7 @@ setting:
> call g:gnat.Set_Project_File ('my_project.gpr') > call g:gnat.Set_Project_File ('my_project.gpr')
Setting a project file will also create a Vim session (|views-sessions|) so - 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. separately for all projects.
*gnat_members* *gnat_members*
...@@ -228,9 +228,9 @@ and HP Ada) is a fairly dated Ada 83 compiler. Support is basic: <F7> will ...@@ -228,9 +228,9 @@ and HP Ada) is a fairly dated Ada 83 compiler. Support is basic: <F7> will
compile the current unit. compile the current unit.
The Dec Ada compiler expects the package name and not the file name to be 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 passed as a parameter. The compiler plug-in supports the usual file name
convention to convert the file into a unit name. For separates both '-' and convention to convert the file into a unit name. Both '-' and '__' are allowed
'__' are allowed. as separators.
*decada_members* *decada_members*
DEC ADA OBJECT ~ DEC ADA OBJECT ~
...@@ -262,7 +262,7 @@ g:decada.Error_Format| string ...@@ -262,7 +262,7 @@ g:decada.Error_Format| string
*g:ada_standard_types* *g:ada_standard_types*
g:ada_standard_types bool (true when exists) 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_space_errors*
*g:ada_no_trail_space_error* *g:ada_no_trail_space_error*
...@@ -279,13 +279,13 @@ g:ada_space_errors bool (true when exists) ...@@ -279,13 +279,13 @@ g:ada_space_errors bool (true when exists)
*g:ada_line_errors* *g:ada_line_errors*
g:ada_line_errors bool (true when exists) 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. option is quite CPU intensive.
*g:ada_rainbow_color* *g:ada_rainbow_color*
g:ada_rainbow_color bool (true when exists) g:ada_rainbow_color bool (true when exists)
Use rainbow colours for '(' and ')'. You need the 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*
g:ada_folding set ('sigpft') g:ada_folding set ('sigpft')
...@@ -313,7 +313,7 @@ g:ada_folding set ('sigpft') ...@@ -313,7 +313,7 @@ g:ada_folding set ('sigpft')
*g:ada_abbrev* *g:ada_abbrev*
g:ada_abbrev bool (true when exists) 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. by the various completion methods.
*g:ada_withuse_ordinary* *g:ada_withuse_ordinary*
...@@ -359,12 +359,12 @@ g:ada_with_gnat_project_files bool (true when exists) ...@@ -359,12 +359,12 @@ g:ada_with_gnat_project_files bool (true when exists)
*g:ada_default_compiler* *g:ada_default_compiler*
g:ada_default_compiler string g:ada_default_compiler string
set default compiler. Currently supported is 'gnat' and set default compiler. Currently supported are 'gnat' and
'decada'. 'decada'.
An "exists" type is a boolean is considered true when the variable is defined An "exists" type is a boolean considered true when the variable is defined and
and false when the variable is undefined. The value which the variable is false when the variable is undefined. The value to which the variable is set
set makes no difference. makes no difference.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
5.3 Commands ~ 5.3 Commands ~
...@@ -372,10 +372,10 @@ set makes no difference. ...@@ -372,10 +372,10 @@ set makes no difference.
:AdaRainbow *:AdaRainbow* :AdaRainbow *:AdaRainbow*
Toggles rainbow colour (|g:ada_rainbow_color|) mode for Toggles rainbow colour (|g:ada_rainbow_color|) mode for
'(' and ')' '(' and ')'.
:AdaLines *:AdaLines* :AdaLines *:AdaLines*
Toggles line error (|g:ada_line_errors|) display Toggles line error (|g:ada_line_errors|) display.
:AdaSpaces *:AdaSpaces* :AdaSpaces *:AdaSpaces*
Toggles space error (|g:ada_space_errors|) display. Toggles space error (|g:ada_space_errors|) display.
...@@ -424,7 +424,7 @@ All constants are locked. See |:lockvar| for details. ...@@ -424,7 +424,7 @@ All constants are locked. See |:lockvar| for details.
*g:ada#WordRegex* *g:ada#WordRegex*
g:ada#WordRegex string g:ada#WordRegex string
Regular expression to search for Ada words Regular expression to search for Ada words.
*g:ada#DotWordRegex* *g:ada#DotWordRegex*
g:ada#DotWordRegex string g:ada#DotWordRegex string
...@@ -432,7 +432,7 @@ g:ada#DotWordRegex string ...@@ -432,7 +432,7 @@ g:ada#DotWordRegex string
*g:ada#Comment* *g:ada#Comment*
g:ada#Comment string g:ada#Comment string
Regular expression to search for Ada comments Regular expression to search for Ada comments.
*g:ada#Keywords* *g:ada#Keywords*
g:ada#Keywords list of dictionaries g:ada#Keywords list of dictionaries
...@@ -454,7 +454,7 @@ ada#Word([{line}, {col}]) *ada#Word()* ...@@ -454,7 +454,7 @@ ada#Word([{line}, {col}]) *ada#Word()*
ada#List_Tag([{line}, {col}]) *ada#Listtags()* ada#List_Tag([{line}, {col}]) *ada#Listtags()*
List all occurrences of the Ada entity under the cursor (or at 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()* ada#Jump_Tag ({ident}, {mode}) *ada#Jump_Tag()*
List all occurrences of the Ada entity under the cursor (or at List all occurrences of the Ada entity under the cursor (or at
...@@ -482,8 +482,8 @@ gnat#New () ...@@ -482,8 +482,8 @@ gnat#New ()
8. Extra Plugins ~ 8. Extra Plugins ~
*ada-extra-plugins* *ada-extra-plugins*
You can optionally install the following extra plug-in. They work well with Ada You can optionally install the following extra plug-ins. They work well with
and enhance the ability of the Ada mode.: Ada and enhance the ability of the Ada mode:
backup.vim backup.vim
http://www.vim.org/scripts/script.php?script_id=1537 http://www.vim.org/scripts/script.php?script_id=1537
...@@ -501,7 +501,7 @@ nerd_comments.vim ...@@ -501,7 +501,7 @@ nerd_comments.vim
matchit.vim matchit.vim
http://www.vim.org/scripts/script.php?script_id=39 http://www.vim.org/scripts/script.php?script_id=39
'%' jumping for any language. The normal '%' jump only works for '{}' '%' 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 taglist.vim
http://www.vim.org/scripts/script.php?script_id=273 http://www.vim.org/scripts/script.php?script_id=273
......
*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 by David Fishburn
...@@ -15,7 +15,8 @@ features for navigation, indentation and syntax highlighting. ...@@ -15,7 +15,8 @@ features for navigation, indentation and syntax highlighting.
1.4 Macros |sql-macros| 1.4 Macros |sql-macros|
2. SQL Dialects |sql-dialects| 2. SQL Dialects |sql-dialects|
2.1 SQLSetType |SQLSetType| 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| 3. Adding new SQL Dialects |sql-adding-dialects|
4. OMNI SQL Completion |sql-completion| 4. OMNI SQL Completion |sql-completion|
4.1 Static mode |sql-completion-static| 4.1 Static mode |sql-completion-static|
...@@ -204,7 +205,7 @@ Press any of the following keys: > ...@@ -204,7 +205,7 @@ Press any of the following keys: >
*sqlanywhere* *sqlanywhere*
*oracle* *plsql* *sqlj* *oracle* *plsql* *sqlj*
*sqlserver* *sqlserver*
*mysql* *postgres* *psql* *mysql* *postgress* *psql*
*informix* *informix*
All relational databases support SQL. There is a portion of SQL that is 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|. ...@@ -231,7 +232,7 @@ be nice to specify a default in your |vimrc|.
2.1 SQLSetType *sqlsettype* *SQLSetType* 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 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: > buffer basis, at any time. The ftplugin/sql.vim file defines this function: >
SQLSetType SQLSetType
...@@ -259,7 +260,17 @@ of available Vim script names: > ...@@ -259,7 +260,17 @@ of available Vim script names: >
:SQL<Tab><space><Tab> :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 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 (PL/SQL). You can override this default by placing one of the following in
...@@ -331,6 +342,10 @@ The defaults static maps are: > ...@@ -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>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> 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 The static maps (which are based on the syntax highlight groups) follow this
format: > format: >
imap <buffer> <C-C>k <C-\><C-O>:call sqlcomplete#Map('sqlKeyword')<CR><C-X><C-O> 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. > ...@@ -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 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 for each group (where <C-C> means hold the CTRL key down while pressing
the space bar): the space bar):
Table List - <C-C>t Table List - <C-C>t
- <C-X><C-O> (the default map assumes tables) - <C-X><C-O> (the default map assumes tables)
Stored Procedure List - <C-C>p Stored Procedure List - <C-C>p
View List - <C-C>v View List - <C-C>v
Column List - <C-C>c Column List - <C-C>c
Windows platform only - When viewing a popup window displaying the list Drilling In / Out - When viewing a popup window displaying the list
of tables, you can press <C-Right>, this will of tables, you can press <Right>, this will
replace the table currently highlighted with replace the table currently highlighted with
the column list for that table. the column list for that table.
- When viewing a popup window displaying the list - When viewing a popup window displaying the list
of columns, you can press <C-Left>, this will of columns, you can press <Left>, this will
replace the column list with the list of tables. replace the column list with the list of tables.
- This allows you to quickly drill down into a - This allows you to quickly drill down into a
table to view it's columns and back again. 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 SQL completion plugin caches various lists that are displayed in
the popup window. This makes the re-displaying of these lists very the popup window. This makes the re-displaying of these lists very
...@@ -498,30 +517,24 @@ beginning with those characters. > ...@@ -498,30 +517,24 @@ beginning with those characters. >
The SQL completion plugin can also display a list of columns for particular The SQL completion plugin can also display a list of columns for particular
tables. The column completion is trigger via <C-C>c. tables. The column completion is trigger via <C-C>c.
NOTE: The following example uses <C-Right> to trigger a column list while NOTE: The following example uses <Right> to trigger a column list while
the popup window is active. This map is only available on the Windows the popup window is active.
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>
Example of using column completion: Example of using column completion:
- Press <C-C>t again to display the list of tables. - 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 this will replace the list of tables, with a list of columns for the
table highlighted (after the same short delay). 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 list of tables. This allows you to drill into tables and column lists
very quickly. 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 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 change the schema of a cached table you can press <C-C>R, which
clears the SQL completion cache. 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 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 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 requires a list of columns. There are two ways to build a column list using
...@@ -529,7 +542,7 @@ the SQL completion plugin. > ...@@ -529,7 +542,7 @@ the SQL completion plugin. >
One column at a time: One column at a time:
< 1. After typing SELECT press <C-C>t to display a list of tables. < 1. After typing SELECT press <C-C>t to display a list of tables.
2. Choose a table from the list. 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. 4. Choose the column from the list and press enter.
5. Enter a "," and press <C-C>c. Generating a column list 5. Enter a "," and press <C-C>c. Generating a column list
generally requires having the cursor on a table name. The plugin generally requires having the cursor on a table name. The plugin
...@@ -632,7 +645,7 @@ your |vimrc|: > ...@@ -632,7 +645,7 @@ your |vimrc|: >
- When completing tables, procedure or views and using dbext.vim 3.00 - When completing tables, procedure or views and using dbext.vim 3.00
or higher the list of objects will also include the owner name. or higher the list of objects will also include the owner name.
When completing these objects and omni_sql_include_owner is enabled 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 omni_sql_precache_syntax_groups
< - Default: < - Default:
...@@ -684,15 +697,15 @@ plugin. > ...@@ -684,15 +697,15 @@ plugin. >
<C-C>L <C-C>L
< - Displays a comma separated list of columns for a specific table. < - Displays a comma separated list of columns for a specific table.
This should only be used when the completion window is active. > 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 < - 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. systems, so this maps is only created on the Windows platform.
If you would like the same feature on Unix, choose a different key If you would like the same feature on Unix, choose a different key
and make the same map in your vimrc. > and make the same map in your vimrc. >
<C-Left> <Left>
< - Displays the list of tables. < - 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 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 feature on Unix, choose a different key and make the same map in
your vimrc. > your vimrc. >
......
*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 VIM REFERENCE MANUAL by Bram Moolenaar
...@@ -35,13 +35,13 @@ GUI version of Vim with: ...@@ -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 The X11 version of Vim can run both in GUI and in non-GUI mode. See
|gui-x11-start|. |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 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 is always sourced after the |vimrc| file. If you have one then the $MYGVIMRC
environment variable has its name. environment variable has its name.
When the GUI starts up initializations are carried out, in this order: 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|. their default value for the GUI |terminal-options|.
- If the system menu file exists, it is sourced. The name of this file is - 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 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!): > ...@@ -473,9 +473,11 @@ this line to your .vimrc file (NOT your .gvimrc file!): >
:let did_install_default_menus = 1 :let did_install_default_menus = 1
If you also want to avoid the Syntax menu: > If you also want to avoid the Syntax menu: >
:let did_install_syntax_menu = 1 :let did_install_syntax_menu = 1
If you do want the Syntax menu but not all the entries for each available The first item in the Syntax menu can be used to show all available filetypes
syntax file (which take quite a bit of time to load): > in the menu (which can take a bit of time to load). If you want to have all
:let skip_syntax_sel_menu = 1 filetypes already present at startup, add: >
:let do_syntax_sel_menu = 1
< <
*console-menus* *console-menus*
Although this documentation is in the GUI section, you can actually use menus Although this documentation is in the GUI section, you can actually use menus
......
*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 VIM REFERENCE MANUAL by Bram Moolenaar
...@@ -540,13 +540,16 @@ Of these three, Vim uses PRIMARY when reading and writing the "* register ...@@ -540,13 +540,16 @@ Of these three, Vim uses PRIMARY when reading and writing the "* register
register. Vim does not access the SECONDARY selection. register. Vim does not access the SECONDARY selection.
Examples: (assuming the default option values) Examples: (assuming the default option values)
- Select an URL in Visual mode in Vim. Go to a text field in Netscape and - Select an URL in Visual mode in Vim. Go to your browser and click the
click the middle mouse button. The selected text will be inserted middle mouse button in the URL text field. The selected text will be
(hopefully!). inserted (hopefully!). Note: in Firefox you can set the
- Select some text in Netscape by dragging with the mouse. Go to Vim and 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. 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 - Select some text in Vim and do "+y. Go to your browser, select some text in
textfield by dragging with the mouse. Now use the right mouse button and 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 select "Paste" from the popup menu. The selected text is overwritten by the
text from Vim. text from Vim.
Note that the text in the "+ register remains available when making a Visual Note that the text in the "+ register remains available when making a Visual
......
*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 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* Introduction *hangul*
------------ ------------
It is to input hangul, the Korean language, with VIM GUI version. It is to input hangul, the Korean language, with VIM GUI version.
...@@ -96,6 +100,6 @@ Bug or Comment ...@@ -96,6 +100,6 @@ Bug or Comment
Send comments, patches and suggestions to: Send comments, patches and suggestions to:
Chi-Deok Hwang <hwang@mizi.co.kr> 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: vim:tw=78:ts=8:ft=help:norl:
...@@ -144,6 +144,7 @@ Special issues ~ ...@@ -144,6 +144,7 @@ Special issues ~
|hebrew.txt| Hebrew language support and editing |hebrew.txt| Hebrew language support and editing
|russian.txt| Russian language support and editing |russian.txt| Russian language support and editing
|ft_ada.txt| Ada (the programming language) support |ft_ada.txt| Ada (the programming language) support
|ft_sql.txt| about the SQL filetype plugin
|hangulin.txt| Hangul (Korean) input mode |hangulin.txt| Hangul (Korean) input mode
|rileft.txt| right-to-left editing mode |rileft.txt| right-to-left editing mode
......
*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 VIM REFERENCE MANUAL by Paul Moore
...@@ -115,7 +115,7 @@ Example (Visual Basic syntax) > ...@@ -115,7 +115,7 @@ Example (Visual Basic syntax) >
3. The "normal" command *ole-normal* 3. The "normal" command *ole-normal*
Due to the way Vim processes OLE Automation commands, combined with the method 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 :normal command via OLE automation. Any attempt to do so will fail, probably
harmlessly, although possibly in unpredictable ways. harmlessly, although possibly in unpredictable ways.
......
*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 VIM REFERENCE MANUAL by Paul Moore
...@@ -93,7 +93,7 @@ module before using it: > ...@@ -93,7 +93,7 @@ module before using it: >
Overview > Overview >
:py print "Hello" # displays a message :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 w = vim.windows[n] # gets window "n"
:py cw = vim.current.window # gets the current window :py cw = vim.current.window # gets the current window
:py b = vim.buffers[n] # gets buffer "n" :py b = vim.buffers[n] # gets buffer "n"
......
*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 VIM REFERENCE MANUAL by Shugo Maeda
...@@ -79,7 +79,7 @@ Ruby code gets all of its access to vim via the "VIM" module. ...@@ -79,7 +79,7 @@ Ruby code gets all of its access to vim via the "VIM" module.
Overview > Overview >
print "Hello" # displays a message 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 num = VIM::Window.count # gets the number of windows
w = VIM::Window[n] # gets window "n" w = VIM::Window[n] # gets window "n"
cw = VIM::Window.current # gets the current window cw = VIM::Window.current # gets the current window
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment