updated for version 7.0194

This commit is contained in:
Bram Moolenaar
2006-02-08 09:20:24 +00:00
parent 9f2c6e1deb
commit 8b6144bdfe
31 changed files with 822 additions and 346 deletions

View File

@ -1235,6 +1235,7 @@ The commands are sorted on the non-optional part of their name.
|:lgetfile| :lg[etfile] read file with locations
|:lgrep| :lgr[ep] run 'grepprg' and jump to first match
|:lgrepadd| :lgrepa[dd] like :grep, but append to current list
|:lhelpgrep| :lh[elpgrep] like ":helpgrep" but uses location list
|:ll| :ll go to specific location
|:llast| :lla[st] go to the specified location, default last one
|:llist| :lli[st] list all locations

View File

@ -1,4 +1,4 @@
*insert.txt* For Vim version 7.0aa. Last change: 2006 Jan 30
*insert.txt* For Vim version 7.0aa. Last change: 2006 Feb 07
VIM REFERENCE MANUAL by Bram Moolenaar
@ -956,39 +956,61 @@ FUNCTIONS FOR FINDING COMPLETIONS *complete-functions*
This applies to 'completefunc' and 'omnifunc'.
The function will be invoked with two arguments. First the function is called
to find the start of the text to be completed. Secondly the function is
called to actually find the matches.
The function is called in two different ways:
- First the function is called to find the start of the text to be completed.
- Later the function is called to actually find the matches.
On the first invocation the arguments are:
a:findstart 1
a:base empty
The function must return the column of where the completion starts. It must
be a number between zero and the cursor column "col('.')". This involves
looking at the characters just before the cursor and including those
characters that could be part of the completed item. The text between this
column and the cursor column will be replaced with the matches. Return -1 if
no completion can be done.
The function must return the column where the completion starts. It must be a
number between zero and the cursor column "col('.')". This involves looking
at the characters just before the cursor and including those characters that
could be part of the completed item. The text between this column and the
cursor column will be replaced with the matches. Return -1 if no completion
can be done.
On the second invocation the arguments are:
a:findstart 0
a:base the text with which matches should match, what was
a:base the text with which matches should match; the text that was
located in the first call (can be empty)
The function must return a List with the matching words. These matches
usually include the "a:base" text. When there are no matches return an empty
List. When one of the items in the list cannot be used as a string (e.g., a
Dictionary) then an error message is given and further items in the list are
not used.
List.
Each list item can either be a string or a Dictionary. When it is a string it
is used as the completion. When it is a Dictionary it can contain these
items:
word the completion, mandatory
menu extra text for the popup menu
info more information about the item
kind single letter indicating the type of completion
All of these must be a string. If an item does not meet these requirements
then an error message is given and further items in the list are not used.
You can mix string and Dictionary items in the returned list.
The "menu" item is used in the popup menu and may be truncated, thus it should
be relatively short. The "info" item can be longer, it may be displayed in a
balloon.
The "kind" item uses a single letter to indicate the kind of completion. This
may be used to show the completion differently (different color or icon).
Currently these types can be used:
v variable
f function or method
c composite (struct, object)
When searching for matches takes some time call |complete_add()| to add each
match to the total list. These matches should then not appear in the returned
list! Call |complete_check()| now and then to allow the user to press a key
while still searching for matches. Stop searching when it returns non-zero.
The function may move the cursor, it is restored afterwards. This option
cannot be set from a |modeline| or in the |sandbox|, for security reasons.
The function is allowed to move the cursor, it is restored afterwards. This
option cannot be set from a |modeline| or in the |sandbox|, for security
reasons.
An example that completes the names of the months: >
fun! CompleteMonths(findstart, base)
@ -1050,11 +1072,16 @@ The menu is used when:
- There are at least two matches.
While the menu is displayed these keys have a special meaning:
<CR> and <Enter>: Accept the currently selected match
<Up>: Select the previous match, as if CTRL-P was used
<Down>: Select the next match, as if CTRL-N was used
<PageUp>: Select a match several entries back
<PageDown>: Select a match several entries further
<CR> and <Enter> Accept the currently selected match
<Up> Select the previous match, as if CTRL-P was used
<Down> Select the next match, as if CTRL-N was used
<PageUp> Select a match several entries back
<PageDown> Select a match several entries further
<BS> and CTRL-H Delete one character, find the matches for the shorter word
before the cursor. This may find more matches.
CTRL-L Add one character from the current match, may reduce the
number of matches. Does not work after selecting one of the
matches with CTRL-N, <Up>, etc.
The colors of the menu can be changed with these highlight groups:
Pmenu normal item |hl-Pmenu|
@ -1073,6 +1100,8 @@ because it adds extra information that is needed for completion. You can find
it here: http://ctags.sourceforge.net/
For version 5.5.4 you should add a patch that adds the "typename:" field:
ftp://ftp.vim.org/pub/vim/unstable/patches/ctags-5.5.4.patch
A compiled .exe for MS-Windows can be found at:
http://georgevreilly.com/vim/ctags.html
If you want to complete system functions you can do something like this. Use
ctags to generate a tags file for all the system header files: >
@ -1104,14 +1133,14 @@ Complete properties and their appropriate values according to CSS 2.1
specification.
(X)HTML *ft-html-omni*
HTML and XHTML *ft-html-omni*
*ft-xhtml-omni*
CTRL-X CTRL-O provides completion of various elements of (X)HTML files.
It is designed to support writing of XHTML 1.0 Strict files but will
also works for other versions of HTML. Features:
- after "<" complete tag name depending on context (no div suggest
- after "<" complete tag name depending on context (no div suggestion
inside of an a tag)
- inside of tag complete proper attributes (no width attribute for an
a tag)
@ -1120,17 +1149,21 @@ also works for other versions of HTML. Features:
- complete names of entities
- complete values of "class" and "id" attributes with data obtained from
style tag and included CSS files
- when completing "style" attribute or working inside of "style" tag
- when completing value of "style" attribute or working inside of "style" tag
switch to |ft-css-omni| completion
- when completing values of events attributes or working inside of "script" tag
switch to |ft-javascript-omni| completion
- when used after "</" CTRL-X CTRL-O will close the last opened tag
Note: When used first time completion menu will be shown with little delay
- this is time needed for loading of data file.
- this is time needed for loading of data file.
Note: Completion may fail in badly formatted documents. In such case try to
run |:make| command to detect formatting problems.
JAVASCRIPT *ft-javascript-omni*
Completion of most elements of JavaScript language and HTML DOM.
Completion of most elements of JavaScript language and DOM elements.
Complete:
@ -1138,13 +1171,13 @@ Complete:
- function name
- function arguments
- properties of variables trying to detect type of variable
- complete HTML DOM objects and properties depending on context
- complete DOM objects and properties depending on context
- keywords of language
Completion works in separate JavaScript files (&ft==javascript) and inside of
<script> tag of (X)HTML. Note: scanning will be only in scope of current tag.
At the moment separate files are not taken into account.
Completion works in separate JavaScript files (&ft==javascript), inside of
<script> tag of (X)HTML and in values of event attributes (including scanning
of external files.
DOM compatibility
At the moment (beginning of 2006) there are two main browsers - MS Internet

View File

@ -1,4 +1,4 @@
*netbeans.txt* For Vim version 7.0aa. Last change: 2005 Apr 04
*netbeans.txt* For Vim version 7.0aa. Last change: 2006 Feb 05
VIM REFERENCE MANUAL by Gordon Prieur
@ -179,6 +179,7 @@ These messages are specific for NetBeans:
Region is guarded, cannot modify
NetBeans defines guarded areas in the text, which you cannot
change.
Also sets the current buffer, if necessary.
*E656*
NetBeans disallows writes of unmodified buffers
@ -485,8 +486,10 @@ setContentType
Not implemented.
setDot off Make the buffer the current buffer and set the cursor at the
specified position. If there are folds they are opened to
make the cursor line visible.
specified position. If the buffer is open in another window
than make that window the current window.
If there are folds they are opened to make the cursor line
visible.
In version 2.1 "lnum/col" can be used instead of "off".
setExitDelay seconds
@ -566,6 +569,7 @@ stopDocumentListen
unguard off len
Opposite of "guard", remove guarding for a text area.
Also sets the current buffer, if necessary.
version Not implemented.
@ -612,6 +616,7 @@ insert off text
123 no problem
123 !message failed
Note that the message in the reply is not quoted.
Also sets the current buffer, if necessary.
remove off length
Delete "length" bytes of text at position "off". Both
@ -620,6 +625,7 @@ remove off length
123 no problem
123 !message failed
Note that the message in the reply is not quoted.
Also sets the current buffer, if necessary.
saveAndExit Perform the equivalent of closing Vim: ":confirm qall".
If there are no changed files or the user does not cancel the

View File

@ -2151,6 +2151,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:lgrep quickfix.txt /*:lgrep*
:lgrepa quickfix.txt /*:lgrepa*
:lgrepadd quickfix.txt /*:lgrepadd*
:lh various.txt /*:lh*
:lhelpgrep various.txt /*:lhelpgrep*
:list various.txt /*:list*
:ll quickfix.txt /*:ll*
:lla quickfix.txt /*:lla*
@ -5420,7 +5422,6 @@ hebrew hebrew.txt /*hebrew*
hebrew.txt hebrew.txt /*hebrew.txt*
help various.txt /*help*
help-context help.txt /*help-context*
help-tags tags 1
help-translated various.txt /*help-translated*
help-xterm-window various.txt /*help-xterm-window*
help.txt help.txt /*help.txt*

View File

@ -1,4 +1,4 @@
*todo.txt* For Vim version 7.0aa. Last change: 2006 Feb 04
*todo.txt* For Vim version 7.0aa. Last change: 2006 Feb 07
VIM REFERENCE MANUAL by Bram Moolenaar
@ -30,25 +30,19 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
*known-bugs*
-------------------- Known bugs and current work -----------------------
Variant of ":helpgrep" that uses a location list? How about:
:lhelpgrep (use local list in help window, not current window)
Crash with X command server (Ciaran McCreesh).
ccomplete / omnicomplete:
- Extra info for each entry to show in a tooltip kind of thing.
Should use a dictionary for each entry. Fields could be:
word the completed word
menu menu text (use word when missing)
info extra info, to be displayed in balloon (e.g., function args)
kind single letter indicating the type of word:
v = variable, f = function/method, c = composite (object,
struct pointer).
For C add tag "kind" field?
When editing compl_leader <CR> should accept the current match.
Somehow select another match without changing the compl_leader, so that you
can use CTRL-L next? Perhaps with <S-Up> and <S-Down>?
- Complete the longest common match instead of the first match?
Do this when "longest" is in 'completeopt'.
Pressing CTRL-N or CTRL-P will get the whole match, as before.
Need to postpone inserting anything until all matches have been found.
Then add a completion item with the longest common string (after what was
typed), if there is one.
- For C add tag "kind" field to each match?
- Finding out if an item has members (to add '.' or '->') requires a grep in
the tags files, that is very slow. Is there another solution? At least
stop at the first match.
@ -109,6 +103,9 @@ Nov 24)
An error in a function uses a line number that doesn't take line continuation
into account. (Mikolaj Machowski) Store line count in an extra array?
Is it possible to keep the command-line window open? Would actually work like
closing it, executing the command and re-opening it (at the same position).
Mac unicode patch (Da Woon Jung):
- selecting proportional font breaks display
- UTF-8 text causes display problems. Font replacement causes this.

View File

@ -648,6 +648,15 @@ g CTRL-A Only when Vim was compiled with MEM_PROFILING defined
compresses the help files).
{not in Vi}
*:lh* *:lhelpgrep*
:lh[elpgrep] {pattern}[@xx]
Same as ":helpgrep", except the location list is used
instead of the quickfix list. If the help window is
already opened, then the location list for that window
is used. Otherwise, a new help window is opened and
the location list for that window is set. The
location list for the current window is not changed.
*:exu* *:exusage*
:exu[sage] Show help on Ex commands. Added to simulate the Nvi
command. {not in Vi}

View File

@ -1,4 +1,4 @@
*version7.txt* For Vim version 7.0aa. Last change: 2006 Feb 04
*version7.txt* For Vim version 7.0aa. Last change: 2006 Feb 05
VIM REFERENCE MANUAL by Bram Moolenaar
@ -192,8 +192,8 @@ Omni completion *new-omni-completion*
This could also be called "intellisense", but that is a trademark. It is a
smart kind of completion. The text in front of the cursor is inspected to
figure out what could be following. This considers struct and class members,
unions, etc.
figure out what could be following. This may suggest struct and class
members, system functions, etc.
Use CTRL-X CTRL-O in Insert mode to start the completion. |i_CTRL-X_CTRL-O|
@ -201,8 +201,11 @@ The 'omnifunc' option is set by filetype plugins to define the function that
figures out the completion.
Currently supported languages:
C |ft-c-omni|
XHTML |ft-html-omni|
C |ft-c-omni|
(X)HTML with CSS |ft-html-omni|
JavaScript |ft-javascript-omni|
any language wih syntax highligting |ft-syntax-omni|
XML |ft-xml-omni|
When the 'completeopt' option contains "menu" then matches for Insert mode
completion are displayed in a popup menu.
@ -460,7 +463,30 @@ Win32: The ":winpos" command now also works in the console. (Vipin Aravind)
|:lgrepadd| Like |:grepadd| but use the location list.
|:lvimgrep| Like |:vimgrep| but use the location list.
|:lvimgrepadd| Like |:vimgrepadd| but use the location list.
|:lhelpgrep| Like |:helpgrep| but use the location list.
|:lfile| Like |:cfile| but use the location list.
|:lgetfile| Like |:cgetfile| but use the location list.
|:laddfile| Like |:caddfile| but use the location list.
|:lbuffer| Like |:cbuffer| but use the location list.
|:laddbuffer| Like |:caddbuffer| but use the location list.
|:lexpr| Like |:cexpr| but use the location list.
|:laddexpr| Like |:caddexpr| but use the location list.
|:ll| Like |:cc| but use the location list.
|:llist| Like |:clist| but use the location list.
|:lnext| Like |:cnext| but use the location list.
|:lprev| Like |:cprev| but use the location list.
|:lNext| Like |:cNext| but use the location list.
|:lfirst| Like |:cfirst| but use the location list.
|:lrewind| Like |:crewind| but use the location list.
|:llast| Like |:clast| but use the location list.
|:lnfile| Like |:cnfile| but use the location list.
|:lpfile| Like |:cpfile| but use the location list.
|:lNfile| Like |:cNfile| but use the location list.
|:lolder| Like |:colder| but use the location list.
|:lnewer| Like |:cnewer| but use the location list.
|:lwindow| Like |:cwindow| but use the location list.
|:lopen| Like |:copen| but use the location list.
|:lclose| Like |:cclose| but use the location list.
Ex command modifiers: ~