Compare commits

..

41 Commits

Author SHA1 Message Date
Bram Moolenaar
362e1a30c6 updated for version 7.0216 2006-03-06 23:29:24 +00:00
Bram Moolenaar
768b8c4dbc updated for version 7.0214 2006-03-04 21:58:33 +00:00
Bram Moolenaar
87b5ca5172 updated for version 7.0214 2006-03-04 21:55:31 +00:00
Bram Moolenaar
36fc535cb1 updated for version 7.0214 2006-03-04 21:49:37 +00:00
Bram Moolenaar
d0131a8bd2 updated for version 7.0214 2006-03-04 21:46:13 +00:00
Bram Moolenaar
0e34f6269e updated for version 7.0213 2006-03-03 23:00:03 +00:00
Bram Moolenaar
3517bb1ece updated for version 7.0213 2006-03-03 22:58:45 +00:00
Bram Moolenaar
65c923adf3 updated for version 7.0213 2006-03-03 22:56:30 +00:00
Bram Moolenaar
bfb2d40b6e updated for version 7.0213 2006-03-03 22:50:42 +00:00
Bram Moolenaar
a55252087b updated for version 7.0212 2006-03-02 22:52:09 +00:00
Bram Moolenaar
8fd89f0fe7 updated for version 7.0212 2006-03-02 22:51:05 +00:00
Bram Moolenaar
0b23879827 updated for version 7.0212 2006-03-02 22:49:12 +00:00
Bram Moolenaar
c06ac34092 updated for version 7.0212 2006-03-02 22:43:39 +00:00
Bram Moolenaar
b475fb917b updated for version 7.0212 2006-03-02 22:40:52 +00:00
Bram Moolenaar
261bfeab3e updated for version 7.0211 2006-03-01 22:12:31 +00:00
Bram Moolenaar
fd2ac767eb updated for version 7.0211 2006-03-01 22:09:21 +00:00
Bram Moolenaar
e1438bb8d0 updated for version 7.0211 2006-03-01 22:01:55 +00:00
Bram Moolenaar
e224ffa156 updated for version 7.0210 2006-03-01 00:01:28 +00:00
Bram Moolenaar
03f4855fc2 updated for version 7.0210 2006-02-28 23:52:23 +00:00
Bram Moolenaar
b388adb188 updated for version 7.0210 2006-02-28 23:50:17 +00:00
Bram Moolenaar
5e3cb7e869 updated for version 7.0209 2006-02-27 23:58:35 +00:00
Bram Moolenaar
eddf53b02e updated for version 7.0208 2006-02-27 00:11:10 +00:00
Bram Moolenaar
a23ccb8ac6 updated for version 7.0208 2006-02-27 00:08:02 +00:00
Bram Moolenaar
1cad292503 updated for version 7.0208 2006-02-27 00:00:52 +00:00
Bram Moolenaar
a226a6dd9f updated for version 7.0208 2006-02-26 23:59:20 +00:00
Bram Moolenaar
a562149de3 updated for version 7.0207 2006-02-25 21:55:24 +00:00
Bram Moolenaar
5c8837f9d7 updated for version 7.0207 2006-02-25 21:52:33 +00:00
Bram Moolenaar
c542aef58d updated for version 7.0207 2006-02-25 21:47:41 +00:00
Bram Moolenaar
ba6c05240f updated for version 7.0207 2006-02-25 21:45:02 +00:00
Bram Moolenaar
32466aa2e9 updated for version 7.0206 2006-02-24 23:53:04 +00:00
Bram Moolenaar
2a3f7eeebf updated for version 7.0205 2006-02-23 21:34:44 +00:00
Bram Moolenaar
df1bdc92c2 updated for version 7.0205 2006-02-23 21:32:16 +00:00
Bram Moolenaar
80a94a582c updated for version 7.0205 2006-02-23 21:26:58 +00:00
Bram Moolenaar
d1f56e68f1 updated for version 7.0204 2006-02-22 21:25:37 +00:00
Bram Moolenaar
238a564935 updated for version 7.0203 2006-02-21 22:12:05 +00:00
Bram Moolenaar
8f7fd65b24 updated for version 7.0203 2006-02-21 22:04:51 +00:00
Bram Moolenaar
030f0dfad5 updated for version 7.0203 2006-02-21 22:02:53 +00:00
Bram Moolenaar
faa959a870 updated for version 7.0202 2006-02-20 21:37:40 +00:00
Bram Moolenaar
70836c8ba8 updated for version 7.0202 2006-02-20 21:28:49 +00:00
Bram Moolenaar
2a0449d129 updated for version 7.0202 2006-02-20 21:27:21 +00:00
Bram Moolenaar
7e8fd63682 updated for version 7.0201 2006-02-18 22:14:51 +00:00
179 changed files with 18901 additions and 5013 deletions

View File

@@ -248,6 +248,7 @@ SRC_DOS = \
src/Make_mvc.mak \
src/Make_w16.mak \
src/bigvim.bat \
src/msvcsetup.bat \
src/dimm.idl \
src/dlldata.c \
src/dosinst.c \
@@ -285,6 +286,7 @@ SRC_DOS = \
src/uninstal.c \
src/vim.def \
src/vim.rc \
src/vimio.h \
src/gvim.exe.mnf \
src/vim16.def \
src/vim16.rc \
@@ -675,6 +677,7 @@ LANG_GEN = \
runtime/spell/??/main.aap \
runtime/spell/yi/README.txt \
runtime/spell/main.aap \
runtime/spell/cleanadd.vim \
runtime/spell/*.vim \
runtime/spell/fixdup \

View File

@@ -128,21 +128,24 @@ MINOR = 0aa
# - Rename the executables to "vimd32.exe", "xxdd32.exe", "installd32.exe" and
# "uninstald32.exe".
# Win32 console version:
# - Set environment for Visual C++ 5.0: "vcvars32"
# - Set environment for Visual C++ Toolkit 2003: "msvcsetup.bat"
# - "nmake -f Make_mvc.mak"
# - "rm testdir/*.out", "nmake -f Make_mvc.mak test" and check the output.
# - Rename the executables to "vimw32.exe", "xxdw32.exe".
# - Rename ObjC/vim.pdb to vimw32.pdb.
# - When building the Win32s version later, delete vimrun.exe, install.exe and
# uninstal.exe. Otherwise rename executables to installw32.exe and
# uninstalw32.exe.
# Win32 GUI version:
# - "nmake -f Make_mvc.mak GUI=yes.
# - move "gvim.exe" to here (otherwise the OLE version will overwrite it).
# - Move ObjC/gvim.pdb to here.
# - Delete vimrun.exe, install.exe and uninstall.exe.
# - Copy "GvimExt/gvimext.dll" to here.
# Win32 GUI version with OLE, PERL, TCL, PYTHON and dynamic IME:
# - Run src/bigvim.bat ("nmake -f Make_mvc.mak GUI=yes OLE=yes IME=yes ...)
# - Rename "gvim.exe" to "gvim_ole.exe".
# - Rename ObjC/gvim.pdb to "gvim_ole.pdb".
# - Delete install.exe and uninstall.exe.
# - If building the Win32s version delete vimrun.exe.
# Win32s GUI version:
@@ -430,6 +433,7 @@ dosbin_gvim: dist no_title.vim dist/$(COMMENT_GVIM)
cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
cp gvimext.dll dist/vim/$(VIMRTDIR)/gvimext.dll
cd dist && zip -9 -rD -z gvim$(VERSION).zip vim <$(COMMENT_GVIM)
cp gvim.pdb dist/gvim$(VERSION).pdb
# make Win32 console
dosbin_w32: dist no_title.vim dist/$(COMMENT_W32)
@@ -446,6 +450,7 @@ dosbin_w32: dist no_title.vim dist/$(COMMENT_W32)
cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe
cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
cd dist && zip -9 -rD -z vim$(VERSION)w32.zip vim <$(COMMENT_W32)
cp vimw32.pdb dist/vim$(VERSION)w32.pdb
# make 32bit DOS
dosbin_d32: dist no_title.vim dist/$(COMMENT_D32)
@@ -500,6 +505,7 @@ dosbin_ole: dist no_title.vim dist/$(COMMENT_OLE)
cp src/VisVim/VisVim.dll dist/vim/$(VIMRTDIR)/VisVim.dll
cp src/VisVim/README_VisVim.txt dist/vim/$(VIMRTDIR)
cd dist && zip -9 -rD -z gvim$(VERSION)ole.zip vim <$(COMMENT_OLE)
cp gvim_ole.pdb dist/gvim$(VERSION)ole.pdb
# make Win32s gvim
dosbin_s: dist no_title.vim dist/$(COMMENT_W32S)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,12 +1,12 @@
" Vim completion script
" Language: All languages, uses existing syntax highlighting rules
" Maintainer: David Fishburn <fishburn@ianywhere.com>
" Version: 1.0
" Last Change: Sun Jan 08 2006 10:17:51 PM
" Version: 1.1
" Last Change: Wed Mar 01 2006 9:58:14 PM
" Set completion with CTRL-X CTRL-O to autoloaded function.
if exists('&ofu')
setlocal ofu=syntaxcomplete#Complete
if exists('+omnifunc')
setlocal omnifunc=syntaxcomplete#Complete
endif
if exists('g:loaded_syntax_completion')
@@ -62,7 +62,7 @@ function! syntaxcomplete#Complete(findstart, base)
if list_idx > -1
let compl_list = s:cache_list[list_idx]
else
let compl_list = s:SyntaxList()
let compl_list = OmniSyntaxList()
let s:cache_name = add( s:cache_name, &filetype )
let s:cache_list = add( s:cache_list, compl_list )
endif
@@ -78,7 +78,7 @@ function! syntaxcomplete#Complete(findstart, base)
return compl_list
endfunc
function! s:SyntaxList()
function! OmniSyntaxList()
let saveL = @l
" Loop through all the syntax groupnames, and build a
@@ -86,63 +86,146 @@ function! s:SyntaxList()
" work generically for any filetype that does not already
" have a plugin defined.
" This ASSUMES the syntax groupname BEGINS with the name
" of the filetype. From my casual viewing of the vim7\sytax
" of the filetype. From my casual viewing of the vim7\syntax
" directory.
redir @l
silent! exec 'syntax list '
redir END
let syntax_groups = @l
let syntax_full = "\n".@l
let @l = saveL
if syntax_groups =~ 'E28'
\ || syntax_groups =~ 'E411'
\ || syntax_groups =~ 'E415'
\ || syntax_groups =~ 'No sytax items'
return -1
if syntax_full =~ 'E28'
\ || syntax_full =~ 'E411'
\ || syntax_full =~ 'E415'
\ || syntax_full =~ 'No Syntax items'
return []
endif
" Abort names - match, links to, matchgroup=, start=, contains=, contained,
" cluster=, nextgroup=, end=
" Default the include group to include the requested syntax group
let syntax_group_include_{&filetype} = ''
" Check if there are any overrides specified for this filetype
if exists('g:omni_syntax_group_include_'.&filetype)
let syntax_group_include_{&filetype} =
\ substitute( g:omni_syntax_group_include_{&filetype},'\s\+','','g')
if syntax_group_include_{&filetype} =~ '\w'
let syntax_group_include_{&filetype} =
\ substitute( syntax_group_include_{&filetype},
\ '\s*,\s*', '\\|', 'g'
\ )
endif
endif
" Default the exclude group to nothing
let syntax_group_exclude_{&filetype} = ''
" Check if there are any overrides specified for this filetype
if exists('g:omni_syntax_group_exclude_'.&filetype)
let syntax_group_exclude_{&filetype} =
\ substitute( g:omni_syntax_group_exclude_{&filetype},'\s\+','','g')
if syntax_group_exclude_{&filetype} =~ '\w'
let syntax_group_exclude_{&filetype} =
\ substitute( syntax_group_exclude_{&filetype},
\ '\s*,\s*', '\\|', 'g'
\ )
endif
endif
" Syntax rules can contain items for more than just the current
" filetype. They can contain additional items added by the user
" via autocmds or their vimrc.
" Some syntax files can be combined (html, php, jsp).
" We want only items that begin with the filetype we are interested in.
let next_group_regex = '\n' .
\ '\zs'.&filetype.'\w\+\ze'.
\ '\s\+xxx\s\+'.
\ '\<\('.
\ substitute(s:syn_remove_words, ',', '\\|', 'g').
\ '\)\@!'
\ '\s\+xxx\s\+'
let syn_list = ''
let index = 0
let index = match(syntax_groups, next_group_regex, index)
let index = match(syntax_full, next_group_regex, index)
while index > 0
let group_name = matchstr( syntax_groups, '\w\+', index )
let group_name = matchstr( syntax_full, '\w\+', index )
let extra_syn_list = s:SyntaxGroupItems(group_name)
let get_syn_list = 1
" if syntax_group_include_{&filetype} == ''
" if syntax_group_exclude_{&filetype} != ''
" if '\<'.syntax_group_exclude_{&filetype}.'\>' =~ '\<'.group_name.'\>'
" let get_syn_list = 0
" endif
" endif
" else
" if '\<'.syntax_group_include_{&filetype}.'\>' !~ '\<'.group_name.'\>'
" let get_syn_list = 0
" endif
" endif
if syntax_group_exclude_{&filetype} != ''
if '\<'.syntax_group_exclude_{&filetype}.'\>' =~ '\<'.group_name.'\>'
let get_syn_list = 0
endif
endif
if get_syn_list == 1
if syntax_group_include_{&filetype} != ''
if '\<'.syntax_group_include_{&filetype}.'\>' !~ '\<'.group_name.'\>'
let get_syn_list = 0
endif
endif
endif
let syn_list = syn_list . extra_syn_list . "\n"
if get_syn_list == 1
" Pass in the full syntax listing, plus the group name we
" are interested in.
let extra_syn_list = s:SyntaxGroupItems(group_name, syntax_full)
let syn_list = syn_list . extra_syn_list . "\n"
endif
let index = index + strlen(group_name)
let index = match(syntax_groups, next_group_regex, index)
let index = match(syntax_full, next_group_regex, index)
endwhile
return sort(split(syn_list))
" Convert the string to a List and sort it.
let compl_list = sort(split(syn_list))
if &filetype == 'vim'
let short_compl_list = []
for i in range(len(compl_list))
if i == len(compl_list)-1
let next = i
else
let next = i + 1
endif
if compl_list[next] !~ '^'.compl_list[i].'.$'
let short_compl_list += [compl_list[i]]
endif
endfor
return short_compl_list
else
return compl_list
endif
endfunction
function! s:SyntaxGroupItems( group_name )
let saveL = @l
" Generate (based on the syntax highlight rules) a list of
" the Statements, functions, keywords and so on available
" If this needs updating, the syntax\sql.vim file should be
" updated
redir @l
silent! exec 'syntax list ' . a:group_name
redir END
function! s:SyntaxGroupItems( group_name, syntax_full )
if @l !~ 'E28'
let syn_list = ""
" From the full syntax listing, strip out the portion for the
" request group.
" Query:
" \n - must begin with a newline
" a:group_name - the group name we are interested in
" \s\+xxx\s\+ - group names are always followed by xxx
" \zs - start the match
" .\{-} - everything ...
" \ze - end the match
" \n\w - at the first newline starting with a character
let syntax_group = matchstr(a:syntax_full,
\ "\n".a:group_name.'\s\+xxx\s\+\zs.\{-}\ze'."\n".'\w'
\)
if syntax_group != ""
" let syn_list = substitute( @l, '^.*xxx\s*\%(contained\s*\)\?', "", '' )
let syn_list = substitute( @l, '^.*xxx\s*', "", '' )
" let syn_list = substitute( @l, '^.*xxx\s*', "", '' )
" We only want the words for the lines begining with
" containedin, but there could be other items.
@@ -152,7 +235,7 @@ function! s:SyntaxGroupItems( group_name )
" contained nextgroup=...
" So this will strip off the ending of lines with known
" keywords.
let syn_list = substitute( syn_list, '\<\('.
let syn_list = substitute( syntax_group, '\<\('.
\ substitute(
\ escape( s:syn_remove_words, '\\/.*$^~[]')
\ , ',', '\\|', 'g').
@@ -172,8 +255,6 @@ function! s:SyntaxGroupItems( group_name )
let syn_list = ''
endif
let @l = saveL
return syn_list
endfunction

View File

@@ -1,7 +1,7 @@
" Vim completion script
" Language: XML
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Last Change: 2006 Feb 6
" Last Change: 2006 Feb 18
" This function will create Dictionary with users namespace strings and values
" canonical (system) names of data files. Names should be lowercase,
@@ -319,10 +319,13 @@ function! xmlcomplete#CompleteTags(findstart, base)
let opentag = xmlcomplete#GetLastOpenTag("b:unaryTagsStack")
let opentag = substitute(opentag, '^\k*:', '', '')
if opentag == ''
return []
"return []
let tags = keys(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]})
call filter(tags, 'v:val !~ "^vimxml"')
else
let tags = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[opentag][0]
endif
let tags = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[opentag][0]
let context = substitute(context, '^\k*:', '', '')
for m in tags

View File

@@ -71,6 +71,7 @@ DOCS = \
pattern.txt \
pi_gzip.txt \
pi_netrw.txt \
pi_paren.txt \
pi_spec.txt \
pi_tar.txt \
pi_zip.txt \
@@ -89,6 +90,7 @@ DOCS = \
starting.txt \
spell.txt \
syntax.txt \
tabpage.txt \
tagsrch.txt \
term.txt \
tips.txt \
@@ -195,6 +197,7 @@ HTMLS = \
pattern.html \
pi_gzip.html \
pi_netrw.html \
pi_paren.html \
pi_spec.html \
print.html \
quickfix.html \
@@ -211,6 +214,7 @@ HTMLS = \
starting.html \
spell.html \
syntax.html \
tabpage.html \
tagsrch.html \
tags.html \
term.html \
@@ -389,6 +393,7 @@ os_risc.txt:
os_win32.txt:
touch os_win32.txt
# Note that $< works with GNU make while $> works for BSD make.
vim-fr.UTF-8.1: vim-fr.1
iconv -f latin1 -t utf-8 $< >$@

View File

@@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 7.0aa. Last change: 2006 Feb 13
*autocmd.txt* For Vim version 7.0aa. Last change: 2006 Feb 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -284,6 +284,8 @@ Name triggered by ~
|WinEnter| after entering another window
|WinLeave| before leaving a window
|TabEnter| after entering another tab page
|TabLeave| before leaving a tab page
|CmdwinEnter| after entering the command-line window
|CmdwinLeave| before leaving the command-line window
@@ -469,6 +471,8 @@ CursorHoldI Just like CursorHold, but in Insert mode.
*CursorMoved*
CursorMoved After the cursor was moved in Normal mode.
Also when the text of the cursor line has been
changed, e.g., with "x", "rx" or "p".
Not triggered when there is typeahead or when
an operator is pending.
For an example see |match-parens|.
@@ -704,6 +708,14 @@ Syntax When the 'syntax' option has been set.
where this option was set, and <amatch> for
the new value of 'syntax'.
See |:syn-on|.
*TabEnter*
TabEnter Just after entering a tab page. |tab-page|
Before triggering the WinEnter and BufEnter
events.
*TabLeave*
TabLeave Just before leaving a tab page. |tab-page|
A WinLeave event will have been triggered
first.
*TermChanged*
TermChanged After the value of 'term' has changed. Useful
for re-loading the syntax file to update the

View File

@@ -1,4 +1,4 @@
*change.txt* For Vim version 7.0aa. Last change: 2006 Feb 15
*change.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -765,6 +765,10 @@ break the line.
For convenience a <NL> character is also used as a line break. Prepend a
backslash to get a real <NL> character (which will be a NUL in the file).
When the result is a |List| then the items are joined with separating line
breaks. Thus each item becomes a line, except that they can contain line
breaks themselves.
The whole matched text can be accessed with "submatch(0)". The text matched
with the first pair of () with "submatch(1)". Likewise for further
sub-matches in ().

View File

@@ -1,4 +1,4 @@
*cmdline.txt* For Vim version 7.0aa. Last change: 2006 Feb 01
*cmdline.txt* For Vim version 7.0aa. Last change: 2006 Mar 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -970,6 +970,11 @@ that there will be an extra screen redraw.
The buffer used for the command-line window is deleted. Any changes to lines
other than the one that is executed with <CR> are lost.
If you would like to execute the command under the cursor and then have the
command-line window open again, you may find this mapping useful: >
:map <F5> <CR>q:
VARIOUS

View File

@@ -1,4 +1,4 @@
*develop.txt* For Vim version 7.0aa. Last change: 2006 Jan 12
*develop.txt* For Vim version 7.0aa. Last change: 2006 Mar 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -187,8 +187,8 @@ strchr() vim_strchr() Accepts special characters
strrchr() vim_strrchr() Accepts special characters
isspace() vim_isspace() Can handle characters > 128
iswhite() vim_iswhite() Only TRUE for Tab and space
memcpy() vim_memmove() Handles overlapped copies
bcopy() vim_memmove() Handles overlapped copies
memcpy() mch_memmove() Handles overlapped copies
bcopy() mch_memmove() Handles overlapped copies
memset() vim_memset() Uniform for all systems

View File

@@ -1,4 +1,4 @@
*diff.txt* For Vim version 7.0aa. Last change: 2006 Jan 22
*diff.txt* For Vim version 7.0aa. Last change: 2006 Feb 18
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -41,6 +41,10 @@ the file.
This only works when a standard "diff" command is available. See 'diffexpr'.
Diffs are local to the current tab page |tab-page|. You can't see diffs with
a window in another tab page. This does make it possible to have several
diffs at the same time, each in their own tab page.
What happens is that Vim opens a window for each of the files. This is like
using the |-O| argument. This uses vertical splits. If you prefer horizontal
splits add the |-o| argument: >
@@ -113,7 +117,7 @@ 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.
:diffoff! Switch off diff mode for all windows in the current tab page.
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,

View File

@@ -1,4 +1,4 @@
*editing.txt* For Vim version 7.0aa. Last change: 2006 Jan 20
*editing.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -334,6 +334,22 @@ CTRL-^ Edit the alternate file (equivalent to ":e #").
(For {Visual} see |Visual-mode|.)
{not in VI}
*gF*
[count]gF Same as "gf", except if a number follows the file
name, then the cursor is positioned on that line in
the file. The file name and the number must be
separated by a non-filename (see 'isfname') and
non-numeric character. White space between the
filename, the separator and the number are ignored.
Examples: >
eval.c:10
eval.c @ 20
eval.c (30)
eval.c 40
<
*v_gF*
{Visual}[count]gF Same as "v_gf".
These commands are used to start editing a single file. This means that the
file is read into the buffer and the current file name is set. The file that
is opened depends on the current directory, see |:cd|.
@@ -398,7 +414,9 @@ You can have the backticks expanded as a Vim expression, instead of an
external command, by using the syntax `={expr}` e.g.: >
:e `=tempname()`
The expression can contain just about anything, thus this can also be used to
avoid the special meaning of '"', '|', '%' and '#'.
avoid the special meaning of '"', '|', '%' and '#'. Names are to be separated
with line breaks. When the result is a |List| then each item is used as a
name. Line breaks also separate names.
*++opt* *[++opt]*
The [++opt] argument can be used to force the value of 'fileformat',
@@ -803,7 +821,7 @@ USING THE ARGUMENT LIST
each file.
{not in Vi} {not available when compiled without the
|+listcmds| feature}
Also see |:windo| and |:bufdo|.
Also see |:windo|, |:tabdo| and |:bufdo|.
Example: >
:args *.c
@@ -1014,6 +1032,9 @@ The names can be in upper- or lowercase.
Vim refuses to |abandon| the current buffer, and when
the last file in the argument list has not been
edited.
If there are other tab pages and quitting the last
window in the current tab page the current tab page is
closed |tab-page|.
:conf[irm] q[uit] Quit, but give prompt when changes have been made, or
the last file in the argument list has not been

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
*gui.txt* For Vim version 7.0aa. Last change: 2006 Feb 14
*gui.txt* For Vim version 7.0aa. Last change: 2006 Feb 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -24,9 +24,9 @@ Other GUI documentation:
1. Starting the GUI *gui-start* *E229* *E233*
First you must make sure you actually have a version of Vim with the GUI code
included. You can check this with the ":version" command, it should include
"+GUI_Athena", "+GUI_GTK", "+GUI_KDE", "+GUI_Motif" or "MS-Windows ... bit
GUI version".
included. You can check this with the ":version" command, it says "with xxx
GUI", where "xxx" is X11-Motif, X11-Athena, Photon, GTK, GTK2, etc., or
"MS-Windows 32 bit GUI version".
How to start the GUI depends on the system used. Mostly you can run the
GUI version of Vim with:
@@ -955,6 +955,9 @@ This section describes other features which are related to the GUI.
endif
endif
A recommended Japanese font is MS Mincho. You can find info here:
http://www.lexikan.com/mincho.htm
==============================================================================
7. Shell Commands *gui-shell*

View File

@@ -1,4 +1,4 @@
*help.txt* For Vim version 7.0aa. Last change: 2005 Nov 30
*help.txt* For Vim version 7.0aa. Last change: 2006 Feb 27
VIM - main help file
k
@@ -122,6 +122,7 @@ Advanced editing ~
|tagsrch.txt| tags and special searches
|quickfix.txt| commands for a quick edit-compile-fix cycle
|windows.txt| commands for using multiple windows and buffers
|tabpage.txt| commands for using multiple tab pages
|syntax.txt| syntax highlighting
|spell.txt| spell checking
|diff.txt| working with two or three versions of the same file
@@ -186,9 +187,11 @@ Remarks about specific systems ~
|os_win32.txt| MS-Windows 95/98/NT
*standard-plugin-list*
Standard plugins ~
|pi_netrw.txt| Reading and writing files over a network
|pi_gzip.txt| Reading and writing compressed files
|pi_expl.txt| File explorer
|pi_netrw.txt| Reading and writing files over a network
|pi_paren.txt| Highlight matching parens
|pi_tar.txt| Tar file explorer
|pi_zip.txt| Zip archive explorer
LOCAL ADDITIONS: *local-additions*

View File

@@ -1,4 +1,4 @@
*if_mzsch.txt* For Vim version 7.0aa. Last change: 2006 Jan 05
*if_mzsch.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Sergey Khorev
@@ -166,7 +166,10 @@ interface.
Common
------
(command {command-string}) Perform the vim ":Ex" style command.
(eval {expr-string}) Evaluate the vim command string.
(eval {expr-string}) Evaluate the vim expression to a string.
A |List| is turned into a string by
joining the items and inserting line
breaks.
NOTE clashes with MzScheme eval
(range-start) Start/End of the range passed with
(range-end) the Scheme command.

View File

@@ -1,4 +1,4 @@
*if_ole.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
*if_ole.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Paul Moore
@@ -77,7 +77,8 @@ Eval(expr) Evaluate an expression.
This method takes a single parameter, which is an expression in Vim's normal
format (see |expression|). It returns a string, which is the result of
evaluating the expression.
evaluating the expression. A |List| is turned into a string by joining the
items and inserting line breaks.
Examples (Visual Basic syntax) >
Line20 = Vim.Eval("getline(20)")

View File

@@ -1,4 +1,4 @@
*if_perl.txt* For Vim version 7.0aa. Last change: 2005 Oct 14
*if_perl.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Sven Verdoolaege
@@ -181,6 +181,8 @@ VIM::Eval({expr}) Evaluates {expr} and returns (success, val).
value of internal |variables| x, and '$x' is equivalent
to perl's $ENV{x}. All |functions| accessible from
the command-line are valid for {expr}.
A |List| is turned into a string by joining the items
and inserting line breaks.
*perl-SetHeight*
Window->SetHeight({height})

View File

@@ -1,4 +1,4 @@
*if_ruby.txt* For Vim version 7.0aa. Last change: 2005 Oct 14
*if_ruby.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Shugo Maeda
@@ -117,6 +117,8 @@ VIM::command({cmd})
VIM::evaluate({expr})
Evaluates {expr} using the vim internal expression evaluator (see
|expression|). Returns the expression result as a string.
A |List| is turned into a string by joining the items and inserting
line breaks.
==============================================================================
3. VIM::Buffer objects *ruby-buffer*

View File

@@ -1,4 +1,4 @@
*if_tcl.txt* For Vim version 7.0aa. Last change: 2005 Oct 14
*if_tcl.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Ingo Wilken
@@ -133,7 +133,8 @@ Commands:
Evaluates the expression {expr} using vim's internal expression
evaluator (see |expression|). Any expression that queries a buffer
or window property uses the current buffer/current window. Returns
the result as a string.
the result as a string. A |List| is turned into a string by joining
the items and inserting line breaks.
Examples: >
set perl_available [::vim::expr has("perl")]
< See also |tcl-window-expr| and |tcl-buffer-expr|.

View File

@@ -1,4 +1,4 @@
*index.txt* For Vim version 7.0aa. Last change: 2006 Jan 26
*index.txt* For Vim version 7.0aa. Last change: 2006 Mar 05
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -541,6 +541,9 @@ tag command action in Normal mode ~
the cursor
|CTRL-W_f| CTRL-W f split window and edit file name under the
cursor
|CTRL-W_F| CTRL-W F split window and edit file name under the
cursor and jump to the line number
following the file name.
|CTRL-W_g_CTRL-]| CTRL-W g CTRL-] split window and do |:tjump| to tag under
cursor
|CTRL-W_g]| CTRL-W g ] split window and do |:tselect| for tag
@@ -719,6 +722,9 @@ tag char note action in Normal mode ~
word
|gf| gf start editing the file whose name is under
the cursor
|gF| gF start editing the file whose name is under
the cursor and jump to the line number
following the filename.
|gg| gg 1 cursor to line N, default first line
|gh| gh start Select mode
|gi| gi 2 like "i", but first move to the |'^| mark
@@ -1305,7 +1311,7 @@ The commands are sorted on the non-optional part of their name.
|:omap| :om[ap] like ":map" but for Operator-pending mode
|:omapclear| :omapc[lear] remove all mappings for Operator-pending mode
|:omenu| :ome[nu] add menu for Operator-pending mode
|:only| :on[ly] close all windows except current one
|:only| :on[ly] close all windows except the current one
|:onoremap| :ono[remap] like ":noremap" but for Operator-pending mode
|:onoremenu| :onoreme[nu] like ":noremenu" but for Operator-pending mode
|:options| :opt[ions] open the options-window
@@ -1413,7 +1419,9 @@ The commands are sorted on the non-optional part of their name.
|:source| :so[urce] read Vim or Ex commands from a file
|:spelldump| :spelld[ump] split window and fill with all correct words
|:spellgood| :spe[llgood] add good word for spelling
|:spellinfo| :spelli[nfo] show info about loaded spell files
|:spellrepall| :spellr[epall] replace all bad words like last |z=|
|:spellundo| :spellu[ndo] remove good or bad word
|:spellwrong| :spellw[rong] add spelling mistake
|:split| :sp[lit] split current window
|:sprevious| :spr[evious] split window and go to previous file in the
@@ -1436,6 +1444,21 @@ The commands are sorted on the non-optional part of their name.
|:syncbind| :sync[bind] sync scroll binding
|:t| :t same as ":copy"
|:tNext| :tN[ext] jump to previous matching tag
|:tabNext| :tabN[ext] go to previous tab page
|:tabclose| :tabc[lose] close current tab page
|:tabdo| :tabdo execute command in each tab page
|:tabedit| :tabe[dit] edit a file in a new tab page
|:tabfind| :tabf[ind] find file in 'path', edit it in a new tab page
|:tabfirst| :tabfir[st] got to first tab page
|:tablast| :tabl[ast] got to last tab page
|:tabmove| :tabm[ove] move tab page to other position
|:tabnew| :tabnew edit a file in a new tab page
|:tabnext| :tabn[ext] go to next tab page
|:tabonly| :tabo[nly] close all tab pages except the current one
|:tabprevious| :tabp[revious] go to previous tab page
|:tabrewind| :tabr[ewind] got to first tab page
|:tabs| :tabs list the tab pages and what they contain
|:tab| :tab create new tab when opening new window
|:tag| :ta[g] jump to tag
|:tags| :tags show the contents of the tag stack
|:tcl| :tc[l] execute Tcl command
@@ -1456,6 +1479,7 @@ The commands are sorted on the non-optional part of their name.
|:tselect| :ts[elect] list matching tags and select one
|:tunmenu| :tu[nmenu] remove menu tooltip
|:undo| :u[ndo] undo last change(s)
|:undojoin| :undoj[oin] join next change with previous undo block
|:unabbreviate| :una[bbreviate] remove abbreviation
|:unhide| :unh[ide] open a window for each loaded file in the
buffer list

View File

@@ -1,4 +1,4 @@
*insert.txt* For Vim version 7.0aa. Last change: 2006 Feb 14
*insert.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -130,6 +130,9 @@ CTRL-R {0-9a-z"%#*+:.-=} *i_CTRL-R*
the cursor up:
CTRL-R ="\<Up>"
Use CTRL-R CTRL-R to insert text literally.
When the result is a |List| the items are used
as lines. They can have line breaks inside
too.
See |registers| about registers. {not in Vi}
CTRL-R CTRL-R {0-9a-z"%#*+/:.-=} *i_CTRL-R_CTRL-R*
@@ -993,10 +996,12 @@ items:
menu extra text for the popup menu
info more information about the item
kind single letter indicating the type of completion
icase when not zero case is to be ignored; when omitted
the 'ignorecase' option is used
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.
All of these except 'icase' 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
@@ -1081,32 +1086,39 @@ There are two states:
1. A complete match has been inserted.
2. Only part of a match has been inserted.
You normally start in the first state, with the first match being inserted.
When "longest" is in 'completeopt' and there is more than one match you start
in the second state.
If you select another match, e.g., with CTRL-N or CTRL-P, you go from the
second to the first state. This doesn't change the list of matches.
In the first state these keys have a special meaning:
<BS> and CTRL-H Delete one character, find the matches for the word before
the cursor. This reduces the list of matches, often to one
entry. Switches to the second state.
entry, and switches to the second state.
In the second state these keys have a special meaning:
<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.
any printable character: Add this character and reduce the number of matches.
any printable, non-white character:
Add this character and reduce the number of matches.
In both states these can be used:
<CR> and <Enter> Accept the currently selected match
<PageUp> Select a match several entries back
<PageDown> Select a match several entries further
<CR> and <Enter> Accept the currently selected match and stop completion.
<PageUp> Select a match several entries back, but don't insert it.
<PageDown> Select a match several entries further, but don't insert it.
<Up> Select the previous match, as if CTRL-P was used, but don't
insert the newly selected word.
insert it.
<Down> Select the next match, as if CTRL-N was used, but don't
insert the newly selected word.
If you select another match, e.g., with CTRL-N or CTRL-P, you go back to the
first state. However, the list of matches doesn't change.
insert it.
Any other character:
Stop completion without changing the match and insert the
typed character. Note that typing a space or <Tab> will
work in both states.
The colors of the menu can be changed with these highlight groups:
@@ -1133,9 +1145,9 @@ Completion of C code requires a tags file. You should use Exuberant ctags,
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
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
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: >
@@ -1230,23 +1242,85 @@ both major engines implemented element, even if this is not in standards it
will be suggested. All other elements are not placed in suggestion list.
PHP *ft-php-omni*
Completion of PHP code requires tags file for completion of data from external
files. You should use Exuberant ctags version 5.5.4 or newer. You can find it
here: http://ctags.sourceforge.net/
Script completes:
- after $ variables name
- function names with additonal info:
- in case of built-in functions list of possible arguments and after | type
data returned by function
- in case of user function arguments and name of file were function was
defined (if it is not current file)
Note: when doing completion first time Vim will load all necessary data into
memory. It may take several seconds. After next use of completion delay
shouldn't be noticeable.
Script detects if cursor is inside <?php ?> tags. If it is outside it will
automatically switch to HTML/CSS/JavaScript completion. Note: contrary to
original HTML files completion of tags (and only tags) isn't context aware.
SYNTAX *ft-syntax-omni*
This uses the current syntax highlighting for completion. It can be used for
any filetype and provides a minimal language-sensitive completion.
To enable code completion do: >
source $VIMRUNTIME/autoload/syntaxcomplete.vim
To enable syntax code completion you can run: >
setlocal omnifunc=syntaxcomplete#Complete
You can automate this by placing this in your vimrc (after any ":filetype"
command): >
autocmd Filetype *
\ if exists('&ofu') && &ofu == "" |
\ source $VIMRUNTIME/autoload/syntaxcomplete.vim |
\ endif
You can automate this by placing the following in your vimrc (after any
":filetype" command): >
if has("autocmd") && exists("+omnifunc")
autocmd Filetype *
\ if &omnifunc == "" |
\ setlocal omnifunc=syntaxcomplete#Complete |
\ endif
endif
The above will set completion to this script only if a proper one does not
already exist for that filetype.
The above will set completion to this script only if a specific plugin does
not already exist for that filetype.
Each filetype can have a wide range of syntax items. The plugin allows you to
customize which syntax groups to include or exclude from the list. Let's have
a look at the PHP filetype to see how this works.
If you edit a file called, index.php, run the following command: >
:syntax list
First thing you will notice is there are many different syntax groups. The
PHP language can include elements from different languages like HTML,
JavaScript and many more. The syntax plugin will only include syntax groups
that begin with the filetype, "php", in this case. For example these syntax
groups are included by default with the PHP: phpEnvVar, phpIntVar,
phpFunctions.
The PHP language has an enormous number of items which it knows how to syntax
highlight. This means these items will be available within the omni
completion list. Some people may find this list unwieldy or are only
interested in certain items.
There are two ways to prune this list (if necessary). If you find certain
syntax groups you do not wish displayed you can add the following to your
vimrc: >
let g:omni_syntax_group_exclude_php = 'phpCoreConstant,phpConstant'
Add as many syntax groups to this list by comma separating them. The basic
form of this variable is: >
let g:omni_syntax_group_exclude_{filetype} = 'comma,separated,list'
For completeness the opposite is also true. Creating this variable in your
vimrc will only include the items in the phpFunctions and phpMethods syntax
groups: >
let g:omni_syntax_group_include_php = 'phpFunctions,phpMethods'
You can create as many of these variables as you need, varying only the
filetype at the end of the variable name.
XML *ft-xml-omni*

View File

@@ -581,7 +581,7 @@ function find_tag2() {
ntags=split(atag,blata,"[ ]");
if ( ntags > 1 ) { return; }
if ( ( allow_one_char == "no" ) && \
( index("!#$%\&'()+,-./0:;=?@ACINX\\[\\]^_`at\\{\\}~",atag) !=0 ) ) {
( index("!#$%&'()+,-./0:;=?@ACINX\\[\\]^_`at\\{\\}~",atag) !=0 ) ) {
return;
}
if ( skip_word[atag] == "yes" ) { return; }
@@ -610,7 +610,7 @@ function find_tag3() {
ntags=split(btag,blata,"[ ]");
if ( ntags > 1 ) { return; }
if ( ( allow_one_char == "no" ) && \
( index("!#$%\&'()+,-./0:;=?@ACINX\\[\\]^_`at\\{\\}~",btag) !=0 ) ) {
( index("!#$%&'()+,-./0:;=?@ACINX\\[\\]^_`at\\{\\}~",btag) !=0 ) ) {
return;
}
if ( skip_word[btag] == "yes" ) { return; }

View File

@@ -1,4 +1,4 @@
*map.txt* For Vim version 7.0aa. Last change: 2006 Feb 10
*map.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -778,7 +778,7 @@ This does not work if 'cpoptions' includes the '<' flag. |<>|
You can even do more complicated things. For example, to consume the space
typed after an abbreviation: >
func Eatchar(pat)
let c = nr2char(getchar())
let c = nr2char(getchar(0))
return (c =~ a:pat) ? '' : c
endfunc
iabbr <silent> if if ()<Left><C-R>=Eatchar('\s')<CR>
@@ -1089,6 +1089,7 @@ completion can be enabled:
-complete=event autocommand events
-complete=expression Vim expression
-complete=file file and directory names
-complete=shellcmd Shell command
-complete=function function name
-complete=help help subjects
-complete=highlight highlight groups

View File

@@ -1,4 +1,4 @@
*mbyte.txt* For Vim version 7.0aa. Last change: 2005 Oct 14
*mbyte.txt* For Vim version 7.0aa. Last change: 2006 Mar 05
VIM REFERENCE MANUAL by Bram Moolenaar et al.
@@ -1257,11 +1257,16 @@ Double-width characters are supported. This works best with 'guifontwide' or
normal width and a space to fill the gap. Note that the 'guifontset' option
is no longer relevant in the GTK+ 2 GUI.
Up to two combining characters can be used. The combining character is drawn
on top of the preceding character. When editing text a composing character is
mostly considered part of the preceding character. For example "x" will
delete a character and its following composing characters by default. If the
'delcombine' option is on, then pressing 'x' will delete the combining
*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
preceding character.
Up to two combining characters can be used by default. This can be changed
with the 'maxcombine' option.
When editing text a composing character is mostly considered part of the
preceding character. For example "x" will delete a character and its
following composing characters by default.
If the 'delcombine' option is on, then pressing 'x' will delete the combining
characters, one at a time, then the base character. But when inserting, you
type the first character and the following composing characters separately,
after which they will be joined. The "r" command will not allow you to type a

View File

@@ -1,4 +1,4 @@
*message.txt* For Vim version 7.0aa. Last change: 2006 Jan 08
*message.txt* For Vim version 7.0aa. Last change: 2006 Mar 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -751,9 +751,12 @@ and the screen is about to be redrawn:
-> Press <Enter> or <Space> to redraw the screen and continue, without that
key being used otherwise.
-> Press ':' or any other Normal mode command character to start that command.
-> Press 'k', '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.
-> 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.
-> 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

View File

@@ -1,4 +1,4 @@
*options.txt* For Vim version 7.0aa. Last change: 2006 Feb 14
*options.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1050,7 +1050,10 @@ A jump table for the options with a short description can be found at |Q_op|.
To check whether line breaks in the balloon text work use this check: >
if has("balloon_multiline")
<
< When they are supported "\n" characters will start a new line. If the
expression evaluates to a |List| this is equal to using each List item
as a string and putting "\n" in between them.
*'binary'* *'bin'* *'nobinary'* *'nobin'*
'binary' 'bin' boolean (default off)
local to buffer
@@ -1576,6 +1579,7 @@ A jump table for the options with a short description can be found at |Q_op|.
u scan the unloaded buffers that are in the buffer list
U scan the buffers that are not in the buffer list
k scan the files given with the 'dictionary' option
kspell use the currently active spell checking |spell|
k{dict} scan the file {dict}. Several "k" flags can be given,
patterns are valid too. For example: >
:set cpt=k/usr/dict/*,k~/spanish
@@ -1628,8 +1632,14 @@ A jump table for the options with a short description can be found at |Q_op|.
menu is only shown when there is more than one match and
sufficient colors are available. |ins-completion-menu|
menuone Use the popup menu also when there is only one match.
Useful when there is additional information about the
match, e.g., what file it comes from.
longest Only insert the longest common text of the matches. Use
CTRL-L to add more characters.
CTRL-L to add more characters. Whether case is ignored
depends on the kind of completion. For buffer text the
'ignorecase' option is used.
*'confirm'* *'cf'* *'noconfirm'* *'nocf'*
@@ -2083,6 +2093,8 @@ A jump table for the options with a short description can be found at |Q_op|.
contain a list of words. This can be one word per line, or several
words per line, separated by non-keyword characters (white space is
preferred). Maximum line length is 510 bytes.
When this option is empty, or an entry "spell" is present, spell
checking is enabled the currently active spelling is used. |spell|
To include a comma in a file name precede it with a backslash. Spaces
after a comma are ignored, otherwise spaces are included in the file
name. See |option-backslash| about using backslashes.
@@ -2445,6 +2457,7 @@ A jump table for the options with a short description can be found at |Q_op|.
When reading a file 'fileencoding' will be set from 'fileencodings'.
To read a file in a certain encoding it won't work by setting
'fileencoding', use the |++enc| argument.
For a new file the global value of 'fileencoding' is used.
Prepending "8bit-" and "2byte-" has no meaning here, they are ignored.
When the option is set, the value is converted to lowercase. Thus
you can set it with uppercase values too. '_' characters are
@@ -2494,9 +2507,11 @@ A jump table for the options with a short description can be found at |Q_op|.
non-blank characters.
When the |++enc| argument is used then the value of 'fileencodings' is
not used.
Note that 'fileencodings' is not used for a new file, 'fileencoding'
is always empty then. This means that a non-existing file may get a
different encoding than an empty file.
Note that 'fileencodings' is not used for a new file, the global value
of 'fileencoding' is used instead. You can set it with: >
:setglobal fenc=iso-8859-2
< This means that a non-existing file may get a different encoding than
an empty file.
The special value "ucs-bom" can be used to check for a Unicode BOM
(Byte Order Mark) at the start of the file. It must not be preceded
by "utf-8" or another Unicode encoding for this to work properly.
@@ -2904,7 +2919,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|v:count| the number of lines to be formatted.
When this option is empty 'formatprg' is used.
Example: >
:set formatexp=mylang#Format()
:set formatexpr=mylang#Format()
< This will invoke the mylang#Format() function in the
autoload/mylang.vim file in 'runtimepath'. |autoload|
@@ -3247,6 +3262,12 @@ A jump table for the options with a short description can be found at |Q_op|.
'c' Use console dialogs instead of popup dialogs for simple
choices.
'e' Add tab pages when indicated with 'showtabline'.
'guitablabel' can be used to change the text in the labels.
When 'e' is missing a non-GUI tab pages line may be used.
The GUI tabs are only supported on some systens, currently
only for GTK.
'f' Foreground: Don't use fork() to detach the GUI from the shell
where it was started. Use this for programs that wait for the
editor to finish (e.g., an e-mail program). Alternatively you
@@ -3307,6 +3328,22 @@ A jump table for the options with a short description can be found at |Q_op|.
Only in the GUI: If on, an attempt is made to open a pseudo-tty for
I/O to/from shell commands. See |gui-pty|.
*'guitablabel'* *'gtl'*
'guitablabel' 'gtl' string (default empty)
global
{not in Vi}
{only available when compiled with GUI enabled and
with the +windows feature}
When nonempty describes the text to use in a label of the GUI tab
pages line. When empty Vim will use a default label. See
|setting-guitablabel| for more info.
The format of this option is like that of 'statusline'.
Only used when the GUI tab pages line is displayed. 'e' must be
present in 'guioptions'. For the non-GUI tab pages line 'tabline' is
used.
*'helpfile'* *'hf'*
'helpfile' 'hf' string (default (MSDOS) "$VIMRUNTIME\doc\help.txt"
(others) "$VIMRUNTIME/doc/help.txt")
@@ -3987,8 +4024,8 @@ A jump table for the options with a short description can be found at |Q_op|.
specified with multi-byte characters (e.g., UTF-8), but only the lower
8 bits of each character will be used.
Example (for Greek): *greek* >
:set langmap=<EFBFBD>A,<EFBFBD>B,<EFBFBD>C,<EFBFBD>D,<EFBFBD>E,<EFBFBD>F,<EFBFBD>G,<EFBFBD>H,<EFBFBD>I,<EFBFBD>J,<EFBFBD>K,<EFBFBD>L,<EFBFBD>M,<EFBFBD>N,<EFBFBD>O,<EFBFBD>P,QQ,<EFBFBD>R,<EFBFBD>S,<EFBFBD>T,<EFBFBD>U,<EFBFBD>V,WW,<EFBFBD>X,<EFBFBD>Y,<EFBFBD>Z,<EFBFBD>a,<EFBFBD>b,<EFBFBD>c,<EFBFBD>d,<EFBFBD>e,<EFBFBD>f,<EFBFBD>g,<EFBFBD>h,<EFBFBD>i,<EFBFBD>j,<EFBFBD>k,<EFBFBD>l,<EFBFBD>m,<EFBFBD>n,<EFBFBD>o,<EFBFBD>p,qq,<EFBFBD>r,<EFBFBD>s,<EFBFBD>t,<EFBFBD>u,<EFBFBD>v,<EFBFBD>w,<EFBFBD>x,<EFBFBD>y,<EFBFBD>z
Example (for Greek, in UTF-8): *greek* >
:set langmap=ΑA,ΒB,ΨC,ΔD,ΕE,ΦF,ΓG,ΗH,ΙI,ΞJ,ΚK,ΛL,ΜM,ΝN,ΟO,ΠP,QQ,ΡR,ΣS,ΤT,ΘU,ΩV,WW,ΧX,ΥY,ΖZ,αa,βb,ψc,δd,εe,φf,γg,ηh,ιi,ξj,κk,λl,μm,νn,οo,πp,qq,ρr,σs,τt,θu,ωv,ςw,χx,υy,ζz
< Example (exchanges meaning of z and y for commands): >
:set langmap=zy,yz,ZY,YZ
<
@@ -4257,6 +4294,20 @@ A jump table for the options with a short description can be found at |Q_op|.
set. Note that this is not in milliseconds, like other options that
set a time. This is to be compatible with Nvi.
*'maxcombine'* *'mco'*
'maxcombine' 'mco' number (default 2)
global
{not in Vi}
{only available when compiled with the |+multi_byte|
feature}
The maximum number of combining characters supported for displaying.
Only used when 'encoding' is "utf-8".
The default is OK for most languages. Hebrew may require 4.
Maximum value is 6.
Even when this option is set to 2 you can still edit text with more
combining characters, you just can't see them. Use |g8| or |ga|.
See |mbyte-combining|.
*'maxfuncdepth'* *'mfd'*
'maxfuncdepth' 'mfd' number (default 100)
global
@@ -4614,7 +4665,7 @@ A jump table for the options with a short description can be found at |Q_op|.
{only available when compiled with the |+linebreak|
feature}
Minimal number of columns to use for the line number. Only relevant
when the 'number' option is set.
when the 'number' option is set or printing lines with a line number.
Since one space is always between the number and the text, there is
one less character for the number itself.
The value is the minimum width. A bigger width is used when needed to
@@ -5071,7 +5122,7 @@ A jump table for the options with a short description can be found at |Q_op|.
feature}
When this option is not empty, it determines the content of the ruler
string, as displayed for the 'ruler' option.
The format of this option, is like that of 'statusline'.
The format of this option is like that of 'statusline'.
The default ruler width is 17 characters. To make the ruler 15
characters wide, put "%15(" at the start and "%)" at the end.
Example: >
@@ -5336,6 +5387,8 @@ A jump table for the options with a short description can be found at |Q_op|.
winsize window sizes
Don't include both "curdir" and "sesdir".
There is no option to include tab pages yet, only the current tab page
is stored in the session. |tab-page|
When "curdir" nor "sesdir" is included, file names are stored with
absolute paths.
"slash" and "unix" are useful on Windows when sharing session files
@@ -5664,7 +5717,9 @@ A jump table for the options with a short description can be found at |Q_op|.
The 'matchpairs' option can be used to specify the characters to show
matches for. 'rightleft' and 'revins' are used to look for opposite
matches.
Note: For the use of the short form parental guidance is advised.
Also see the matchparen plugin for highlighting the match when moving
around |pi_paren.txt|.
Note: Use of the short form is rated PG.
*'showmode'* *'smd'* *'noshowmode'* *'nosmd'*
'showmode' 'smd' boolean (Vim default: on, Vi default: off)
@@ -5678,6 +5733,21 @@ A jump table for the options with a short description can be found at |Q_op|.
NOTE: This option is set to the Vi default value when 'compatible' is
set and to the Vim default value when 'compatible' is reset.
*'showtabline'* *'stal'*
'showtabline' 'stal' number (default 1)
global
{not in Vi}
{not available when compiled without the +windows
feature}
The value of this option specifies when the line with tab page labels
will be displayed:
0: never
1: only if there are at least two tab pages
2: always
This is both for the GUI and non-GUI implementation of the tab pages
line.
See |tab-page| for more information about tab pages.
*'sidescroll'* *'ss'*
'sidescroll' 'ss' number (default 0)
global
@@ -5985,6 +6055,14 @@ A jump table for the options with a short description can be found at |Q_op|.
All fields except the {item} is optional. A single percent sign can
be given as "%%". Up to 80 items can be specified.
When the option starts with "%!" then it is used as an expression,
evaluated and the result is used as the option value. Example: >
:set statusline=%!MyStatusLine()
< The result can contain %{} items that will be evaluated too.
When there is error while evaluating the option then it will be made
empty to avoid further errors. Otherwise screen updating would loop.
Note that the only effect of 'ruler' when this option is set (and
'laststatus' is 2) is controlling the output of |CTRL-G|.
@@ -6043,15 +6121,24 @@ A jump table for the options with a short description can be found at |Q_op|.
percentage described for 'ruler'. Always 3 in length.
a S Argument list status as in default title. ({current} of {max})
Empty if the argument file count is zero or one.
{ NF Evaluate expression between '{' and '}' and substitute result.
{ NF Evaluate expression between '%{' and '}' and substitute result.
Note that there is no '%' before the closing '}'.
( - Start of item group. Can be used for setting the width and
alignment of a section. Must be followed by %) somewhere.
) - End of item group. No width fields allowed.
T N For 'tabline': start of tab page N label. Use %T after the last
label. This information is used for mouse clicks.
X N For 'tabline': start of close tab N label. Use %X after the
label, e.g.: %3Xclose%X. Use %999X for a "close current tab"
mark. This information is used for mouse clicks.
< - Where to truncate line if too long. Default is at the start.
No width fields allowed.
= - Separation point between left and right aligned items.
No width fields allowed.
# - Set highlight group. The name must follow and then a # again.
Thus use %#HLname# for highlight group HLname. The same
highlighting is used, also for the statusline of non-current
windows.
* - Set highlight group to User{N}, where {N} is taken from the
minwid field, e.g. %1*. Restore normal highlight with %* or %0*.
The difference between User{N} and StatusLine will be applied
@@ -6232,7 +6319,41 @@ A jump table for the options with a short description can be found at |Q_op|.
'S' flag in 'cpoptions'.
Only normal file name characters can be used, "/\*?[|<>" are illegal.
*'tabstop'* *'ts'*
*'tabline'* *'tal'*
'tabline' 'tal' string (default empty)
global
{not in Vi}
{not available when compiled without the +windows
feature}
When nonempty, this option determines the content of the tab pages
line at the top of the Vim window. When empty Vim will use a default
tab pages line. See |setting-tabline| for more info.
The tab pages line only appears as specified with the 'showtabline'
option and only when there is no GUI tab line. When 'e' is in
'guioptions' and the GUI supports a tab line 'guitablabel' is used
instead.
The value is evaluated like with 'statusline'. You can use
|tabpagenr()|, |tabpagewinnr()| and |tabpagebuflist()| to figure out
the text to be displayed. Use "%1T" for the first label, "%2T" for
the second one, etc. Use "%X" items for closing labels.
Keep in mind that only one of the tab pages is the current one, others
are invisible and you can't jump to their windows.
*'tabpagemax'* *'tpm'*
'tabpagemax' 'tpm' number (default 10)
global
{not in Vi}
{not available when compiled without the +windows
feature}
Maximum number of tab pages to be opened by the |-p| command line
argument or the ":tab all" command. |tabpage|
*'tabstop'* *'ts'*
'tabstop' 'ts' number (default 8)
local to buffer
Number of spaces that a <Tab> in the file counts for. Also see
@@ -6835,7 +6956,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Currently, these messages are given:
>= 1 When the viminfo file is read or written.
>= 2 When a file is ":source"'ed.
>= 5 Every searched tags file.
>= 5 Every searched tags file and include file.
>= 8 Files for which a group of autocommands is executed.
>= 9 Every executed autocommand.
>= 12 Every executed function.
@@ -7057,8 +7178,8 @@ A jump table for the options with a short description can be found at |Q_op|.
char key mode ~
b <BS> Normal and Visual
s <Space> Normal and Visual
h "h" Normal and Visual
l "l" Normal and Visual
h "h" Normal and Visual (not recommended)
l "l" Normal and Visual (not recommended)
< <Left> Normal and Visual
> <Right> Normal and Visual
~ "~" Normal
@@ -7074,8 +7195,9 @@ A jump table for the options with a short description can be found at |Q_op|.
"dh". If you use this, you may also want to use the mapping
":map <BS> X" to make backspace delete the character in front of the
cursor.
When 'l' is included, you get a side effect: "yl" on an empty line
will include the <EOL>, so that "p" will insert a new line.
When 'l' is included and it is used after an operator at the end of a
line then it will not move to the next line. This makes "dl", "cl",
"yl" etc. work normally.
NOTE: This option is set to the Vi default value when 'compatible' is
set and to the Vim default value when 'compatible' is reset.

View File

@@ -1,4 +1,4 @@
*os_vms.txt* For Vim version 7.0aa. Last change: 2005 Jul 12
*os_vms.txt* For Vim version 7.0aa. Last change: 2006 Mar 02
VIM REFERENCE MANUAL
@@ -56,11 +56,14 @@ To use the precompiled binary version, you need one of these archives:
vim-XX-exe-vax-gui.zip VAX GUI executables
vim-XX-exe-vax-term.zip VAX console executables
and of course
and of course (optional)
vim-XX-runtime.zip runtime files
The binary archives contain: vim.exe, ctags.exe, xxd.exe files.
For GTK executables you will need GTKLIB that is available for
Alpha and IA64 platform.
==============================================================================
3. Compiling *vms-compiling*
@@ -121,10 +124,10 @@ Vim uses a special directory structure to hold the document and runtime files:
|- vim57
|----- doc
|----- syntax
|- vim60
|- vim62
|----- doc
|----- syntax
|- vim61
|- vim64
|----- doc
|----- syntax
vimrc (system rc files)
@@ -239,6 +242,17 @@ and to the SYS$STARTUP:SYLOGIN.COM >
It will set up a normal Vim work environment for every user on the system.
IMPORTANT: Vim on OpenVMS (and on other case insensitive system) command line
parameters are assumed to be lowecase. In order to indicate that a command
line parameter is uppercase "/" sign must be used.
Examples:
>
vim -R filename ! means: -r List swap files and exit
vim -/r filename ! means: -R Readonly mode (like "view")
vim -u <vimrc> ! means: -u Use <vimrc> instead of any .vimrc
vim -/u <gvimrc> ! means: -U Use <gvimrc> instead of any .gvimrc
==============================================================================
7. GUI mode questions *vms-gui*
@@ -653,7 +667,10 @@ start it with: >
9. VMS related changes *vms-changes*
Version 7.0
Version 7
- Improved low level char input (affects just console mode)
Version 6.4 (2005 Oct 15)
- GTKLIB and Vim build on IA64
- colors in terminal mode
- syntax highlighting in terminal mode

View File

@@ -1,4 +1,4 @@
*pattern.txt* For Vim version 7.0aa. Last change: 2006 Feb 14
*pattern.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -16,8 +16,9 @@ explanations are in chapter 27 |usr_27.txt|.
5. Multi items |pattern-multi-items|
6. Ordinary atoms |pattern-atoms|
7. Ignoring case in a pattern |/ignorecase|
8. Compare with Perl patterns |perl-patterns|
9. Highlighting matches |match-highlight|
8. Composing characters |patterns-composing|
9. Compare with Perl patterns |perl-patterns|
10. Highlighting matches |match-highlight|
==============================================================================
1. Search commands *search-commands* *E486*
@@ -1104,12 +1105,6 @@ Examples:
\cfoo - - foo Foo FOO
foo\C - - foo
*/\Z*
When "\Z" appears anywhere in the pattern, composing characters are ignored.
Thus only the base characters need to match, the composing characters may be
different and the number of composing characters may differ. Only relevant
when 'encoding' is "utf-8".
Technical detail: *NL-used-for-Nul*
<Nul> characters in the file are stored as <NL> in memory. In the display
they are shown as "^@". The translation is done when reading and writing
@@ -1134,7 +1129,27 @@ expect. But invalid bytes may cause trouble, a pattern with an invalid byte
will probably never match.
==============================================================================
8. Compare with Perl patterns *perl-patterns*
8. Composing characters *patterns-composing*
*/\Z*
When "\Z" appears anywhere in the pattern, composing characters are ignored.
Thus only the base characters need to match, the composing characters may be
different and the number of composing characters may differ. Only relevant
when 'encoding' is "utf-8".
When a composing character appears at the start of the pattern of after an
item that doesn't include the composing character, a match is found at any
character that includes this composing character.
When using a dot and a composing character, this works the same as the
composing character by itself, except that it doesn't matter what comes before
this.
The order of composing characters matters, even though changing the order
doen't change what a character looks like. This may change in the future.
==============================================================================
9. Compare with Perl patterns *perl-patterns*
Vim's regexes are most similar to Perl's, in terms of what you can do. The
difference between them is mostly just notation; here's a summary of where
@@ -1144,7 +1159,7 @@ Capability in Vimspeak in Perlspeak ~
----------------------------------------------------------------
force case insensitivity \c (?i)
force case sensitivity \C (?-i)
backref-less grouping \%(atom) (?:atom)
backref-less grouping \%(atom\) (?:atom)
conservative quantifiers \{-n,m} *?, +?, ??, {}?
0-width match atom\@= (?=atom)
0-width non-match atom\@! (?!atom)
@@ -1177,10 +1192,10 @@ Finally, these constructs are unique to Perl:
- \& (which is to \| what "and" is to "or"; it forces several branches
to match at one spot)
- matching lines/columns by number: \%5l \%5c \%5v
- limiting the "return value" of a regex: \zs \ze
- setting the start and end of the match: \zs \ze
==============================================================================
9. Highlighting matches *match-highlight*
10. Highlighting matches *match-highlight*
*:mat* *:match*
:mat[ch] {group} /{pattern}/
@@ -1191,14 +1206,23 @@ Finally, these constructs are unique to Perl:
< Instead of // any character can be used to mark the start and
end of the {pattern}. Watch out for using special characters,
such as '"' and '|'.
{group} must exist at the moment this command is executed.
The match overrides the 'hlsearch' highlighting.
'ignorecase' does not apply, use |/\c| in the pattern to
ignore case. Otherwise case is not ignored.
The {group} highlighting still applies when a character is
to be highlighted for 'hlsearch'.
Note that highlighting the last used search pattern with
'hlsearch' is used in all windows, while the pattern defined
with ":match" only exists in the current window. It is kept
when switching to another buffer.
The |matchparen| plugin uses match highlighting, thus will
disable your ":match" command as soon as you move to a paren.
'ignorecase' does not apply, use |/\c| in the pattern to
ignore case. Otherwise case is not ignored.
Another example, which highlights all characters in virtual
column 72 and more: >
:highlight rightMargin term=bold ctermfg=blue guifg=blue
@@ -1213,4 +1237,20 @@ Finally, these constructs are unique to Perl:
:mat[ch] none
Clear a previously defined match pattern.
:2mat[ch] {group} /{pattern}/
:2mat[ch]
:2mat[ch] none
:3mat[ch] {group} /{pattern}/
:3mat[ch]
:3mat[ch] none
Just like |:match| above, but set a separate match. Thus
there can be three matches active at the same time. The match
with the lowest number has priority if several match at the
same position.
The ":3match" command is used by the |matchparen| plugin. You
are suggested to use ":match" for manual matching and
":2match" for another plugin.
vim:tw=78:ts=8:ft=help:norl:

42
runtime/doc/pi_paren.txt Normal file
View File

@@ -0,0 +1,42 @@
*pi_paren.txt* For Vim version 7.0aa. Last change: 2006 Mar 01
VIM REFERENCE MANUAL by Bram Moolenaar
Highlighting matching parens *matchparen*
The functionality mentioned here is a |standard-plugin|.
This plugin is only available if 'compatible' is not set.
You can avoid loading this plugin by setting the "loaded_matchparen" variable: >
:let loaded_matchparen = 1
The plugin installs CursorMoved autocommands to redefine the match
highlighting.
To disable the plugin after it was loaded use this command: >
:NoMatchParen
And to enable it again: >
:DoMatchParen
The highlighting used is MatchParen. You can specify different colors with
the ":highlight" command. Example: >
:hi MatchParen ctermbg=blue guibg=lightblue
The characters to be matched come from the 'matchpairs' option. You can
change the value to highlight different matches. Note that not everything is
possible. For example, you can't highlight single or double quotes, because
the start and end are equal.
The syntax highlighting attributes are used. When the cursor currently is not
in a string or comment syntax item, then matches inside string and comment
syntax items are ignored. Any syntax items with "string" or "comment"
somewhere in their name are considered string or comment items.
==============================================================================
vim:tw=78:ts=8:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*quickref.txt* For Vim version 7.0aa. Last change: 2006 Feb 13
*quickref.txt* For Vim version 7.0aa. Last change: 2006 Mar 05
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -588,337 +588,341 @@ In Insert or Command-line mode:
the help.
Short explanation of each option: *option-list*
|'aleph'| |'al'| ASCII code of the letter Aleph (Hebrew)
|'allowrevins'| |'ari'| allow CTRL-_ in Insert and Command-line mode
|'altkeymap'| |'akm'| for default second language (Farsi/Hebrew)
|'ambiwidth'| |'ambw'| what to do with Unicode chars of ambiguous width
|'antialias'| |'anti'| Mac OS X: use smooth, antialiased fonts
|'autochdir'| |'acd'| change directory to the file in the current window
|'arabic'| |'arab'| for Arabic as a default second language
|'arabicshape'| |'arshape'| do shaping for Arabic characters
|'autoindent'| |'ai'| take indent for new line from previous line
|'autoread'| |'ar'| autom. read file when changed outside of Vim
|'autowrite'| |'aw'| automatically write file if changed
|'autowriteall'| |'awa'| as 'autowrite', but works with more commands
|'background'| |'bg'| "dark" or "light", used for highlight colors
|'backspace'| |'bs'| how backspace works at start of line
|'backup'| |'bk'| keep backup file after overwriting a file
|'backupcopy'| |'bkc'| make backup as a copy, don't rename the file
|'backupdir'| |'bdir'| list of directories for the backup file
|'backupext'| |'bex'| extension used for the backup file
|'backupskip'| |'bsk'| no backup for files that match these patterns
|'balloondelay'| |'bdlay'| delay in mS before a balloon may pop up
|'ballooneval'| |'beval'| switch on balloon evaluation
|'balloonexpr'| |'bexpr'| expression to show in balloon
|'binary'| |'bin'| read/write/edit file in binary mode
|'bioskey'| |'biosk'| MS-DOS: use bios calls for input characters
|'bomb'| prepend a Byte Order Mark to the file
|'breakat'| |'brk'| characters that may cause a line break
|'browsedir'| |'bsdir'| which directory to start browsing in
|'bufhidden'| |'bh'| what to do when buffer is no longer in window
|'buflisted'| |'bl'| whether the buffer shows up in the buffer list
|'buftype'| |'bt'| special type of buffer
|'casemap'| |'cmp'| specifies how case of letters is changed
|'cdpath'| |'cd'| list of directories searched with ":cd"
|'cedit'| key used to open the command-line window
|'charconvert'| |'ccv'| expression for character encoding conversion
|'cindent'| |'cin'| do C program indenting
|'cinkeys'| |'cink'| keys that trigger indent when 'cindent' is set
|'cinoptions'| |'cino'| how to do indenting when 'cindent' is set
|'cinwords'| |'cinw'| words where 'si' and 'cin' add an indent
|'clipboard'| |'cb'| use the clipboard as the unnamed register
|'cmdheight'| |'ch'| number of lines to use for the command-line
|'cmdwinheight'| |'cwh'| height of the command-line window
|'columns'| |'co'| number of columns in the display
|'comments'| |'com'| patterns that can start a comment line
|'commentstring'| |'cms'| template for comments; used for fold marker
|'compatible'| |'cp'| behave Vi-compatible as much as possible
|'complete'| |'cpt'| specify how Insert mode completion works
|'completefunc'| |'cfu'| function to be used for Insert mode completion
|'completeopt'| |'cot'| options for Insert mode completion
|'confirm'| |'cf'| ask what to do about unsaved/read-only files
|'conskey'| |'consk'| get keys directly from console (MS-DOS only)
|'copyindent'| |'ci'| make 'autoindent' use existing indent structure
|'cpoptions'| |'cpo'| flags for Vi-compatible behavior
|'cscopepathcomp'| |'cspc'| how many components of the path to show
|'cscopeprg'| |'csprg'| command to execute cscope
|'cscopequickfix'| |'csqf'| use quickfix window for cscope results
|'cscopetag'| |'cst'| use cscope for tag commands
|'cscopetagorder'| |'csto'| determines ":cstag" search order
|'cscopeverbose'| |'csverb'| give messages when adding a cscope database
|'debug'| set to "msg" to see all error messages
|'define'| |'def'| pattern to be used to find a macro definition
|'delcombine'| |'deco'| delete combining characters on their own
|'dictionary'| |'dict'| list of file names used for keyword completion
|'diff'| use diff mode for the current window
|'diffexpr'| |'dex'| expression used to obtain a diff file
|'diffopt'| |'dip'| options for using diff mode
|'digraph'| |'dg'| enable the entering of digraphs in Insert mode
|'directory'| |'dir'| list of directory names for the swap file
|'display'| |'dy'| list of flags for how to display text
|'eadirection'| |'ead'| in which direction 'equalalways' works
|'edcompatible'| |'ed'| toggle flags of ":substitute" command
|'encoding'| |'enc'| encoding used internally
|'endofline'| |'eol'| write <EOL> for last line in file
|'equalalways'| |'ea'| windows are automatically made the same size
|'equalprg'| |'ep'| external program to use for "=" command
|'errorbells'| |'eb'| ring the bell for error messages
|'errorfile'| |'ef'| name of the errorfile for the QuickFix mode
|'errorformat'| |'efm'| description of the lines in the error file
|'esckeys'| |'ek'| recognize function keys in Insert mode
|'eventignore'| |'ei'| autocommand events that are ignored
|'expandtab'| |'et'| use spaces when <Tab> is inserted
|'exrc'| |'ex'| read .vimrc and .exrc in the current directory
|'fileencoding'| |'fenc'| file encoding for multi-byte text
|'fileencodings'| |'fencs'| automatically detected character encodings
|'fileformat'| |'ff'| file format used for file I/O
|'fileformats'| |'ffs'| automatically detected values for 'fileformat'
|'filetype'| |'ft'| type of file, used for autocommands
|'fillchars'| |'fcs'| characters to use for displaying special items
|'fkmap'| |'fk'| Farsi keyboard mapping
|'foldclose'| |'fcl'| close a fold when the cursor leaves it
|'foldcolumn'| |'fdc'| width of the column used to indicate folds
|'foldenable'| |'fen'| set to display all folds open
|'foldexpr'| |'fde'| expression used when 'foldmethod' is "expr"
|'foldignore'| |'fdi'| ignore lines when 'foldmethod' is "indent"
|'foldlevel'| |'fdl'| close folds with a level higher than this
|'foldlevelstart'| |'fdls'| 'foldlevel' when starting to edit a file
|'foldmarker'| |'fmr'| markers used when 'foldmethod' is "marker"
|'foldmethod'| |'fdm'| folding type
|'foldminlines'| |'fml'| minimum number of lines for a fold to be closed
|'foldnestmax'| |'fdn'| maximum fold depth
|'foldopen'| |'fdo'| for which commands a fold will be opened
|'foldtext'| |'fdt'| expression used to display for a closed fold
|'formatlistpat'| |'flp'| pattern used to recognize a list header
|'formatoptions'| |'fo'| how automatic formatting is to be done
|'formatprg'| |'fp'| name of external program used with "gq" command
|'formatexpr'| |'fex'| expression used with "gq" command
|'fsync'| |'fs'| whether to invoke fsync() after file write
|'gdefault'| |'gd'| the ":substitute" flag 'g' is default on
|'grepformat'| |'gfm'| format of 'grepprg' output
|'grepprg'| |'gp'| program to use for ":grep"
|'guicursor'| |'gcr'| GUI: settings for cursor shape and blinking
|'guifont'| |'gfn'| GUI: Name(s) of font(s) to be used
|'guifontset'| |'gfs'| GUI: Names of multi-byte fonts to be used
|'guifontwide'| |'gfw'| list of font names for double-wide characters
|'guiheadroom'| |'ghr'| GUI: pixels room for window decorations
|'guioptions'| |'go'| GUI: Which components and options are used
|'guipty'| GUI: try to use a pseudo-tty for ":!" commands
|'helpfile'| |'hf'| full path name of the main help file
|'helpheight'| |'hh'| minimum height of a new help window
|'helplang'| |'hlg'| preferred help languages
|'hidden'| |'hid'| don't unload buffer when it is |abandon|ed
|'highlight'| |'hl'| sets highlighting mode for various occasions
|'hlsearch'| |'hls'| highlight matches with last search pattern
|'history'| |'hi'| number of command-lines that are remembered
|'hkmap'| |'hk'| Hebrew keyboard mapping
|'hkmapp'| |'hkp'| phonetic Hebrew keyboard mapping
|'icon'| let Vim set the text of the window icon
|'iconstring'| string to use for the Vim icon text
|'ignorecase'| |'ic'| ignore case in search patterns
|'imactivatekey'| |'imak'| key that activates the X input method
|'imcmdline'| |'imc'| use IM when starting to edit a command line
|'imdisable'| |'imd'| do not use the IM in any mode
|'iminsert'| |'imi'| use :lmap or IM in Insert mode
|'imsearch'| |'ims'| use :lmap or IM when typing a search pattern
|'include'| |'inc'| pattern to be used to find an include file
|'includeexpr'| |'inex'| expression used to process an include line
|'incsearch'| |'is'| highlight match while typing search pattern
|'indentexpr'| |'inde'| expression used to obtain the indent of a line
|'indentkeys'| |'indk'| keys that trigger indenting with 'indentexpr'
|'infercase'| |'inf'| adjust case of match for keyword completion
|'insertmode'| |'im'| start the edit of a file in Insert mode
|'isfname'| |'isf'| characters included in file names and pathnames
|'isident'| |'isi'| characters included in identifiers
|'iskeyword'| |'isk'| characters included in keywords
|'isprint'| |'isp'| printable characters
|'joinspaces'| |'js'| two spaces after a period with a join command
|'key'| encryption key
|'keymap'| |'kmp'| name of a keyboard mapping
|'keymodel'| |'km'| enable starting/stopping selection with keys
|'keywordprg'| |'kp'| program to use for the "K" command
|'langmap'| |'lmap'| alphabetic characters for other language mode
|'langmenu'| |'lm'| language to be used for the menus
|'laststatus'| |'ls'| tells when last window has status lines
|'lazyredraw'| |'lz'| don't redraw while executing macros
|'linebreak'| |'lbr'| wrap long lines at a blank
|'lines'| number of lines in the display
|'linespace'| |'lsp'| number of pixel lines to use between characters
|'lisp'| automatic indenting for Lisp
|'lispwords'| |'lw'| words that change how lisp indenting works
|'list'| show <Tab> and <EOL>
|'listchars'| |'lcs'| characters for displaying in list mode
|'loadplugins'| |'lpl'| load plugin scripts when starting up
|'magic'| changes special characters in search patterns
|'makeef'| |'mef'| name of the errorfile for ":make"
|'makeprg'| |'mp'| program to use for the ":make" command
|'matchpairs'| |'mps'| pairs of characters that "%" can match
|'matchtime'| |'mat'| tenths of a second to show matching paren
|'maxfuncdepth'| |'mfd'| maximum recursive depth for user functions
|'maxmapdepth'| |'mmd'| maximum recursive depth for mapping
|'maxmem'| |'mm'| maximum memory (in Kbyte) used for one buffer
|'maxmempattern'| |'mmp'| maximum memory (in Kbyte) used for pattern search
|'maxmemtot'| |'mmt'| maximum memory (in Kbyte) used for all buffers
|'menuitems'| |'mis'| maximum number of items in a menu
|'mkspellmem'| |'msm'| memory used before |:mkspell| compresses the tree
|'modeline'| |'ml'| recognize modelines at start or end of file
|'modelines'| |'mls'| number of lines checked for modelines
|'modifiable'| |'ma'| changes to the text are not possible
|'modified'| |'mod'| buffer has been modified
|'more'| pause listings when the whole screen is filled
|'mouse'| enable the use of mouse clicks
|'mousefocus'| |'mousef'| keyboard focus follows the mouse
|'mousehide'| |'mh'| hide mouse pointer while typing
|'mousemodel'| |'mousem'| changes meaning of mouse buttons
|'mouseshape'| |'mouses'| shape of the mouse pointer in different modes
|'mousetime'| |'mouset'| max time between mouse double-click
|'mzquantum'| |'mzq'| the interval between polls for MzScheme threads
|'nrformats'| |'nf'| number formats recognized for CTRL-A command
|'number'| |'nu'| print the line number in front of each line
|'numberwidth'| |'nuw'| number of columns used for the line number
|'omnifunc'| |'ofu'| function for filetype-specific completion
|'operatorfunc'| |'opfunc'| funtion to be called for |g@| operator
|'osfiletype'| |'oft'| operating system-specific filetype information
|'paragraphs'| |'para'| nroff macros that separate paragraphs
|'paste'| allow pasting text
|'pastetoggle'| |'pt'| key code that causes 'paste' to toggle
|'patchexpr'| |'pex'| expression used to patch a file
|'patchmode'| |'pm'| keep the oldest version of a file
|'path'| |'pa'| list of directories searched with "gf" et.al.
|'preserveindent'| |'pi'| preserve the indent structure when reindenting
|'previewheight'| |'pvh'| height of the preview window
|'previewwindow'| |'pvw'| identifies the preview window
|'printdevice'| |'pdev'| name of the printer to be used for :hardcopy
|'printencoding'| |'penc'| encoding to be used for printing
|'printexpr'| |'pexpr'| expression used to print PostScript for :hardcopy
|'printfont'| |'pfn'| name of the font to be used for :hardcopy
|'printheader'| |'pheader'| format of the header used for :hardcopy
|'printmbcharset'| |'pmbcs'| CJK character set to be used for :hardcopy
|'printmbfont'| |'pmbfn'| font names to be used for CJK output of :hardcopy
|'printoptions'| |'popt'| controls the format of :hardcopy output
|'quoteescape'| |'qe'| escape characters used in a string
|'readonly'| |'ro'| disallow writing the buffer
|'remap'| allow mappings to work recursively
|'report'| threshold for reporting nr. of lines changed
|'restorescreen'| |'rs'| Win32: restore screen when exiting
|'revins'| |'ri'| inserting characters will work backwards
|'rightleft'| |'rl'| window is right-to-left oriented
|'rightleftcmd'| |'rlc'| commands for which editing works right-to-left
|'ruler'| |'ru'| show cursor line and column in the status line
|'rulerformat'| |'ruf'| custom format for the ruler
|'runtimepath'| |'rtp'| list of directories used for runtime files
|'scroll'| |'scr'| lines to scroll with CTRL-U and CTRL-D
|'scrollbind'| |'scb'| scroll in window as other windows scroll
|'scrolljump'| |'sj'| minimum number of lines to scroll
|'scrolloff'| |'so'| minimum nr. of lines above and below cursor
|'scrollopt'| |'sbo'| how 'scrollbind' should behave
|'sections'| |'sect'| nroff macros that separate sections
|'secure'| secure mode for reading .vimrc in current dir
|'selection'| |'sel'| what type of selection to use
|'selectmode'| |'slm'| when to use Select mode instead of Visual mode
|'sessionoptions'| |'ssop'| options for |:mksession|
|'shell'| |'sh'| name of shell to use for external commands
|'shellcmdflag'| |'shcf'| flag to shell to execute one command
|'shellpipe'| |'sp'| string to put output of ":make" in error file
|'shellquote'| |'shq'| quote character(s) for around shell command
|'shellredir'| |'srr'| string to put output of filter in a temp file
|'shellslash'| |'ssl'| use forward slash for shell file names
|'shelltemp'| |'stmp'| whether to use a temp file for shell commands
|'shelltype'| |'st'| Amiga: influences how to use a shell
|'shellxquote'| |'sxq'| like 'shellquote', but include redirection
|'shiftround'| |'sr'| round indent to multiple of shiftwidth
|'shiftwidth'| |'sw'| number of spaces to use for (auto)indent step
|'shortmess'| |'shm'| list of flags, reduce length of messages
|'shortname'| |'sn'| non-MS-DOS: Filenames assumed to be 8.3 chars
|'showbreak'| |'sbr'| string to use at the start of wrapped lines
|'showcmd'| |'sc'| show (partial) command in status line
|'showfulltag'| |'sft'| show full tag pattern when completing tag
|'showmatch'| |'sm'| briefly jump to matching bracket if insert one
|'showmode'| |'smd'| message on status line to show current mode
|'sidescroll'| |'ss'| minimum number of columns to scroll horizontal
|'sidescrolloff'| |'siso'| min. nr. of columns to left and right of cursor
|'smartcase'| |'scs'| no ignore case when pattern has uppercase
|'smartindent'| |'si'| smart autoindenting for C programs
|'smarttab'| |'sta'| use 'shiftwidth' when inserting <Tab>
|'softtabstop'| |'sts'| number of spaces that <Tab> uses while editing
|'spell'| enable spell checking
|'spellcapcheck'| |'spc'| pattern to locate end of a sentence
|'spellfile'| |'spf'| files where |zg| and |zw| store words
|'spelllang'| |'spl'| language(s) to do spell checking for
|'spellsuggest'| |'sps'| method(s) used to suggest spelling corrections
|'splitbelow'| |'sb'| new window from split is below the current one
|'splitright'| |'spr'| new window is put right of the current one
|'startofline'| |'sol'| commands move cursor to first blank in line
|'statusline'| |'stl'| custom format for the status line
|'suffixes'| |'su'| suffixes that are ignored with multiple match
|'suffixesadd'| |'sua'| suffixes added when searching for a file
|'swapfile'| |'swf'| whether to use a swapfile for a buffer
|'swapsync'| |'sws'| how to sync the swap file
|'switchbuf'| |'swb'| sets behavior when switching to another buffer
|'synmaxcol'| |'smc'| maximum column to find syntax items
|'syntax'| |'syn'| syntax to be loaded for current buffer
|'tabstop'| |'ts'| number of spaces that <Tab> in file uses
|'tagbsearch'| |'tbs'| use binary searching in tags files
|'taglength'| |'tl'| number of significant characters for a tag
|'tagrelative'| |'tr'| file names in tag file are relative
|'tags'| |'tag'| list of file names used by the tag command
|'tagstack'| |'tgst'| push tags onto the tag stack
|'term'| name of the terminal
|'termbidi'| |'tbidi'| terminal takes care of bi-directionality
|'termencoding'| |'tenc'| character encoding used by the terminal
|'terse'| shorten some messages
|'textauto'| |'ta'| obsolete, use 'fileformats'
|'textmode'| |'tx'| obsolete, use 'fileformat'
|'textwidth'| |'tw'| maximum width of text that is being inserted
|'thesaurus'| |'tsr'| list of thesaurus files for keyword completion
|'tildeop'| |'top'| tilde command "~" behaves like an operator
|'timeout'| |'to'| time out on mappings and key codes
|'timeoutlen'| |'tm'| time out time in milliseconds
|'title'| let Vim set the title of the window
|'titlelen'| percentage of 'columns' used for window title
|'titleold'| old title, restored when exiting
|'titlestring'| string to use for the Vim window title
|'toolbar'| |'tb'| GUI: which items to show in the toolbar
|'toolbariconsize'| |'tbis'| size of the toolbar icons (for GTK 2 only)
|'ttimeout'| time out on mappings
|'ttimeoutlen'| |'ttm'| time out time for key codes in milliseconds
|'ttybuiltin'| |'tbi'| use built-in termcap before external termcap
|'ttyfast'| |'tf'| indicates a fast terminal connection
|'ttymouse'| |'ttym'| type of mouse codes generated
|'ttyscroll'| |'tsl'| maximum number of lines for a scroll
|'ttytype'| |'tty'| alias for 'term'
|'undolevels'| |'ul'| maximum number of changes that can be undone
|'updatecount'| |'uc'| after this many characters flush swap file
|'updatetime'| |'ut'| after this many milliseconds flush swap file
|'verbose'| |'vbs'| give informative messages
|'verbosefile'| |'vfile'| file to write messages in
|'viewdir'| |'vdir'| directory where to store files with :mkview
|'viewoptions'| |'vop'| specifies what to save for :mkview
|'viminfo'| |'vi'| use .viminfo file upon startup and exiting
|'virtualedit'| |'ve'| when to use virtual editing
|'visualbell'| |'vb'| use visual bell instead of beeping
|'warn'| warn for shell command when buffer was changed
|'weirdinvert'| |'wi'| for terminals that have weird inversion method
|'whichwrap'| |'ww'| allow specified keys to cross line boundaries
|'wildchar'| |'wc'| command-line character for wildcard expansion
|'wildcharm'| |'wcm'| like 'wildchar' but also works when mapped
|'wildignore'| |'wig'| files matching these patterns are not completed
|'wildmenu'| |'wmnu'| use menu for command line completion
|'wildmode'| |'wim'| mode for 'wildchar' command-line expansion
|'wildoptions'| |'wop'| specifies how command line completion is done.
|'winaltkeys'| |'wak'| when the windows system handles ALT keys
|'winheight'| |'wh'| minimum number of lines for the current window
|'winfixheight'| |'wfh'| keep window height when opening/closing windows
|'winminheight'| |'wmh'| minimum number of lines for any window
|'winminwidth'| |'wmw'| minimal number of columns for any window
|'winwidth'| |'wiw'| minimal number of columns for current window
|'wrap'| long lines wrap and continue on the next line
|'wrapmargin'| |'wm'| chars from the right where wrapping starts
|'wrapscan'| |'ws'| searches wrap around the end of the file
|'write'| writing to a file is allowed
|'writeany'| |'wa'| write to file with no need for "!" override
|'writebackup'| |'wb'| make a backup before overwriting a file
|'writedelay'| |'wd'| delay this many msec for each char (for debug)
'aleph' 'al' ASCII code of the letter Aleph (Hebrew)
'allowrevins' 'ari' allow CTRL-_ in Insert and Command-line mode
'altkeymap' 'akm' for default second language (Farsi/Hebrew)
'ambiwidth' 'ambw' what to do with Unicode chars of ambiguous width
'antialias' 'anti' Mac OS X: use smooth, antialiased fonts
'autochdir' 'acd' change directory to the file in the current window
'arabic' 'arab' for Arabic as a default second language
'arabicshape' 'arshape' do shaping for Arabic characters
'autoindent' 'ai' take indent for new line from previous line
'autoread' 'ar' autom. read file when changed outside of Vim
'autowrite' 'aw' automatically write file if changed
'autowriteall' 'awa' as 'autowrite', but works with more commands
'background' 'bg' "dark" or "light", used for highlight colors
'backspace' 'bs' how backspace works at start of line
'backup' 'bk' keep backup file after overwriting a file
'backupcopy' 'bkc' make backup as a copy, don't rename the file
'backupdir' 'bdir' list of directories for the backup file
'backupext' 'bex' extension used for the backup file
'backupskip' 'bsk' no backup for files that match these patterns
'balloondelay' 'bdlay' delay in mS before a balloon may pop up
'ballooneval' 'beval' switch on balloon evaluation
'balloonexpr' 'bexpr' expression to show in balloon
'binary' 'bin' read/write/edit file in binary mode
'bioskey' 'biosk' MS-DOS: use bios calls for input characters
'bomb' prepend a Byte Order Mark to the file
'breakat' 'brk' characters that may cause a line break
'browsedir' 'bsdir' which directory to start browsing in
'bufhidden' 'bh' what to do when buffer is no longer in window
'buflisted' 'bl' whether the buffer shows up in the buffer list
'buftype' 'bt' special type of buffer
'casemap' 'cmp' specifies how case of letters is changed
'cdpath' 'cd' list of directories searched with ":cd"
'cedit' key used to open the command-line window
'charconvert' 'ccv' expression for character encoding conversion
'cindent' 'cin' do C program indenting
'cinkeys' 'cink' keys that trigger indent when 'cindent' is set
'cinoptions' 'cino' how to do indenting when 'cindent' is set
'cinwords' 'cinw' words where 'si' and 'cin' add an indent
'clipboard' 'cb' use the clipboard as the unnamed register
'cmdheight' 'ch' number of lines to use for the command-line
'cmdwinheight' 'cwh' height of the command-line window
'columns' 'co' number of columns in the display
'comments' 'com' patterns that can start a comment line
'commentstring' 'cms' template for comments; used for fold marker
'compatible' 'cp' behave Vi-compatible as much as possible
'complete' 'cpt' specify how Insert mode completion works
'completefunc' 'cfu' function to be used for Insert mode completion
'completeopt' 'cot' options for Insert mode completion
'confirm' 'cf' ask what to do about unsaved/read-only files
'conskey' 'consk' get keys directly from console (MS-DOS only)
'copyindent' 'ci' make 'autoindent' use existing indent structure
'cpoptions' 'cpo' flags for Vi-compatible behavior
'cscopepathcomp' 'cspc' how many components of the path to show
'cscopeprg' 'csprg' command to execute cscope
'cscopequickfix' 'csqf' use quickfix window for cscope results
'cscopetag' 'cst' use cscope for tag commands
'cscopetagorder' 'csto' determines ":cstag" search order
'cscopeverbose' 'csverb' give messages when adding a cscope database
'debug' set to "msg" to see all error messages
'define' 'def' pattern to be used to find a macro definition
'delcombine' 'deco' delete combining characters on their own
'dictionary' 'dict' list of file names used for keyword completion
'diff' use diff mode for the current window
'diffexpr' 'dex' expression used to obtain a diff file
'diffopt' 'dip' options for using diff mode
'digraph' 'dg' enable the entering of digraphs in Insert mode
'directory' 'dir' list of directory names for the swap file
'display' 'dy' list of flags for how to display text
'eadirection' 'ead' in which direction 'equalalways' works
'edcompatible' 'ed' toggle flags of ":substitute" command
'encoding' 'enc' encoding used internally
'endofline' 'eol' write <EOL> for last line in file
'equalalways' 'ea' windows are automatically made the same size
'equalprg' 'ep' external program to use for "=" command
'errorbells' 'eb' ring the bell for error messages
'errorfile' 'ef' name of the errorfile for the QuickFix mode
'errorformat' 'efm' description of the lines in the error file
'esckeys' 'ek' recognize function keys in Insert mode
'eventignore' 'ei' autocommand events that are ignored
'expandtab' 'et' use spaces when <Tab> is inserted
'exrc' 'ex' read .vimrc and .exrc in the current directory
'fileencoding' 'fenc' file encoding for multi-byte text
'fileencodings' 'fencs' automatically detected character encodings
'fileformat' 'ff' file format used for file I/O
'fileformats' 'ffs' automatically detected values for 'fileformat'
'filetype' 'ft' type of file, used for autocommands
'fillchars' 'fcs' characters to use for displaying special items
'fkmap' 'fk' Farsi keyboard mapping
'foldclose' 'fcl' close a fold when the cursor leaves it
'foldcolumn' 'fdc' width of the column used to indicate folds
'foldenable' 'fen' set to display all folds open
'foldexpr' 'fde' expression used when 'foldmethod' is "expr"
'foldignore' 'fdi' ignore lines when 'foldmethod' is "indent"
'foldlevel' 'fdl' close folds with a level higher than this
'foldlevelstart' 'fdls' 'foldlevel' when starting to edit a file
'foldmarker' 'fmr' markers used when 'foldmethod' is "marker"
'foldmethod' 'fdm' folding type
'foldminlines' 'fml' minimum number of lines for a fold to be closed
'foldnestmax' 'fdn' maximum fold depth
'foldopen' 'fdo' for which commands a fold will be opened
'foldtext' 'fdt' expression used to display for a closed fold
'formatlistpat' 'flp' pattern used to recognize a list header
'formatoptions' 'fo' how automatic formatting is to be done
'formatprg' 'fp' name of external program used with "gq" command
'formatexpr' 'fex' expression used with "gq" command
'fsync' 'fs' whether to invoke fsync() after file write
'gdefault' 'gd' the ":substitute" flag 'g' is default on
'grepformat' 'gfm' format of 'grepprg' output
'grepprg' 'gp' program to use for ":grep"
'guicursor' 'gcr' GUI: settings for cursor shape and blinking
'guifont' 'gfn' GUI: Name(s) of font(s) to be used
'guifontset' 'gfs' GUI: Names of multi-byte fonts to be used
'guifontwide' 'gfw' list of font names for double-wide characters
'guiheadroom' 'ghr' GUI: pixels room for window decorations
'guioptions' 'go' GUI: Which components and options are used
'guipty' GUI: try to use a pseudo-tty for ":!" commands
'guitablabel' 'gtl' GUI: custom label for a tab page
'helpfile' 'hf' full path name of the main help file
'helpheight' 'hh' minimum height of a new help window
'helplang' 'hlg' preferred help languages
'hidden' 'hid' don't unload buffer when it is |abandon|ed
'highlight' 'hl' sets highlighting mode for various occasions
'hlsearch' 'hls' highlight matches with last search pattern
'history' 'hi' number of command-lines that are remembered
'hkmap' 'hk' Hebrew keyboard mapping
'hkmapp' 'hkp' phonetic Hebrew keyboard mapping
'icon' let Vim set the text of the window icon
'iconstring' string to use for the Vim icon text
'ignorecase' 'ic' ignore case in search patterns
'imactivatekey' 'imak' key that activates the X input method
'imcmdline' 'imc' use IM when starting to edit a command line
'imdisable' 'imd' do not use the IM in any mode
'iminsert' 'imi' use :lmap or IM in Insert mode
'imsearch' 'ims' use :lmap or IM when typing a search pattern
'include' 'inc' pattern to be used to find an include file
'includeexpr' 'inex' expression used to process an include line
'incsearch' 'is' highlight match while typing search pattern
'indentexpr' 'inde' expression used to obtain the indent of a line
'indentkeys' 'indk' keys that trigger indenting with 'indentexpr'
'infercase' 'inf' adjust case of match for keyword completion
'insertmode' 'im' start the edit of a file in Insert mode
'isfname' 'isf' characters included in file names and pathnames
'isident' 'isi' characters included in identifiers
'iskeyword' 'isk' characters included in keywords
'isprint' 'isp' printable characters
'joinspaces' 'js' two spaces after a period with a join command
'key' encryption key
'keymap' 'kmp' name of a keyboard mapping
'keymodel' 'km' enable starting/stopping selection with keys
'keywordprg' 'kp' program to use for the "K" command
'langmap' 'lmap' alphabetic characters for other language mode
'langmenu' 'lm' language to be used for the menus
'laststatus' 'ls' tells when last window has status lines
'lazyredraw' 'lz' don't redraw while executing macros
'linebreak' 'lbr' wrap long lines at a blank
'lines' number of lines in the display
'linespace' 'lsp' number of pixel lines to use between characters
'lisp' automatic indenting for Lisp
'lispwords' 'lw' words that change how lisp indenting works
'list' show <Tab> and <EOL>
'listchars' 'lcs' characters for displaying in list mode
'loadplugins' 'lpl' load plugin scripts when starting up
'magic' changes special characters in search patterns
'makeef' 'mef' name of the errorfile for ":make"
'makeprg' 'mp' program to use for the ":make" command
'matchpairs' 'mps' pairs of characters that "%" can match
'matchtime' 'mat' tenths of a second to show matching paren
'maxfuncdepth' 'mfd' maximum recursive depth for user functions
'maxmapdepth' 'mmd' maximum recursive depth for mapping
'maxmem' 'mm' maximum memory (in Kbyte) used for one buffer
'maxmempattern' 'mmp' maximum memory (in Kbyte) used for pattern search
'maxmemtot' 'mmt' maximum memory (in Kbyte) used for all buffers
'menuitems' 'mis' maximum number of items in a menu
'mkspellmem' 'msm' memory used before |:mkspell| compresses the tree
'modeline' 'ml' recognize modelines at start or end of file
'modelines' 'mls' number of lines checked for modelines
'modifiable' 'ma' changes to the text are not possible
'modified' 'mod' buffer has been modified
'more' pause listings when the whole screen is filled
'mouse' enable the use of mouse clicks
'mousefocus' 'mousef' keyboard focus follows the mouse
'mousehide' 'mh' hide mouse pointer while typing
'mousemodel' 'mousem' changes meaning of mouse buttons
'mouseshape' 'mouses' shape of the mouse pointer in different modes
'mousetime' 'mouset' max time between mouse double-click
'mzquantum' 'mzq' the interval between polls for MzScheme threads
'nrformats' 'nf' number formats recognized for CTRL-A command
'number' 'nu' print the line number in front of each line
'numberwidth' 'nuw' number of columns used for the line number
'omnifunc' 'ofu' function for filetype-specific completion
'operatorfunc' 'opfunc' funtion to be called for |g@| operator
'osfiletype' 'oft' operating system-specific filetype information
'paragraphs' 'para' nroff macros that separate paragraphs
'paste' allow pasting text
'pastetoggle' 'pt' key code that causes 'paste' to toggle
'patchexpr' 'pex' expression used to patch a file
'patchmode' 'pm' keep the oldest version of a file
'path' 'pa' list of directories searched with "gf" et.al.
'preserveindent' 'pi' preserve the indent structure when reindenting
'previewheight' 'pvh' height of the preview window
'previewwindow' 'pvw' identifies the preview window
'printdevice' 'pdev' name of the printer to be used for :hardcopy
'printencoding' 'penc' encoding to be used for printing
'printexpr' 'pexpr' expression used to print PostScript for :hardcopy
'printfont' 'pfn' name of the font to be used for :hardcopy
'printheader' 'pheader' format of the header used for :hardcopy
'printmbcharset' 'pmbcs' CJK character set to be used for :hardcopy
'printmbfont' 'pmbfn' font names to be used for CJK output of :hardcopy
'printoptions' 'popt' controls the format of :hardcopy output
'quoteescape' 'qe' escape characters used in a string
'readonly' 'ro' disallow writing the buffer
'remap' allow mappings to work recursively
'report' threshold for reporting nr. of lines changed
'restorescreen' 'rs' Win32: restore screen when exiting
'revins' 'ri' inserting characters will work backwards
'rightleft' 'rl' window is right-to-left oriented
'rightleftcmd' 'rlc' commands for which editing works right-to-left
'ruler' 'ru' show cursor line and column in the status line
'rulerformat' 'ruf' custom format for the ruler
'runtimepath' 'rtp' list of directories used for runtime files
'scroll' 'scr' lines to scroll with CTRL-U and CTRL-D
'scrollbind' 'scb' scroll in window as other windows scroll
'scrolljump' 'sj' minimum number of lines to scroll
'scrolloff' 'so' minimum nr. of lines above and below cursor
'scrollopt' 'sbo' how 'scrollbind' should behave
'sections' 'sect' nroff macros that separate sections
'secure' secure mode for reading .vimrc in current dir
'selection' 'sel' what type of selection to use
'selectmode' 'slm' when to use Select mode instead of Visual mode
'sessionoptions' 'ssop' options for |:mksession|
'shell' 'sh' name of shell to use for external commands
'shellcmdflag' 'shcf' flag to shell to execute one command
'shellpipe' 'sp' string to put output of ":make" in error file
'shellquote' 'shq' quote character(s) for around shell command
'shellredir' 'srr' string to put output of filter in a temp file
'shellslash' 'ssl' use forward slash for shell file names
'shelltemp' 'stmp' whether to use a temp file for shell commands
'shelltype' 'st' Amiga: influences how to use a shell
'shellxquote' 'sxq' like 'shellquote', but include redirection
'shiftround' 'sr' round indent to multiple of shiftwidth
'shiftwidth' 'sw' number of spaces to use for (auto)indent step
'shortmess' 'shm' list of flags, reduce length of messages
'shortname' 'sn' non-MS-DOS: Filenames assumed to be 8.3 chars
'showbreak' 'sbr' string to use at the start of wrapped lines
'showcmd' 'sc' show (partial) command in status line
'showfulltag' 'sft' show full tag pattern when completing tag
'showmatch' 'sm' briefly jump to matching bracket if insert one
'showmode' 'smd' message on status line to show current mode
'showtabline' 'stal' tells when the tab pages line is displayed
'sidescroll' 'ss' minimum number of columns to scroll horizontal
'sidescrolloff' 'siso' min. nr. of columns to left and right of cursor
'smartcase' 'scs' no ignore case when pattern has uppercase
'smartindent' 'si' smart autoindenting for C programs
'smarttab' 'sta' use 'shiftwidth' when inserting <Tab>
'softtabstop' 'sts' number of spaces that <Tab> uses while editing
'spell' enable spell checking
'spellcapcheck' 'spc' pattern to locate end of a sentence
'spellfile' 'spf' files where |zg| and |zw| store words
'spelllang' 'spl' language(s) to do spell checking for
'spellsuggest' 'sps' method(s) used to suggest spelling corrections
'splitbelow' 'sb' new window from split is below the current one
'splitright' 'spr' new window is put right of the current one
'startofline' 'sol' commands move cursor to first blank in line
'statusline' 'stl' custom format for the status line
'suffixes' 'su' suffixes that are ignored with multiple match
'suffixesadd' 'sua' suffixes added when searching for a file
'swapfile' 'swf' whether to use a swapfile for a buffer
'swapsync' 'sws' how to sync the swap file
'switchbuf' 'swb' sets behavior when switching to another buffer
'synmaxcol' 'smc' maximum column to find syntax items
'syntax' 'syn' syntax to be loaded for current buffer
'tabstop' 'ts' number of spaces that <Tab> in file uses
'tabline' 'tal' custom format for the console tab pages line
'tabpagemax' 'tpm' maximum number of tab pages for |-p| and "tab all"
'tagbsearch' 'tbs' use binary searching in tags files
'taglength' 'tl' number of significant characters for a tag
'tagrelative' 'tr' file names in tag file are relative
'tags' 'tag' list of file names used by the tag command
'tagstack' 'tgst' push tags onto the tag stack
'term' name of the terminal
'termbidi' 'tbidi' terminal takes care of bi-directionality
'termencoding' 'tenc' character encoding used by the terminal
'terse' shorten some messages
'textauto' 'ta' obsolete, use 'fileformats'
'textmode' 'tx' obsolete, use 'fileformat'
'textwidth' 'tw' maximum width of text that is being inserted
'thesaurus' 'tsr' list of thesaurus files for keyword completion
'tildeop' 'top' tilde command "~" behaves like an operator
'timeout' 'to' time out on mappings and key codes
'timeoutlen' 'tm' time out time in milliseconds
'title' let Vim set the title of the window
'titlelen' percentage of 'columns' used for window title
'titleold' old title, restored when exiting
'titlestring' string to use for the Vim window title
'toolbar' 'tb' GUI: which items to show in the toolbar
'toolbariconsize' 'tbis' size of the toolbar icons (for GTK 2 only)
'ttimeout' time out on mappings
'ttimeoutlen' 'ttm' time out time for key codes in milliseconds
'ttybuiltin' 'tbi' use built-in termcap before external termcap
'ttyfast' 'tf' indicates a fast terminal connection
'ttymouse' 'ttym' type of mouse codes generated
'ttyscroll' 'tsl' maximum number of lines for a scroll
'ttytype' 'tty' alias for 'term'
'undolevels' 'ul' maximum number of changes that can be undone
'updatecount' 'uc' after this many characters flush swap file
'updatetime' 'ut' after this many milliseconds flush swap file
'verbose' 'vbs' give informative messages
'verbosefile' 'vfile' file to write messages in
'viewdir' 'vdir' directory where to store files with :mkview
'viewoptions' 'vop' specifies what to save for :mkview
'viminfo' 'vi' use .viminfo file upon startup and exiting
'virtualedit' 've' when to use virtual editing
'visualbell' 'vb' use visual bell instead of beeping
'warn' warn for shell command when buffer was changed
'weirdinvert' 'wi' for terminals that have weird inversion method
'whichwrap' 'ww' allow specified keys to cross line boundaries
'wildchar' 'wc' command-line character for wildcard expansion
'wildcharm' 'wcm' like 'wildchar' but also works when mapped
'wildignore' 'wig' files matching these patterns are not completed
'wildmenu' 'wmnu' use menu for command line completion
'wildmode' 'wim' mode for 'wildchar' command-line expansion
'wildoptions' 'wop' specifies how command line completion is done.
'winaltkeys' 'wak' when the windows system handles ALT keys
'winheight' 'wh' minimum number of lines for the current window
'winfixheight' 'wfh' keep window height when opening/closing windows
'winminheight' 'wmh' minimum number of lines for any window
'winminwidth' 'wmw' minimal number of columns for any window
'winwidth' 'wiw' minimal number of columns for current window
'wrap' long lines wrap and continue on the next line
'wrapmargin' 'wm' chars from the right where wrapping starts
'wrapscan' 'ws' searches wrap around the end of the file
'write' writing to a file is allowed
'writeany' 'wa' write to file with no need for "!" override
'writebackup' 'wb' make a backup before overwriting a file
'writedelay' 'wd' delay this many msec for each char (for debug)
------------------------------------------------------------------------------
*Q_ur* Undo/Redo commands

View File

@@ -1,4 +1,4 @@
*remote.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
*remote.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -53,8 +53,8 @@ The following command line arguments are available:
*--remote-send*
--remote-send {keys} Send {keys} to server and exit.
*--remote-expr*
--remote-expr {expr} Evaluate {expr} in server and
print the result on stdout.
--remote-expr {expr} Evaluate {expr} in server and print the result
on stdout.
*--serverlist*
--serverlist Output a list of server names.

View File

@@ -1,4 +1,4 @@
*spell.txt* For Vim version 7.0aa. Last change: 2006 Feb 01
*spell.txt* For Vim version 7.0aa. Last change: 2006 Mar 05
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -84,28 +84,45 @@ zG Like "zg" but add the word to the internal word list
*zw*
zw Like "zg" but mark the word as a wrong (bad) word.
If the word already appears in 'spellfile' it is
turned into a comment line. See |spellfile-cleanup|
for getting rid of those.
*zW*
zW Like "zw" but add the word to the internal word list
|internal-wordlist|.
zuw *zug* *zuw*
zug Undo |zw| and |zg|, remove the word from the entry in
'spellfile'. Count used as with |zg|.
zuW *zuG* *zuW*
zuG Undo |zW| and |zG|, remove the word from the internal
word list. Count used as with |zg|.
*:spe* *:spellgood*
:[count]spe[llgood] {word}
Add {word} as a good word to 'spellfile', like with
"zg". Without count the first name is used, with a
|zg|. Without count the first name is used, with a
count of two the second entry, etc.
:spe[llgood]! {word} Add {word} as a good word to the internal word list,
like with "zG".
like with |zG|.
*:spellw* *:spellwrong*
:[count]spellw[rong] {word}
Add {word} as a wrong (bad) word to 'spellfile', as
with "zw". Without count the first name is used, with
with |zw|. Without count the first name is used, with
a count of two the second entry, etc.
:spellw[rong]! {word} Add {word} as a wrong (bad) word to the internal word
list.
list, like with |zW|.
:[count]spellu[ndo] {word} *:spellu* *:spellundo*
Like |zuw|. [count] used as with |:spellgood|.
:spellu[ndo]! {word} Like |zuW|. [count] used as with |:spellgood|.
After adding a word to 'spellfile' with the above commands its associated
".spl" file will automatically be updated and reloaded. If you change
@@ -319,6 +336,25 @@ get an error the file may be truncated, modified or intended for another Vim
version.
SPELLFILE CLEANUP *spellfile-cleanup*
The |zw| command turns existing entries in 'spellfile' into comment lines.
This avoids having to write a new file every time, but results in the file
only getting longer, never shorter. To clean up the comment lines in all
".add" spell files do this: >
:runtime spell/cleanadd.vim
This deletes all comment lines, except the ones that start with "##". Use
"##" lines to add comments that you want to keep.
You can invoke this script as often as you like. A variable is provided to
skip updating files that have been changed recently. Set it to the number of
seconds that has passed since a file was changed before it will be cleaned.
For example, to clean only files that were not changed in the last hour: >
let g:spell_clean_limit = 60 * 60
The default is one second.
WORDS
Vim uses a fixed method to recognize a word. This is independent of
@@ -805,6 +841,29 @@ flags. But Myspell doesn't support that, thus you may not want to use it
anyway. For compatibility use an 8-bit encoding.
INFORMATION
These entries in the affix file can be used to add information to the spell
file. There are no restrictions on the format, but they should be in the
right encoding.
*spell-NAME* *spell-VERSION* *spell-HOME*
*spell-AUTHOR* *spell-EMAIL* *spell-COPYRIGHT*
NAME Name of the language
VERSION 1.0.1 with fixes
HOME http://www.myhome.eu
AUTHOR John Doe
EMAIL john AT Doe DOT net
COPYRIGHT LGPL
These fields are put in the .spl file as-is. The |:spellinfo| command can be
used to view the info.
*:spellinfo* *:spelli*
:spelli[nfo] Display the information for the spell file(s) used for
the current buffer.
CHARACTER TABLES
*spell-affix-chars*
When using an 8-bit encoding the affix file should define what characters are
@@ -1121,12 +1180,12 @@ words with this flag combine in any order. This means there is no control
over which word comes first. Example:
COMPOUNDFLAG c ~
*spell-COMPOUNDFLAGS*
*spell-COMPOUNDRULE*
A more advanced method to specify how compound words can be formed uses
multiple items with multiple flags. This is not compatible with Myspell 3.0.
Let's start with an example:
COMPOUNDFLAGS c+ ~
COMPOUNDFLAGS se ~
COMPOUNDRULE c+ ~
COMPOUNDRULE se ~
The first line defines that words with the "c" flag can be concatenated in any
order. The second line defines compound words that are made of one word with
@@ -1144,7 +1203,7 @@ You can make these words:
soup
onionsoup
The COMPOUNDFLAGS item may appear multiple times. The argument is made out of
The COMPOUNDRULE item may appear multiple times. The argument is made out of
one or more groups, where each group can be:
one flag e.g., c
alternate flags inside [] e.g., [abc]
@@ -1154,20 +1213,20 @@ Optionally this may be followed by:
This is similar to the regexp pattern syntax (but not the same!). A few
examples with the sequence of word flags they require:
COMPOUNDFLAGS x+ x xx xxx etc.
COMPOUNDFLAGS yz yz
COMPOUNDFLAGS x+z xz xxz xxxz etc.
COMPOUNDFLAGS yx+ yx yxx yxxx etc.
COMPOUNDRULE x+ x xx xxx etc.
COMPOUNDRULE yz yz
COMPOUNDRULE x+z xz xxz xxxz etc.
COMPOUNDRULE yx+ yx yxx yxxx etc.
COMPOUNDFLAGS [abc]z az bz cz
COMPOUNDFLAGS [abc]+z az aaz abaz bz baz bcbz cz caz cbaz etc.
COMPOUNDFLAGS a[xyz]+ ax axx axyz ay ayx ayzz az azy azxy etc.
COMPOUNDFLAGS sm*e se sme smme smmme etc.
COMPOUNDFLAGS s[xyz]*e se sxe sxye sxyxe sye syze sze szye szyxe etc.
COMPOUNDRULE [abc]z az bz cz
COMPOUNDRULE [abc]+z az aaz abaz bz baz bcbz cz caz cbaz etc.
COMPOUNDRULE a[xyz]+ ax axx axyz ay ayx ayzz az azy azxy etc.
COMPOUNDRULE sm*e se sme smme smmme etc.
COMPOUNDRULE s[xyz]*e se sxe sxye sxyxe sye syze sze szye szyxe etc.
A specific example: Allow a compound to be made of two words and a dash:
In the .aff file:
COMPOUNDFLAGS sde ~
COMPOUNDRULE sde ~
NEEDAFFIX x ~
COMPOUNDMAX 3 ~
COMPOUNDMIN 1 ~
@@ -1201,7 +1260,7 @@ specified with COMPOUNDMAX. Example:
When omitted there is no maximum. It applies to all compound words.
To set a limit for words with specific flags make sure the items in
COMPOUNDFLAGS where they appear don't allow too many words.
COMPOUNDRULE where they appear don't allow too many words.
*spell-COMPOUNDSYLMAX*
The maximum number of syllables that a compound word may contain is specified
@@ -1254,45 +1313,6 @@ the affix file, without arguments:
Vim will try to figure out where one word ends and a next starts. When there
are spelling mistakes this may not be quite right.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
NOTE: The following has not been implemented yet, because there are no word
lists that support this.
> *spell-CMP*
> Sometimes it is necessary to change a word when concatenating it to another,
> by removing a few letters, inserting something or both. It can also be useful
> to restrict concatenation to words that match a pattern. For this purpose CMP
> items can be used. They look like this:
> CMP {flag} {flags} {strip} {strip2} {add} {cond} {cond2}
>
> {flag} the flag, as used in COMPOUNDFLAGS for the lead word
> {flags} accepted flags for the following word ('.' to accept
> all)
> {strip} text to remove from the end of the lead word (zero
> for no stripping)
> {strip2} text to remove from the start of the following word
> (zero for no stripping)
> {add} text to insert between the words (zero for no
> addition)
> {cond} condition to match at the end of the lead word
> {cond2} condition to match at the start of the following word
>
> This is the same as what is used for SFX and PFX items, with the extra {flags}
> and {cond2} fields. Example:
> CMP f mrt 0 - . . ~
>
> When used with the food and dish word list above, this means that a dash is
> inserted after each food item. Thus you get "onion-soup" and
> "onion-tomato-salat".
>
> When there are CMP items for a compound flag the concatenation is only done
> when a CMP item matches.
>
> When there are no CMP items for a compound flag, then all words will be
> concatenated, as if there was an item:
> CMP {flag} . 0 0 . .
>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
*spell-COMMON*
Common words can be specified with the COMMON item. This will give better
@@ -1305,7 +1325,9 @@ When multiple regions are specified in a ":mkspell" command the common words
for all regions are combined and used for all regions.
*spell-NOSPLITSUGS*
This item indicates that suggestions for splitting a word will not appear:
This item indicates that splitting a word to make suggestions is not a good
idea. Split-word suggestions will appear only when there are few similar
words.
NOSPLITSUGS ~
@@ -1315,8 +1337,6 @@ suggested. Can be used for obscene words.
NOSUGGEST % ~
NOT IMPLEMENTED YET.
REPLACEMENTS *spell-REP*
@@ -1461,14 +1481,20 @@ CIRCUMFIX (Hunspell) *spell-CIRCUMFIX*
COMPLEXPREFIXES (Hunspell) *spell-COMPLEXPREFIXES*
Enables using two prefixes. Not supported.
COMPOUND (Hunspell) *spell-COMPOUND*
This is one line with the count of COMPOUND items, followd by
that many COMPOUND lines with a pattern.
Remove the first line with the count and rename the other
items to COMPOUNDRULE |spell-COMPOUNDRULE|
COMPOUNDBEGIN (Hunspell) *spell-COMPOUNDBEGIN*
Use COMPOUNDFLAGS instead. |spell-COMPOUNDFLAGS|
Use COMPOUNDRULE instead. |spell-COMPOUNDRULE|
COMPOUNDEND (Hunspell) *spell-COMPOUNDEND*
Use COMPOUNDFLAGS instead. |spell-COMPOUNDFLAGS|
Use COMPOUNDRULE instead. |spell-COMPOUNDRULE|
COMPOUNDMIDDLE (Hunspell) *spell-COMPOUNDMIDDLE*
Use COMPOUNDFLAGS instead. |spell-COMPOUNDFLAGS|
Use COMPOUNDRULE instead. |spell-COMPOUNDRULE|
COMPOUNDROOT (Hunspell) *spell-COMPOUNDROOT*
Flag for words in the dictionary that are already a compound.
@@ -1484,9 +1510,6 @@ COMPOUNDWORDMAX (Hunspell) *spell-COMPOUNDWORDMAX*
FORBIDDENWORD (Hunspell) *spell-FORBIDDENWORD*
Use BAD instead. |spell-BAD|
HOME (Hunspell) *spell-HOME*
Specifies the website for the language. Not supported.
LANG (Hunspell) *spell-LANG*
This specifies language-specific behavior. This actually
moves part of the language knowledge into the program,
@@ -1499,9 +1522,6 @@ LEMMA_PRESENT (Hunspell) *spell-LEMMA_PRESENT*
MAXNGRAMSUGS (Hunspell) *spell-MAXNGRAMSUGS*
Not supported.
NAME (Hunspell) *spell-NAME*
Specifies the name of the language. Not supported.
ONLYINCOMPOUND (Hunspell) *spell-ONLYINCOMPOUND*
Use NEEDCOMPOUND instead. |spell-NEEDCOMPOUND|
@@ -1518,9 +1538,6 @@ TRY (Myspell, Hunspell, others) *spell-TRY*
Vim does not use the TRY item, it is ignored. For making
suggestions the actual characters in the words are used.
VERSION (Hunspell) *spell-VERSION*
Specifies the version for the language. Not supported.
WORDCHARS (Hunspell) *spell-WORDCHARS*
Used to recognize words. Vim doesn't need it, because there
is no need to separate words before checking them (using a

View File

@@ -1,4 +1,4 @@
*starting.txt* For Vim version 7.0aa. Last change: 2006 Feb 14
*starting.txt* For Vim version 7.0aa. Last change: 2006 Mar 05
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -372,6 +372,14 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
-O[N] Open N windows, split vertically. Otherwise it's like -o.
If both the -o and the -O option are given, the last one on
the command line determines how the windows will be split.
{not in Vi}
*-p*
-p[N] Open N tab pages. If [N] is not given, one tab page is opened
for every file given as argument. The maximum is set with
'tabpagemax' pages (default 10). If there are more tab pages
than arguments, the last few tab pages will be editing an
empty file.
{not in Vi}
*-T*
@@ -831,6 +839,8 @@ accordingly. Vim proceeds in this order:
11. Open all windows
When the |-o| flag was given, windows will be opened (but not
displayed yet).
When the |-p| flag was given, tab pages will be created (but not
displayed yet).
When switching screens, it happens now. Redrawing starts.
If the "-q" flag was given to Vim, the first error is jumped to.
Buffers for all windows will be loaded.
@@ -1119,6 +1129,7 @@ you want to make this file your default .vimrc, move it to your home directory
(on Unix), s: (Amiga) or $VIM directory (MS-DOS). You could also use
autocommands |autocommand| and/or modelines |modeline|.
*vimrc-option-example*
If you only want to add a single option setting to your vimrc, you can use
these steps:
1. Edit your vimrc file with Vim.
@@ -1128,6 +1139,7 @@ these steps:
'=' to enter the value. E.g., for the 'guifont' option: >
o:set guifont=<C-R>=&guifont<CR><Esc>
< [<C-R> is a CTRL-R, <CR> is a return, <Esc> is the escape key]
You need to escape special characters, esp. spaces.
Note that when you create a .vimrc file, this can influence the 'compatible'
option, which has several side effects. See |'compatible'|.
@@ -1203,6 +1215,9 @@ An example mapping: >
:nmap <F2> :wa<Bar>exe "mksession! " . v:this_session<CR>:so ~/sessions/
This saves the current Session, and starts off the command to load another.
A session only includes the current tab page. There currently is no option to
store all tab pages. |tab-page|
The |SessionLoadPost| autocmd event is triggered after a session file is
loaded/sourced.
*SessionLoad-variable*

View File

@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 7.0aa. Last change: 2006 Feb 16
*syntax.txt* For Vim version 7.0aa. Last change: 2006 Mar 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3968,8 +3968,12 @@ SignColumn column where |signs| are displayed
IncSearch 'incsearch' highlighting; also used for the text replaced with
":s///c"
*hl-LineNr*
LineNr line number for ":number" and ":#" commands, and when 'number'
LineNr Line number for ":number" and ":#" commands, and when 'number'
option is set.
*hl-MatchParen*
MatchParen The character under the cursor or just before it, if it
is a paired bracket, and its match. |pi_paren.txt|
*hl-ModeMsg*
ModeMsg 'showmode' message (e.g., "-- INSERT --")
*hl-MoreMsg*
@@ -4020,6 +4024,12 @@ StatusLine status line of current window
StatusLineNC status lines of not-current windows
Note: if this is equal to "StatusLine" Vim will use "^^^" in
the status line of the current window.
*hl-TabLine*
TabLine tab pages line, not active tab page label
*hl-TabLineFill*
TabLineFill tab pages line, where there are no labels
*hl-TabLineSel*
TabLineSel tab pages line, active tab page label
*hl-Title*
Title titles for output from ":set all", ":autocmd" etc.
*hl-Visual*

346
runtime/doc/tabpage.txt Normal file
View File

@@ -0,0 +1,346 @@
*tabpage.txt* For Vim version 7.0aa. Last change: 2006 Mar 03
VIM REFERENCE MANUAL by Bram Moolenaar
Editing with windows in multiple tab pages. *tab-page* *tabpage*
The commands which have been added to use multiple tab pages are explained
here. Additionally, there are explanations for commands that work differently
when used in combination with more than one tab page.
1. Introduction |tab-page-intro|
2. Commands |tab-page-commands|
3. Other items |tab-page-other|
4. Setting 'tabline' |setting-tabline|
5. Setting 'guitablabel' |setting-guitablabel|
{Vi does not have any of these commands}
{not able to use multiple tab pages when the |+windows| feature was disabled
at compile time}
==============================================================================
1. Introduction *tab-page-intro*
A tab page holds one or more windows. You can easily switch between tab
pages, so that you have several collections of windows to work on different
things.
Usually you will see a list of labels at the top of the Vim window, one for
each tab page. With the mouse you can click on the label to jump to that tab
page. There are other ways to move between tab pages, see below.
Most commands work only in the current tab page. That includes the |CTRL-W|
commands, |:windo|, |:all| and |:ball| (when not using the |:tab| modifier).
The commands that are aware of other tab pages than the current one are
mentioned below.
Tabs are also a nice way to edit a buffer temporarily without changing the
current window layout. Open a new tab page, do whatever you want to do and
close the tab page.
==============================================================================
2. Commands *tab-page-commands*
OPENING A NEW TAB PAGE:
When starting Vim "vim -p filename ..." opens each file argument in a separate
tab page (up to 'tabpagemax'). |-p|
A double click with the mouse in the non-GUI tab pages line opens a new, empty
tab page. It is placed left of the position of the click. The first click
may select another tab page first, causing an extra screen update.
In the GUI tab pages line you can use the right mouse button to open menu.
|tabline-menu|.
:tabe[dit] *:tabe* *:tabedit* *:tabnew*
:tabnew Open a new tab page with an empty window, after the current
tab page.
:tabe[dit] [++opt] [+cmd] {file}
:tabnew [++opt] [+cmd] {file}
Open a new tab page and edit {file}, like with |:edit|.
:tabf[ind] [++opt] [+cmd] {file} *:tabf* *:tabfind*
Open a new tab page and edit {file} in 'path', like with
|:find|.
{not available when the |+file_in_path| feature was disabled
at compile time}
:[count]tab {cmd} *:tab*
Execute {cmd} and when it opens a new window open a new tab
page instead. Doesn't work for |:diffsplit| or |:diffpatch|.
When [count] is omitted the tab page appears after the current
one. When [count] is specified the new tab page comes after
tab page [count]. Use ":0tab cmd" to get the new tab page as
the first one. Examples: >
:tab split " opens current buffer in new tab page
:tab help gt " opens tab page with help for "gt"
CLOSING A TAB PAGE:
Closing the last window of a tab page closes the tab page too, unless there is
only one tab page.
Using the mouse: If the tab page line is displayed you can click in the "X" at
the top right to close the current tab page. A custom |'tabline'| may show
something else.
*:tabc* *:tabclose*
:tabc[lose][!] Close current tab page.
This command fails when:
- There is only one tab page on the screen. *E784*
- When 'hidden' is not set, [!] is not used, a buffer has
changes, and there is no other window on this buffer.
Changes to the buffer are not written and won't get lost, so
this is a "safe" command.
:tabc[lose][!] {count}
Close tab page {count}. Fails in the same way as ':tabclose"
above.
*:tabo* *:tabonly*
:tabo[nly][!] Close all other tab pages.
When the 'hidden' option is set, all buffers in closed windows
become hidden.
When 'hidden' is not set, and the 'autowrite' option is set,
modified buffers are written. Otherwise, windows that have
buffers that are modified are not removed, unless the [!] is
given, then they become hidden. But modified buffers are
never abandoned, so changes cannot get lost.
SWITCHING TO ANOTHER TAB PAGE:
Using the mouse: If the tab page line is displayed you can click in a tab page
label to switch to that tab page. Click where there is no label to go to the
next tab page. |'tabline'|
:tabn[ext] *:tabn* *:tabnext* *gt*
gt Go to the next tab page. Wraps around from the last to the
first one.
:tabn[ext] {count}
{count}gt Go to tab page {count}. The first tab page has number one.
:tabp[revious] *:tabp* *:tabprevious* *gT*
:tabN[ext] *:tabN* *:tabNext*
gT Go to the previous tab page. Wraps around from the first one
to the last one.
:tabp[revious] {count}
:tabN[ext] {count}
{count}gT Go {count} tab pages back. Wraps around from the first one
to the last one.
:tabr[ewind] *:tabfir* *:tabfirst* *:tabr* *:tabrewind*
:tabfir[st] Go to the first tab page.
*:tabl* *:tablast*
:tabl[ast] Go to the last tab page.
Other commands:
*:tabs*
:tabs List the tab pages and the windows they contain.
Shows a ">" for the current window.
Shows a "+" for modified buffers.
REORDERING TAB PAGES:
*:tabm* *:tabmove*
:tabmove N Move the current tab page to after tab page N. Use zero to
make the current tab page the first one. Without N the tab
page is made the last one.
LOOPING OVER TAB PAGES:
*:tabd* *:tabdo*
:tabd[o] {cmd} Execute {cmd} in each tab page.
It works like doing this: >
:tabfirst
:{cmd}
:tabnext
:{cmd}
etc.
< This only operates in the current window of each tab page.
When an error is detected on one tab page, further tab pages
will not be visited.
The last tab page (or where an error occurred) becomes the
current tab page.
{cmd} can contain '|' to concatenate several commands.
{cmd} must not open or close tab pages or reorder them.
{not in Vi} {not available when compiled without the
|+listcmds| feature}
Also see |:windo|, |:argdo| and |:bufdo|.
==============================================================================
3. Other items *tab-page-other*
*tabline-menu*
The GUI tab pages line has a popup menu. It is accessed with a right click.
The entries are:
Close Close the tab page under the mouse pointer. The
current one if there is no label under the mouse
pointer.
New Tab Open a tab page, editing an empty buffer. It appears
to the left of the mouse pointer.
Open Tab... Like "New Tab" and additionaly use a file selector to
select a file to edit.
Diff mode works per tab page. You can see the diffs between several files
within one tab page. Other tab pages can show differences between other
files.
The TabLeave and TabEnter autocommand events can be used to do something when
switching from one tab page to another. The exact order depends on what you
are doing. When creating a new tab page this works as if you create a new
window on the same buffer and then edit another buffer. Thus ":tabnew"
triggers:
WinLeave leave current window
TabLeave leave current tab page
TabEnter enter new tab page
WinEnter enter window in new tab page
BufLeave leave current buffer
BufEnter enter new empty buffer
When switching to another tab page the order is:
BufLeave
WinLeave
TabLeave
TabEnter
WinEnter
BufEnter
==============================================================================
4. Setting 'tabline' *setting-tabline*
The 'tabline' option specifies what the line with tab pages labels looks like.
It is only used when there is no GUI tab line.
You can use the 'showtabline' option to specify when you want the line with
tab page labels to appear: never, when there is more than one tab page or
always.
The highlighting of the tab pages line is set with the groups TabLine
TabLineSel and TabLineFill. |hl-TabLine| |hl-TabLineSel| |hl-TabLineFill|
The 'tabline' option allows you to define your preferred way to tab pages
labels. This isn't easy, thus an example will be given here.
For basics see the 'statusline' option. The same items can be used in the
'tabline' option. Additionally, the |tabpagebuflist()|, |tabpagenr()| and
|tabpagewinnr()| functions are useful.
Since the number of tab labels will vary, you need to use an expresion for the
whole option. Something like: >
:set tabline=%!MyTabLine()
Then define the MyTabLine() function to list all the tab pages labels. A
convenient method is to split it in two parts: First go over all the tab
pages and define labels for them. Then get the label for each tab page. >
function MyTabLine()
let s = ''
for i in range(tabpagenr('$'))
" select the highlighting
if i + 1 == tabpagenr()
let s .= '%#TabLineSel#'
else
let s .= '%#TabLine#'
endif
" set the tab page number (for mouse clicks)
let s .= '%' . (i + 1) . 'T'
" the label is made by MyTabLabel()
let s .= ' %{MyTabLabel(' . (i + 1) . ')} '
endfor
" after the last tab fill with TabLineFill and reset tab page nr
let s .= '%#TabLineFill#%T'
" right-align the label to close the current tab page
if tabpagenr('$') > 1
let s .= '%=%#TabLine#%999Xclose'
endif
return s
endfunction
Now the MyTabLabel() function is called for each tab page to get its label. >
function MyTabLabel(n)
let buflist = tabpagebuflist(a:n)
let winnr = tabpagewinnr(a:n)
return bufname(buflist[winnr - 1])
endfunction
This is just a simplistic example that results in a tab pages line that
resembles the default, but without adding a + for a modified buffer or
trunctating the names. You will want to reduce the width of labels in a
clever way when there is not enough room. Check the 'columns' option for the
space available.
==============================================================================
5. Setting 'guitablabel' *setting-guitablabel*
When the GUI tab pages line is displayed, 'guitablabel' can be used to
specify the label to display for each tab page. Unlike 'tabline', which
specifies the whole tab pages line at once, 'guitablabel' is used for each
label separately.
See the 'statusline' option for the format of the value.
The "%N" item can be used for the current tab page number. The |v:lnum|
variable is also set to this number when 'guitablabel' is evaluated.
The items that use a file name refer to the current window of the tab page.
Note that syntax highlighting is not used for 'guitablabel'. The %T and %X
items are also ignored.
A simple example that puts the tab page number and the buffer name in the
label: >
:set guitablabel=%N\ %f
An example that resembles the default: Show the number of windows in the tab
page and a '+' if there is a modifed buffer: >
function GuiTabLabel()
let label = ''
let bufnrlist = tabpagebuflist(v:lnum)
" Add '+' if one of the buffers in the tab page is modified
for bufnr in bufnrlist
if getbufvar(bufnr, "&modified")
let label = '+'
break
endif
endfor
" Append the number of windows in the tab page if more than one
let wincount = tabpagewinnr(v:lnum, '$')
if wincount > 1
let label .= wincount
endif
if label != ''
let label .= ' '
endif
" Append the buffer name
return label . bufname(bufnrlist[tabpagewinnr(v:lnum) - 1])
endfunction
set guitablabel=%{GuiTabLabel()}
Note that the function must be defined before setting the option, otherwise
you get an error message for the function not being known.
vim:tw=78:ts=8:ft=help:norl:

View File

@@ -254,6 +254,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'graphic' vi_diff.txt /*'graphic'*
'grepformat' options.txt /*'grepformat'*
'grepprg' options.txt /*'grepprg'*
'gtl' options.txt /*'gtl'*
'guicursor' options.txt /*'guicursor'*
'guifont' options.txt /*'guifont'*
'guifontset' options.txt /*'guifontset'*
@@ -261,6 +262,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'guiheadroom' options.txt /*'guiheadroom'*
'guioptions' options.txt /*'guioptions'*
'guipty' options.txt /*'guipty'*
'guitablabel' options.txt /*'guitablabel'*
'hardtabs' vi_diff.txt /*'hardtabs'*
'helpfile' options.txt /*'helpfile'*
'helpheight' options.txt /*'helpheight'*
@@ -354,11 +356,13 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'mat' options.txt /*'mat'*
'matchpairs' options.txt /*'matchpairs'*
'matchtime' options.txt /*'matchtime'*
'maxcombine' options.txt /*'maxcombine'*
'maxfuncdepth' options.txt /*'maxfuncdepth'*
'maxmapdepth' options.txt /*'maxmapdepth'*
'maxmem' options.txt /*'maxmem'*
'maxmempattern' options.txt /*'maxmempattern'*
'maxmemtot' options.txt /*'maxmemtot'*
'mco' options.txt /*'mco'*
'mef' options.txt /*'mef'*
'menuitems' options.txt /*'menuitems'*
'mesg' vi_diff.txt /*'mesg'*
@@ -718,6 +722,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'showfulltag' options.txt /*'showfulltag'*
'showmatch' options.txt /*'showmatch'*
'showmode' options.txt /*'showmode'*
'showtabline' options.txt /*'showtabline'*
'shq' options.txt /*'shq'*
'si' options.txt /*'si'*
'sidescroll' options.txt /*'sidescroll'*
@@ -758,6 +763,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'ssop' options.txt /*'ssop'*
'st' options.txt /*'st'*
'sta' options.txt /*'sta'*
'stal' options.txt /*'stal'*
'startofline' options.txt /*'startofline'*
'statusline' options.txt /*'statusline'*
'stl' options.txt /*'stl'*
@@ -892,6 +898,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
't_vs' term.txt /*'t_vs'*
't_xs' term.txt /*'t_xs'*
'ta' options.txt /*'ta'*
'tabline' options.txt /*'tabline'*
'tabpagemax' options.txt /*'tabpagemax'*
'tabstop' options.txt /*'tabstop'*
'tag' options.txt /*'tag'*
'tagbsearch' options.txt /*'tagbsearch'*
@@ -899,6 +907,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'tagrelative' options.txt /*'tagrelative'*
'tags' options.txt /*'tags'*
'tagstack' options.txt /*'tagstack'*
'tal' options.txt /*'tal'*
'tb' options.txt /*'tb'*
'tbi' options.txt /*'tbi'*
'tbidi' options.txt /*'tbidi'*
@@ -928,6 +937,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'toolbar' options.txt /*'toolbar'*
'toolbariconsize' options.txt /*'toolbariconsize'*
'top' options.txt /*'top'*
'tpm' options.txt /*'tpm'*
'tr' options.txt /*'tr'*
'ts' options.txt /*'ts'*
'tsl' options.txt /*'tsl'*
@@ -1224,6 +1234,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
-n starting.txt /*-n*
-nb starting.txt /*-nb*
-o starting.txt /*-o*
-p starting.txt /*-p*
-q starting.txt /*-q*
-qf starting.txt /*-qf*
-r starting.txt /*-r*
@@ -1476,6 +1487,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
08.6 usr_08.txt /*08.6*
08.7 usr_08.txt /*08.7*
08.8 usr_08.txt /*08.8*
08.9 usr_08.txt /*08.9*
09.1 usr_09.txt /*09.1*
09.2 usr_09.txt /*09.2*
09.3 usr_09.txt /*09.3*
@@ -2537,8 +2549,12 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:spelld spell.txt /*:spelld*
:spelldump spell.txt /*:spelldump*
:spellgood spell.txt /*:spellgood*
:spelli spell.txt /*:spelli*
:spellinfo spell.txt /*:spellinfo*
:spellr spell.txt /*:spellr*
:spellrepall spell.txt /*:spellrepall*
:spellu spell.txt /*:spellu*
:spellundo spell.txt /*:spellundo*
:spellw spell.txt /*:spellw*
:spellwrong spell.txt /*:spellwrong*
:split windows.txt /*:split*
@@ -2638,6 +2654,33 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:tN tagsrch.txt /*:tN*
:tNext tagsrch.txt /*:tNext*
:ta tagsrch.txt /*:ta*
:tab tabpage.txt /*:tab*
:tabN tabpage.txt /*:tabN*
:tabNext tabpage.txt /*:tabNext*
:tabc tabpage.txt /*:tabc*
:tabclose tabpage.txt /*:tabclose*
:tabd tabpage.txt /*:tabd*
:tabdo tabpage.txt /*:tabdo*
:tabe tabpage.txt /*:tabe*
:tabedit tabpage.txt /*:tabedit*
:tabf tabpage.txt /*:tabf*
:tabfind tabpage.txt /*:tabfind*
:tabfir tabpage.txt /*:tabfir*
:tabfirst tabpage.txt /*:tabfirst*
:tabl tabpage.txt /*:tabl*
:tablast tabpage.txt /*:tablast*
:tabm tabpage.txt /*:tabm*
:tabmove tabpage.txt /*:tabmove*
:tabn tabpage.txt /*:tabn*
:tabnew tabpage.txt /*:tabnew*
:tabnext tabpage.txt /*:tabnext*
:tabo tabpage.txt /*:tabo*
:tabonly tabpage.txt /*:tabonly*
:tabp tabpage.txt /*:tabp*
:tabprevious tabpage.txt /*:tabprevious*
:tabr tabpage.txt /*:tabr*
:tabrewind tabpage.txt /*:tabrewind*
:tabs tabpage.txt /*:tabs*
:tag tagsrch.txt /*:tag*
:tags tagsrch.txt /*:tags*
:tc if_tcl.txt /*:tc*
@@ -2675,6 +2718,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:una map.txt /*:una*
:unabbreviate map.txt /*:unabbreviate*
:undo undo.txt /*:undo*
:undoj undo.txt /*:undoj*
:undojoin undo.txt /*:undojoin*
:unh windows.txt /*:unh*
:unhide windows.txt /*:unhide*
:unl eval.txt /*:unl*
@@ -3061,6 +3106,7 @@ CTRL-W_CTRL-Z windows.txt /*CTRL-W_CTRL-Z*
CTRL-W_CTRL-] windows.txt /*CTRL-W_CTRL-]*
CTRL-W_CTRL-^ windows.txt /*CTRL-W_CTRL-^*
CTRL-W_CTRL-_ windows.txt /*CTRL-W_CTRL-_*
CTRL-W_F windows.txt /*CTRL-W_F*
CTRL-W_H windows.txt /*CTRL-W_H*
CTRL-W_J windows.txt /*CTRL-W_J*
CTRL-W_K windows.txt /*CTRL-W_K*
@@ -3875,6 +3921,7 @@ E780 spell.txt /*E780*
E781 spell.txt /*E781*
E782 spell.txt /*E782*
E783 spell.txt /*E783*
E784 tabpage.txt /*E784*
E79 message.txt /*E79*
E80 message.txt /*E80*
E800 arabic.txt /*E800*
@@ -4086,6 +4133,8 @@ TCL if_tcl.txt /*TCL*
TERM starting.txt /*TERM*
TTpro-telnet syntax.txt /*TTpro-telnet*
Tab intro.txt /*Tab*
TabEnter autocmd.txt /*TabEnter*
TabLeave autocmd.txt /*TabLeave*
Tcl if_tcl.txt /*Tcl*
TermChanged autocmd.txt /*TermChanged*
TermResponse autocmd.txt /*TermResponse*
@@ -5145,6 +5194,7 @@ ft-ocaml-syntax syntax.txt /*ft-ocaml-syntax*
ft-papp-syntax syntax.txt /*ft-papp-syntax*
ft-pascal-syntax syntax.txt /*ft-pascal-syntax*
ft-perl-syntax syntax.txt /*ft-perl-syntax*
ft-php-omni insert.txt /*ft-php-omni*
ft-php-syntax syntax.txt /*ft-php-syntax*
ft-php3-syntax syntax.txt /*ft-php3-syntax*
ft-phtml-syntax syntax.txt /*ft-phtml-syntax*
@@ -5265,12 +5315,14 @@ g?g? change.txt /*g?g?*
g@ map.txt /*g@*
gD pattern.txt /*gD*
gE motion.txt /*gE*
gF editing.txt /*gF*
gH visual.txt /*gH*
gI insert.txt /*gI*
gJ change.txt /*gJ*
gP change.txt /*gP*
gQ intro.txt /*gQ*
gR change.txt /*gR*
gT tabpage.txt /*gT*
gU change.txt /*gU*
gUU change.txt /*gUU*
gUgU change.txt /*gUgU*
@@ -5304,6 +5356,7 @@ getftime() eval.txt /*getftime()*
getftype() eval.txt /*getftype()*
getline() eval.txt /*getline()*
getloclist() eval.txt /*getloclist()*
getpos() eval.txt /*getpos()*
getqflist() eval.txt /*getqflist()*
getreg() eval.txt /*getreg()*
getregtype() eval.txt /*getregtype()*
@@ -5340,6 +5393,7 @@ group-name syntax.txt /*group-name*
gs various.txt /*gs*
gsp.vim syntax.txt /*gsp.vim*
gstar pattern.txt /*gstar*
gt tabpage.txt /*gt*
gtk-tooltip-colors gui_x11.txt /*gtk-tooltip-colors*
gu change.txt /*gu*
gugu change.txt /*gugu*
@@ -5429,6 +5483,7 @@ 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*
@@ -5479,6 +5534,7 @@ hl-FoldColumn syntax.txt /*hl-FoldColumn*
hl-Folded syntax.txt /*hl-Folded*
hl-IncSearch syntax.txt /*hl-IncSearch*
hl-LineNr syntax.txt /*hl-LineNr*
hl-MatchParen syntax.txt /*hl-MatchParen*
hl-Menu syntax.txt /*hl-Menu*
hl-ModeMsg syntax.txt /*hl-ModeMsg*
hl-MoreMsg syntax.txt /*hl-MoreMsg*
@@ -5499,6 +5555,9 @@ hl-SpellLocal syntax.txt /*hl-SpellLocal*
hl-SpellRare syntax.txt /*hl-SpellRare*
hl-StatusLine syntax.txt /*hl-StatusLine*
hl-StatusLineNC syntax.txt /*hl-StatusLineNC*
hl-TabLine syntax.txt /*hl-TabLine*
hl-TabLineFill syntax.txt /*hl-TabLineFill*
hl-TabLineSel syntax.txt /*hl-TabLineSel*
hl-Title syntax.txt /*hl-Title*
hl-Tooltip syntax.txt /*hl-Tooltip*
hl-User1 syntax.txt /*hl-User1*
@@ -5875,10 +5934,13 @@ match-parens tips.txt /*match-parens*
matchend() eval.txt /*matchend()*
matchit-install usr_05.txt /*matchit-install*
matchlist() eval.txt /*matchlist()*
matchparen pi_paren.txt /*matchparen*
matchstr() eval.txt /*matchstr()*
max() eval.txt /*max()*
mbyte-IME mbyte.txt /*mbyte-IME*
mbyte-XIM mbyte.txt /*mbyte-XIM*
mbyte-combining mbyte.txt /*mbyte-combining*
mbyte-composing mbyte.txt /*mbyte-composing*
mbyte-conversion mbyte.txt /*mbyte-conversion*
mbyte-encoding mbyte.txt /*mbyte-encoding*
mbyte-first mbyte.txt /*mbyte-first*
@@ -6135,6 +6197,8 @@ new-items-7 version7.txt /*new-items-7*
new-line-continuation version5.txt /*new-line-continuation*
new-location-list version7.txt /*new-location-list*
new-manpage-trans version7.txt /*new-manpage-trans*
new-matchparen version7.txt /*new-matchparen*
new-more-unicode version7.txt /*new-more-unicode*
new-multi-byte version5.txt /*new-multi-byte*
new-multi-lang version6.txt /*new-multi-lang*
new-netrw-explore version7.txt /*new-netrw-explore*
@@ -6237,6 +6301,7 @@ pattern-multi-items pattern.txt /*pattern-multi-items*
pattern-overview pattern.txt /*pattern-overview*
pattern-searches pattern.txt /*pattern-searches*
pattern.txt pattern.txt /*pattern.txt*
patterns-composing pattern.txt /*patterns-composing*
pdev-option print.txt /*pdev-option*
penc-option print.txt /*penc-option*
perl if_perl.txt /*perl*
@@ -6273,6 +6338,7 @@ php3.vim syntax.txt /*php3.vim*
phtml.vim syntax.txt /*phtml.vim*
pi_gzip.txt pi_gzip.txt /*pi_gzip.txt*
pi_netrw.txt pi_netrw.txt /*pi_netrw.txt*
pi_paren.txt pi_paren.txt /*pi_paren.txt*
pi_spec.txt pi_spec.txt /*pi_spec.txt*
plugin usr_05.txt /*plugin*
plugin-details filetype.txt /*plugin-details*
@@ -6528,6 +6594,7 @@ scrolling scroll.txt /*scrolling*
scrollstart-variable eval.txt /*scrollstart-variable*
sdl.vim syntax.txt /*sdl.vim*
search() eval.txt /*search()*
search()-sub-match eval.txt /*search()-sub-match*
search-commands pattern.txt /*search-commands*
search-offset pattern.txt /*search-offset*
search-pattern pattern.txt /*search-pattern*
@@ -6554,9 +6621,12 @@ setbufvar() eval.txt /*setbufvar()*
setcmdpos() eval.txt /*setcmdpos()*
setline() eval.txt /*setline()*
setloclist() eval.txt /*setloclist()*
setpos() eval.txt /*setpos()*
setqflist() eval.txt /*setqflist()*
setreg() eval.txt /*setreg()*
setting-guifont gui.txt /*setting-guifont*
setting-guitablabel tabpage.txt /*setting-guitablabel*
setting-tabline tabpage.txt /*setting-tabline*
setwinvar() eval.txt /*setwinvar()*
sftp pi_netrw.txt /*sftp*
sgml.vim syntax.txt /*sgml.vim*
@@ -6598,6 +6668,7 @@ special-buffers windows.txt /*special-buffers*
speed-up tips.txt /*speed-up*
spell spell.txt /*spell*
spell-ACCENT spell.txt /*spell-ACCENT*
spell-AUTHOR spell.txt /*spell-AUTHOR*
spell-BAD spell.txt /*spell-BAD*
spell-CHECKCOMPOUNDCASE spell.txt /*spell-CHECKCOMPOUNDCASE*
spell-CHECKCOMPOUNDDUP spell.txt /*spell-CHECKCOMPOUNDDUP*
@@ -6605,22 +6676,24 @@ spell-CHECKCOMPOUNDPATTERN spell.txt /*spell-CHECKCOMPOUNDPATTERN*
spell-CHECKCOMPOUNDREP spell.txt /*spell-CHECKCOMPOUNDREP*
spell-CHECKCOMPOUNDTRIPLE spell.txt /*spell-CHECKCOMPOUNDTRIPLE*
spell-CIRCUMFIX spell.txt /*spell-CIRCUMFIX*
spell-CMP spell.txt /*spell-CMP*
spell-COMMON spell.txt /*spell-COMMON*
spell-COMPLEXPREFIXES spell.txt /*spell-COMPLEXPREFIXES*
spell-COMPOUND spell.txt /*spell-COMPOUND*
spell-COMPOUNDBEGIN spell.txt /*spell-COMPOUNDBEGIN*
spell-COMPOUNDEND spell.txt /*spell-COMPOUNDEND*
spell-COMPOUNDFLAG spell.txt /*spell-COMPOUNDFLAG*
spell-COMPOUNDFLAGS spell.txt /*spell-COMPOUNDFLAGS*
spell-COMPOUNDFORBIDFLAG spell.txt /*spell-COMPOUNDFORBIDFLAG*
spell-COMPOUNDMAX spell.txt /*spell-COMPOUNDMAX*
spell-COMPOUNDMIDDLE spell.txt /*spell-COMPOUNDMIDDLE*
spell-COMPOUNDMIN spell.txt /*spell-COMPOUNDMIN*
spell-COMPOUNDPERMITFLAG spell.txt /*spell-COMPOUNDPERMITFLAG*
spell-COMPOUNDROOT spell.txt /*spell-COMPOUNDROOT*
spell-COMPOUNDRULE spell.txt /*spell-COMPOUNDRULE*
spell-COMPOUNDSYLLABLE spell.txt /*spell-COMPOUNDSYLLABLE*
spell-COMPOUNDSYLMAX spell.txt /*spell-COMPOUNDSYLMAX*
spell-COMPOUNDWORDMAX spell.txt /*spell-COMPOUNDWORDMAX*
spell-COPYRIGHT spell.txt /*spell-COPYRIGHT*
spell-EMAIL spell.txt /*spell-EMAIL*
spell-FLAG spell.txt /*spell-FLAG*
spell-FOL spell.txt /*spell-FOL*
spell-FORBIDDENWORD spell.txt /*spell-FORBIDDENWORD*
@@ -6684,6 +6757,7 @@ spell-wordlist-format spell.txt /*spell-wordlist-format*
spell-yiddish spell.txt /*spell-yiddish*
spell.txt spell.txt /*spell.txt*
spellbadword() eval.txt /*spellbadword()*
spellfile-cleanup spell.txt /*spellfile-cleanup*
spellfile.vim spell.txt /*spellfile.vim*
spellsuggest() eval.txt /*spellsuggest()*
split() eval.txt /*split()*
@@ -6927,6 +7001,16 @@ t_vi term.txt /*t_vi*
t_vs term.txt /*t_vs*
t_xs term.txt /*t_xs*
tab intro.txt /*tab*
tab-page tabpage.txt /*tab-page*
tab-page-commands tabpage.txt /*tab-page-commands*
tab-page-intro tabpage.txt /*tab-page-intro*
tab-page-other tabpage.txt /*tab-page-other*
tabline-menu tabpage.txt /*tabline-menu*
tabpage tabpage.txt /*tabpage*
tabpage.txt tabpage.txt /*tabpage.txt*
tabpagebuflist() eval.txt /*tabpagebuflist()*
tabpagenr() eval.txt /*tabpagenr()*
tabpagewinnr() eval.txt /*tabpagewinnr()*
tag tagsrch.txt /*tag*
tag-! tagsrch.txt /*tag-!*
tag-any-white tagsrch.txt /*tag-any-white*
@@ -7073,6 +7157,7 @@ uganda.txt uganda.txt /*uganda.txt*
undercurl syntax.txt /*undercurl*
underline syntax.txt /*underline*
undo undo.txt /*undo*
undo-blocks undo.txt /*undo-blocks*
undo-commands undo.txt /*undo-commands*
undo-redo undo.txt /*undo-redo*
undo-remarks undo.txt /*undo-remarks*
@@ -7248,6 +7333,7 @@ v_b_r_example visual.txt /*v_b_r_example*
v_c change.txt /*v_c*
v_d change.txt /*v_d*
v_g? change.txt /*v_g?*
v_gF editing.txt /*v_gF*
v_gJ change.txt /*v_gJ*
v_gV visual.txt /*v_gV*
v_g] tagsrch.txt /*v_g]*
@@ -7346,6 +7432,7 @@ viminfo-write starting.txt /*viminfo-write*
vimrc starting.txt /*vimrc*
vimrc-filetype usr_05.txt /*vimrc-filetype*
vimrc-intro usr_05.txt /*vimrc-intro*
vimrc-option-example starting.txt /*vimrc-option-example*
vimrc_example.vim usr_05.txt /*vimrc_example.vim*
vimtutor usr_01.txt /*vimtutor*
virtcol() eval.txt /*virtcol()*
@@ -7437,6 +7524,8 @@ winheight() eval.txt /*winheight()*
winline() eval.txt /*winline()*
winnr() eval.txt /*winnr()*
winrestcmd() eval.txt /*winrestcmd()*
winrestview() eval.txt /*winrestview()*
winsaveview() eval.txt /*winsaveview()*
winwidth() eval.txt /*winwidth()*
word motion.txt /*word*
word-count editing.txt /*word-count*
@@ -7565,6 +7654,10 @@ zo fold.txt /*zo*
zr fold.txt /*zr*
zs scroll.txt /*zs*
zt scroll.txt /*zt*
zuG spell.txt /*zuG*
zuW spell.txt /*zuW*
zug spell.txt /*zug*
zuw spell.txt /*zuw*
zv fold.txt /*zv*
zw spell.txt /*zw*
zx fold.txt /*zx*

View File

@@ -1,4 +1,4 @@
*tagsrch.txt* For Vim version 7.0aa. Last change: 2005 Oct 15
*tagsrch.txt* For Vim version 7.0aa. Last change: 2006 Feb 24
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -36,19 +36,26 @@ An easy way back is with the CTRL-T command. Also read about the tag stack
below.
*:ta* *:tag* *E426* *E429*
:ta[g][!] {ident} Jump to the definition of {ident}, using the
:[count]ta[g][!] {ident}
Jump to the definition of {ident}, using the
information in the tags file(s). Put {ident} in the
tag stack. See |tag-!| for [!].
{ident} can be a regexp pattern, see |tag-regexp|.
When there are several matching tags for {ident}, the
first one is jumped to. |:tnext|.
When there are several matching tags for {ident}, jump
to the [count] one. When [count] is omitted the
first one is jumped to. See |tag-matchlist| for
jumping to other matching tags.
g<LeftMouse> *g<LeftMouse>*
<C-LeftMouse> *<C-LeftMouse>* *CTRL-]*
CTRL-] Jump to the definition of the keyword under the
cursor. Same as ":tag {ident}", where {ident} is the
keyword under or after cursor. {Vi: identifier after
the cursor}
keyword under or after cursor.
When there are several matching tags for {ident}, jump
to the [count] one. When no [count] is given the
first one is jumped to. See |tag-matchlist| for
jumping to other matching tags.
{Vi: identifier after the cursor}
*v_CTRL-]*
{Visual}CTRL-] Same as ":tag {ident}", where {ident} is the text that

View File

@@ -1,4 +1,4 @@
*tips.txt* For Vim version 7.0aa. Last change: 2006 Feb 16
*tips.txt* For Vim version 7.0aa. Last change: 2006 Mar 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -450,11 +450,15 @@ Highlighting matching parens *match-parens*
This example shows the use of a few advanced tricks:
- using the |CursorMoved| autocommand event
- using |searchpairpos()| to find a matching paren
- using |synID()| to detect whether the cursor is in a string or comment
- using |:match| to highlight something
- using a |pattern| to match a specific position in the file.
This should be put in a Vim script file, since it uses script-local variables.
Note that it doesn't recognize strings or comments in the text.
It skips matches in strings or comments, unless the cursor started in string
or comment. This requires syntax highlighting.
A slightly more advanced version is used in the |matchparen| plugin.
>
let s:paren_hl_on = 0
function s:Highlight_Matching_Paren()
@@ -484,8 +488,11 @@ Note that it doesn't recognize strings or comments in the text.
let c = '\['
let c2 = '\]'
endif
let s_skip ='synIDattr(synID(line("."), col("."), 0), "name") ' .
\ '=~? "string\\|comment"'
execute 'if' s_skip '| let s_skip = 0 | endif'
let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags)
let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip)
if m_lnum > 0 && m_lnum >= line('w0') && m_lnum <= line('w$')
exe 'match Search /\(\%' . c_lnum . 'l\%' . c_col .

View File

@@ -1,4 +1,4 @@
*todo.txt* For Vim version 7.0aa. Last change: 2006 Feb 17
*todo.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -30,135 +30,10 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
*known-bugs*
-------------------- Known bugs and current work -----------------------
Support WINDOW TABS. Works like several pages, each with their own split
windows. Let's call them "tab pages".
- Add tabpage(): returns current tab page number.
- ":tabsplit" makes a copy of the current tab page.
- Add TabLeavePre and TabEnterPost autocommands
- line at top of frame with tabs.
Add 'tabtext' option, like 'statusline'.
- check for E999
- docs:
General remark: commands that work on windows only work on the windows
in the current tab page. Including :windo.
Session file only contains the current tab page.
:tabedit
:tabfind
:tab N
:tabs
{count}gt
:close may close current tab page if there is one window.
:tabclose
:tabclose N - close tab N
:tabonly - close all other tabs.
:close and :quit (last window in tab)
"gt": Use "1gt" - "99gt" to switch to another tab. "gt" goes to the
next one. Hint in docs: To mess with another buffer, without
changing the window layout, do this in another tab.
'tabline' values 0/1/2
mouse click in tabline:
select a tab page
X closes current tab page
:argall and :ball only opens window for buffers that are not in any
window in any tab page
:diffoff only works in the current tab page
diff works per tab page
"vim -p *" opens each file in a separate tab page (up to 10).
- add GUI Tabs for some systems.
Patch for GTK 1.2 passed on by Christian Michon, 2004 Jan 6.
Simple patch for GTK by Luis M (nov 7).
- Need to be able to search the windows in inactive tabs, e.g. for the
quickfix window.
Future enhancements:
tab page local variables?
tab page local options? 'diffopt' could differ between tab pages.
tab page local colors?
Crash with X command server (Ciaran McCreesh).
Motif: in diff mode dragging one scrollbar doesn't update the other one.
Ctags still hasn't included the patch. Darren is looking for someone to do
maintanance.
"fsutil hardlink" can create a hard link on an NTFS file system. (Daniel
Einspanjer) What library function can detect that?
Win32: use GetFileInformationByHandle() to detect hard links on NTFS?
(George Reilly)
spelling:
- Also use the spelling dictionary for dictionary completion.
When 'dictionary' is empty and/or when "kspell" is in 'complete'.
- Use runtime/cleanadd script to cleanup .add files. When to invoke it?
After deleting a word with "zw" and some timestamp difference perhaps?
Store it as spell/cleanadd.vim.
- suggestion for "KG" to "kg" when it's keepcase.
- Using KEEPCASE flag still allows all-upper word, docs say it doesn't.
Don't allow it, because there is no other way to do this.
- Implement NOSUGGEST flag (used for obscene words).
- Implement NOSPLITSUGS.
- Rename COMPOUNDFLAGS to COMPOUNDPATTERN or COMPOUNDRULE?
Hunspell now uses COMPOUND with a count.
- Check out Hunspell 1.1.3.
what does MAXNGRAMSUGS do?
See announcement (Nemeth, 5 jan)
is COMPLEXPREFIXES necessary now that we have flags for affixes?
- Look into hungarian dictionary:
http://magyarispell.sourceforge.net/hu_HU-1.0.tar.gz
- Support flags on a suffix. Used for second level affixes, rare and
nocomp. The flags may also be used for compounding. Default is an OR
mechanism with the flags of the word. Adding "compset" on the affixes
means the compound flags of the word are not used.
Instead of "SFX a 0 add/FLAGS ." we could use "SFX a 0 add . /FLAGS" (or
support both).
- When compounding Hunspell doesn't allow affixes inside the compound word,
only before and after it. COMPOUNDPERMITFLAG can be used to allow it.
Check Myspell and Aspell if they also work this way.
Thus a word + suffix needs a flag that it can't be used with a following
compound, and word + prefix can't be after another word in a compound.
- Implement COMPOUNDFORBIDFLAG.
- Support breakpoint character <20> 0xb7 and ignore it? Makes it possible to use
same wordlist for hyphenation.
8 Alternate Dutch word list at www.nederlandsewoorden.nl (use script to
obtain). But new Myspell wordlist will come (Hagen)
- Finding suggestions with sound folding is slow. Somehow store the
sound-folded words and link to the words it comes from?
- Have "zg" and "zw" report the file that was modified. (Marvin Renich)
- Add a command like "zg" that selects one of the files 'spellfile'.
- Add a "zug" command that undoes "zg"? Deletes the good word instead of
adding a bad word like "zw" would. Use "zuw" to undo "zw"? (Antonio
Colombo)
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).
":keepundo": add change to existing undo chain, so that one "u" undoes them
all. (Gautam Iyer)
Mac unicode patch (Da Woon Jung):
- selecting proportional font breaks display
- UTF-8 text causes display problems. Font replacement causes this.
- Command-key mappings do not work. (Alan Schmitt)
- Add default key mappings for the command key (Alan Schmitt)
use http://macvim.org/OSX/files/gvimrc
- With 'nopaste' pasting is wrong, with 'paste' Command-V doesn't work.
(Alan Schmitt)
Patch to add a few flags to search(). (Benji Fisher, Nov 29, doc update Dec 1)
Win32: Use the free downloadable compiler 7.1 (2003). Figure out how to do
debugging (with Agide?) and describe it. (George Reilly)
Try out using the free MS compiler and debugger, using Make_mvc.mak.
Try using Visual C++ Express 2005. (Ilya Bobir Dec 20)
Disadvantage: Annoying warning messages, requires ..._NO_DEPRECATE, this
is not a standard compiler.
Win32: Check that installer puts menu items in "all users" dir when possible,
not administrator dir.
When expanding on the command line, recognize shell commands, such as ":!cmd".
Move from ExpandFromContext() to separate function.
Check for file being executable. EW_EXEC
Escape special characters ";&<>(){}". Also in file names. (Adri Verhoef)
Autoload:
- Add a Vim script in $VIMRUNTIME/tools that takes a file with a list of
@@ -171,21 +46,22 @@ Autoload:
helpfile doc/myscript.txt
For the "helpfile" item ":helptags" is run.
Add ":smap", Select mode mapping? Otherwise: ":sunmap", so that Visual mode
mappings for normal keys can be removed from Select mode.
When expanding on the command line, recognize shell commands, such as ":!cmd".
Complete command names by searching in $PATH. When completing file names
escape special characters ";&<>(){}". (Adri Verhoef)
Win32: Describe how to do debugging and describe it. (George Reilly)
Are there more commands where v:swapcommand can be set to something useful?
Put autocommand event names in a hashtable for faster lookup?
Awaiting response:
- Win32: tearoff menu window should have a scrollbar when it's taller than
the screen.
- mblen(NULL, 0) also in Vim 6.3?
Mac unicode patch (Da Woon Jung):
- Mac: Unicode input and display (Eckehard Berns, 2004 June 27)
Other patch from Da Woon Jung, 2005 Jan 16.
8 Add patch from Muraoka Taro (Mar 16) to support input method on Mac?
New patch 2004 Jun 16
- selecting proportional font breaks display
- UTF-8 text causes display problems. Font replacement causes this.
- Command-key mappings do not work. (Alan Schmitt)
- Add default key mappings for the command key (Alan Schmitt)
use http://macvim.org/OSX/files/gvimrc
- With 'nopaste' pasting is wrong, with 'paste' Command-V doesn't work.
(Alan Schmitt)
CONSIDERED FOR VERSION 7.0:
@@ -207,8 +83,8 @@ Omni completion:
characters/strings. (Martin Stubenschrott)
And/or: Provide a function to popup the menu, so that an insert mode
mapping can start it (with a specific selection).
- GUI implementation of the popup menu.
- Show "info" from a match in preview window.
- Show "info" from a match in preview window (with an option or by opening
a preview window with a specific name).
Or use one window for matches, another for context/info (Doug Kearns,
2005 Sep 13)
- Ideas on: http://www.wholetomato.com/
@@ -258,46 +134,11 @@ Omni completion:
Show the list of changes in a window to be able to select a version?
Also: See ":e" as a change operation, find the changes and add them to the
undo info. Needed for when an external tool changes the file.
- PERSISTENT UNDO: store undo in a file.
Use timestamps, so that a version a certain time ago can be found and info
before some time/date can be flushed. 'undopersist' gives maximum time to
keep undo: "3h", "1d", "2w", "1y", etc. For the file use dot and
extension: ".filename.un~" (like swapfile but "un~" instead of "swp").
- EMBEDDING: Make it possible to run Vim inside a window of another program.
For Xwindows this can be done with XReparentWindow().
For GTK Neil Bird has a patch to use Vim like a widget.
- Add COLUMN NUMBERS to ":" commands ":line1,line2[col1,col2]cmd". Block
can be selected with CTRL-V. Allow '$' (end of line) for col2.
- Add DEBUGGER INTERFACE. Implementation for gdb by Xavier de Gaye.
Should work like an IDE. Try to keep it generic. Now found here:
http://clewn.sf.net.
And the idevim plugin/script.
To be able to start the debugger from inside Vim: For GUI run a program
with a netbeans connection; for console: start a program that splits the
terminal, runs the debugger in one window and reconnect Vim I/O to the
other window.
Wishes for NetBeans commands:
- make it possible to have 'defineAnnoType' also handle terminal colors.
- send 'balloonText' events for the cursor position (using CursorHold ?)
in terminal mode.
- ECLIPSE plugin. Problem is: the interface is very complicated. Need to
implement part in Java and then connect to Vim. Some hints from Alexandru
Roman, 2004 Dec 15. Should then also work with Oracle Jdeveloper, see JSR
198 standard http://www.jcp.org/en/jsr/detail?id=198.
Eclim does it: http://eclim.sourceforge.net/ (Eric Van Dewoestine)
Plugin that uses a terminal emulator: http://vimplugin.sf.net
- STICKY CURSOR: Add a way of scrolling that leaves the cursor where it is.
Especially when using the scrollbar. Typing a cursor-movement command
scrolls back to where the cursor is.
- Execute a function with standard option values. No need to save and
restore option values. Especially useful for new options. Problem: how
to avoid a performance penalty (esp. for string options)?
8 Support four composing/combining characters, needed for Hebrew. (Ron Aaron)
Add the 'maxcombining' option to set the nr. of composing characters.
At the same time support more colors (use two bytes when necessary).
8 "ga" should show all composing characters, also if there are more than 2.
8 Searching for a composing character by itself should work. Perhaps "."
with a composing char should work too.
- Add a few more things to 'diffopt': "horizontal", "vertical",
"foldcolumn". (Benji Fisher, 2004 Jun 21)
- FileChangedShellPost autocommand event: after (not) reloading a changed
@@ -307,15 +148,6 @@ Omni completion:
It's not clear that this doesn't cause problems when the executed
commands do something like changing 'lines'. Esp. because the
screen has not yet been allocated with the new size.
- Running a shell command from the GUI still has limitations. Look into how
the Vim shell project can help: http://vimshell.wana.at
- Displaying size of Visual area: use 24-33 column display.
When selecting multiple lines, up to about a screenful, also count the
characters.
- Mac: Unicode input and display (Eckehard Berns, 2004 June 27)
Other patch from Da Woon Jung, 2005 Jan 16.
8 Add patch from Muraoka Taro (Mar 16) to support input method on Mac?
New patch 2004 Jun 16
9 Add cursor-column highlighting. Enable it with 'cursorcolumn' option,
set highlighting with "CursorColumn" group. Useful for aligning text.
Also cursor-row highlighting. Patch from Yasuhiro Matsumoto for
@@ -328,76 +160,43 @@ Omni completion:
- When using 'incsearch" CTRL-R CTRL-W gets the word under the cursor, but
the part that already matched is doubled then. Remove the part of the
word that would be doubled. Make it work line CTRL-N in Insert mode.
- Add Lua interface? (Wolfgang Oertl)
- "onemore" flag in 'virtualedit': move cursor past end of line. Patch by
Mattias Flodin (2004 Jul 30)
- In a :s command multi-byte characters should also be upper/lower cased
with \u, \U, etc.
8 Add a command to jump to a certain kind of tag. Allow the user to specify
values for the optional fields. E.g., ":tag size type=m".
Also allow specifying the file and command, so that the result of
taglist() can be used.
Adjust src/main.aap for installing manpages like in Makefile.
- Adjust src/main.aap for installing manpages like in Makefile.
And for generating Vim.app for the Mac.
Install spell files with src/main.aap.
When editing a file with both utf-8 and latin1 text Vim always falls back to
latin1. Add a command to convert the latin1 characters to utf-8?
:unmix utf-8,latin1 filename
Would only work when 'encoding' is utf-8.
Also: command to search for illegal utf-8 byte sequence?
Also generate the .pdb file that can be used to generate a useful crash report
on MS-Windows. (George Reilly)
- Add command to search for illegal utf-8 byte sequence.
Add strtol() to avoid the problems with leading zero causing octal conversion.
Try new POSIX tests, made after my comments. (Geoff Clare, 2005 April 7)
Version 1.5 is in ~/src/posix/1.5. (Lynne Canal)
Add a 'tool' window: behaves like a preview window but there can be several.
Don't count it in only_one_window(). (Alexei Alexandrov)
Win32: Patch for Korean IME. (Yusung, 2005 March 21)
When "= evaluation results in a List, use it as a sequence of lines.
Support ":set syntax=cpp.doxygen"? Suggested patch by Michael Geddes (9 Aug
2004). Should also work for 'filetype'.
For manipulating buffers without opening a new window, support Virtual
windows. Example:
:virtwin let l = GetBufLine(4, 10)
:fun GetBufLine(bufnr, lnum)
: exe "buffer " . a:bufnr
: return getline(lnum)
:endfun
The getline() and setline() functions could work for other buffers, using a
Virtual window.
A Virtual window only exists for one command. There can be several (for
nested commands). The window works as if it comes after the last window, size
is the Vim window size, but it's never displayed.
Win32: In the generated batch files, use $VIMRUNTIME if it's set. Examples by
Mathias Michaelis (2004 Sep 6)
Also place vimtutor.bat in %windir%?
Add gui_mch_browsedir() for Motif, Mac OS/X.
Ctags still hasn't included the patch. Darren is looking for someone to do
maintanance. Is there another solution?
HTML indenting can be slow, find out why. Any way to do some kind of
profiling for Vim script? At least add a function to get the current time in
usec. reltime([start, [end]])
HTML indenting can be slow, find out why.
Add a function to get the current time in usec. reltime([start, [end]])
reltime().sec == seconds, reltime().usec = microseconds
reltime(start) current time relative to [start]
echo timestring(reltime(start), 3) (3 is nr of digits after dot)
reltime(start, end) difference between start and end
Real Profiling:
- :profile start /tmp/somefile (append if exists)
Profiling:
- :profile pause
- :profile resume
- :profile stop
- per function line
- self, Vim and total time (incl system time)
- dump results in file on exit or when stopped.
Add more tests for all new functionality in Vim 7. Especially new functions.
@@ -408,94 +207,96 @@ Jan 6)
Add a flag to check for a match with the next item first? Helps for
continuation lines that may contain just about anything.
Awaiting updated patches:
--- awaiting updated patch ---
8 Add ":n" to fnamemodify(): normalize path, remove "../" when possible.
Aric Blumer has a patch for this.
He will update the patch for 6.3.
Autocommands:
7 Completion of network shares, patch by Yasuhiro Matsumoto.
Update 2004 Sep 6.
How does this work? Missing comments.
- gettext() Translate a message. (Patch from Yasuhiro Matsumoto)
Update 2004 Sep 10
Another patch from Edward L. Fox (2005 Nov 24)
Search in 'runtimepath'?
More docs about how to use this.
How to get the messages into the .po files?
--- did not respond (yet) --
- Patch for 'breakindent' option: repeat indent for wrapped line. (Vaclav
Smilauer, 2004 Sep 13, fix Oct 31)
Asked for improvements 2004 Dec 20.
7 Make "5dd" on last-but-one-line not delete anything (Vi compatible).
Add flag in 'cpoptions' for this. When not present, "2dd" in the last
line should delete the last line. Patch from greenx 2002 Apr 11.
8 Add a few more command names to the menus. Patch from Jiri Brezina
(28 feb 2002).
7 ATTENTION dialog choices are more logical when "Delete it' appears
before "Quit". Patch by Robert Webb, 2004 May 3.
- Include flipcase patch: ~/vim/patches/wall.flipcase2 ? Make it work
for multi-byte characters.
- Win32: add options to print dialog. Patch from Vipin Aravind.
- Patch to add highlighting for whitespace. (Tom Schumm, 2003 Jul 5)
use the patch that keeps using HLF_8 if HLF_WS has not
been given values.
Add section in help files for these highlight groups?
8 "fg" and "bg" don't work in an xterm. Get default colors from xterm
with an ESC sequence. Ideas in: ~/vim/patches/vikas.xtermcolors .
7 Add "DefaultFG" and "DefaultBG" for the colors of the menu. (Marcin
Dalecki has a patch for Motif and Carbon)
- Add possibility to highlight specific columns (for Fortran). Or put a
line in between columns (e.g., for 'textwidth').
Patch to add 'hlcolumn' from Vit Stradal, 2004 May 20.
8 Add functions:
confirm() add "flags" argument, with 'v' for vertical
layout and 'c' for console dialog. (Haegg)
Flemming Madsen has a patch for the 'c' flag
(2003 May 13)
raisewin() raise gvim window (see HierAssist patch for
Tcl implementation ~/vim/HierAssist/ )
7 Make globpath() also work with upwards search. (Brian Medley)
7 Add patch from Benoit Cerrina to integrate Vim and Perl functions
better. Now also works for Ruby (2001 Nov 10)
- Patch from Herculano de Lima Einloft Neto for better formatting of the
quickfix window (2004 dec 2)
7 When 'rightleft' is set, the search pattern should be displayed right
to left as well? See patch of Dec 26. (Nadim Shaikli)
8 Lock all used memory so that it doesn't get swapped to disk (uncrypted).
Patch by Jason Holt, 2003 May 23. Uses mlock.
7 Support a stronger encryption. Jason Holt implemented AES (May 6 2003).
7 Add ! register, for shell commands. (patch from Grenie)
8 In the gzip plugin, also recognize *.gz.orig, *.gz.bak, etc. Like it's
done for filetype detection. Patch from Walter Briscoe, 2003 Jul 1.
7 Add a "-@ filelist" argument: read file names from a file. (David
Kotchan has a patch for it)
8 Include a connection to an external program through a pipe? See
patches from Felbinger for a mathematica interface.
Or use emacs server kind of thing?
7 Add ":justify" command. Patch from Vit Stradal 2002 Nov 25.
- findmatch() should be adjusted for Lisp. See remark at
get_lisp_indent(). Esp. \( and \) should be skipped. (Dorai Sitaram,
incomplete patch Mar 18)
- Set user variables to the names of the actually used user vimrc file,
the first directory looked for user plugins/syntax files.
$MYVIMRC for .vimrc, $MYGVIMRC for .gvimrc, $MYRUNTIME/plugin for
runtime files?
Also: when the environment variable exists, use it. If it doesn't
exist, set it. Requires good names: $VIM_USER_VIMRC $VIM_USER_DIR
- The Replace dialog takes "\r" literal, unless "replace all" is used.
Need to escape backslashes.
Win32: the text to replace with isn't remembered.
- For GUI Find/Replace dialog support using a regexp. Patch for Motif
and GTK by degreneir (nov 10 and nov 18).
Patch for "paranoid mode" by Kevin Collins, March 7. Needs much more work.
Add ":smap", Select mode mapping? Otherwise: ":sunmap", so that Visual mode
mappings for normal keys can be removed from Select mode.
Check if file explorer can handle directory names and links with a single
quote. (Nieko Maatjes, 2005 Jan 4)
Awaiting updated patches:
8 Add ":n" to fnamemodify(): normalize path, remove "../" when possible.
Aric Blumer has a patch for this.
He will update the patch for 6.3.
7 Completion of network shares, patch by Yasuhiro Matsumoto.
Update 2004 Sep 6.
How does this work? Missing comments.
- Patch for 'breakindent' option: repeat indent for wrapped line. (Vaclav
Smilauer, 2004 Sep 13, fix Oct 31)
Asked for improvements 2004 Dec 20.
7 Make "5dd" on last-but-one-line not delete anything (Vi compatible).
Add flag in 'cpoptions' for this. When not present, "2dd" in the last
line should delete the last line. Patch from greenx 2002 Apr 11.
8 Add a few more command names to the menus. Patch from Jiri Brezina
(28 feb 2002).
7 ATTENTION dialog choices are more logical when "Delete it' appears
before "Quit". Patch by Robert Webb, 2004 May 3.
- Include flipcase patch: ~/vim/patches/wall.flipcase2 ? Make it work
for multi-byte characters.
- Win32: add options to print dialog. Patch from Vipin Aravind.
- Patch to add highlighting for whitespace. (Tom Schumm, 2003 Jul 5)
use the patch that keeps using HLF_8 if HLF_WS has not
been given values.
Add section in help files for these highlight groups?
8 "fg" and "bg" don't work in an xterm. Get default colors from xterm
with an ESC sequence. Ideas in: ~/vim/patches/vikas.xtermcolors .
7 Add "DefaultFG" and "DefaultBG" for the colors of the menu. (Marcin
Dalecki has a patch for Motif and Carbon)
- Add possibility to highlight specific columns (for Fortran). Or put a
line in between columns (e.g., for 'textwidth').
Patch to add 'hlcolumn' from Vit Stradal, 2004 May 20.
8 Add functions:
gettext() Translate a message. (Patch from Yasuhiro Matsumoto)
Update 2004 Sep 10
Another patch from Edward L. Fox (2005 Nov 24)
Search in 'runtimepath'?
More docs about how to use this.
How to get the messages into the .po files?
confirm() add "flags" argument, with 'v' for vertical
layout and 'c' for console dialog. (Haegg)
Flemming Madsen has a patch for the 'c' flag
(2003 May 13)
raisewin() raise gvim window (see HierAssist patch for
Tcl implementation ~/vim/HierAssist/ )
7 Make globpath() also work with upwards search. (Brian Medley)
7 Add patch from Benoit Cerrina to integrate Vim and Perl functions
better. Now also works for Ruby (2001 Nov 10)
- Patch from Herculano de Lima Einloft Neto for better formatting of the
quickfix window (2004 dec 2)
7 When 'rightleft' is set, the search pattern should be displayed right
to left as well? See patch of Dec 26. (Nadim Shaikli)
8 Lock all used memory so that it doesn't get swapped to disk (uncrypted).
Patch by Jason Holt, 2003 May 23. Uses mlock.
7 Support a stronger encryption. Jason Holt implemented AES (May 6 2003).
7 Add ! register, for shell commands. (patch from Grenie)
8 In the gzip plugin, also recognize *.gz.orig, *.gz.bak, etc. Like it's
done for filetype detection. Patch from Walter Briscoe, 2003 Jul 1.
7 Add a "-@ filelist" argument: read file names from a file. (David
Kotchan has a patch for it)
8 Include a connection to an external program through a pipe? See
patches from Felbinger for a mathematica interface.
Or use emacs server kind of thing?
7 Add ":justify" command. Patch from Vit Stradal 2002 Nov 25.
- findmatch() should be adjusted for Lisp. See remark at
get_lisp_indent(). Esp. \( and \) should be skipped. (Dorai Sitaram,
incomplete patch Mar 18)
- Set user variables to the names of the actually used user vimrc file,
the first directory looked for user plugins/syntax files.
$MYVIMRC for .vimrc, $MYGVIMRC for .gvimrc, $MYRUNTIME/plugin for
runtime files?
Also: when the environment variable exists, use it. If it doesn't
exist, set it. Requires good names: $VIM_USER_VIMRC $VIM_USER_DIR
- The Replace dialog takes "\r" literal, unless "replace all" is used.
Need to escape backslashes.
Win32: the text to replace with isn't remembered.
- For GUI Find/Replace dialog support using a regexp. Patch for Motif
and GTK by degreneir (nov 10 and nov 18).
- Patch for "paranoid mode" by Kevin Collins, March 7. Needs much more work.
Vi incompatibility:
- Try new POSIX tests, made after my comments. (Geoff Clare, 2005 April 7)
Version 1.5 is in ~/src/posix/1.5. (Lynne Canal)
8 With undo/redo only marks in the changed lines should be changed. Other
marks should be kept. Vi keeps each mark at the same text, even when it
is deleted or restored. (Webb)
@@ -572,6 +373,7 @@ GTK+ 1 (OK in GTK 2):
appending "bold" when there are not 14 dashes.
GTK+ GUI known bugs:
9 Crash with X command server over ssh. (Ciaran McCreesh, 2006 Feb 6)
8 GTK 2: Combining UTF-8 characters not displayed properly in menus (Mikolaj
Machowski) They are displayed as separate characters. Problem in
creating a label?
@@ -584,6 +386,8 @@ GTK+ GUI known bugs:
It starts working after GTK gvim loses the selection and gains it again.
Win32 GUI known bugs:
- Win32: tearoff menu window should have a scrollbar when it's taller than
the screen.
8 On Windows 98 the unicows library is needed to support functions with UCS2
file names. Can we load unicows.dll dynamically?
8 The -P argument doesn't work very well with many MDI applications.
@@ -719,6 +523,7 @@ Athena GUI:
Motif GUI:
- gui_mch_browsedir() is missing.
7 Use XmStringCreateLocalized() instead of XmStringCreateSimple()?
David Harrison says it's OK (it exists in Motif 1.2).
8 Lesstif: When deleting a menu that's torn off, the torn off menu becomes
@@ -923,6 +728,7 @@ Amiga:
Macintosh:
- GUI: gui_mch_browsedir() is missing.
7 Patch to add 'transparency' option. Disadvantage: it's slow. (Eckehard
Berns, 2004 May 9) http://ecki.to/vim/TransBack-2004-05-09.diff
Needs more work. Add when someone really wants it.
@@ -1317,6 +1123,40 @@ Problems that will (probably) not be solved:
--------------------- extensions and improvements ----------------------
*extensions-improvements*
Didn't make it into Vim 7.0:
- Add COLUMN NUMBERS to ":" commands ":line1,line2[col1,col2]cmd". Block
can be selected with CTRL-V. Allow '$' (end of line) for col2.
- Add DEBUGGER INTERFACE. Implementation for gdb by Xavier de Gaye.
Should work like an IDE. Try to keep it generic. Now found here:
http://clewn.sf.net.
And the idevim plugin/script.
To be able to start the debugger from inside Vim: For GUI run a program
with a netbeans connection; for console: start a program that splits the
terminal, runs the debugger in one window and reconnect Vim I/O to the
other window.
Wishes for NetBeans commands:
- make it possible to have 'defineAnnoType' also handle terminal colors.
- send 'balloonText' events for the cursor position (using CursorHold ?)
in terminal mode.
- ECLIPSE plugin. Problem is: the interface is very complicated. Need to
implement part in Java and then connect to Vim. Some hints from Alexandru
Roman, 2004 Dec 15. Should then also work with Oracle Jdeveloper, see JSR
198 standard http://www.jcp.org/en/jsr/detail?id=198.
Eclim does it: http://eclim.sourceforge.net/ (Eric Van Dewoestine)
Plugin that uses a terminal emulator: http://vimplugin.sf.net
- STICKY CURSOR: Add a way of scrolling that leaves the cursor where it is.
Especially when using the scrollbar. Typing a cursor-movement command
scrolls back to where the cursor is.
- Running a shell command from the GUI still has limitations. Look into how
the terminal emulator of the Vim shell project can help:
http://vimshell.wana.at
- Add Lua interface? (Wolfgang Oertl)
8 Add a command to jump to a certain kind of tag. Allow the user to specify
values for the optional fields. E.g., ":tag size type=m".
Also allow specifying the file and command, so that the result of
taglist() can be used.
Documentation:
8 The GUI help should explain the Find and Find/Replace dialogs. Add a link
to it from ":promptrepl" and ":promptfind".
@@ -1397,9 +1237,46 @@ User Friendlier:
global_event_filter() for GTK.
Tab pages:
9 GUI implementation for the tab pages line for other systems.
8 Make GUI menu in tab pages line configurable. Like the popup menu.
8 tab pages in the session file, if "tabpages" in 'sessionoptions'
8 :tabmove +N move tab page N pages forward
8 :tabmove -N move tab page N pages backward
7 :tabdup duplicate the tab with all its windows.
7 Option to put tab line at the left or right? Need an option to specify
its witdh. It's like a separate window with ":tabs" output.
7 Add local variables for each tab page?
8 Add local options for each tab page? E.g., 'diffopt' could differ between
tab pages.
7 Add local highlighting for each tab page?
Spell checking:
9 Work together with OpenOffice.org to update the wordlists. (Adri Verhoef,
Aad Nales) Setup vim-spell maillist?
- Implement COMPOUNDFORBIDFLAG .
- Check out Hunspell 1.1.4.
The manpage doesn't match the source code...
Try to make the newly added features compatible.
what does MAXNGRAMSUGS do?
is COMPLEXPREFIXES necessary when we have flags for affixes?
- Look into Hungarian dictionary: hu_HU-1.0.tar.gz
This one doesn't match with Hunspell 1.1.4.
- Add CHECKCOMPOUNDCASE: when compounding make leading capital lower case.
How is it supposed to work?
- When compounding Hunspell doesn't allow affixes inside the compound word,
only before and after it. COMPOUNDPERMITFLAG can be used to allow it.
Check Myspell and Aspell if they also work this way.
Thus a word + suffix needs a flag that it can't be used with a following
compound, and word + prefix can't be after another word in a compound.
- suggestion for "KG" to "kg" when it's keepcase.
- Support flags on a suffix. Used for second level affixes, rare and
nocomp. The flags may also be used for compounding. Default is an OR
mechanism with the flags of the word. Adding "compset" on the affixes
means the compound flags of the word are not used.
Instead of "SFX a 0 add/FLAGS ." we could use "SFX a 0 add . /FLAGS" (or
support both).
- Support breakpoint character <20> 0xb7 and ignore it? Makes it possible to
use same wordlist for hyphenation.
- Compound word is accepted if nr of words is <= COMPOUNDMAX OR nr of
syllables <= COMPOUNDSYLMAX. Specify using AND in the affix file?
- COMPOUNDMAX -> COMPOUNDWORDMAX?
@@ -1416,6 +1293,8 @@ Spell checking:
- PSEUDOROOT == NEEDAFFIX
- COMPOUNDROOT -> COMPOUNDED? For a word that already is a compound word
Or use COMPOUNDED2, COMPOUNDED3, etc.
8 Alternate Dutch word list at www.nederlandsewoorden.nl (use script to
obtain). But new Myspell wordlist will come (Hagen)
- CIRCUMFIX: when a word uses a prefix marked with the CIRCUMFIX flag, then
the word must also have a suffix marked with the CIRCUMFIX flag. It's a
bit primitive, since only one flag is used, which doesn't allow matching
@@ -1438,7 +1317,6 @@ Spell checking:
syntax items (to add @Spell).
Add ":syntax contains {pattern} add=@Spell" command? A bit like ":syn
cluster" but change the contains list directly for matching syntax items.
8 Install spell files with src/main.aap.
- References: MySpell library (in OpenOffice.org).
http://spellchecker.mozdev.org/source.html
http://whiteboard.openoffice.org/source/browse/whiteboard/lingucomponent/source/spellcheck/myspell/
@@ -1495,13 +1373,18 @@ Folding:
to implement this?
- "zJ" command: add the line or fold below the fold in the fold under the
cursor.
- 'foldmethod' "syntax": "fold=3": set fold level for a region.
- 'foldmethod' "syntax": "fold=3" argument: set fold level for a region or
match.
- Apply a new foldlevel to a range of lines. (Steve Litt)
8 Have some way to restrict commands to not folded text. Also commands like
searches.
Multi-byte characters:
- When editing a file with both utf-8 and latin1 text Vim always falls back
to latin1. Add a command to convert the latin1 characters to utf-8?
:unmix utf-8,latin1 filename
Would only work when 'encoding' is utf-8.
9 When the tail byte of a double-byte character is illegal (e.g., a CR), the
display is messed up (Yasuhiro Matsumoto). Should check for illegal
double-byte characters and display them differently (display each single
@@ -1624,7 +1507,7 @@ Syntax highlighting:
"%" match. :syntax nomatch cMatchError (,{,[,),},] [contained]
8 Highlight the text between two matching parens (e.g., with a grey
background) when on one of the parens or in between them.
Or highlight the matching paren when the cursor is on one.
Option for the matchparen plugin?
8 Add a command to jump to the next character highlighted with "Error".
8 When using a cterm, and no ctermfg or ctermbg are defined, use start/stop
sequences. Add remark in docs that :if 'term' == "term-name" should be
@@ -1742,6 +1625,9 @@ Syntax highlighting:
Built-in script language:
7 Execute a function with standard option values. No need to save and
restore option values. Especially useful for new options. Problem: how
to avoid a performance penalty (esp. for string options)?
8 Add referring to key options with "&t_xx". Both for "echo &t_xx" and
":let &t_xx =". Useful for making portable mappings.
8 exists("&&option") tests if 'option' is actually implemented. Useful for
@@ -1759,13 +1645,6 @@ Built-in script language:
Alternative: Support packages. {package-name}:{function-name}().
Packages are loaded automatically when first used, from
$VIMRUNTIME/packages (or use a search path).
7 Add the markclear() function to delete a mark in another buffer. Charles
Campbell (2004 Jan 9)
http://mysite.verizon.net/astronaut/vim/index.html#Patch
Implement setmark(markname, lnum [, col [, filename]]) instead?
When "lnum" is zero delete the mark.
When "filename" has no wildcards and there is no matching buffer, add
the buffer (unlisted).
7 Pre-parse or compile Vim scripts into a bytecode.
1. Put the bytecode with the original script, with an ":if
has('bytecode')" around it, so that it's only used with a Vim that
@@ -1817,17 +1696,16 @@ Built-in script language:
specified in any way? To be able to jump to the last edited file.
8 Pass the executable name to the Vim scripts in some way. As v:argv0?
8 Add command arguments with three dashes, passed on to Vim scripts.
8 When starting to source a vim script, delete all functions that it has
previously defined? Avoids using ":fun!" all the time.
7 Add optional arguments to user functions:
:func myFunc(arg1, arg2, arg3 = "blah", arg4 = 17)
6 User functions: Functions local to buffer "b:func()"?
8 Add ":let var[{expr}] = {expr}". When past the end of "var" just ignore.
8 For Strings add ":let var[{expr}] = {expr}". When past the end of "var"
just ignore.
8 The "= register should be writable, if followed by the name of a variable,
option or environment variable.
8 ":let &option" should list the value of the option.
7 Add synIDlist(), making the whole list of syntax items on the
stack available (separated with '\n').
7 Add synIDlist(), making the whole list of syntax items on the syntax stack
available as a List.
8 Add autocommand-event for when a variable is changed:
:au VarChanged {varname} {commands}
8 Add "has("gui_capable")", to check if the GUI can be started.
@@ -2074,7 +1952,6 @@ Tags:
7 Can CTRL-] (jump to tag) include a following "." and "->" to restrict the
number of possible matches? Check tags file for an item that has members.
(Flemming Madsen)
7 Count before CTRL-]: jump to N'th match
8 Scope arguments for ":tag", e.g.: ":tag class:cPage open", like Elvis.
8 When output of ":tselect" is long, getting the more-prompt, should be able
to type the tag number directly.
@@ -2231,6 +2108,7 @@ GUI:
Autocommands:
- Put autocommand event names in a hashtable for faster lookup?
7 For autocommand events that trigger multiple times per buffer (e.g.,
CursorHold), go through the list once and cache the result for a specific
buffer. Invalidate the cache when adding/deleting autocommands or
@@ -2315,6 +2193,7 @@ Autocommands:
Insert mode completion/expansion:
- GUI implementation of the popup menu.
8 When there is no word before the cursor but something like "sys." complete
with "sys.". Works well for C and similar languages.
9 ^X^L completion doesn't repeat correctly. It uses the first match with
@@ -2658,6 +2537,9 @@ Visual mode:
- When dragging the Visual selection with the mouse and 'scrolloff' is zero,
behave like 'scrolloff' is one, so that the text scrolls when the pointer
is in the top line.
- Displaying size of Visual area: use 24-33 column display.
When selecting multiple lines, up to about a screenful, also count the
characters.
8 When using "I" or "A" in Visual block mode, short lines do not get the new
text. Make it possible to add the text to short lines too, with padding
where needed.
@@ -2923,6 +2805,11 @@ Searching:
Undo:
- Persistent undo: store undo in a file.
Use timestamps, so that a version a certain time ago can be found and info
before some time/date can be flushed. 'undopersist' gives maximum time to
keep undo: "3h", "1d", "2w", "1y", etc. For the file use dot and
extension: ".filename.un~" (like swapfile but "un~" instead of "swp").
- Make it possible to undo all the commands from a mapping, including a
trailing unfinished command, e.g. for ":map K iX^[r".
- When accidentally hitting "R" instead of Ctrl-R, further Ctrl-R is not

View File

@@ -1,4 +1,4 @@
*undo.txt* For Vim version 7.0aa. Last change: 2003 Oct 21
*undo.txt* For Vim version 7.0aa. Last change: 2006 Feb 28
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -10,7 +10,8 @@ The basics are explained in section |02.5| of the user manual.
1. Undo and redo commands |undo-commands|
2. Two ways of undo |undo-two-ways|
3. Remarks about undo |undo-remarks|
3. Undo blocks |undo-blocks|
4. Remarks about undo |undo-remarks|
==============================================================================
1. Undo and redo commands *undo-commands*
@@ -72,7 +73,36 @@ Rationale: Nvi uses the "." command instead of CTRL-R. Unfortunately, this
words, in Nvi it does nothing.
==============================================================================
3. Remarks about undo *undo-remarks*
3. Undo blocks *undo-blocks*
One undo command normally undoes a typed command, no matter how many changes
that command makes. This sequence of undo-able changes forms an undo block.
Thus if the typed key(s) call a function, all the commands in the function are
undone together.
If you want to write a function or script that doesn't create a new undoable
change but joins in with the previous change use this command:
*:undoj* *:undojoin*
:undoj[oin] Join further changes with the previous undo block.
Warning: Use with care, it may prevent the user from
properly undoing changes.
{not in Vi}
This is most useful when you need to prompt the user halfway a change. For
example in a function that calls |getchar()|. Do make sure that there was a
related change before this that you must join with.
This doesn't work by itself, because the next key press will start a new
change again. But you can do something like this: >
:undojoin | delete
After this an "u" command will undo the delete command and the previous
change.
==============================================================================
4. Remarks about undo *undo-remarks*
The number of changes that are remembered is set with the 'undolevels' option.
If it is zero, the Vi-compatible way is always used. If it is negative no

View File

@@ -1,4 +1,4 @@
*usr_08.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
*usr_08.txt* For Vim version 7.0aa. Last change: 2006 Feb 25
VIM USER MANUAL - by Bram Moolenaar
@@ -17,6 +17,7 @@ side by side. All this is possible with split windows.
|08.6| Commands for all windows
|08.7| Viewing differences with vimdiff
|08.8| Various
|08.9| Tab pages
Next chapter: |usr_09.txt| Using the GUI
Previous chapter: |usr_07.txt| Editing more than one file
@@ -504,6 +505,95 @@ window is to appear:
:topleft {cmd} at the top or left of the Vim window
:botright {cmd} at the bottom or right of the Vim window
==============================================================================
*08.9* Tab pages
You will have noticed that windows never overlap. That means you quickly run
out of screen space. The solution for this is called Tab pages.
Assume you are editing "thisfile". To create a new tab page use this command: >
:tabedit thatfile
This will edit the file "thatfile" in a window that occupies the whole Vim
window. And you will notice a bar at the top with the two file names:
+----------------------------------+
| thisfile | /thatfile/ __________X| (thatfile is bold)
|/* thatfile */ |
|that |
|that |
|~ |
|~ |
|~ |
| |
+----------------------------------+
You now have two tab pages. The first one has a window for "thisfile" and the
second one a window for "thatfile". It's like two pages that are on top of
eachother, with a tab sticking out of each page showing the file name.
Now use the mouse to click on "thisfile" in the top line. The result is
+----------------------------------+
| /thisfile/ | thatfile __________X| (thisfile is bold)
|/* thisfile */ |
|this |
|this |
|~ |
|~ |
|~ |
| |
+----------------------------------+
Thus you can switch between tab pages by clicking on the label in the top
line. If you don't have a mouse or don't want to use it, you can use the "gt"
command. Mnemonic: Goto Tab.
Now let's create another tab page with the command: >
:tab split
This makes a new tab page with one window that is editing the same buffer as
the window we were in:
+-------------------------------------+
| thisfile | /thisfile/ | thatfile __X| (thisfile is bold)
|/* thisfile */ |
|this |
|this |
|~ |
|~ |
|~ |
| |
+-------------------------------------+
You can put ":tab" before any Ex command that opens a window. The window will
be opened in a new tab page. Another example: >
:tab help gt
Will show the help text for "gt" in a new tab page.
A few more things you can do with tab pages:
- click with the mouse in the space after the last label
The next tab page will be selected, like with "gt".
- click with the mouse on the "X" in the top right corner
The current tab page will be closed. Unless there are unsaved
changes in the current tab page.
- double click with the mouse in the top line
A new tab page will be created.
- the "tabonly" command
Closes all tab pages except the current one. Unless there are unsaved
changes in other tab pages.
For more information about tab pages see |tab-page|.
==============================================================================
Next chapter: |usr_09.txt| Using the GUI

View File

@@ -1,4 +1,4 @@
*usr_12.txt* For Vim version 7.0aa. Last change: 2004 Dec 29
*usr_12.txt* For Vim version 7.0aa. Last change: 2006 Feb 26
VIM USER MANUAL - by Bram Moolenaar
@@ -273,7 +273,7 @@ To display a man page for the word under the cursor, use this: >
For example, you want to know the return value of "strstr()" while editing
this line:
if (strstr(input, "aap") == ) ~
if ( strstr (input, "aap") == ) ~
Move the cursor to somewhere on "strstr" and type "\K". A window will open
to display the man page for strstr().

View File

@@ -1,4 +1,4 @@
*usr_31.txt* For Vim version 7.0aa. Last change: 2003 Oct 21
*usr_31.txt* For Vim version 7.0aa. Last change: 2006 Feb 28
VIM USER MANUAL - by Bram Moolenaar
@@ -76,7 +76,7 @@ Will start the browser in "/usr".
When you are not using the GUI version, you could use the file explorer window
to select files like in a file browser. However, this doesn't work for the
":browse" command. See |file-explorer|.
":browse" command. See |netrw-browse|.
==============================================================================
*31.2* Confirmation

View File

@@ -1,4 +1,4 @@
*usr_41.txt* For Vim version 7.0aa. Last change: 2005 Nov 30
*usr_41.txt* For Vim version 7.0aa. Last change: 2006 Feb 22
VIM USER MANUAL - by Bram Moolenaar
@@ -834,7 +834,7 @@ For people who like short functions, this does the same thing: >
: return a:num2
:endfunction
A user defined function is called in exactly the same way as a builtin
A user defined function is called in exactly the same way as a built-in
function. Only the name is different. The Min function can be used like
this: >
@@ -2245,7 +2245,7 @@ organize your functions in library scripts. But you must use function names
where the part before the '#' matches the script name. Otherwise Vim would
not know what script to load.
If you get really enthousiastic and write lots of library scripts, you may
If you get really enthusiastic and write lots of library scripts, you may
want to use subdirectories. Example: >
call netlib#ftp#read('somefile')

View File

@@ -1,4 +1,4 @@
*various.txt* For Vim version 7.0aa. Last change: 2006 Jan 08
*various.txt* For Vim version 7.0aa. Last change: 2006 Mar 05
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -55,14 +55,16 @@ ga Print the ascii value of the character under the
The <Nul> character in a file is stored internally as
<NL>, but it will be shown as:
<^@> 0, Hex 00, Octal 000 ~
If the character has composing characters these are
also shown. The value of 'maxcombine' doesn't matter.
Mnemonic: Get Ascii value. {not in Vi}
*g8*
g8 Print the hex values of the bytes used in the
character under the cursor, assuming it is in |UTF-8|
encoding. This also shows composing characters.
Example of a character with three composing
characters:
encoding. This also shows composing characters. The
value of 'maxcombine' doesn't matter.
Example of a character with two composing characters:
e0 b8 81 + e0 b8 b9 + e0 b9 89 ~
{not in Vi}
@@ -94,7 +96,8 @@ g8 Print the hex values of the bytes used in the
*:nu* *:number*
:[range]nu[mber] [count] [flags]
Same as :print, but precede each line with its line
number. (See also 'highlight' option).
number. (See also 'highlight' and 'numberwidth'
option).
See |ex-flags| for [flags].
*:#*

View File

@@ -1,4 +1,4 @@
*version7.txt* For Vim version 7.0aa. Last change: 2006 Feb 17
*version7.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -23,6 +23,8 @@ Spell checking |new-spell|
Omni completion |new-omni-completion|
MzScheme interface |new-MzScheme|
Printing multi-byte text |new-print-multi-byte|
Extended Unicode support |new-more-unicode|
Highlighting matching parens |new-matchparen|
Translated manual pages |new-manpage-trans|
Internal grep |new-vimgrep|
Scroll back in messages |new-scroll-back|
@@ -131,6 +133,12 @@ compatibility problems and because "SS" can't be changed back to a sharp s.
that could be the function argument without type. Now it finds the position
where the type is given.
The line continuation in functions was not taken into account, line numbers in
errors were logical lines, not lines in the sourced file. That made it
difficult to locate errors. Now the line number in the sourced file is
reported, relative to the function start. This also means that line numbers
for ":breakadd func" are different.
==============================================================================
NEW FEATURES *new-7*
@@ -227,6 +235,37 @@ The 'printmbcharset' and 'printmbfont' options are used for this.
Also see |postscript-cjk-printing|. (Mike Williams)
Extended Unicode support *new-more-unicode*
------------------------
Previously only two combining characters were displayed. The limit is now
raised to 6. This can be set with the 'maxcombine' option. The default is
still 2.
|ga| now shows all combining characters, not just the first two.
Previously only 16 bit Unicode characters were supported for displaying. Now
the full 32 bit character set can be used. Unless manually disabled at
compile time.
For pattern matching it is now possible to search for individual composing
characters. |patterns-composing|
Highlighting matching parens *new-matchparen*
----------------------------
When moving the cursor through the text and it is on a paren, then the
matching paren can be highlighted. This uses the new |CursorMoved|
autocommand event.
See |matchparen| for more information.
The plugin uses the |:match| command. It now supports three match patterns.
The plugin uses the third one. The first one is for the user and the second
one can be used by another plugin.
Translated manual pages *new-manpage-trans*
-----------------------
@@ -388,6 +427,14 @@ CTRL-W <Enter> In the quickfix window: opens a new window to show the
<A-RightMouse> ('mousemodel' "extend")
Make a blockwise selection. |<A-LeftMouse>|
gF Start editing the filename under the cursor and jump
to the line number following the file name.
(Yegappan Lakshmanan)
CTRL-W F Start editing the filename under the cursor in a new
window and jump to the line number following the file
name. (Yegappan Lakshmanan)
Insert mode commands: ~
CTRL-\ CTRL-O Execute a Normal mode command. Like CTRL-O but
@@ -491,6 +538,8 @@ Win32: The ":winpos" command now also works in the console. (Vipin Aravind)
|:lcscope| Like |:cscope| but use the location list.
|:ltag| Jump to a tag and add matching tags to a location list.
|:undojoin| Join a change with the previous undo block.
Ex command modifiers: ~
@@ -522,6 +571,8 @@ New and extended functions: ~
|complete_check()| check for key pressed, for 'completefunc'
|copy()| make a shallow copy of a List or Dictionary
|count()| count nr of times a value is in a List or Dictionary
|cursor()| also accepts an offset for 'virtualedit', and
the first argument can be a list: [lnum, col, off]
|deepcopy()| make a full copy of a List or Dictionary
|empty()| check if List or Dictionary is empty
|getloclist()| list of location list items (Yegappan Lakshmanan)
@@ -542,6 +593,7 @@ New and extended functions: ~
|getfperm()| get file permission string (Nikolai Weibull)
|getftype()| get type of file (Nikolai Weibull)
|getline()| with second argument: get List with buffer lines
|getpos()| return a list with the position of cursor, mark, etc.
|has_key()| check whether a key appears in a Dictionary
|inputlist()| select an entry from a list
|insert()| insert an item somewhere in a List
@@ -574,6 +626,8 @@ New and extended functions: ~
|taglist()| get list of matching tags (Yegappan Lakshmanan)
|tr()| translate characters (Ron Aaron)
|values()| get List of Dictionary values
|winrestview()| restore the view of the current window
|winsaveview()| save the view of the current window
|writefile()| write a list of lines into a file
User defined functions can now be loaded automatically from the "autoload"
@@ -649,11 +703,16 @@ different value.
VHDL indent file (Gerald Lai)
MGL syntax file. (Gero Kuhlmann)
rd syntax file. (Johannes Ranke)
New Keymaps: ~
Sinhala (Sri Lanka) (Harshula Jayasuriya)
Tamil in TSCII encoding (Yegappan Lakshmanan)
New message translations: ~
@@ -723,6 +782,9 @@ other Vim to the foreground.
When starting Vim with a "-t tag" argument, there is an existing swapfile and
the user selects "quit" or "abort" then exit Vim.
Undo now also restores the '< and '> marks. "gv" selects the same area as
before the change and undo.
==============================================================================
IMPROVEMENTS *improvements-7*
@@ -779,7 +841,14 @@ Added the "count" argument to match(), matchend() and matchstr(). (Ilya Sher)
winnr() takes an optional "$" and "#" arguments. (Nikolai Weibull, Yegappan
Lakshmanan)
Added 's' flag to search(): set ' mark if cursor moved. (Yegappan Lakshmanan)
Added 'n' flag to search(): don't move the cursor. (Nikolai Weibull)
Added 'c' flag to search(): accept match at the cursor.
Added 'e' flag to search(): move to end of the match. (Benji Fisher)
Added 'p' flag to search(): return number of sub-pattern. (Benji Fisher)
These also apply to searchpos(), searchpair() and searchpairpos().
The search() and searchpair() functions have an extra argument to specify
where to stop searching. Speeds up searches that should not continue too far.
When uncompressing fails in the gzip plugin, give an error message but don't
delete the raw text. Helps if the file has a .gz extension but is not
@@ -798,9 +867,6 @@ upper case. Add color support to the builtin vt320 terminal codes.
For the '%' item in 'viminfo', allow a number to set a maximum for the number
of buffers.
The 'statusline' option can be local to the window, so that each window can
have a different value. (partly by Yegappan Lakshmanan)
When a file looks like a shell script, check for an "exec" command that starts
the tcl interpreter. (suggested by Alexios Zavras)
@@ -814,6 +880,10 @@ list.
Win32: When libintl.dll supports bind_textdomain_codeset(), use it.
(NAKADAIRA Yukihiro)
Win32: Vim was not aware of hard links on NTFS file systems. These are
detected now for when 'backupcopy' is "auto". Also fixed a bogus "file has
been changed since reading it" error for links.
When foldtext() finds no text after removing the comment leader, use the
second line of the fold. Helps for C-style /* */ comments where the first
line is just "/*".
@@ -937,9 +1007,6 @@ Lakshmanan)
Win32: Balloons can have multiple lines if common controls supports it.
(Sergey Khorev)
The 's' flag is added to the search() and searchpair() function to set the
' mark if the cursor is moved. (Yegappan Lakshmanan)
For 'errorformat' it was not possible to have a file name that contains the
character that follows after "%f". For example, in "%f:%l:%m" the file name
could not contain ":". Now include the first ":" where the rest of the
@@ -1016,6 +1083,24 @@ Insert mode completion for whole lines now also searches unloaded buffers.
The colortest.vim script can now be invoked directly with ":source" or
":runtime".
The 'statusline' option can be local to the window, so that each window can
have a different value. (partly by Yegappan Lakshmanan)
The 'statusline' option and other options that support the same format can now
use these new features:
- When it starts with "%!" the value is first evaluated as an expression
before parsing the value.
- "%#HLname#" can be used to start highlighting with HLname.
When 'statusline' is set to something that causes an error message then it is
made empty to avoid an endless redraw loop. Also for other options, such at
'tabline'. ":verbose set statusline" will mention that it was set in an error
handler.
When there are several matching tags, the ":tag <name>" and CTRL-] commands
jump to the [count] matching tag. (Yegappan Lakshmanan)
==============================================================================
COMPILE TIME CHANGES *compile-changes-7*
@@ -1023,13 +1108,6 @@ Dropped the support for the BeOS and Amiga GUI. They were not maintained and
probably didn't work. If you want to work on this: get the Vim 6.x version
and merge it back in.
Mac: "make" now creates the Vim.app directory and "make install" copies it to
its final destination. (Raf)
Mac: Made it possible to compile with Motif, Athena or GTK without tricks and
still being able to use the MacRoman conversion. Added the os_mac_conv.c
file.
When running the tests and one of them fails to produce "test.out" the
following tests are still executed. This helps when running out of memory.
@@ -1047,10 +1125,34 @@ functions.
Moved unix_expandpath() to misc1.c, so that it can also be used by os_mac.c
without copying the code.
Mac: When running "make install" the runtime files are installed as for Unix.
--- Mac ---
"make" now creates the Vim.app directory and "make install" copies it to its
final destination. (Raf)
Made it possible to compile with Motif, Athena or GTK without tricks and still
being able to use the MacRoman conversion. Added the os_mac_conv.c file.
When running "make install" the runtime files are installed as for Unix.
Avoids that too many files are copied. When running "make" a link to the
runtime files is created to avoid a recursive copy that takes much time.
Configure will attempt to build Vim for both Intel and PowerPC. The
--with-mac-arch configure argument can change it.
--- Win32 ---
The Make_mvc.mak file was adjusted to work with the latest MS compilers,
including the free version of Visual Studio 2005. (George Reilly)
INSTALLpc.txt was updated for the recent changes. (George Reilly)
The distributed executable is now produced with the free Visual C++ Toolkit
2003 and other free SDK chunks. msvcsetup.bat was added to support this.
Also generate the .pdb file that can be used to generate a useful crash report
on MS-Windows. (George Reilly)
==============================================================================
BUG FIXES *bug-fixes-7*
@@ -1147,6 +1249,9 @@ just before it is invoked
VMS: Occasionally CR characters were inserted in the file. Expansion of
environment variables was not correct. (Zoltan Arpadffy)
VMS: Improved low level char input (affects just console mode). (Zoltan
Arpadffy)
UTF-8: When 'delcombine' is set "dw" only deleted the last combining character
from the first character of the word.
@@ -1707,4 +1812,54 @@ event that removed the balloon again. Ignore the key release event.
When "umask" is set such that nothing is writable then the viminfo file would
be written without write permission. (Julian Bridle)
Motif: In diff mode dragging one scrollbar didn't update the scrollbar of the
other diff'ed window.
When editing in an xterm with a different number of colors than expected the
screen would be cleared and redrawn, causing the message about the edited file
to be cleared. Now set "keep_msg" to redraw the last message.
For a color terminal: When the Normal HL uses bold, possibly to make the color
lighter, and another HL group specifies a color it might become light as well.
Now reset bold if a HL group doesn't specify bold itself.
When using 256 color xterm the color 255 would show up as color 0. Use a
short instead of a char to store the color number.
ml_get errors when searching for "\n\zs" in an empty file.
When selecting a block and using "$" to select until the end of every line and
not highlighting the character under the cursor the first character of the
block could be unhighlighted.
When counting words for the Visual block area and using "$" to select until
the end of every line only up to the length of the last line was counted.
"dip" in trailing empty lines left one empty line behind.
The script ID was only remembered globally for each option. When a buffer- or
window-local option was set the same "last set" location was changed for all
buffers and windows. Now remember the script ID for each local option
separately.
GUI: The "Replace All" button didn't handle backslashes in the replacement in
the same way as "Replace". Escape backslashes so that they are taken
literally.
When using Select mode from Insert mode and typing a key, causing lines to be
deleted and a message displayed, delayed the effect of inserting the key.
Now overwrite the message without delay.
When 'whichwrap' includes "l" then "dl" and "yl" on a single letter line
worked differently. Now recognize all operators when using "l" at the end of
a line.
GTK GUI: when the font selector returned a font name with a comma in it then
it would be handled like two font names. Now put a backslash before the
comma.
MS-DOS, Win32: When 'encoding' defaults to "latin1" then the value for
'iskeyword' was still for CPxxx. And when 'nocompatible' was set 'isprint'
would also be the wrong value.
vim:tw=78:ts=8:ft=help:norl:

View File

@@ -0,0 +1,574 @@
.\" Traduction Lundi 7 août 2000 par Richard Hitier
.\" (richard.hitier@dial.oleane.com)
.\" Mise à jour de la traduction par David Blanchet
.\" (david.blanchet@free.fr) 2005-01-17
.\"
.TH VIM 1 "22 Février 2002"
.SH NOM
vim \- Vi IMproved, éditeur de texte pour programmeurs
.SH SYNOPSIS
.br
.B vim
[options] [fichier ...]
.br
.B vim
[options] \-
.br
.B vim
[options] \-t marqueur
.br
.B vim
[options] \-q [fichiererreurs]
.PP
.br
.B ex
.br
.B view
.br
.B gvim
.B gview
.B evim
.B eview
.br
.B rvim
.B rview
.B rgvim
.B rgview
.SH DESCRIPTION
.B Vim
est un éditeur de texte proposant une compatibilité ascendante
avec Vi. Il permet d'éditer n'importe quel type de texte brut.
Il est particulièrement adapté pour l'édition des programmes.
.PP
Il comporte de nombreuses améliorations par rapport à Vi : annulation sur
plusieurs niveaux, fenêtres et tampons multiples, coloration syntaxique,
édition en ligne de commande, complètement des noms de fichiers, aide en
ligne, sélection visuelle, etc.
Voir ":help vi_diff.txt" pour un résumé des différences entre
.B Vim
et Vi.
.PP
Pendant l'exécution de
.B Vim
\, une aide abondante est accessible au travers du système d'aide
en ligne, grâce à la commande ":help".
Voir la section AIDE EN LIGNE plus bas.
.PP
Le plus souvent
.B Vim
est démarré pour éditer un unique fichier avec la commande
.PP
vim fichier
.PP
Plus généralement,
.B Vim
est lancé avec :
.PP
vim [options] [listefichiers]
.PP
Si la listefichiers est omise, l'éditeur démarre avec un tampon vide.
Autrement, l'une des quatre méthodes suivantes vous permettra de choisir
un ou plusieurs fichiers à éditer.
.TP 12
fichier ...
Une liste de noms de fichiers.
Le premier sera le fichier courant et sera lu dans le tampon.
Le curseur sera placé sur la première ligne du tampon.
Vous pouvez passer aux autres fichiers avec la commande ":next".
Pour éditer un fichier débutant par un tiret, faites précéder la
liste de fichiers par "\-\-".
.TP
\-
Le fichier à éditer est lu sur l'entrée standard (stdin). Les commandes sont
lues depuis stderr, qui devrait être un terminal.
.TP
\-t {marqueur}
Le fichier à éditer et la position initiale du curseur dépendent
d'un "marqueur", qui est une sorte d'étiquette.
{marqueur} est recherché dans le fichier des marqueurs, le fichier correspondant
devient le fichier courant et la commande associée est exécutée.
Principalement utile pour les programmes en C ; dans ce cas, {marqueur}
peut être le nom d'une fonction.
Au final, le fichier contenant cette fonction devient le fichier
courant et le curseur est placé au début de la fonction.
Voir ":help tag\-commands".
.TP
\-q [fichiererreurs]
Démarre en mode Mise-au-point (QuickFix).
Le fichier [fichiererreurs] est lu et la première erreur est affichée.
Si [fichiererreurs] est omis, le nom du fichier est lu dans
l'option 'errorfile' ("AztecC.Err" par défaut sur Amiga, "errors.err" sur les
autres systèmes).
La commande ":cn" permet de sauter aux erreurs suivantes.
Voir ":help quickfix".
.PP
.B Vim
se comporte différemment selon le nom de la commande (l'exécutable peut
cependant être le même fichier).
.TP 10
vim
La façon "normale", le comportement par défaut.
.TP
ex
Démarre en mode Ex.
La commande ":vi" permet de passer en mode Normal.
Ce mode est également accessible avec l'argument "\-e".
.TP
view
Démarre en mode Lecture-Seule. Vous êtes protégé de l'écriture accidentelle
des fichiers. Ce mode est également accessible avec l'argument "\-R".
.TP
gvim gview
La version graphique.
Ouvre une nouvelle fenêtre.
Également accessible avec l'argument "\-g".
.TP
evim eview
La version graphique en mode Débutant (easy).
Ouvre une nouvelle fenêtre.
Également accessible avec l'argument "\-y".
.TP
rvim rview rgvim rgview
Comme ci-dessus, mais avec des restrictions. Il vous sera impossible de
lancer des commandes du shell, ou de suspendre
.B Vim.
Également accessible avec l'argument "\-Z".
.SH OPTIONS
Les options peuvent être spécifiées dans n'importe quel ordre,
avant ou après les noms de fichiers. Les options sans arguments
peuvent être combinées après un unique tiret.
.TP 12
+[num]
Place le curseur sur la ligne "num" dans le premier fichier.
Si "num" est omis, le curseur sera placé sur la dernière ligne.
.TP
+/{motif}
Place le curseur sur la première occurence de {motif} dans le premier fichier.
Voir ":help search\-pattern" pour connaître les motifs de recherches
disponibles.
.TP
+{commande}
.TP
\-c {commande}
Exécute {commande} après la lecture du premier fichier.
{commande} est interprétée comme une commande Ex.
Si la {commande} contient des espaces, elle doit être entourée
de doubles-apostrophes (cela dépend du shell utilisé).
Exemple: Vim "+set si" main.c
.br
Note : vous pouvez utiliser jusqu'à 10 commandes "+" ou "\-c".
.TP
\-S {fichier}
Source {fichier} après la lecture du premier fichier.
C'est équivalent à \-c "source {fichier}".
{fichier} ne peut pas débuter par un '\-'.
Si {fichier} est omis, "Session.vim" est utilisé (cela ne fonctionne que si
\-S est le dernier argument).
.TP
\-\-cmd {commande}
Comme "\-c", mais la commande est exécutée juste avant de traiter les fichiers
vimrc.
Vous pouvez utiliser jusqu'à 10 de ces commandes, indépendamment des
commandes "\-c".
.TP
\-A
Si
.B Vim
a été compilé avec le support de la fonctionnalité ARABIC pour l'édition de
fichiers de droite à gauche et les claviers arabes, cette option lance
.B Vim
en mode Arabe, c.-à-d. que l'option 'arabic' est activée.
Sinon, un message d'erreur est émis et
.B Vim
quitte.
.TP
\-b
Mode Binaire.
Active plusieurs options pour permettre l'édition
d'un fichier binaire ou exécutable.
.TP
\-C
Compatible. Active l'option 'compatible'.
.B Vim
se comportera alors quasiment comme Vi, même s'il existe un fichier .vimrc.
.TP
\-d
Démarre en mode Diff.
Deux ou trois noms de fichiers doivent être spécifiés.
.B Vim
ouvrira alors tous les fichiers et affichera leurs différences.
Fonctionne comme vimdiff(1).
.TP
\-d {périph}
Ouvre {périph} pour l'utiliser comme terminal.
Uniquement sur Amiga.
Exemple:
"\-d con:20/30/600/150".
.TP
\-D
Debogage. Passe en mode Débogage lors de l'exécution de la première commande
d'un script.
.TP
\-e
Démarre
.B Vim
en mode Ex, comme si l'exécutable s'appelait "ex".
.TP
\-E
Démarre
.B Vim
en mode Ex amélioré, comme si l'exécutable "exim" avait été invoqué.
.TP
\-f
Premier-plan (Foreground). Pour la version graphique,
.B Vim
ne forke pas et ne se détache pas du shell dans lequel il a été invoqué.
Sur Amiga,
.B Vim
n'est pas relancé pour ouvrir une nouvelle fenêtre.
Cette option est utile quand
.B Vim
est exécuté par un programme qui attend la fin de la session d'édition
(par exemple mail).
Sur Amiga, les commandes ":sh" et ":!" ne fonctionneront pas.
.TP
\-\-nofork
Premier-plan (Foreground). Pour la version graphique,
.B Vim
ne forkera pas et ne se détachera pas du shell dans lequel il a été lancé.
.TP
\-F
Si
.B Vim
a été compilé avec le support de la fonctionnalité FKMAP pour l'édition de
fichiers de droite à gauche et les claviers farsi, cette option lance
.B Vim
en mode Farsi, c.-à-d. avec les options 'fkmap' et 'rightleft' activées.
Sinon, un message d'erreur est émis et
.B Vim
quitte.
.TP
\-g
Si
.B Vim
a été compilé avec le support de l'IHM graphique, cette option active
l'IHM graphique. Si le support n'a pas été compilé, un message d'erreur
est émis et
.B Vim
quitte.
.TP
\-h
Donne une aide succinte sur les arguments et les options de la ligne de
commande. Après cela,
.B Vim
quitte.
.TP
\-H
Si
.B Vim
a été compilé avec le support de la fonctionnalité RIGHTLEFT pour l'édition de
fichiers de droite à gauche et les claviers hébreu, cette option lance
.B Vim
en mode Hebreu, c.-à-d. avec les options 'hkmap' et 'rightleft' activées.
Sinon, un message d'erreur est émis et
.B Vim
quitte.
.TP
\-i {viminfo}
Lorsque l'utilisation d'un fichier viminfo est activée, cette option indique
le nom de fichier à utiliser à la place de "~/.viminfo" par défaut.
Il est possible d'empêcher l'utilisation d'un fichier ".viminfo", en
spécifiant le nom de fichier "NONE".
.TP
\-L
Comme \-r.
.TP
\-l
Mode Lisp.
Active les options 'lisp' et 'showmatch'.
.TP
\-m
Empêche la modification des fichiers.
Désactive l'option 'write'.
Vous pouvez toujours modifier le tampon, mais il vous sera impossible
d'écrire le fichier.
.TP
\-M
N'autorise aucune modification. les options 'modifiable' et 'write' sont
desactivées, de sorte que les changements ne sont pas autorisés et que les
fichiers ne peuvent pas être écrits. Note : ces options peuvent être activées
pour autoriser les modifications.
.TP
\-N
Mode Non-compatible. Désactive l'option 'compatible'.
Cela améliorera le comportement de
.B Vim
\, mais il sera moins conforme à celui de Vi, même s'il n'existe aucun
fichier ".vimrc".
.TP
\-n
N'utilise pas de fichier d'échange (swapfile).
Le recouvrement après un plantage sera impossible.
Utile pour éditer un fichier sur un support très lent (disquette par ex.).
Également activable avec ":set uc=0".
Il est possible de l'annuler avec ":set uc=200".
.TP
\-nb
Devient un serveur d'édition pour NetBeans. Consulter la documentation à ce
sujet pour davantage de détails.
.TP
\-o[N]
Ouvre N fenêtres les unes au-dessus des autres.
Quand N est omis, ouvre une fenêtre pour chaque fichier.
.TP
\-O[N]
Ouvre N fenêtres côte à côte.
Quand N est omis, ouvre une fenêtre pour chaque fichier fichier.
.TP
\-R
Mode Lecture-Seule.
Active l'option 'readonly'.
Vous pouvez toujours éditer le tampon, mais il vous sera impossible de
d'écraser accidentellement un fichier.
Si vous voulez écraser un fichier, ajoutez un point d'exclamation à la commande
Ex, comme dans ":w!".
L'option \-R impose l'option \-n (voir ci-dessus).
L'option 'readonly' peut être désactivée avec ":set noro".
Voir ":help 'readonly'".
.TP
\-r
Donne la liste des fichiers d'échange, avec des informations pour les utiliser
à des fins de recouvrement.
.TP
\-r {file}
Mode Recouvrement.
Utilise le fichier d'échange pour récouvrer d'une session d'édition plantée.
Le fichier d'échange est un fichier avec le même nom que le fichier texte,
suivi du suffixe ".swp".
Voir ":help recovery".
.TP
\-s
Mode Silencieux. Disponible uniquement quand
.B Vim
est lancé en tant que "ex" ou quand l'option "\-e" a été spécifiée avant
l'option "\-s".
.TP
\-s {scriptEntrée}
Lit le fichier de script {scriptEntrée}.
Les caractères du fichier sont interprétés comme si vous les tapiez.
La commande ":source! {scriptEntrée}" donne le même résultat.
Si la fin du fichier est atteinte avant que l'éditeur quitte, les caractères
suivants sont lus depuis le clavier.
.TP
\-T {terminal}
Indique à
.B Vim
le nom du terminal utilisé.
Cela n'est requis que lorsque la détection automatique échoue.
Le {terminal} devrait être connu de
.B Vim
(intégré) ou défini dans le fichier termcap ou terminfo.
.TP
\-u {vimrc}
Utilise les commandes du fichier {vimrc} pour les initialisations.
Toutes les autres initialisations sont omises.
À utiliser pour éditer un type de fichiers particulier.
Cela permet aussi d'omettre toute initialisation en spécifiant le nom de
fichier "NONE".
Voir ":help initialization" dans Vim pour davantage de détails.
.TP
\-U {gvimrc}
Utilise les commandes du fichier {gvimrc} pour l'initialisation de l'IHM
graphique.
Toutes les autres initialisations graphiques sont omises.
Cela permet aussi d'omettre toute initialisation graphique en spécifiant le nom
de fichier "NONE".
Voir ":help gui\-init" dans Vim pour davantage de détails.
.TP
\-V[N]
Mode Verbeux.
Donne des messages à propos des fichiers sourcés, ainsi que sur la lecture
et les écritures dans le fichier viminfo. le nombre optionnel N précise la
valeur de l'option 'verbose' (10 par défaut).
.TP
\-v
Démarre
.B Vim
en mode Vi, comme si l'exécutable s'appelait "vi". Cela n'a d'effet que si
l'exécutable invoqué est "ex".
.TP
\-w {scriptSortie}
Tous les caractères que vous tapez sont enregistrés dans le fichier
{scriptSortie}, jusqu'à ce que vous quittiez
.B Vim.
C'est utile quand vous voulez créer un fichier de script à utiliser avec
"vim \-s" ou ":source!".
Si le fichier {scriptSortie} existe, les caractères sont ajoutés à la fin.
.TP
\-W {scriptSortie}
Comme \-w, mais un fichier existant sera écrasé.
.TP
\-x
Chiffre les fichiers lors de l'écriture. Une clé de chiffrement sera demandée.
.TP
\-X
Ne se connecte pas au serveur X. Accélère le temps de démarrage dans un
terminal, mais le titre de la fenêtre et le presse-papier seront inaccessibles.
.TP
\-y
Démarre
.B Vim
en mode Débutant (easy), comme si l'exécutable s'appelait "evim" ou "eview".
Donne à
.B Vim
un comportement plus proche des éditeurs « cliquez-tapez ».
.TP
\-Z
Mode restreint. Fonctionne comme si l'exécutable commençait par la lettre 'r'.
.TP
\-\-
Délimite la fin des options.
Les arguments qui suivent seront considérés comme des noms de fichiers.
Cela permet d'éditer des fichier débutant par un '\-'.
.TP
\-\-echo\-wid
IHM graphique GTK uniquement : retourne la Window ID sur stdout.
.TP
\-\-help
Donne un message d'aide et quitte, comme "\-h".
.TP
\-\-literal
Prend les arguments de noms de fichiers littéralement, sans étendre les
jokers. N'a aucun effet sur Unix, où le shell étend les jokers.
.TP
\-\-noplugin
Ne charge pas les greffons. Implicite avec \-u NONE.
.TP
\-\-remote
Se connecte à un serveur Vim et lui fait éditer les fichiers spécifiés dans
le reste des arguments. Si aucun serveur n'est trouvé, un avertissement est
émis et les fichiers sont édités dans le Vim courant.
.TP
\-\-remote\-expr {expr}
Se connecte à un serveur Vim, y évalue {expr} et affiche le résultat sur la
sortie standard (stdout).
.TP
\-\-remote\-send {touches}
Se connecte à un serveur Vim et y envoie {touches}.
.TP
\-\-remote\-silent
Comme \-\-remote, mais sans émettre d'avertissement si aucun serveur n'est
trouvé.
.TP
\-\-remote\-wait
Comme \-\-remote, mais Vim ne quitte pas tant que le fichier est en cours
d'édition.
.TP
\-\-remote\-wait\-silent
Comme \-\-remote\-wait, mais sans émettre d'avertissement si aucun serveur n'est
trouvé.
.TP
\-\-serverlist
Donne la liste des noms de tous les serveurs Vim disponibles.
.TP
\-\-servername {nom}
Utilise {nom} pour le nom de serveur. Ce nom est donné au Vim courant, à moins
qu'il ne soit utilisé avec un argument \-\-remote. Dans ce cas, il s'agit du nom
du serveur auquel se connecter.
.TP
\-\-socketid {id}
IHM graphique GTK+ uniquement : utilise le mécanisme GtkPlug pour faire
fonctionner gvim dans une autre fenêtre.
.TP
\-\-version
Affiche les informations sur la version puis quitte.
.SH AIDE EN LIGNE
Taper ":help" dans
.B Vim
pour commencer.
Taper ":help sujet" pour obtenir de l'aide sur un sujet précis.
Par exemple : ":help ZZ" pour consulter l'aide sur la commande "ZZ".
Utiliser <Tab> et CTRL\-D pour compléter les sujets (":help
cmdline\-completion").
Des marqueurs sont inclus dans l'aide et vous permettent de sauter d'un endroit
à un autre (comme des liens hypertextes, voir ":help").
L'ensemble des fichiers de la documentation peut être consulté de cette
façon, par exemple ":help syntax.txt".
.SH FICHIERS
.TP 15
/usr/local/lib/vim/doc/*.txt
Les fichiers de la documentation de
.B Vim.
Utiliser ":help doc\-file\-list" pour obtenir la liste complète.
.TP
/usr/local/lib/vim/doc/tags
Le fichier des marqueurs utilisé pour trouver les informations dans les
fichiers de la documentation.
.TP
/usr/local/lib/vim/syntax/syntax.vim
Initialisation de la syntaxe pour l'ensemble du système.
.TP
/usr/local/lib/vim/syntax/*.vim
Fichiers de syntaxe pour différents langages.
.TP
/usr/local/lib/vim/vimrc
Initialisation de
.B Vim
pour l'ensemble du système.
.TP
/usr/local/lib/vim/gvimrc
Initialisation de gvim pour l'ensemble du système.
.TP
/usr/local/lib/vim/optwin.vim
Script utilisé pour la commande ":options", une manière pratique de consulter
et de modifier les options.
.TP
/usr/local/lib/vim/menu.vim
Initialisation des menus de gvim pour l'ensemble du système.
.TP
/usr/local/lib/vim/bugreport.vim
Script pour générer un rapport de bogue. Voir ":help bugs".
.TP
/usr/local/lib/vim/filetype.vim
Script pour détecter le type d'un fichier d'après son nom.
Voir ":help 'filetype'".
.TP
/usr/local/lib/vim/scripts.vim
Script pour détecter le type d'un fichier d'après son contenu.
Voir ":help 'filetype'".
.TP
/usr/local/lib/vim/*.ps
Fichiers utilisés pour l'impression PostScript.
.PP
Pour disposer d'informations récentes, consulter le site Internet de VIM :
.br
<URL:http://www.vim.org/>
.SH VOIR AUSSI
vimtutor(1)
.SH AUTEUR
La majeure partie de
.B Vim
a été écrite par Bram Moolenaar, avec l'aide de nombreux autres contributeurs.
Voir ":help credits" dans
.B Vim.
.br
.B Vim
est basé sur Stevie, réalisé par Tim Thompson,
Tony Andrews et G.R. (Fred) Walter.
Toutefois, pratiquement rien du code original ne subsiste.
.SH BOGUES
Probablement.
Voir ":help todo" pour consulter la liste des problèmes connus.
.PP
NOTE : Remarquez que bon nombre de points, qui pourraient être considérés comme
des bugs par certains, sont en fait dus à une reproduction trop fidèle
du comportement de Vi. Et si vous pensez que d'autres points sont des
bugs "parce que Vi le fait différemment", vous devriez jeter un oeil
attentif au fichier vi_diff.txt (ou taper ":help vi_diff.txt" dans Vim).
Regardez aussi les options 'compatible' et 'coptions'.
.SH TRADUCTION
Cette page de manuel a été traduite par Richard Hitier.
<richard.hitier@dial.oleane.com> 2000-08-07.
.br
Cette page de manuel a été mise à jour par David Blanchet.
<david.blanchet@free.fr> 2005-01-17.

View File

@@ -1,4 +1,4 @@
*windows.txt* For Vim version 7.0aa. Last change: 2006 Jan 27
*windows.txt* For Vim version 7.0aa. Last change: 2006 Mar 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -68,6 +68,9 @@ inactive no no ' '
Note: All CTRL-W commands can also be executed with |:wincmd|, for those
places where a Normal mode command can't be used or is inconvenient.
The main Vim window can hold several split windows. There are also tab pages
|tab-page|, each of which can hold multiple windows.
==============================================================================
2. Starting Vim *windows-starting*
@@ -255,6 +258,9 @@ CTRL-W c *CTRL-W_c* *:clo* *:close*
:clo[se][!] Close current window. When the 'hidden' option is set, or
when the buffer was changed and the [!] is used, the buffer
becomes hidden (unless there is another window editing it).
When there is only one window in the current tab page and
there is another tab page, this closes the current tab page.
|tab-page|.
This command fails when: *E444*
- There is only one window on the screen.
- When 'hidden' is not set, [!] is not used, the buffer has
@@ -271,6 +277,8 @@ CTRL-W CTRL-C *CTRL-W_CTRL-C*
:hid[e] Quit current window, unless it is the last window on the
screen. The buffer becomes hidden (unless there is another
window editing it or 'bufhidden' is "unload" or "delete").
If the window is the last one in the current tab page the tab
page is closed. |tab-page|
The value of 'hidden' is irrelevant for this command.
Changes to the buffer are not written and won't get lost, so
this is a "safe" command.
@@ -551,6 +559,9 @@ can also get to them with the buffer list commands, like ":bnext".
Rearrange the screen to open one window for each argument.
All other windows are closed. When a count is given, this is
the maximum number of windows to open.
With the |:tab| modifier open a tab page for each argument.
When there are more arguments than 'tabpagemax' further ones
become split windows in the last tab page.
When the 'hidden' option is set, all buffers in closed windows
become hidden.
When 'hidden' is not set, and the 'autowrite' option is set,
@@ -620,7 +631,8 @@ can also get to them with the buffer list commands, like ":bnext".
CTRL-W w
:{cmd}
etc.
< When an error is detected on one window, further
< This only operates in the current tab page.
When an error is detected on one window, further
windows will not be visited.
The last window (or where an error occurred) becomes
the current window.
@@ -628,7 +640,7 @@ can also get to them with the buffer list commands, like ":bnext".
{cmd} must not open or close windows or reorder them.
{not in Vi} {not available when compiled without the
|+listcmds| feature}
Also see |:argdo| and |:bufdo|.
Also see |:tabdo|, |:argdo| and |:bufdo|.
*:bufdo*
:bufdo[!] {cmd} Execute {cmd} in each buffer in the buffer list.
@@ -654,7 +666,7 @@ can also get to them with the buffer list commands, like ":bnext".
each buffer.
{not in Vi} {not available when compiled without the
|+listcmds| feature}
Also see |:argdo| and |:windo|.
Also see |:tabdo|, |:argdo| and |:windo|.
Examples: >
@@ -704,6 +716,11 @@ CTRL-W CTRL-F Split current window in two. Edit file name under cursor.
{not available when the |+file_in_path| feature was disabled
at compile time}
CTRL-W F *CTRL-W_F*
Split current window in two. Edit file name under cursor and
jump to the line number following the file name. See |gF| for
details on how the line number is obtained.
Also see |CTRL-W_CTRL-I|: open window for an included file that includes
the keyword under the cursor.
@@ -939,9 +956,10 @@ list of buffers. |unlisted-buffer|
:bw[ipeout][!] {bufname}
:N,Mbw[ipeout][!]
:bw[ipeout][!] N1 N2 ...
Like |:bdelete|, but really delete the buffer. All marks in
this buffer become invalid, option settings are lost, etc.
Don't use this unless you know what you are doing.
Like |:bdelete|, but really delete the buffer. Everything
related to the buffer is lost. All marks in this buffer
become invalid, option settings are lost, etc. Don't use this
unless you know what you are doing.
:[N]bun[load][!] *:bun* *:bunload* *E515*
:bun[load][!] [N]
@@ -1073,6 +1091,8 @@ list of buffers. |unlisted-buffer|
of windows opened ('winwidth' if |:vertical| was prepended).
Buf/Win Enter/Leave autocommands are not executed for the new
windows here, that's only done when they are really entered.
When the |:tab| modifier is used new windows are opended in a
new tab, up to 'tabpagemax'.
Note: All the commands above that start editing another buffer, keep the
'readonly' flag as it was. This differs from the ":edit" command, which sets

View File

@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2006 Jan 12
" Last Change: 2006 Mar 05
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -891,6 +891,9 @@ au BufNewFile,BufRead *.mf setf mf
" MetaPost
au BufNewFile,BufRead *.mp setf mp
" MGL
au BufNewFile,BufRead *.mgl setf mgl
" MMIX or VMS makefile
au BufNewFile,BufRead *.mms call s:FTmms()
@@ -1294,6 +1297,9 @@ au BufNewFile,BufRead *.rexx,*.rex setf rexx
" R (Splus)
au BufNewFile,BufRead *.s,*.S setf r
" R Help file
au BufNewFile,BufRead *.rd,*.Rd setf rhelp
" Rexx, Rebol or R
au BufNewFile,BufRead *.r,*.R call s:FTr()
@@ -1655,19 +1661,29 @@ au BufNewFile,BufRead *.latex,*.sty,*.dtx,*.ltx,*.bbl setf tex
au BufNewFile,BufRead *.tex call s:FTtex()
fun! s:FTtex()
let n = 1
while n < 10 && n < line("$")
let line = getline(n)
if line =~ '^\s*\\\%(documentclass\>\|usepackage\>\|begin{\)'
setf tex
return
elseif line =~ '^\s*\\\%(start\l\+\|setup\l\+\|usemodule\)\>'
setf context
return
let lnum = 1
let checked = 0
while checked < 25 && lnum < line("$")
let line = getline(lnum)
if line !~ '^\s*%'
if line =~ '^\s*\\\%(documentclass\>\|usepackage\>\|begin{\|newcommand\>\|renewcommand\>\)'
setf tex
return
elseif line =~ '^\s*\\\%(start\a\+\|setup\a\+\|usemodule\|enablemode\|enableregime\|setvariables\|useencoding\|usesymbols\|stelle\a\+\|verwende\a\+\|stel\a\+\|gebruik\a\+\|usa\a\+\|imposta\a\+\|regle\a\+\|utilisemodule\)\>'
setf context
return
endif
let checked = checked + 1
endif
let n = n + 1
let lnum = lnum + 1
endwhile
setf tex
" Didn't recognize anything, guess.
if exists("g:tex_flavour") && g:tex_flavour == "context"
setf context
else
setf tex
endif
endfun
" Context

View File

@@ -51,6 +51,11 @@ if exists("loaded_matchit")
endif
" ###
if exists('&ofu')
setlocal ofu=phpcomplete#CompletePHP
endif
setlocal commentstring=/*%s*/
" Undo the stuff we changed.

View File

@@ -2,7 +2,7 @@
" Maintainer: Georg Dahn <gorgyd@yahoo.co.uk>
" Originally By: Marcin Dalecki <dalecki@cs.net.pl>
" Johannes Zellner <johannes@zellner.org>
" Last Change: Sun, 17 Apr 2005 18:28:58 CEST
" Last Change: Sun, 5 Mar 2006 07:20:00 CEST
" vim:set foldmethod=marker tabstop=8:
" Quit when menu translations have already been done.
@@ -21,6 +21,7 @@ endif
menutrans &File &Datei
menutrans &Open\.\.\.<Tab>:e &<26>ffnen\.\.\.<Tab>:e
menutrans Sp&lit-Open\.\.\.<Tab>:sp In\ geteiltem\ &Fenster\ <20>ffnen\.\.\.<Tab>:sp
menutrans Open\ Tab\.\.\.<Tab>:tabnew In\ neuem\ &Tab\ <20>ffnen\.\.\.<Tab>:tabnew
menutrans &New<Tab>:enew &Neue\ Datei<Tab>:enew
menutrans &Close<Tab>:close S&chlie<EFBFBD>en<Tab>:close
menutrans &Save<Tab>:w &Speichern<Tab>:w
@@ -100,6 +101,22 @@ menutrans &Keymap &Tastatur-Belegung
" }}} EDIT / EDITIEREN
" {{{ TOOLS / WERKZEUGE
if has("syntax")
menutrans &Spelling &Rechtschreibung
menutrans &Spell\ Check\ On &Rechtschreibung\ an
menutrans Spell\ Check\ &Off Rechtschreibung\ &aus
menutrans To\ &Next\ error<Tab>]s Zum\ &n<EFBFBD>chsten\ Fehler<Tab>]s
menutrans To\ &Previous\ error<Tab>[s Zum\ &letzten\ Fehler<Tab>[s
menutrans Suggest\ &Corrections<Tab>z? &Korrekturvorschl<EFBFBD>ge<Tab>z?
menutrans &Repeat\ correction<Tab>:spellrepall &Wiederhole\ Korrektur<Tab>:spellrepall
menutrans Set\ language\ to\ "en" Verwende\ W<EFBFBD>rterbuch\ "en"
menutrans Set\ language\ to\ "en_au" Verwende\ W<EFBFBD>rterbuch\ "en_au"
menutrans Set\ language\ to\ "en_ca" Verwende\ W<EFBFBD>rterbuch\ "en_ca"
menutrans Set\ language\ to\ "en_gb" Verwende\ W<EFBFBD>rterbuch\ "en_gb"
menutrans Set\ language\ to\ "en_nz" Verwende\ W<EFBFBD>rterbuch\ "en_nz"
menutrans Set\ language\ to\ "en_us" Verwende\ W<EFBFBD>rterbuch\ "en_us"
menutrans &Find\ More\ Languages &Suche\ nach\ W<EFBFBD>rterb<EFBFBD>chern
endif
if has("folding")
menutrans &Folding Fa&ltung
" open close folds
@@ -147,7 +164,7 @@ menutrans &Older\ List<Tab>:cold &
menutrans N&ewer\ List<Tab>:cnew &Neuere\ Liste<Tab>:cnew
menutrans Error\ &Window Feh&ler-Fenster
menutrans &Set\ Compiler &Compiler
menutrans Se&T\ Compiler &Compiler
menutrans &Update<Tab>:cwin &Aktualisieren<Tab>:cwin
menutrans &Open<Tab>:copen &<26>ffnen<Tab>:copen
menutrans &Close<Tab>:cclose &Schlie<EFBFBD>en<Tab>:cclose
@@ -184,7 +201,7 @@ menutrans [No\ File] [Keine\ Datei]
menutrans &Window &Ansicht
menutrans &New<Tab>^Wn &Neu<Tab>^Wn
menutrans S&plit<Tab>^Ws Aufs&palten<Tab>^Ws
menutrans Split\ &Vertically<Tab>^Wv &Vertikal\ Aufspalten<Tab>^Ws
menutrans Split\ &Vertically<Tab>^Wv &Vertikal\ Aufspalten<Tab>^Wv
menutrans Split\ File\ E&xplorer Ver&zeichnis
menutrans Sp&lit\ To\ #<Tab>^W^^ Aufspa&lten\ in\ #<Tab>^W^^
menutrans &Close<Tab>^Wc &Schlie<EFBFBD>en<Tab>^Wc
@@ -228,6 +245,8 @@ menutrans &Paste &Einf
menutrans &Delete &L<EFBFBD>schen
menutrans Select\ Blockwise Auswahl\ Blockartig
menutrans Select\ &Word Auswahl\ des\ &Wortes
menutrans Select\ &Sentence Auswahl\ des\ Sa&tzes
menutrans Select\ Pa&ragraph Auswahl\ des\ Absatzes
menutrans Select\ &Line Auswahl\ der\ &Zeile
menutrans Select\ &Block Auswahl\ des\ &Blocks
menutrans Select\ &All &Alles\ Ausw<EFBFBD>hlen

View File

@@ -2,7 +2,7 @@
" You can also use this as a start for your own set of menus.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2006 Feb 02
" Last Change: 2006 Mar 05
" Note that ":an" (short for ":anoremenu") is often used to make a menu work
" in all modes and avoid side effects from mappings defined by the user.
@@ -98,6 +98,7 @@ endfun
" File menu
an 10.310 &File.&Open\.\.\.<Tab>:e :browse confirm e<CR>
an 10.320 &File.Sp&lit-Open\.\.\.<Tab>:sp :browse sp<CR>
an 10.320 &File.Open\ Tab\.\.\.<Tab>:tabnew :browse tabnew<CR>
an 10.325 &File.&New<Tab>:enew :confirm enew<CR>
an <silent> 10.330 &File.&Close<Tab>:close
\ :if winheight(2) < 0 <Bar>
@@ -418,7 +419,7 @@ if has("spell")
an 40.335.120 &Tools.&Spelling.Spell\ Check\ &Off :set nospell<CR>
an 40.335.130 &Tools.&Spelling.To\ &Next\ error<Tab>]s ]s
an 40.335.130 &Tools.&Spelling.To\ &Previous\ error<Tab>[s [s
an 40.335.140 &Tools.&Spelling.Suggest\ &Corrections<Tab>z? z?
an 40.335.140 &Tools.&Spelling.Suggest\ &Corrections<Tab>z= z=
an 40.335.150 &Tools.&Spelling.&Repeat\ correction<Tab>:spellrepall :spellrepall<CR>
an 40.335.200 &Tools.&Spelling.-SEP1- <Nop>
an 40.335.210 &Tools.&Spelling.Set\ language\ to\ "en" :set spl=en spell<CR>

View File

@@ -1,7 +1,7 @@
" These commands create the option window.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2006 Jan 13
" Last Change: 2006 Mar 05
" If there already is an option window, jump to that one.
if bufwinnr("option-window") > 0
@@ -463,6 +463,17 @@ if has("scrollbind")
endif
call <SID>Header("multiple tab pages")
call append("$", "showtabline\t0, 1 or 2; when to use a tab pages line")
call append("$", " \tset stal=" . &stal)
call append("$", "tabpagemax\tmaximum number of tab pages to open for -p and \"tab all\"")
call append("$", " \tset tpm=" . &tpm)
call append("$", "tabline\tcustom tab pages line")
call <SID>OptionG("tal", &tal)
call append("$", "guitablabel\tcustom tab page label for the GUI")
call <SID>OptionG("gtl", &gtl)
call <SID>Header("terminal")
call append("$", "term\tname of the used terminal")
call <SID>OptionG("term", &term)
@@ -697,6 +708,11 @@ call <SID>OptionL("fo")
call append("$", "formatlistpat\tpattern to recognize a numbered list")
call append("$", "\t(local to buffer)")
call <SID>OptionL("flp")
if has("eval")
call append("$", "formatexpr\texpression used for \"gq\" to format lines")
call append("$", "\t(local to buffer)")
call <SID>OptionL("fex")
endif
if has("insert_expand")
call append("$", "complete\tspecifies how Insert mode completion works for CTRL-N and CTRL-P")
call append("$", "\t(local to buffer)")

View File

@@ -0,0 +1,104 @@
" Vim plugin for showing matching parens
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2006 Mar 04
" Exit quickly when:
" - this plugin was already loaded (or disabled)
" - when 'compatible' is set
" - the "CursorMoved" autocmd event is not availble.
if exists("g:loaded_matchparen") || &cp || !exists("##CursorMoved")
finish
endif
let g:loaded_matchparen = 1
augroup matchparen
" Replace all matchparen autocommands
autocmd! CursorMoved,CursorMovedI * call s:Highlight_Matching_Pair()
augroup END
let s:paren_hl_on = 0
" Skip the rest if it was already done.
if exists("*s:Highlight_Matching_Pair")
finish
endif
" The function that is invoked (very often) to define a ":match" highlighting
" for any matching paren.
function! s:Highlight_Matching_Pair()
" Remove any previous match.
if s:paren_hl_on
3match none
let s:paren_hl_on = 0
endif
" Avoid that we remove the popup menu.
if pumvisible()
return
endif
" Get the character under the cursor and check if it's in 'matchpairs'.
let c_lnum = line('.')
let c_col = col('.')
let before = 0
let c = getline(c_lnum)[c_col - 1]
let plist = split(&matchpairs, ':\|,')
let i = index(plist, c)
if i < 0
" not found, in Insert mode try character before the cursor
if c_col > 1 && (mode() == 'i' || mode() == 'R')
let before = 1
let c = getline(c_lnum)[c_col - 2]
let i = index(plist, c)
endif
if i < 0
" not found, nothing to do
return
endif
endif
" Figure out the arguments for searchpairpos().
" Restrict the search to visible lines with "stopline".
if i % 2 == 0
let s_flags = 'nW'
let c2 = plist[i + 1]
let stopline = line('w$')
else
let s_flags = 'nbW'
let c2 = c
let c = plist[i - 1]
let stopline = line('w0')
endif
if c == '['
let c = '\['
let c2 = '\]'
endif
" When not in a string or comment ignore matches inside them.
let s_skip ='synIDattr(synID(c_lnum, c_col - before, 0), "name") ' .
\ '=~? "string\\|comment"'
execute 'if' s_skip '| let s_skip = 0 | endif'
" Find the match. When it was just before the cursor move it there for a
" moment.
if before > 0
let save_cursor = getpos('.')
call cursor(c_lnum, c_col - before)
endif
let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline)
if before > 0
call setpos('.', save_cursor)
endif
" If a match is found setup match highlighting.
if m_lnum > 0 && m_lnum >= line('w0') && m_lnum <= line('w$')
exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) .
\ 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/'
let s:paren_hl_on = 1
endif
endfunction
" Define commands that will disable and enable the plugin.
command! NoMatchParen 3match none | unlet! g:loaded_matchparen | au! matchparen
command! DoMatchParen runtime plugin/matchparen.vim | doau CursorMoved

View File

@@ -3,17 +3,20 @@
" Last Update: 2006 Jan 19
" Time in seconds after last time an ll.xxxxx.add file was updated
" Default is one hour.
" Default is one second.
" If you invoke this script often set it to something bigger, e.g. 60 * 60
" (one hour)
if !exists("g:spell_clean_limit")
let g:spell_clean_limit = 60 * 60
let g:spell_clean_limit = 1
endif
" Loop over all the runtime/spell/*.add files.
" Delete all comment lines, except the ones starting with ##.
for s:fname in split(globpath(&rtp, "spell/*.add"), "\n")
if filewritable(s:fname) && localtime() - getftime(s:fname) > g:spell_clean_limit
silent exe "split " . escape(s:fname, ' \')
silent exe "tab split " . escape(s:fname, ' \')
echo "Processing" s:fname
silent! g/^#/d
silent! g/^#[^#]/d
silent update
close
endif

View File

@@ -1,5 +1,5 @@
*** sv_SE.orig.aff Wed Aug 31 21:00:19 2005
--- sv_SE.aff Fri Sep 30 14:09:19 2005
*** sv_SE.orig.aff 2003-08-14 14:00:32.000000000 +0200
--- sv_SE.aff 2006-02-21 20:33:31.687500000 +0100
***************
*** 6,7 ****
--- 6,22 ----
@@ -139,547 +139,82 @@
+ SAL <20> E
+ SAL <20>G(IE)-6 <09>K # vokal+g(ie) ger ej j-ljud
+ SAL <20> <09>
*** sv_SE.orig.dic 2003-08-14 13:02:06.000000000 +0200
--- sv_SE.dic 2005-10-15 18:15:52.171875000 +0200
*** sv_SE.orig.dic 2003-08-14 14:02:06.000000000 +0200
--- sv_SE.dic 2006-02-23 18:39:11.218750000 +0100
***************
*** 108,113 ****
--- 108,114 ----
adoption/ADHS
adoptivbarn/BDS
adoptivson/ADS
+ adr.
adrenalin/BS
adress/DHS
adressat/ADHS
***************
*** 608,613 ****
--- 609,615 ----
anl<6E>ps/S
anl<6E>pta/JRS
anm
+ anm.
anmaning/ADGS
anmoda/ABCDEFMNPS
anmodande/ACEFS
***************
*** 973,978 ****
--- 975,981 ----
arrogant/OS
arsenal/DHS
arsenik/DS
+ art.
art/ADHOS
arta/CHJMNPS
artefakt/DHS
***************
*** 1094,1099 ****
--- 1097,1103 ----
audiens/DHS
auditorie/CIS
auditorium/JS
+ aug.
August/A
augusti/AS
auktion/ADHS
***************
*** 2376,2381 ****
--- 2380,2386 ----
bikupa/AEGS
bikupe/S
bikups/S
+ bil.
bil/ADGS
bila/EGIJOS
bilaga/EGOS
***************
*** 2490,2495 ****
--- 2495,2501 ----
Bj<42>rn
bj<62>rn/ADGS
Bj<42>rns
+ bl.a.
bla/JS
black/DGS
blackout/DHS
***************
*** 3645,3650 ****
--- 3651,3657 ----
debut/ADHS
debutant/DHS
debutera/JMS
+ dec.
december/AS
decennie/CIS
decennium/AJS
***************
*** 4117,4122 ****
--- 4124,4130 ----
dotterson/ADS
Douglas
dov/OPS
+ dr
dra/AJS
drabant/DHS
drabba/ACMNPS
***************
*** 4315,4321 ****
duven/MS
dvala/EGJS
*** 4317,4319 ****
dvaldes/S
! dvs
dv<64>ljas/S
dv<64>ljes/S
dv<64>ljs/NS
--- 4323,4330 ----
duven/MS
dvala/EGJS
--- 4317,4319 ----
dvaldes/S
! dvs.
! d.v.s.
! #dvs Removed by Stefan.
dv<64>ljas/S
dv<64>ljes/S
dv<64>ljs/NS
***************
*** 4463,4468 ****
--- 4472,4478 ----
Ebbas
Ecuador/A
ed/ADHS
+ e.d.
Edberg/A
eder/AJMS
Edit/A
***************
*** 4612,4617 ****
--- 4622,4628 ----
ekorre/AEGS
ekosystem/BDS
ekos<6F>ndning/ADGS
*** 24490 ****
--- 24490,24554 ----
<EFBFBD>vila/MS
+
+ # Additions by Stefan:
+ SEK
+ adr.
+ anm.
+ art.
+ aug.
+ bl.a.
+ d.v.s.
+ dec.
+ dr
+ dvs.
+ e.Kr.
eksem/BDS
Eksj<73>/A
ekumenik/DS
***************
*** 4825,4830 ****
--- 4836,4842 ----
enkrona/EGS
enk<6E>t/DHS
Enk<6E>ping/A
+ e.d.
+ enl.
enlighet/S
enligt/S
enorm/OPS
***************
*** 4990,4995 ****
--- 5002,5008 ----
etanol/DS
etapp/DHS
etc
+ etc.
etcetera/S
eten/BDS
eter/ES
***************
*** 5334,5341 ****
--- 5347,5356 ----
favorisera/ACDMNPS
favorit/ADHS
fav<61>r/DHS
+ f.d.
fe/EFHS
feber/ES
+ febr.
febril/MOPS
februari/AS
federal/MOS
***************
*** 5451,5456 ****
--- 5466,5472 ----
fiffla/ACDMNS
fifflar/DJQS
fifflare/AEJS
+ fig.
figur/ADHS
figurativ/OS
figurera/ACJMNPS
***************
*** 5635,5640 ****
--- 5651,5657 ----
fj<66>sk/ABS
fj<66>ska/JMS
fj<66>ttra/CMNPS
+ f.Kr.
flack/OPS
flacka/ABCDJMNS
fladder/CS
***************
*** 5913,5918 ****
--- 5930,5936 ----
fortplanta/ACMNPS
fortplantning/ADGS
fortran/S
+ forts.
fortsatt/OQS
fortskrida/KS
forts<74>tta/AJS
***************
*** 6075,6080 ****
--- 6093,6099 ----
fras/DHS
frasa/BDHJMS
frasering/ADS
+ fre.
fred/ADS
freda/ACJMNPS
fredag/ADGS
***************
*** 6170,6175 ****
--- 6189,6195 ----
frivol/MOS
froda/ACMNPS
frodig/OS
+ fr.o.m.
from/KLMNS
fromhet/ADS
fromt/S
***************
*** 6453,6458 ****
--- 6473,6479 ----
f<>stman/AFS
f<>stm<74>/AEIS
f<>stning/ADGS
+ f.d.
+ f.n.
+ f.<2E>.
f<>da/ADEJKLRS
f<>dd/OQS
f<>delse/AES
***************
*** 10493,10498 ****
--- 10514,10520 ----
Jan/A
Janne/A
Janos
+ febr.
+ fig.
+ fil.kand.
+ fil.lic.
+ forts.
+ fr.o.m.
+ fre.
+ jan.
januari/AS
japan/DHS
Japans
***************
*** 10520,10525 ****
--- 10542,10548 ----
jetflyg/ABS
jetmotor/EHS
jetplan/ABDS
+ jfr
jiddisch/DS
Jimmy/A
jippo/ACES
***************
*** 10870,10875 ****
--- 10893,10899 ----
kaos/BS
kaotisk/OS
Kap
+ kap.
kap/BDS
kapa/ACJMNPS
kapabel/KMS
***************
*** 11119,11124 ****
--- 11143,11149 ----
Kjell/A
kjol/ADGS
kjortel/EIS
+ kl.
kl
klack/DGS
klacka/IJMS
***************
*** 13445,13450 ****
--- 13470,13476 ----
l<>pning/ADGS
l<>psedel/AEIS
l<>ptid/DS
+ l<>r.
l<>rdag/ADGS
l<>s/AORS
l<>sa/ABDJKLQRS
***************
*** 13783,13788 ****
--- 13809,13815 ----
Mauretanien/A
Mauritius
mausoleum/JS
+ max.
max
maxim/DHS
maximal/MOS
***************
*** 13965,13970 ****
--- 13992,13998 ----
mexikan/DHS
mexikanska/AEGS
Mexiko/A
+ m.fl.
mg
MHz
Michael/A
***************
*** 14016,14021 ****
--- 14044,14050 ----
milsl<73>ng/OS
milstolpe/AEGS
mimosa/AES
+ min.
min/ACDFHS
mina/HJS
minderv<72>rdig/OQRS
***************
*** 14136,14141 ****
--- 14165,14171 ----
mj<6D>lnar/DJQS
mj<6D>lnare/AEJS
ml
+ m.m.
mm
mo/AEGS
mobba/ACMNPS
***************
*** 14539,14544 ****
--- 14569,14575 ----
m<>lstyrd/OS
m<>ls<6C>ttning/ADGS
m<>ltid/ADHS
+ max.
+ min.
+ m<>n.
m<>n/DGQS
m<>na/IJMPRS
m<>nad/ADHQS
***************
*** 14792,14797 ****
--- 14823,14830 ----
neutron/DHS
nev<65>/ES
New
+ ngn
+ ngt
nia/EGJQS
Nicaragua/A
nick/DGS
***************
*** 14920,14931 ****
--- 14953,14966 ----
notifikation/ADS
notis/DHS
notorisk/OS
+ nov.
nova/AES
novell/DHS
novellmagasin/ABDS
novellsamling/ADGS
november/AS
novis/DHS
+ nr.
nr
nu/BS
nubb/S
***************
*** 15243,15248 ****
--- 15278,15284 ----
obrottslig/OS
obrukbar/MOS
obruten/MS
+ obs.
obs
observant/OPS
observation/ADHS
***************
*** 15470,15475 ****
--- 15506,15512 ----
okonventionell/MOS
okritisk/OS
okryddade/OS
+ okt.
oktagon/HS
oktal/MOS
oktav/DHS
***************
*** 15741,15746 ****
--- 15778,15784 ----
onjutbar/MOS
onkel/AES
onormal/MOS
+ ons.
onsdag/ADGS
onyanserade/OS
onykter/MS
***************
*** 15977,15983 ****
--- 16015,16023 ----
ostrukturerade/OS
ost<73>rd/OS
osund/OS
+ osv.
osv
+ o.s.v.
osvensk/OS
osviklig/OPS
osympatisk/OPQS
***************
*** 16378,16383 ****
--- 16418,16424 ----
petitum/ES
Petra/A
Pettersson/A
+ obs.
+ okt.
+ ons.
+ osv.
+ p.g.a.
pga
Philips
pi/FS
***************
*** 17457,17462 ****
--- 17498,17504 ----
resonabel/MS
resonemang/ABDS
resonera/ACMNS
+ resp.
resp/S
respekt/S
respektabel/LMS
***************
*** 18328,18333 ****
--- 18370,18376 ----
sentimentalitet/ADS
separat/OS
separera/ACMNPS
+ sept.
september/AS
seraf/DHS
serenad/DHS
***************
*** 18652,18657 ****
--- 18695,18701 ----
sj<73>slag/S
sj<73>ss/S
sj<73>pig/OS
+ s.k.
ska/GJMPS
skada/ABCDEGJMNPS
skadedjur/BDS
***************
*** 20767,20772 ****
--- 20811,20817 ----
s<>mnl<6E>s/OQRS
s<>mnl<6E>shet/ADS
s<>mnmedel/ACFS
+ sept.
+ s<>n.
s<>ndag/ADGS
s<>nder/S
s<>nderbruten/MS
***************
*** 20832,20837 ****
--- 20877,20883 ----
s<>v<EFBFBD>l/S
s<>v<EFBFBD>rst/S
ta/AKRS
+ tab.
tabbe/S
tabell/DHS
tabernaklet/AS
***************
*** 21063,21068 ****
--- 21109,21115 ----
testar/DJQS
testare/AEJS
testning/ADGS
+ t.ex.
tex
Texas
text/DHOS
***************
*** 21336,21341 ****
--- 21383,21389 ----
tippa/ACMNPS
tips/BDS
tipsa/ACJMNPS
+ tis.
tisdag/ADGS
tistel/EIS
titan/S
***************
*** 21463,21468 ****
--- 21511,21517 ----
tolv<6C>rig/OS
tolv<6C>rs/S
Tom
+ t.o.m.
tom/LMS
Tomas
tomat/DHS
***************
*** 21513,21518 ****
--- 21562,21568 ----
torped/ADHS
torpedb<64>t/ADGS
torr/MOPS
+ tab.
+ tis.
+ tors.
torsdag/ADGS
torsk/DGS
Torsten/A
***************
*** 22359,22364 ****
--- 22409,22415 ----
uppkomst/DS
uppkoppling/ADGS
uppkrupen/MS
+ u.a.
+ uppl.
upplaga/AEGOS
upplagd/OS
upplage/S
***************
*** 22639,22644 ****
--- 22690,22696 ----
utf<74>rar/DJQS
utf<74>rare/AEJS
utf<74>rlig/OPS
+ utg.
utgallra/ACMNPS
utgamla/S
utgammal/MS
***************
*** 23003,23008 ****
--- 23055,23061 ----
varannan/S
varav/S
Varberg/A
+ vard.
varda/BDS
vardag/ADGS
vardaglig/OPS
***************
*** 23091,23096 ****
--- 23144,23150 ----
Vaxholm/A
vaxljus/BDS
Vaxmora
+ vd
VD
ve/GS
veck/ABDS
***************
*** 23203,23208 ****
--- 23257,23264 ----
vettl<74>s/OS
vev/DS
veva/ACJMNPS
+ v.g.
+ v.g.v.
vi/ACEOS
vibration/ADHS
vibrator/AES
***************
*** 23416,23421 ****
--- 23472,23478 ----
VM
vokabul<75>r/S
vokal/DHS
+ vard.
+ vd
+ vol.
volont<6E>r/ADHS
volt/S
Volvo/A

View File

@@ -1,7 +1,7 @@
" Vim script for testing colors
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Contributors: Rafael Garcia-Suarez, Charles Campbell
" Last Change: 2006 Feb 16
" Last Change: 2006 Feb 20
" edit this file, then do ":source %", and check if the colors match
@@ -54,11 +54,12 @@
" Open this file in a window if it isn't edited yet.
" Use the current window if it's empty.
if &mod || line('$') != 1 || getline(1) != ''
new
endif
if expand('%:p') != expand('<sfile>:p')
exe "edit " . expand('<sfile>')
if &mod || line('$') != 1 || getline(1) != ''
exe "new " . expand('<sfile>')
else
exe "edit " . expand('<sfile>')
endif
endif
syn clear

View File

@@ -2,7 +2,7 @@
"
" Language: Logtalk
" Maintainer: Paulo Moura <pmoura@logtalk.org>
" Last Change: June 6, 2005
" Last Change: February 24, 2006
" Quit when a syntax file was already loaded:
@@ -89,6 +89,14 @@ syn region logtalkDir matchgroup=logtalkDirTag start=":- calls(" matchgroup=lo
syn region logtalkDir matchgroup=logtalkDirTag start=":- uses(" matchgroup=logtalkDirTag end=")\." contains=ALL
" Module directives
syn region logtalkDir matchgroup=logtalkDirTag start=":- module(" matchgroup=logtalkDirTag end=")\." contains=ALL
syn region logtalkDir matchgroup=logtalkDirTag start=":- export(" matchgroup=logtalkDirTag end=")\." contains=ALL
syn region logtalkDir matchgroup=logtalkDirTag start=":- meta_predicate(" matchgroup=logtalkDirTag end=")\." contains=ALL
syn region logtalkDir matchgroup=logtalkDirTag start=":- use_module(" matchgroup=logtalkDirTag end=")\." contains=ALL
" Logtalk built-in predicates
syn match logtalkBuiltIn "\<\(abolish\|c\(reate\|urrent\)\)_\(object\|protocol\|category\)\ze("
@@ -129,6 +137,7 @@ syn match logtalkBuiltInMethod "\<before\ze("
syn match logtalkBuiltInMethod "\<after\ze("
syn match logtalkBuiltInMethod "\<expand_term\ze("
syn match logtalkBuiltInMethod "\<term_expansion\ze("
syn match logtalkBuiltInMethod "\<phrase\ze("

128
runtime/syntax/mgl.vim Normal file
View File

@@ -0,0 +1,128 @@
" Vim syntax file
" Language: MGL
" Version: 1.0
" Last Change: 2006 Feb 21
" Maintainer: Gero Kuhlmann <gero@gkminix.han.de>
"
" $Id$
"
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
syn sync lines=250
syn keyword mglBoolean true false
syn keyword mglConditional if else then
syn keyword mglConstant nil
syn keyword mglPredefined maxint
syn keyword mglLabel case goto label
syn keyword mglOperator to downto in of with
syn keyword mglOperator and not or xor div mod
syn keyword mglRepeat do for repeat while to until
syn keyword mglStatement procedure function break continue return restart
syn keyword mglStatement program begin end const var type
syn keyword mglStruct record
syn keyword mglType integer string char boolean char ipaddr array
" String
if !exists("mgl_one_line_string")
syn region mglString matchgroup=mglString start=+'+ end=+'+ contains=mglStringEscape
syn region mglString matchgroup=mglString start=+"+ end=+"+ contains=mglStringEscapeGPC
else
"wrong strings
syn region mglStringError matchgroup=mglStringError start=+'+ end=+'+ end=+$+ contains=mglStringEscape
syn region mglStringError matchgroup=mglStringError start=+"+ end=+"+ end=+$+ contains=mglStringEscapeGPC
"right strings
syn region mglString matchgroup=mglString start=+'+ end=+'+ oneline contains=mglStringEscape
syn region mglString matchgroup=mglString start=+"+ end=+"+ oneline contains=mglStringEscapeGPC
end
syn match mglStringEscape contained "''"
syn match mglStringEscapeGPC contained '""'
if exists("mgl_symbol_operator")
syn match mglSymbolOperator "[+\-/*=\%]"
syn match mglSymbolOperator "[<>]=\="
syn match mglSymbolOperator "<>"
syn match mglSymbolOperator ":="
syn match mglSymbolOperator "[()]"
syn match mglSymbolOperator "\.\."
syn match mglMatrixDelimiter "(."
syn match mglMatrixDelimiter ".)"
syn match mglMatrixDelimiter "[][]"
endif
syn match mglNumber "-\=\<\d\+\>"
syn match mglHexNumber "\$[0-9a-fA-F]\+\>"
syn match mglCharacter "\#[0-9]\+\>"
syn match mglIpAddr "[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\>"
syn region mglComment start="(\*" end="\*)"
syn region mglComment start="{" end="}"
syn region mglComment start="//" end="$"
if !exists("mgl_no_functions")
syn keyword mglFunction dispose new
syn keyword mglFunction get load print select
syn keyword mglFunction odd pred succ
syn keyword mglFunction chr ord abs sqr
syn keyword mglFunction exit
syn keyword mglOperator at timeout
endif
syn region mglPreProc start="(\*\$" end="\*)"
syn region mglPreProc start="{\$" end="}"
syn keyword mglException try except raise
syn keyword mglPredefined exception
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_mgl_syn_inits")
if version < 508
let did_mgl_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink mglBoolean Boolean
HiLink mglComment Comment
HiLink mglConditional Conditional
HiLink mglConstant Constant
HiLink mglException Exception
HiLink mglFunction Function
HiLink mglLabel Label
HiLink mglMatrixDelimiter Identifier
HiLink mglNumber Number
HiLink mglHexNumber Number
HiLink mglCharacter Number
HiLink mglIpAddr Number
HiLink mglOperator Operator
HiLink mglPredefined mglFunction
HiLink mglPreProc PreProc
HiLink mglRepeat Repeat
HiLink mglStatement Statement
HiLink mglString String
HiLink mglStringEscape Special
HiLink mglStringEscapeGPC Special
HiLink mglStringError Error
HiLink mglStruct mglStatement
HiLink mglSymbolOperator mglOperator
HiLink mglType Type
delcommand HiLink
endif
let b:current_syntax = "mgl"
" vim: ts=8 sw=2

View File

@@ -3,7 +3,7 @@
" Maintainer: Kazunobu Kuriyama <kazunobu.kuriyama@nifty.com>
" Ex-maintainer: Anthony Hodsdon <ahodsdon@fastmail.fm>
" First Author: Valentino Kyriakides <1kyriaki@informatik.uni-hamburg.de>
" Last Change: 2005 Apr 13
" Last Change: 2006 Mar 4
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -44,6 +44,7 @@ syn match objcScopeDecl "@public\|@private\|@protected"
syn match objcDirective "@interface\|@implementation"
syn match objcDirective "@class\|@end\|@defs"
syn match objcDirective "@encode\|@protocol\|@selector"
syn match objcDirective "@try\|@catch\|@finally\|@throw\|@synchronized"
" Match the ObjC method types
"

161
runtime/syntax/rhelp.vim Normal file
View File

@@ -0,0 +1,161 @@
" Vim syntax file
" Language: R Help File
" Maintainer: Johannes Ranke <jranke@uni-bremen.de>
" Last Change: 2006 M<>r 06
" Version: 0.5
" Remarks: - Now includes R syntax highlighting in the appropriate
" sections if an r.vim file is in the same directory or in the
" default debian location.
" - I didn't yet include any special markup for S4 methods.
" - The two versions of \item{}{} markup are not
" distinguished (in the \arguments{} environment, the items to
" be described are R identifiers, but not in the \describe{}
" environment).
" - There is no Latex markup in equations
" Version Clears: {{{1
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
syn case match
" Rd identifiers {{{
syn region rhelpIdentifier matchgroup=rhelpSection start="\\name{" end="}"
syn region rhelpIdentifier matchgroup=rhelpSection start="\\alias{" end="}"
syn region rhelpIdentifier matchgroup=rhelpSection start="\\pkg{" end="}"
syn region rhelpIdentifier matchgroup=rhelpSection start="\\item{" end="}" contained
syn region rhelpIdentifier matchgroup=rhelpSection start="\\method{" end=/}/ contained
" Highlighting of R code using an existing r.vim syntax file if available {{{1
let s:syntaxdir = expand("<sfile>:p:h") "look in the directory of this file
let s:rsyntax = s:syntaxdir . "/r.vim"
if filereadable(s:rsyntax)
syn include @R <sfile>:p:h/r.vim
elseif filereadable('/usr/share/vim/vim64/syntax/r.vim') "and debian location
syn include @R /usr/share/vim/vimcurrent/syntax/r.vim
else
syn match rhelpRComment /\#.*/ "if no r.vim is found, do comments
syn cluster R contains=rhelpRComment
endif
syn region rhelpRcode matchgroup=Delimiter start="\\examples{" matchgroup=Delimiter transparent end=/}/ contains=@R,rhelpSection
syn region rhelpRcode matchgroup=Delimiter start="\\usage{" matchgroup=Delimiter transparent end=/}/ contains=@R,rhelpIdentifier
syn region rhelpRcode matchgroup=Delimiter start="\\synopsis{" matchgroup=Delimiter transparent end=/}/ contains=@R
syn region rhelpRcode matchgroup=Delimiter start="\\special{" matchgroup=Delimiter transparent end=/}/ contains=@R contained
syn region rhelpRcode matchgroup=Delimiter start="\\code{" matchgroup=Delimiter transparent end=/}/ contains=@R contained
" Strings {{{1
syn region rhelpString start=/"/ end=/"/
" Special TeX characters ( \$ \& \% \# \{ \} \_) {{{1
syn match rhelpSpecialChar "\\[$&%#{}_]"
" Special Delimiters {{{1
syn match rhelpDelimiter "\\cr"
syn match rhelpDelimiter "\\tab "
" Keywords {{{1
syn match rhelpKeyword "\\R"
syn match rhelpKeyword "\\dots"
syn match rhelpKeyword "\\ldots"
" Links {{{1
syn region rhelpLink matchgroup=rhelpSection start="\\link{" end="}" contained keepend
syn region rhelpLink matchgroup=rhelpSection start="\\link\[.*\]{" end="}" contained keepend
" Type Styles {{{1
syn match rhelpType "\\emph\>"
syn match rhelpType "\\strong\>"
syn match rhelpType "\\bold\>"
syn match rhelpType "\\sQuote\>"
syn match rhelpType "\\dQuote\>"
syn match rhelpType "\\preformatted\>"
syn match rhelpType "\\kbd\>"
syn match rhelpType "\\samp\>"
syn match rhelpType "\\eqn\>"
syn match rhelpType "\\deqn\>"
syn match rhelpType "\\file\>"
syn match rhelpType "\\email\>"
syn match rhelpType "\\url\>"
syn match rhelpType "\\var\>"
syn match rhelpType "\\env\>"
syn match rhelpType "\\option\>"
syn match rhelpType "\\command\>"
syn match rhelpType "\\dfn\>"
syn match rhelpType "\\cite\>"
syn match rhelpType "\\acronym\>"
" rhelp sections {{{1
syn match rhelpSection "\\encoding\>"
syn match rhelpSection "\\title\>"
syn match rhelpSection "\\description\>"
syn match rhelpSection "\\concept\>"
syn match rhelpSection "\\arguments\>"
syn match rhelpSection "\\details\>"
syn match rhelpSection "\\value\>"
syn match rhelpSection "\\references\>"
syn match rhelpSection "\\note\>"
syn match rhelpSection "\\author\>"
syn match rhelpSection "\\seealso\>"
syn match rhelpSection "\\keyword\>"
syn match rhelpSection "\\docType\>"
syn match rhelpSection "\\format\>"
syn match rhelpSection "\\source\>"
syn match rhelpSection "\\itemize\>"
syn match rhelpSection "\\describe\>"
syn match rhelpSection "\\enumerate\>"
syn match rhelpSection "\\item "
syn match rhelpSection "\\item$"
syn match rhelpSection "\\tabular{[lcr]*}"
syn match rhelpSection "\\dontrun\>"
syn match rhelpSection "\\dontshow\>"
syn match rhelpSection "\\testonly\>"
" Freely named Sections {{{1
syn region rhelpFreesec matchgroup=Delimiter start="\\section{" matchgroup=Delimiter transparent end=/}/
" Rd comments {{{1
syn match rhelpComment /%.*$/ contained
" Error {{{1
syn region rhelpRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rhelpError,rhelpBraceError,rhelpCurlyError
syn region rhelpRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rhelpError,rhelpBraceError,rhelpParenError
syn region rhelpRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rhelpError,rhelpCurlyError,rhelpParenError
syn match rhelpError /[)\]}]/
syn match rhelpBraceError /[)}]/ contained
syn match rhelpCurlyError /[)\]]/ contained
syn match rhelpParenError /[\]}]/ contained
" Define the default highlighting {{{1
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_rhelp_syntax_inits")
if version < 508
let did_rhelp_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink rhelpIdentifier Identifier
HiLink rhelpString String
HiLink rhelpKeyword Keyword
HiLink rhelpLink Underlined
HiLink rhelpType Type
HiLink rhelpSection PreCondit
HiLink rhelpError Error
HiLink rhelpBraceError Error
HiLink rhelpCurlyError Error
HiLink rhelpParenError Error
HiLink rhelpDelimiter Delimiter
HiLink rhelpComment Comment
HiLink rhelpRComment Comment
HiLink rhelpSpecialChar SpecialChar
delcommand HiLink
endif
let b:current_syntax = "rhelp"
" vim: foldmethod=marker:

View File

@@ -2,8 +2,8 @@
" Language: shell (sh) Korn shell (ksh) bash (sh)
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
" Last Change: Feb 01, 2006
" Version: 80
" Last Change: Mar 01, 2006
" Version: 81
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
"
" Using the following VIM variables: {{{1
@@ -123,7 +123,7 @@ syn match shTestError "]"
" Options Interceptor: {{{1
" ====================
syn match shOption "\s[\-+][a-zA-Z0-9]\+\>"ms=s+1
syn match shOption "\s--[^ \t$`|]\+"ms=s+1
syn match shOption "\s--[^ \t$`'"|]\+"ms=s+1
" Operators: {{{1
" ==========

View File

@@ -2,7 +2,7 @@
" This is a GENERATED FILE. Please always refer to source file at the URI below.
" Language: OpenSSH server configuration file (ssh_config)
" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>
" Last Change: 2003-05-06
" Last Change: 2006-03-05
" URL: http://trific.ath.cx/Ftp/vim/syntax/sshconfig.vim
" Setup
@@ -30,7 +30,8 @@ syn keyword sshconfigTodo TODO FIXME NOT contained
syn keyword sshconfigYesNo yes no ask
syn keyword sshconfigCipher blowfish des 3des
syn keyword sshconfigCipher aes128-cbc 3des-cbc blowfish-cbc cast128-cbc
syn keyword sshconfigCipher arcfour aes192-cbc aes256-cbc
syn keyword sshconfigCipher aes192-cbc aes256-cbc aes128-ctr aes256-ctr
syn keyword sshconfigCipher arcfour arcfour128 arcfour256 cast128-cbc
syn keyword sshconfigMAC hmac-md5 hmac-sha1 hmac-ripemd160 hmac-sha1-96
syn keyword sshconfigMAC hmac-md5-96
syn keyword sshconfigHostKeyAlg ssh-rsa ssh-dss
@@ -48,24 +49,29 @@ syn match sshconfigHostPort "\<\(\x\{,4}:\)\+\x\{,4}[:/]\d\+\>"
" Keywords
syn keyword sshconfigHostSect Host
syn keyword sshconfigKeyword AFSTokenPassing BatchMode BindAddress
syn keyword sshconfigKeyword AddressFamily BatchMode BindAddress
syn keyword sshconfigKeyword ChallengeResponseAuthentication CheckHostIP
syn keyword sshconfigKeyword Cipher Ciphers ClearAllForwardings Compression
syn keyword sshconfigKeyword CompressionLevel ConnectionAttempts
syn keyword sshconfigKeyword DynamicForward EscapeChar ForwardAgent ForwardX11
syn keyword sshconfigKeyword GatewayPorts GlobalKnownHostsFile
syn keyword sshconfigKeyword HostbasedAuthentication HostKeyAlgorithms
syn keyword sshconfigKeyword HostKeyAlias HostName IdentityFile KeepAlive
syn keyword sshconfigKeyword KerberosAuthentication KerberosTgtPassing
syn keyword sshconfigKeyword LocalForward LogLevel MACs
syn keyword sshconfigKeyword NoHostAuthenticationForLocalhost
syn keyword sshconfigKeyword Cipher Ciphers ClearAllForwardings
syn keyword sshconfigKeyword Compression CompressionLevel ConnectTimeout
syn keyword sshconfigKeyword ConnectionAttempts ControlMaster
syn keyword sshconfigKeyword ControlPath DynamicForward EnableSSHKeysign
syn keyword sshconfigKeyword EscapeChar ForwardAgent ForwardX11
syn keyword sshconfigKeyword ForwardX11Trusted GSSAPIAuthentication
syn keyword sshconfigKeyword GSSAPIDelegateCredentials GatewayPorts
syn keyword sshconfigKeyword GlobalKnownHostsFile HostKeyAlgorithms
syn keyword sshconfigKeyword HashKnownHosts KbdInteractiveDevices
syn keyword sshconfigKeyword HostKeyAlias HostName HostbasedAuthentication
syn keyword sshconfigKeyword IdentitiesOnly IdentityFile LocalForward
syn keyword sshconfigKeyword LogLevel MACs NoHostAuthenticationForLocalhost
syn keyword sshconfigKeyword NumberOfPasswordPrompts PasswordAuthentication
syn keyword sshconfigKeyword Port PreferredAuthentications Protocol
syn keyword sshconfigKeyword ProxyCommand PubkeyAuthentication RemoteForward
syn keyword sshconfigKeyword ProxyCommand PubkeyAuthentication
syn keyword sshconfigKeyword RSAAuthentication RemoteForward
syn keyword sshconfigKeyword RhostsAuthentication RhostsRSAAuthentication
syn keyword sshconfigKeyword RSAAuthentication SmartcardDevice
syn keyword sshconfigKeyword StrictHostKeyChecking UsePrivilegedPort User
syn keyword sshconfigKeyword UserKnownHostsFile XAuthLocation
syn keyword sshconfigKeyword SendEnv ServerAliveCountMax ServerAliveInterval
syn keyword sshconfigKeyword SmartcardDevice StrictHostKeyChecking
syn keyword sshconfigKeyword TCPKeepAlive UsePrivilegedPort User
syn keyword sshconfigKeyword UserKnownHostsFile VerifyHostKeyDNS XAuthLocation
" Define the default highlighting
if version >= 508 || !exists("did_sshconfig_syntax_inits")

View File

@@ -2,7 +2,7 @@
" This is a GENERATED FILE. Please always refer to source file at the URI below.
" Language: OpenSSH server configuration file (sshd_config)
" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>
" Last Change: 2003-05-06
" Last Change: 2006-03-05
" URL: http://trific.ath.cx/Ftp/vim/syntax/sshdconfig.vim
" Setup
@@ -29,8 +29,8 @@ syn keyword sshdconfigTodo TODO FIXME NOT contained
" Constants
syn keyword sshdconfigYesNo yes no
syn keyword sshdconfigCipher aes128-cbc 3des-cbc blowfish-cbc cast128-cbc
syn keyword sshdconfigCipher aes192-cbc aes256-cbc
syn keyword sshdconfigCipher arcfour
syn keyword sshdconfigCipher aes192-cbc aes256-cbc aes128-ctr aes256-ctr
syn keyword sshdconfigCipher arcfour arcfour128 arcfour256 cast128-cbc
syn keyword sshdconfigMAC hmac-md5 hmac-sha1 hmac-ripemd160 hmac-sha1-96
syn keyword sshdconfigMAC hmac-md5-96
syn keyword sshdconfigRootLogin without-password forced-commands-only
@@ -46,27 +46,33 @@ syn match sshdconfigHostPort "\<\(\x\{,4}:\)\+\x\{,4}:\d\+\>"
syn match sshdconfigTime "\<\(\d\+[sSmMhHdDwW]\)\+\>"
" Keywords
syn keyword sshdconfigKeyword AFSTokenPassing AllowGroups AllowTcpForwarding
syn keyword sshdconfigKeyword AcceptEnv AddressFamily
syn keyword sshdconfigKeyword AllowGroups AllowTcpForwarding
syn keyword sshdconfigKeyword AllowUsers AuthorizedKeysFile Banner
syn keyword sshdconfigKeyword ChallengeResponseAuthentication Ciphers
syn keyword sshdconfigKeyword ClientAliveInterval ClientAliveCountMax
syn keyword sshdconfigKeyword Compression DenyGroups DenyUsers GatewayPorts
syn keyword sshdconfigKeyword HostbasedAuthentication HostKey IgnoreRhosts
syn keyword sshdconfigKeyword IgnoreUserKnownHosts KeepAlive
syn keyword sshdconfigKeyword ChallengeResponseAuthentication
syn keyword sshdconfigKeyword Ciphers ClientAliveCountMax
syn keyword sshdconfigKeyword ClientAliveInterval Compression
syn keyword sshdconfigKeyword DenyGroups DenyUsers GSSAPIAuthentication
syn keyword sshdconfigKeyword GSSAPICleanupCredentials GatewayPorts
syn keyword sshdconfigKeyword HostKey HostbasedAuthentication
syn keyword sshdconfigKeyword IgnoreRhosts IgnoreUserKnownHosts
syn keyword sshdconfigKeyword KerberosAuthentication KerberosOrLocalPasswd
syn keyword sshdconfigKeyword KerberosTgtPassing KerberosTicketCleanup
syn keyword sshdconfigKeyword KerberosGetAFSToken
syn keyword sshdconfigKeyword KeyRegenerationInterval ListenAddress
syn keyword sshdconfigKeyword LoginGraceTime LogLevel MACs MaxStartups
syn keyword sshdconfigKeyword PAMAuthenticationViaKbdInt
syn keyword sshdconfigKeyword PasswordAuthentication PermitEmptyPasswords
syn keyword sshdconfigKeyword PermitRootLogin PermitUserEnvironment PidFile
syn keyword sshdconfigKeyword Port PrintLastLog PrintMotd Protocol
syn keyword sshdconfigKeyword PubkeyAuthentication RhostsAuthentication
syn keyword sshdconfigKeyword RhostsRSAAuthentication RSAAuthentication
syn keyword sshdconfigKeyword LogLevel LoginGraceTime MACs MaxAuthTries
syn keyword sshdconfigKeyword MaxStartups PasswordAuthentication
syn keyword sshdconfigKeyword PermitEmptyPasswords PermitRootLogin
syn keyword sshdconfigKeyword PermitUserEnvironment PidFile Port
syn keyword sshdconfigKeyword PrintLastLog PrintMotd Protocol
syn keyword sshdconfigKeyword PubkeyAuthentication RSAAuthentication
syn keyword sshdconfigKeyword RhostsAuthentication RhostsRSAAuthentication
syn keyword sshdconfigKeyword ServerKeyBits StrictModes Subsystem
syn keyword sshdconfigKeyword SyslogFacility UseLogin UsePrivilegeSeparation
syn keyword sshdconfigKeyword VerifyReverseMapping X11DisplayOffset
syn keyword sshdconfigKeyword X11Forwarding X11UseLocalhost XAuthLocation
syn keyword sshdconfigKeyword ShowPatchLevel
syn keyword sshdconfigKeyword SyslogFacility TCPKeepAlive UseDNS
syn keyword sshdconfigKeyword UseLogin UsePAM UsePrivilegeSeparation
syn keyword sshdconfigKeyword X11DisplayOffset X11Forwarding
syn keyword sshdconfigKeyword X11UseLocalhost XAuthLocation
" Define the default highlighting
if version >= 508 || !exists("did_sshdconfig_syntax_inits")

View File

@@ -1,8 +1,8 @@
" Vim syntax file
" Language: TeX
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrchipO@ScampbellPfamily.AbizM>
" Last Change: Dec 07, 2005
" Version: 31
" Last Change: Feb 28, 2006
" Version: 32
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
"
" Notes: {{{1
@@ -372,7 +372,14 @@ if b:extfname == "dtx"
syn match texComment "\^\^A.*$" contains=@texCommentGroup
syn match texComment "^%\+" contains=@texCommentGroup
else
syn match texComment "%.*$" contains=@texCommentGroup
if g:tex_fold_enabled
" allows syntax-folding of 2 or more contiguous comment lines
" single-line comments are not folded
syn match texComment "%.*$" contains=@texCommentGroup
syn region texComment start="^\zs\s*%.*\_s*%" skip="^\s*%" end='^\ze\s*[^%]' fold
else
syn match texComment "%.*$" contains=@texCommentGroup
endif
endif
" Separate lines used for verb` and verb# so that the end conditions {{{1

View File

@@ -1,8 +1,8 @@
" Vim syntax file
" Language: Vim 7.0 script
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: February 15, 2006
" Version: 7.0-26
" Last Change: March 03, 2006
" Version: 7.0-28
" Automatically generated keyword lists: {{{1
" Quit when a syntax file was already loaded {{{2
@@ -16,11 +16,11 @@ syn keyword vimTodo contained COMBAK NOT RELEASED TODO WIP
syn cluster vimCommentGroup contains=vimTodo,@Spell
" regular vim commands {{{2
syn keyword vimCommand contained ab[breviate] abc[lear] abo[veleft] al[l] arga[dd] argd[elete] argdo arge[dit] argg[lobal] argl[ocal] ar[gs] argu[ment] as[cii] bad[d] ba[ll] bd[elete] be bel[owright] bf[irst] bl[ast] bm[odified] bn[ext] bN[ext] bo[tright] bp[revious] brea[k] breaka[dd] breakd[el] breakl[ist] br[ewind] bro[wse] bufdo b[uffer] buffers bun[load] bw[ipeout] ca[bbrev] cabc[lear] caddb[uffer] cad[dexpr] caddf[ile] cal[l] cat[ch] cb[uffer] cc ccl[ose] cd ce[nter] cex[pr] cf[ile] cfir[st] cg[etfile] c[hange] changes chd[ir] che[ckpath] checkt[ime] cla[st] cl[ist] clo[se] cmapc[lear] cnew[er] cn[ext] cN[ext] cnf[ile] cNf[ile] cnorea[bbrev] col[der] colo[rscheme] comc[lear] comp[iler] conf[irm] con[tinue] cope[n] co[py] cpf[ile] cp[revious] cq[uit] cr[ewind] cuna[bbrev] cu[nmap] cw[indow] debugg[reedy] delc[ommand] d[elete] DeleteFirst delf[unction] delm[arks] diffg[et] diffoff diffpatch diffpu[t] diffsplit diffthis diffu[pdate] dig[raphs] di[splay] dj[ump] dl[ist] dr[op] ds[earch] dsp[lit] echoe[rr] echom[sg] echon e[dit] el[se] elsei[f] em[enu] emenu* endfo[r] endf[unction] en[dif] endt[ry] endw[hile] ene[w] ex exi[t] Explore exu[sage] f[ile] files filetype fina[lly] fin[d] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] folddoc[losed] foldd[oopen] foldo[pen] for fu[nction] g[lobal] go[to] gr[ep] grepa[dd] ha[rdcopy] h[elp] helpf[ind] helpg[rep] helpt[ags] Hexplore hid[e] his[tory] I ia[bbrev] iabc[lear] if ij[ump] il[ist] imapc[lear] inorea[bbrev] is[earch] isp[lit] iuna[bbrev] iu[nmap] j[oin] ju[mps] k keepalt keepj[umps] kee[pmarks] laddb[uffer] lad[dexpr] laddf[ile] lan[guage] la[st] lb[uffer] lc[d] lch[dir] lcl[ose] le[ft] lefta[bove] lex[pr] lf[ile] lfir[st] lg[etfile] lgr[ep] lgrepa[dd] lh[elpgrep] l[ist] ll lla[st] lli[st] lmak[e] lm[ap] lmapc[lear] lnew[er] lne[xt] lN[ext] lnf[ile] lNf[ile] ln[oremap] lo[adview] loc[kmarks] lockv[ar] lol[der] lop[en] lpf[ile] lp[revious] lr[ewind] ls lt[ag] lu[nmap] lv[imgrep] lvimgrepa[dd] lw[indow] mak[e] ma[rk] marks mat[ch] menut[ranslate] mk[exrc] mks[ession] mksp[ell] mkvie[w] mkv[imrc] mod[e] m[ove] mzf[ile] mz[scheme] nbkey NetrwSettings new n[ext] N[ext] nmapc[lear] noh[lsearch] norea[bbrev] Nread nu[mber] nun[map] Nw omapc[lear] on[ly] o[pen] opt[ions] ou[nmap] pc[lose] ped[it] pe[rl] perld[o] po[p] popu popu[p] pp[op] pre[serve] prev[ious] p[rint] P[rint] profd[el] prof[ile] prompt promptf[ind] promptr[epl] ps[earch] pta[g] ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptN[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] pw[d] pyf[ile] py[thon] qa[ll] q[uit] quita[ll] r[ead] rec[over] redi[r] red[o] redr[aw] redraws[tatus] reg[isters] res[ize] ret[ab] retu[rn] rew[ind] ri[ght] rightb[elow] rub[y] rubyd[o] rubyf[ile] ru[ntime] rv[iminfo] sal[l] san[dbox] sa[rgument] sav[eas] sba[ll] sbf[irst] sbl[ast] sbm[odified] sbn[ext] sbN[ext] sbp[revious] sbr[ewind] sb[uffer] scripte[ncoding] scrip[tnames] se[t] setf[iletype] setg[lobal] setl[ocal] Sexplore sf[ind] sfir[st] sh[ell] sign sil[ent] sim[alt] sla[st] sl[eep] sm[agic] sn[ext] sN[ext] sni[ff] sno[magic] sor[t] so[urce] spelld[ump] spe[llgood] spellr[epall] spellw[rong] sp[lit] spr[evious] sre[wind] sta[g] startg[replace] star[tinsert] startr[eplace] stj[ump] st[op] stopi[nsert] sts[elect] sun[hide] sus[pend] sv[iew] syncbind t ta[g] tags tc[l] tcld[o] tclf[ile] te[aroff] tf[irst] the th[row] tj[ump] tl[ast] tm tm[enu] tn[ext] tN[ext] to[pleft] tp[revious] tr[ewind] try ts[elect] tu tu[nmenu] una[bbreviate] u[ndo] unh[ide] unlo[ckvar] unm[ap] up[date] verb[ose] ve[rsion] vert[ical] Vexplore v[global] vie[w] vim[grep] vimgrepa[dd] vi[sual] viu[sage] vmapc[lear] vne[w] vs[plit] vu[nmap] wa[ll] wh[ile] winc[md] windo winp[os] win[size] wn[ext] wN[ext] wp[revious] wq wqa[ll] w[rite] ws[verb] wv[iminfo] X xa[ll] x[it] XMLent XMLns y[ank]
syn keyword vimCommand contained ab[breviate] abc[lear] abo[veleft] al[l] arga[dd] argd[elete] argdo arge[dit] argg[lobal] argl[ocal] ar[gs] argu[ment] as[cii] bad[d] ba[ll] bd[elete] be bel[owright] bf[irst] bl[ast] bm[odified] bn[ext] bN[ext] bo[tright] bp[revious] brea[k] breaka[dd] breakd[el] breakl[ist] br[ewind] bro[wse] bufdo b[uffer] buffers bun[load] bw[ipeout] ca[bbrev] cabc[lear] caddb[uffer] cad[dexpr] caddf[ile] cal[l] cat[ch] cb[uffer] cc ccl[ose] cd ce[nter] cex[pr] cf[ile] cfir[st] cg[etfile] c[hange] changes chd[ir] che[ckpath] checkt[ime] cla[st] cl[ist] clo[se] cmapc[lear] cnew[er] cn[ext] cN[ext] cnf[ile] cNf[ile] cnorea[bbrev] col[der] colo[rscheme] comc[lear] comp[iler] conf[irm] con[tinue] cope[n] co[py] cpf[ile] cp[revious] cq[uit] cr[ewind] cuna[bbrev] cu[nmap] cw[indow] debugg[reedy] delc[ommand] d[elete] DeleteFirst delf[unction] delm[arks] diffg[et] diffoff diffpatch diffpu[t] diffsplit diffthis diffu[pdate] dig[raphs] di[splay] dj[ump] dl[ist] dr[op] ds[earch] dsp[lit] echoe[rr] echom[sg] echon e[dit] el[se] elsei[f] em[enu] emenu* endfo[r] endf[unction] en[dif] endt[ry] endw[hile] ene[w] ex exi[t] Explore exu[sage] f[ile] files filetype fina[lly] fin[d] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] folddoc[losed] foldd[oopen] foldo[pen] for fu[nction] g[lobal] go[to] gr[ep] grepa[dd] ha[rdcopy] h[elp] helpf[ind] helpg[rep] helpt[ags] Hexplore hid[e] his[tory] I ia[bbrev] iabc[lear] if ij[ump] il[ist] imapc[lear] inorea[bbrev] is[earch] isp[lit] iuna[bbrev] iu[nmap] j[oin] ju[mps] k keepalt keepj[umps] kee[pmarks] laddb[uffer] lad[dexpr] laddf[ile] lan[guage] la[st] lb[uffer] lc[d] lch[dir] lcl[ose] le[ft] lefta[bove] lex[pr] lf[ile] lfir[st] lg[etfile] lgr[ep] lgrepa[dd] lh[elpgrep] l[ist] ll lla[st] lli[st] lmak[e] lm[ap] lmapc[lear] lnew[er] lne[xt] lN[ext] lnf[ile] lNf[ile] ln[oremap] lo[adview] loc[kmarks] lockv[ar] lol[der] lop[en] lpf[ile] lp[revious] lr[ewind] ls lt[ag] lu[nmap] lv[imgrep] lvimgrepa[dd] lw[indow] mak[e] ma[rk] marks mat[ch] menut[ranslate] mk[exrc] mks[ession] mksp[ell] mkvie[w] mkv[imrc] mod[e] m[ove] mzf[ile] mz[scheme] nbkey NetrwSettings new n[ext] N[ext] nmapc[lear] noh[lsearch] norea[bbrev] Nread nu[mber] nun[map] Nw omapc[lear] on[ly] o[pen] opt[ions] ou[nmap] pc[lose] ped[it] pe[rl] perld[o] po[p] popu popu[p] pp[op] pre[serve] prev[ious] p[rint] P[rint] profd[el] prof[ile] prompt promptf[ind] promptr[epl] ps[earch] pta[g] ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptN[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] pw[d] pyf[ile] py[thon] qa[ll] q[uit] quita[ll] r[ead] rec[over] redi[r] red[o] redr[aw] redraws[tatus] reg[isters] res[ize] ret[ab] retu[rn] rew[ind] ri[ght] rightb[elow] rub[y] rubyd[o] rubyf[ile] ru[ntime] rv[iminfo] sal[l] san[dbox] sa[rgument] sav[eas] sba[ll] sbf[irst] sbl[ast] sbm[odified] sbn[ext] sbN[ext] sbp[revious] sbr[ewind] sb[uffer] scripte[ncoding] scrip[tnames] se[t] setf[iletype] setg[lobal] setl[ocal] Sexplore sf[ind] sfir[st] sh[ell] sign sil[ent] sim[alt] sla[st] sl[eep] sm[agic] sn[ext] sN[ext] sni[ff] sno[magic] sor[t] so[urce] spelld[ump] spe[llgood] spellr[epall] spellw[rong] sp[lit] spr[evious] sre[wind] sta[g] startg[replace] star[tinsert] startr[eplace] stj[ump] st[op] stopi[nsert] sts[elect] sun[hide] sus[pend] sv[iew] syncbind t tab tabc[lose] tabd[o] tabe[dit] tabf[ind] tabfir[st] tabl[ast] tabmove tabnew tabn[ext] tabN[ext] tabo[nly] tabp[revious] tabr[ewind] tabs ta[g] tags tc[l] tcld[o] tclf[ile] te[aroff] tf[irst] the th[row] tj[ump] tl[ast] tm tm[enu] tn[ext] tN[ext] to[pleft] tp[revious] tr[ewind] try ts[elect] tu tu[nmenu] una[bbreviate] u[ndo] undoj[oin] unh[ide] unlo[ckvar] unm[ap] up[date] verb[ose] ve[rsion] vert[ical] Vexplore v[global] vie[w] vim[grep] vimgrepa[dd] vi[sual] viu[sage] vmapc[lear] vne[w] vs[plit] vu[nmap] wa[ll] wh[ile] winc[md] windo winp[os] win[size] wn[ext] wN[ext] wp[revious] wq wqa[ll] w[rite] ws[verb] wv[iminfo] X xa[ll] x[it] XMLent XMLns y[ank]
syn match vimCommand contained "\<z[-+^.=]"
" vimOptions are caught only when contained in a vimSet {{{2
syn keyword vimOption contained : acd ai akm al aleph allowrevins altkeymap ambiwidth ambw anti antialias ar arab arabic arabicshape ari arshape autochdir autoindent autoread autowrite autowriteall aw awa background backspace backup backupcopy backupdir backupext backupskip balloondelay ballooneval balloonexpr bdir bdlay beval bex bexpr bg bh bin binary biosk bioskey bk bkc bl bomb breakat brk browsedir bs bsdir bsk bt bufhidden buflisted buftype casemap cb ccv cd cdpath cedit cf cfu ch charconvert ci cin cindent cink cinkeys cino cinoptions cinw cinwords clipboard cmdheight cmdwinheight cmp cms co columns com comments commentstring compatible complete completefunc completeopt confirm consk conskey copyindent cot cp cpo cpoptions cpt cscopepathcomp cscopeprg cscopequickfix cscopetag cscopetagorder cscopeverbose cspc csprg csqf cst csto csverb cwh debug deco def define delcombine dex dg dict dictionary diff diffexpr diffopt digraph dip dir directory display dy ea ead eadirection eb ed edcompatible ef efm ei ek enc encoding endofline eol ep equalalways equalprg errorbells errorfile errorformat esckeys et eventignore ex expandtab exrc fcl fcs fdc fde fdi fdl fdls fdm fdn fdo fdt fen fenc fencs fex ff ffs fileencoding fileencodings fileformat fileformats filetype fillchars fk fkmap flp fml fmr fo foldclose foldcolumn foldenable foldexpr foldignore foldlevel foldlevelstart foldmarker foldmethod foldminlines foldnestmax foldopen foldtext formatexpr formatlistpat formatoptions formatprg fp fs fsync ft gcr gd gdefault gfm gfn gfs gfw ghr go gp grepformat grepprg guicursor guifont guifontset guifontwide guiheadroom guioptions guipty helpfile helpheight helplang hf hh hi hid hidden highlight history hk hkmap hkmapp hkp hl hlg hls hlsearch ic icon iconstring ignorecase im imactivatekey imak imc imcmdline imd imdisable imi iminsert ims imsearch inc include includeexpr incsearch inde indentexpr indentkeys indk inex inf infercase insertmode is isf isfname isi isident isk iskeyword isp isprint joinspaces js key keymap keymodel keywordprg km kmp kp langmap langmenu laststatus lazyredraw lbr lcs linebreak lines linespace lisp lispwords list listchars lm lmap loadplugins lpl ls lsp lw lz ma magic makeef makeprg mat matchpairs matchtime maxfuncdepth maxmapdepth maxmem maxmempattern maxmemtot mef menuitems mfd mh mis mkspellmem ml mls mm mmd mmp mmt mod modeline modelines modifiable modified more mouse mousef mousefocus mousehide mousem mousemodel mouses mouseshape mouset mousetime mp mps msm mzq mzquantum nf nrformats nu number numberwidth nuw oft ofu omnifunc operatorfunc opfunc osfiletype pa para paragraphs paste pastetoggle patchexpr patchmode path pdev penc pex pexpr pfn pheader pi pm pmbcs pmbfn popt preserveindent previewheight previewwindow printdevice printencoding printexpr printfont printheader printmbcharset printmbfont printoptions prompt pt pvh pvw qe quoteescape readonly remap report restorescreen revins ri rightleft rightleftcmd rl rlc ro rs rtp ru ruf ruler rulerformat runtimepath sb sbo sbr sc scb scr scroll scrollbind scrolljump scrolloff scrollopt scs sect sections secure sel selection selectmode sessionoptions sft sh shcf shell shellcmdflag shellpipe shellquote shellredir shellslash shelltemp shelltype shellxquote shiftround shiftwidth shm shortmess shortname showbreak showcmd showfulltag showmatch showmode shq si sidescroll sidescrolloff siso sj slm sm smartcase smartindent smarttab smc smd sn so softtabstop sol sp spc spell spellcapcheck spellfile spelllang spellsuggest spf spl splitbelow splitright spr sps sr srr ss ssl ssop st sta startofline statusline stl stmp sts su sua suffixes suffixesadd sw swapfile swapsync swb swf switchbuf sws sxq syn synmaxcol syntax ta tabstop tag tagbsearch taglength tagrelative tags tagstack tb tbi tbidi tbis tbs tenc term termbidi termencoding terse textauto textmode textwidth tf tgst thesaurus tildeop timeout timeoutlen title titlelen titleold titlestring tl tm to toolbar toolbariconsize top tr ts tsl tsr ttimeout ttimeoutlen ttm tty ttybuiltin ttyfast ttym ttymouse ttyscroll ttytype tw tx uc ul undolevels updatecount updatetime ut vb vbs vdir ve verbose verbosefile vfile vi viewdir viewoptions viminfo virtualedit visualbell vop wa wak warn wb wc wcm wd weirdinvert wfh wh whichwrap wi wig wildchar wildcharm wildignore wildmenu wildmode wildoptions wim winaltkeys window winfixheight winheight winminheight winminwidth winwidth wiv wiw wm wmh wmnu wmw wop wrap wrapmargin wrapscan write writeany writebackup writedelay ws ww
syn keyword vimOption contained : acd ai akm al aleph allowrevins altkeymap ambiwidth ambw anti antialias ar arab arabic arabicshape ari arshape autochdir autoindent autoread autowrite autowriteall aw awa background backspace backup backupcopy backupdir backupext backupskip balloondelay ballooneval balloonexpr bdir bdlay beval bex bexpr bg bh bin binary biosk bioskey bk bkc bl bomb breakat brk browsedir bs bsdir bsk bt bufhidden buflisted buftype casemap cb ccv cd cdpath cedit cf cfu ch charconvert ci cin cindent cink cinkeys cino cinoptions cinw cinwords clipboard cmdheight cmdwinheight cmp cms co columns com comments commentstring compatible complete completefunc completeopt confirm consk conskey copyindent cot cp cpo cpoptions cpt cscopepathcomp cscopeprg cscopequickfix cscopetag cscopetagorder cscopeverbose cspc csprg csqf cst csto csverb cwh debug deco def define delcombine dex dg dict dictionary diff diffexpr diffopt digraph dip dir directory display dy ea ead eadirection eb ed edcompatible ef efm ei ek enc encoding endofline eol ep equalalways equalprg errorbells errorfile errorformat esckeys et eventignore ex expandtab exrc fcl fcs fdc fde fdi fdl fdls fdm fdn fdo fdt fen fenc fencs fex ff ffs fileencoding fileencodings fileformat fileformats filetype fillchars fk fkmap flp fml fmr fo foldclose foldcolumn foldenable foldexpr foldignore foldlevel foldlevelstart foldmarker foldmethod foldminlines foldnestmax foldopen foldtext formatexpr formatlistpat formatoptions formatprg fp fs fsync ft gcr gd gdefault gfm gfn gfs gfw ghr go gp grepformat grepprg gtl guicursor guifont guifontset guifontwide guiheadroom guioptions guipty guitablabel helpfile helpheight helplang hf hh hi hid hidden highlight history hk hkmap hkmapp hkp hl hlg hls hlsearch ic icon iconstring ignorecase im imactivatekey imak imc imcmdline imd imdisable imi iminsert ims imsearch inc include includeexpr incsearch inde indentexpr indentkeys indk inex inf infercase insertmode is isf isfname isi isident isk iskeyword isp isprint joinspaces js key keymap keymodel keywordprg km kmp kp langmap langmenu laststatus lazyredraw lbr lcs linebreak lines linespace lisp lispwords list listchars lm lmap loadplugins lpl ls lsp lw lz ma magic makeef makeprg mat matchpairs matchtime maxfuncdepth maxmapdepth maxmem maxmempattern maxmemtot mef menuitems mfd mh mis mkspellmem ml mls mm mmd mmp mmt mod modeline modelines modifiable modified more mouse mousef mousefocus mousehide mousem mousemodel mouses mouseshape mouset mousetime mp mps msm mzq mzquantum nf nrformats nu number numberwidth nuw oft ofu omnifunc operatorfunc opfunc osfiletype pa para paragraphs paste pastetoggle patchexpr patchmode path pdev penc pex pexpr pfn pheader pi pm pmbcs pmbfn popt preserveindent previewheight previewwindow printdevice printencoding printexpr printfont printheader printmbcharset printmbfont printoptions prompt pt pvh pvw qe quoteescape readonly remap report restorescreen revins ri rightleft rightleftcmd rl rlc ro rs rtp ru ruf ruler rulerformat runtimepath sb sbo sbr sc scb scr scroll scrollbind scrolljump scrolloff scrollopt scs sect sections secure sel selection selectmode sessionoptions sft sh shcf shell shellcmdflag shellpipe shellquote shellredir shellslash shelltemp shelltype shellxquote shiftround shiftwidth shm shortmess shortname showbreak showcmd showfulltag showmatch showmode showtabline shq si sidescroll sidescrolloff siso sj slm sm smartcase smartindent smarttab smc smd sn so softtabstop sol sp spc spell spellcapcheck spellfile spelllang spellsuggest spf spl splitbelow splitright spr sps sr srr ss ssl ssop st sta stal startofline statusline stl stmp sts su sua suffixes suffixesadd sw swapfile swapsync swb swf switchbuf sws sxq syn synmaxcol syntax ta tabline tabpagemax tabstop tag tagbsearch taglength tagrelative tags tagstack tal tb tbi tbidi tbis tbs tenc term termbidi termencoding terse textauto textmode textwidth tf tgst thesaurus tildeop timeout timeoutlen title titlelen titleold titlestring tl tm to toolbar toolbariconsize top tpm tr ts tsl tsr ttimeout ttimeoutlen ttm tty ttybuiltin ttyfast ttym ttymouse ttyscroll ttytype tw tx uc ul undolevels updatecount updatetime ut vb vbs vdir ve verbose verbosefile vfile vi viewdir viewoptions viminfo virtualedit visualbell vop wa wak warn wb wc wcm wd weirdinvert wfh wh whichwrap wi wig wildchar wildcharm wildignore wildmenu wildmode wildoptions wim winaltkeys window winfixheight winheight winminheight winminwidth winwidth wiv wiw wm wmh wmnu wmw wop wrap wrapmargin wrapscan write writeany writebackup writedelay ws ww
" vimOptions: These are the turn-off setting variants {{{2
syn keyword vimOption contained noacd noai noakm noallowrevins noaltkeymap noanti noantialias noar noarab noarabic noarabicshape noari noarshape noautochdir noautoindent noautoread noautowrite noautowriteall noaw noawa nobackup noballooneval nobeval nobin nobinary nobiosk nobioskey nobk nobl nobomb nobuflisted nocf noci nocin nocindent nocompatible noconfirm noconsk noconskey nocopyindent nocp nocscopetag nocscopeverbose nocst nocsverb nodeco nodelcombine nodg nodiff nodigraph nodisable noea noeb noed noedcompatible noek noendofline noeol noequalalways noerrorbells noesckeys noet noex noexpandtab noexrc nofen nofk nofkmap nofoldenable nogd nogdefault noguipty nohid nohidden nohk nohkmap nohkmapp nohkp nohls nohlsearch noic noicon noignorecase noim noimc noimcmdline noimd noincsearch noinf noinfercase noinsertmode nois nojoinspaces nojs nolazyredraw nolbr nolinebreak nolisp nolist noloadplugins nolpl nolz noma nomagic nomh noml nomod nomodeline nomodifiable nomodified nomore nomousef nomousefocus nomousehide nonu nonumber nopaste nopi nopreserveindent nopreviewwindow noprompt nopvw noreadonly noremap norestorescreen norevins nori norightleft norightleftcmd norl norlc noro nors noru noruler nosb nosc noscb noscrollbind noscs nosecure nosft noshellslash noshelltemp noshiftround noshortname noshowcmd noshowfulltag noshowmatch noshowmode nosi nosm nosmartcase nosmartindent nosmarttab nosmd nosn nosol nospell nosplitbelow nosplitright nospr nosr nossl nosta nostartofline nostmp noswapfile noswf nota notagbsearch notagrelative notagstack notbi notbidi notbs notermbidi noterse notextauto notextmode notf notgst notildeop notimeout notitle noto notop notr nottimeout nottybuiltin nottyfast notx novb novisualbell nowa nowarn nowb noweirdinvert nowfh nowildmenu nowinfixheight nowiv nowmnu nowrap nowrapscan nowrite nowriteany nowritebackup nows
@@ -42,20 +42,20 @@ syn match vimOption contained "t_k;"
" unsupported settings: these are supported by vi but don't do anything in vim {{{2
syn keyword vimErrSetting contained hardtabs ht w1200 w300 w9600
" AutoBuf Events {{{2
" AutoCmd Events {{{2
syn case ignore
syn keyword vimAutoEvent contained BufAdd BufCreate BufDelete BufEnter BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre Cmd-event CmdwinEnter CmdwinLeave ColorScheme CursorHold CursorHoldI CursorMoved CursorMovedI E135 E143 E200 E201 E203 E204 EncodingChanged FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter InsertChange InsertEnter InsertLeave MenuPopup QuickFixCmdPost QuickFixCmdPre RemoteReply SessionLoadPost SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TermChanged TermResponse User UserGettingBored VimEnter VimLeave VimLeavePre WinEnter WinLeave
syn keyword vimAutoEvent contained BufAdd BufCreate BufDelete BufEnter BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre Cmd-event CmdwinEnter CmdwinLeave ColorScheme CursorHold CursorHoldI CursorMoved CursorMovedI E135 E143 E200 E201 E203 E204 EncodingChanged FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter InsertChange InsertEnter InsertLeave MenuPopup QuickFixCmdPost QuickFixCmdPre RemoteReply SessionLoadPost SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabEnter TabLeave TermChanged TermResponse User UserGettingBored VimEnter VimLeave VimLeavePre WinEnter WinLeave
" Highlight commonly used Groupnames {{{2
syn keyword vimGroup contained Comment Constant String Character Number Boolean Float Identifier Function Statement Conditional Repeat Label Operator Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug Underlined Ignore Error Todo
" Default highlighting groups {{{2
syn keyword vimHLGroup contained Cursor CursorIM DiffAdd DiffChange DiffDelete DiffText Directory ErrorMsg FoldColumn Folded IncSearch LineNr Menu ModeMsg MoreMsg NonText Normal Pmenu PmenuSbar PmenuSel PmenuThumb Question Scrollbar Search SignColumn SpecialKey SpellBad SpellCap SpellLocal SpellRare StatusLine StatusLineNC Title Tooltip VertSplit Visual VisualNOS WarningMsg WildMenu
syn keyword vimHLGroup contained Cursor CursorIM DiffAdd DiffChange DiffDelete DiffText Directory ErrorMsg FoldColumn Folded IncSearch LineNr MatchParen Menu ModeMsg MoreMsg NonText Normal Pmenu PmenuSbar PmenuSel PmenuThumb Question Scrollbar Search SignColumn SpecialKey SpellBad SpellCap SpellLocal SpellRare StatusLine StatusLineNC TabLine TabLineFill TabLineSel Title Tooltip VertSplit Visual VisualNOS WarningMsg WildMenu
syn match vimHLGroup contained "Conceal"
syn case match
" Function Names {{{2
syn keyword vimFuncName contained add append argc argidx argv browse browsedir bufexists buflisted bufloaded bufname bufnr bufwinnr byte2line byteidx call char2nr cindent col complete_add complete_check confirm copy count cscope_connection cursor deepcopy delete did_filetype diff_filler diff_hlID empty escape eval eventhandler executable exists expand expr8 extend filereadable filewritable filter finddir findfile fnamemodify foldclosed foldclosedend foldlevel foldtext foldtextresult foreground function garbagecollect get getbufline getbufvar getchar getcharmod getcmdline getcmdpos getcmdtype getcwd getfontname getfperm getfsize getftime getftype getline getloclist getqflist getreg getregtype getwinposx getwinposy getwinvar glob globpath has has_key hasmapto histadd histdel histget histnr hlexists hlID hostname iconv indent index input inputdialog inputlist inputrestore inputsave inputsecret insert isdirectory islocked items join keys len libcall libcallnr line line2byte lispindent localtime map maparg mapcheck match matchend matchlist matchstr max min mkdir mode nextnonblank nr2char prevnonblank printf pumvisible range readfile remote_expr remote_foreground remote_peek remote_read remote_send remove rename repeat resolve reverse search searchdecl searchpair searchpairpos searchpos server2client serverlist setbufvar setcmdpos setline setloclist setqflist setreg setwinvar simplify sort soundfold spellbadword spellsuggest split strftime stridx string strlen strpart strridx strtrans submatch substitute synID synIDattr synIDtrans system tagfiles taglist tempname tolower toupper tr type values virtcol visualmode winbufnr wincol winheight winline winnr winrestcmd winwidth writefile
syn keyword vimFuncName contained add append argc argidx argv browse browsedir bufexists buflisted bufloaded bufname bufnr bufwinnr byte2line byteidx call char2nr cindent col complete_add complete_check confirm copy count cscope_connection cursor deepcopy delete did_filetype diff_filler diff_hlID empty escape eval eventhandler executable exists expand expr8 extend filereadable filewritable filter finddir findfile fnamemodify foldclosed foldclosedend foldlevel foldtext foldtextresult foreground function garbagecollect get getbufline getbufvar getchar getcharmod getcmdline getcmdpos getcmdtype getcwd getfontname getfperm getfsize getftime getftype getline getloclist getpos getqflist getreg getregtype getwinposx getwinposy getwinvar glob globpath has has_key hasmapto histadd histdel histget histnr hlexists hlID hostname iconv indent index input inputdialog inputlist inputrestore inputsave inputsecret insert isdirectory islocked items join keys len libcall libcallnr line line2byte lispindent localtime map maparg mapcheck match matchend matchlist matchstr max min mkdir mode nextnonblank nr2char prevnonblank printf pumvisible range readfile remote_expr remote_foreground remote_peek remote_read remote_send remove rename repeat resolve reverse search searchdecl searchpair searchpairpos searchpos server2client serverlist setbufvar setcmdpos setline setloclist setqflist setreg setwinvar simplify sort soundfold spellbadword spellsuggest split strftime stridx string strlen strpart strridx strtrans submatch substitute synID synIDattr synIDtrans system tabpagebuflist tabpagenr tabpagewinnr tagfiles taglist tempname tolower toupper tr type values virtcol visualmode winbufnr wincol winheight winline winnr winrestcmd winwidth writefile
"--- syntax above generated by mkvimvim ---
" Special Vim Highlighting (not automatic) {{{1
@@ -123,12 +123,12 @@ syn keyword vimPattern contained start skip end
" Operators: {{{2
" =========
syn cluster vimOperGroup contains=vimOper,vimOperParen,vimNumber,vimString,vimOperOk,vimRegister,vimContinue
syn cluster vimOperGroup contains=vimOper,vimOperParen,vimNumber,vimString,vimRegister,vimContinue
syn match vimOper "\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile
syn match vimOper "||\|&&\|[-+.]" skipwhite nextgroup=vimString,vimSpecFile
syn region vimOperParen matchgroup=vimOper start="(" end=")" contains=@vimOperGroup
syn region vimOperParen matchgroup=vimSep start="{" end="}" contains=@vimOperGroup nextgroup=vimVar
syn match vimOperOk "\<[aiAIrR][()]"
"syn match vimOperOk "\<[aiAIrR][()]" contained
if !exists("g:vimsyntax_noerror")
syn match vimOperError ")"
endif

View File

@@ -1,12 +1,12 @@
" Vim syntax file
" Language: Yacc
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: Sep 06, 2005
" Version: 3
" Last Change: Feb 22, 2006
" Version: 4
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
"
" Option:
" yacc_uses_cpp : if this variable exists, then C++ is loaded rather than C
" g:yacc_uses_cpp : if this variable exists, then C++ is loaded rather than C
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -18,12 +18,12 @@ endif
" Read the C syntax to start with
if version >= 600
if exists("yacc_uses_cpp")
if exists("g:yacc_uses_cpp")
runtime! syntax/cpp.vim
else
runtime! syntax/c.vim
endif
elseif exists("yacc_uses_cpp")
elseif exists("g:yacc_uses_cpp")
so <sfile>:p:h/cpp.vim
else
so <sfile>:p:h/c.vim
@@ -47,7 +47,7 @@ syn region yaccUnion contained matchgroup=yaccCurly start="{" matchgroup=yaccCur
syn region yaccUnionCurly contained matchgroup=yaccCurly start="{" matchgroup=yaccCurly end="}" contains=@yaccUnionGroup
syn match yaccBrkt contained "[<>]"
syn match yaccType "<[a-zA-Z_][a-zA-Z0-9_]*>" contains=yaccBrkt
syn match yaccDefinition "^[A-Za-z][A-Za-z0-9_]*[ \t]*:"
syn match yaccDefinition "^[A-Za-z][A-Za-z0-9_]*\_s*:"
" special Yacc separators
syn match yaccSectionSep "^[ \t]*%%"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -16,8 +16,9 @@ all: gvimext.dll
gvimext.dll: gvimext.obj \
gvimext.res
$(implib) /NOLOGO -machine:$(CPU) -def:gvimext.def $** -out:gvimext.lib
$(link) $(dlllflags) -base:0x1C000000 -out:$*.dll $** $(olelibsdll) shell32.lib gvimext.lib comctl32.lib gvimext.exp
# $(implib) /NOLOGO -machine:$(CPU) -def:gvimext.def $** -out:gvimext.lib
# $(link) $(dlllflags) -base:0x1C000000 -out:$*.dll $** $(olelibsdll) shell32.lib gvimext.lib comctl32.lib gvimext.exp
$(link) $(lflags) -dll -def:gvimext.def -base:0x1C000000 -out:$*.dll $** $(olelibsdll) shell32.lib comctl32.lib
gvimext.obj: gvimext.h

View File

@@ -33,6 +33,12 @@
#define INC_OLE2 // WIN32, get ole2 from windows.h
/* Visual Studio 2005 has 'deprecated' many of the standard CRT functions */
#if _MSC_VER >= 1400
# define _CRT_SECURE_NO_DEPRECATE
# define _CRT_NONSTDC_NO_DEPRECATE
#endif
#include <windows.h>
#include <windowsx.h>
#include <shlobj.h>

View File

@@ -8,7 +8,7 @@
// Generated from the TEXTINCLUDE 2 resource.
//
#ifndef __BORLANDC__
# include "afxres.h"
# include "winresrc.h"
#endif
/////////////////////////////////////////////////////////////////////////////

View File

@@ -28,21 +28,33 @@ MacOS Classic is no longer supported. If you really want it use Vim 6.4.
1.1 Carbon interface (default)
You can compile vim with the standard Unix routine:
cd ..
./configure
make; make install
cd .../src
make
This will create a working Vim.app application bundle in the src
directory. You can move this bundle (the Vim.app directory) anywhere
you want, for example, /Applications.
you want. Or use this command to move it to /Applications:
make install
You need at least Xcode 1.5 to compile Vim 7.0.
Configure will create a universal binary if possible. This requires
installing the universal SDK (currently for 10.4).
To overrule the architecture do this before running make:
./configure --with-mac-arch=intel
or
./configure --with-mac-arch=ppc
1.2 X-Windows or Plain Text
If you do not want the Carbon interface, you must explicitly tell
configure to use a different GUI.
cd ..
./configure --enable-gui=gtk2
cd .../src
./configure --disable-darwin --enable-gui=gtk2
make; make install
NOTE: The following GUI options are supported:

View File

@@ -3,35 +3,347 @@ INSTALLpc.txt - Installation of Vim on PC
This file contains instructions for compiling Vim. If you already have an
executable version of Vim, you don't need this.
More information can be found here:
More information can be found here: (Very stale now.)
http://mywebpage.netscape.com/sharppeople/vim/howto/
http://mywebpage.netscape.com/sharppeople/vim/howto/
The file "feature.h" can be edited to match your preferences. You can skip
this, then you will get the default behavior as is documented, which should
be fine for most people.
With the exception of the last two sections (Windows 3.1 and MS-DOS),
this document assumes that you are building Vim for Win32
(Windows NT/2000/XP/2003/Vista and Windows 95/98/Me)
Contents:
1. MS-DOS
2. Win32 (Windows XP/NT and Windows 95/98)
3. Windows NT with OpenNT
4. Windows 3.1
5. Using Mingw
6. Cross compiling for Win32 from a Linux machine
7. Building with Python support
8. Building with MzScheme support
1. Microsoft Visual C++
2. Using MinGW
3. Cygwin
4. Borland
5. Cross compiling for Win32 from a Linux machine
6. Building with Python support
7. Building with MzScheme support
8. Windows 3.1
9. MS-DOS
The currently preferred method is using the free Visual C++ Toolkit 2003.
1. MS-DOS
1. Microsoft Visual C++
=======================
Visual Studio
-------------
Building with Visual Studio (VS 98, VS .NET, VS .NET 2003, and VS .NET 2005)
is straightforward. (These instructions should also work for VS 4 and VS 5.)
To build Vim from the command line with MSVC, use Make_mvc.mak.
Visual Studio installed a batch file called vcvars32.bat, which you must
run to set up paths for nmake and MSVC.
nmake -f Make_mvc.mak console Win32 SDK or Microsoft Visual C++
nmake -f Make_mvc.mak GUI=yes GUI Microsoft Visual C++
nmake -f Make_mvc.mak OLE=yes OLE Microsoft Visual C++
nmake -f Make_mvc.mak PERL=C:\Perl PYTHON=C:\Python etc.
Perl, Python, etc.
Make_mvc.mak allows a Vim to be built with various different features and
debug support. Debugging with MS Devstudio is provided by Make_dvc.mak.
For a description of the use of Make_dvc.mak, look in Make_mvc.mak.
For compiling Gvim with IME support on far-east Windows, add IME=yes
to the parameters you pass to Make_mvc.mak.
To build Vim from within the Visual Studio IDE, open the Make_ivc.mak project.
(Note: Make_ivc.mak is not as rich as Make_mvc.mak, which allows for
far more configuration.) Make_ivc.mak can also be built with nmake.
nmake -f Make_ivc.mak CFG="Vim - Win32 Release gvim"
GUI Microsoft Visual C++ 4.x or later
nmake -f Make_ivc.mak CFG="Vim - Win32 Release gvim OLE"
OLE Microsoft Visual C++ 4.x or later
See the specific files for comments and options.
These files have been supplied by George V. Reilly, Ben Singer, Ken Scott and
Ron Aaron; they have been tested.
Visual C++ Toolkit 2003
-----------------------
You can download the Microsoft Visual C++ Toolkit 2003 from
http://msdn.microsoft.com/visualc/vctoolkit2003/
This contains the command-line tools (compiler, linker, CRT headers,
and libraries) for Visual Studio .NET 2003, but not the Visual Studio IDE.
To compile and debug Vim with the VC2003 Toolkit, you will also need
|ms-platform-sdk|, |dotnet-1.1-redist|, |dotnet-1.1-sdk|,
and |windbg-download|.
It's easier to download Visual C++ 2005 Express Edition, |msvc-2005-express|.
The advantage of the VC 2003 Toolkit is that it will be freely available
long after VC 2005 Express Edition stops being free in November 2006.
The free Code::Blocks IDE works with the VC2003 Toolkit, as described at
http://wiki.codeblocks.org/index.php?title=Integrating_Microsoft_Visual_Toolkit_2003_with_Code::Blocks_IDE
(This site also takes you through configuring a number of other
free C compilers for Win32.)
To compile Vim using the VC2003 Toolkit and Make_mvc.mak, you must first
execute the following commands in a cmd.exe window (the msvcsetup.bat batch
file can be used):
set PATH=%SystemRoot%\Microsoft.NET\Framework\v1.1.4322;%PATH%
call "%VCToolkitInstallDir%vcvars32.bat"
set MSVCVer=7.1
call "%ProgramFiles%\Microsoft Platform SDK\SetEnv.Cmd"
set LIB=%ProgramFiles%\Microsoft Visual Studio .NET 2003\Vc7\lib;%LIB%
Now you can build Vim with Make_mvc.mak.
Getting the Windows Platform SDK *ms-platform-sdk*
You will also need a copy of the Windows Platform SDK from
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
Specifically, you need the Windows Core SDK subset of the Platform SDK,
which contains the Windows headers and libraries.
Getting the .NET Framework 1.1 Runtime *dotnet-1.1-redist*
You need the .NET Framework 1.1 Redistributable Package from
http://www.microsoft.com/downloads/details.aspx?familyid=262d25e3-f589-4842-8157-034d1e7cf3a3
or from Windows Update:
http://windowsupdate.microsoft.com/
This is needed to install |dotnet-1.1-sdk|. It also contains cvtres.exe,
which is needed to link Vim.
Getting the .NET Framework 1.1 SDK *dotnet-1.1-sdk*
You need the .NET Framework 1.1 SDK from
http://www.microsoft.com/downloads/details.aspx?familyid=9b3a2ca6-3647-4070-9f41-a333c6b9181d
This contains some additional libraries needed to compile Vim,
such as msvcrt.lib. You must install |dotnet-1.1-redist| before
installing the .NET 1.1 SDK.
Getting the WinDbg debugger *windbg-download*
The Debugging Tools for Windows can be downloaded from
http://www.microsoft.com/whdc/devtools/debugging/default.mspx
This includes the WinDbg debugger, which you will want if you ever need
to debug Vim itself. An earlier version of the Debugging Tools
is also available through the Platform SDK, |ms-platform-sdk|.
Visual C++ 2005 Express Edition
-------------------------------
Visual C++ 2005 Express Edition can be downloaded for free
before November 2006 from
http://msdn.microsoft.com/vstudio/express/visualC/default.aspx
This includes the IDE and the debugger. You will also need
|ms-platform-sdk|. You can build Vim with Make_mvc.mak.
Instructions for integrating the Platform SDK into VC Express:
http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx
2. MinGW
========
(written by Ron Aaron: <ronaharon@yahoo.com>)
This is about how to produce a Win32 binary of gvim with MinGW.
First, you need to get the 'mingw32' compiler, which is free for the download
at:
http://www.mingw.org/
Once you have downloaded the compiler binaries, unpack them on your hard disk
somewhere, and put them on your PATH. If you are on Win95/98 you can edit
your AUTOEXEC.BAT file with a line like:
set PATH=C:\GCC-2.95.2\BIN;%PATH%
or on NT/2000/XP, go to the Control Panel, (Performance and Maintenance),
System, Advanced, and edit the environment from there.
Test if gcc is on your path. From a CMD (or COMMAND on '95/98) window:
C:\> gcc --version
2.95.2
C:\> make --version
GNU Make version 3.77 (...etc...)
Now you are ready to rock 'n' roll. Unpack the vim sources (look on
www.vim.org for exactly which version of the vim files you need).
Change directory to 'vim\src':
C:\> cd vim\src
C:\VIM\SRC>
and you type:
make -f Make_ming.mak gvim.exe
After churning for a while, you will end up with 'gvim.exe' in the 'vim\src'
directory.
You should not need to do *any* editing of any files to get vim compiled this
way. If, for some reason, you want the console-mode-only version of vim (this
is NOT recommended on Win32, especially on '95/'98!!!), you need only change
the 'gvim.exe' to 'vim.exe' in the 'make' commands given above.
If you are dismayed by how big the EXE is, I strongly recommend you get 'UPX'
(also free!) and compress the file (typical compression is 50%). UPX can be
found at
http://www.upx.org/
ADDITION: NLS support with MinGW
(by Eduardo F. Amatria <eferna1@platea.pntic.mec.es>)
If you want National Language Support, read the file src/po/README_mingw.txt.
You need to uncomment lines in Make_ming.mak to have NLS defined.
3. Cygwin
=========
Use Make_cyg.mak with Cygwin's GCC. See
http://users.skynet.be/antoine.mechelynck/vim/compile.htm
The Cygnus one many not fully work yet.
With Cygnus gcc you can use the Unix Makefile instead (you need to get the
Unix archive then). Then you get a Cygwin application (feels like Vim is
runnin on Unix), while with Make_cyg.mak you get a Windows application (like
with the other makefiles).
4. Borland
===========
Use Make_bc5.mak with Borland C++ 5.x. See
http://users.skynet.be/antoine.mechelynck/vim/compile.htm
5. Cross compiling for Win32 from a Linux machine
=================================================
[Update of 1) needs to be verified]
If you like, you can compile the 'mingw' Win32 version from the comfort of
your Linux (or other unix) box. To do this, you need to follow a few steps:
1) Install the mingw32 cross-compiler. See
http://www.libsdl.org/extras/win32/cross/README.txt
2) get the *unix* version of the vim sources
3) in 'Make_ming.mak', set 'CROSS' to '1' instead of '0'.
4) make -f Make_ming.mak gvim.exe
Now you have created the Windows binary from your Linux box! Have fun...
6. Building with Python support
===============================
(written by Ron Aaron: <ronaharon@yahoo.com>)
This has been tested with the mingw32 compiler, and the ActiveState
ActivePython:
http://www.ActiveState.com/Products/ActivePython/
After installing the ActivePython, you will have to create a 'mingw32'
'libpython20.a' to link with:
cd $PYTHON/libs
pexports python20.dll > python20.def
dlltool -d python20.def -l libpython20.a
Once that is done, edit the 'Make_ming.mak' so the PYTHON variable points to
the root of the Python installation (C:\Python20, for example). If you are
cross-compiling on Linux with the mingw32 setup, you need to also convert all
the 'Include' files to *unix* line-endings. This bash command will do it
easily:
for fil in *.h ; do vim -e -c 'set ff=unix|w|q' $fil
Now just do:
make -f Make_ming.mak gvim.exe
and you will end up with a Python-enabled, Win32 version. Enjoy!
7. Building with MzScheme support
=================================
(written by Sergey Khorev <sergey.khorev@gmail.com>)
Vim with MzScheme (http://www.plt-scheme.org/software/mzscheme) support can
be built with either MSVC, or MinGW, or Cygwin. Supported versions are 205 and
above (including 299 and 30x series).
The MSVC build is quite straightforward. Simply invoke (in one line)
nmake -fMake_mvc.mak MZSCHEME=<Path-to-MzScheme>
[MZSCHEME_VER=<MzScheme-version>] [DYNAMIC_MZSCHEME=<yes or no>]
where <MzScheme-version> is the last seven characters from MzScheme dll name
(libmzschXXXXXXX.dll).
If DYNAMIC_MZSCHEME=yes, resulting executable will not depend on MzScheme
DLL's, but will load them in runtime on demand.
Building dynamic MzScheme support on MinGW and Cygwin is similar. Take into
account that <Path-to-MzScheme> should contain slashes rather than backslashes
(e.g. d:/Develop/MzScheme)
"Static" MzScheme support (Vim executable will depend on MzScheme DLLs
explicitly) on MinGW and Cygwin requires additional step.
libmzschXXXXXXX.dll and libmzgcXXXXXXX.dll should be copied from
%WINDOWS%\System32 to other location (either build directory, some temporary
dir or even MzScheme home).
Pass that path as MZSCHEME_DLLS parameter for Make. E.g.,
make -f Make_cyg.mak MZSCHEME=d:/Develop/MzScheme MZSCHEME_VER=209_000
MZSCHEME_DLLS=c:/Temp DYNAMIC_MZSCHEME=no
After a successful build, these dlls can be freely removed, leaving them in
%WINDOWS%\System32 only.
8. Windows 3.1x
===============
make -f Make_w16.mak 16 bit, Borland C++ 5.0
Warning: Be sure to use the right make.exe. It should be Borland make.
You will almost certainly have to change the paths for libs and include files
in the Makefile. Look for "D:\BC5" and "ctl3dv2". You will get a number of
warnings which can be ignored ( _chmod, precompiled header files, and
"possibly incorrect assignment").
The makefile should also work for BC++ 4.0 and 4.5, but may need tweaking to
remove unsupported compiler & liker options.
For making the Win32s version, you need Microsoft Visual C++ 4.1 OR EARLIER.
In MSVC 4.2 support for Win32s was dropped! Use this command:
nmake -f Make_mvc.mak GUI=yes
9. MS-DOS
=========
Summary:
ren Make_bc3.mak Makefile; make 16 bit, Borland C++ and Turbo C++
ren Make_tcc.mak Makefile; make 16 bit, Turbo C
make -f Make_djg.mak 32 bit, DJGPP 2.0
make -f Make_bc5.mak 32 bit, Borland C++ 5.x (edit it to
define DOS)
ren Make_bc3.mak Makefile; make 16 bit, Borland C++ and Turbo C++
ren Make_tcc.mak Makefile; make 16 bit, Turbo C
make -f Make_djg.mak 32 bit, DJGPP 2.0
make -f Make_bc5.mak 32 bit, Borland C++ 5.x (edit it to
define DOS)
Warning: Be sure to use the right make.exe. Microsoft C make doesn't work;
Borland make only works with Make_bc3.mak, Make_bc5.mak and Make_tcc.mak;
@@ -64,285 +376,3 @@ will work properly! Esp. handling multi-byte file names.
If you get all kinds of strange error messages when compiling, try adding
changing the file format from "unix" to "dos".
2. Win32 (Windows NT/XP and Windows 95/98)
====================================
Summary:
vcvars32 Setup paths for nmake and MSVC
nmake -f Make_mvc.mak console Win32 SDK or Microsoft Visual C++
nmake -f Make_mvc.mak GUI=yes GUI Microsoft Visual C++
nmake -f Make_mvc.mak OLE=yes OLE Microsoft Visual C++
nmake -f Make_mvc.mak PERL=C:\Perl PYTHON=C:\Python etc.
Perl, Python, etc.
Microsoft Visual C++
make -f Make_bc5.mak GUI Borland C++ 5.x
make -f Make_bc5.mak console Borland C++ 5.x (change the file)
nmake -f Make_ivc.mak CFG="Vim - Win32 Release gvim"
GUI Microsoft Visual C++ 4.x or later
nmake -f Make_ivc.mak CFG="Vim - Win32 Release gvim OLE"
OLE Microsoft Visual C++ 4.x or later
make -f Make_cyg.mak various Cygnus gcc
make -f Make_ming.mak various MingW with gcc
See the specific files for comments and options.
These files have been supplied by George V. Reilly, Ben Singer, Ken Scott and
Ron Aaron; they have been tested. The Cygnus one many not fully work yet.
With Cygnus gcc you can use the Unix Makefile instead (you need to get the
Unix archive then). Then you get a Cygwin application (feels like Vim is
runnin on Unix), while with Make_cyg.mak you get a Windows application (like
with the other makefiles).
You can also use the Visual C++ IDE: use File/Open workspace, select the
Make_ivc.mak file, then select Build/Build all. This builds the GUI version
by default.
Vim for Win32 compiles with the Microsoft Visual C++ 2.0 compiler and later,
and with the Borland C++ 4.5 32-bit compiler and later. It compiles on
Windows 95 and all four NT platforms: i386, Alpha, MIPS, and PowerPC. The
NT/i386 and the Windows 95 binaries are identical. Use Make_mvc.mak to
compile with Visual C++ and Make_bc5.mak to compile with Borland C++.
Make_mvc.mak allows a Vim to be built with various different features and
debug support. Debugging with MS Devstudio is provided by Make_dvc.mak.
For a description of the use of Make_dvc.mak, look in Make_mvc.mak.
For compiling Gvim with IME support on far-east Windows, uncomment the
MULTI_BYTE_IME define in the src/feature.h file before compiling.
The Win32 console binary was compiled with Visual C++ version 5.0, using
Make_mvc.mak and Make_bc5.mak (Borland C). Other compilers should also work.
If you get all kinds of strange error messages when compiling (you shouldn't
with the Microsoft or Borland 32-bit compilers), try adding <CR> characters
at the end of each line.
You probably need to run "vcvars32" before using "nmake".
For making the Win32s version, you need Microsoft Visual C++ 4.1 OR EARLIER.
In version 4.2 support for Win32s was dropped! Use this command:
nmake -f Make_mvc.mak GUI=yes
See the respective Makefiles for more comments.
3. Windows NT with OpenNT
=========================
(contributed by Michael A. Benzinger)
Building Vim on OpenNT 2.0 on Windows NT 4.0, with Softway's prerelease gcc:
1. export CONFIG_SHELL=//D/OpenNT/bin/sh
2. Make the following exports for modifying config.mk:
export CFLAGS=-O -Wshadow
export X_PRE_LIBS=-lXmu
2. Run configure as follows:
configure --prefix=/vim --bindir=/bin/opennt --enable-gui=Motif
If you don't have OpenNTif (Motif support), use this:
configure --prefix=/vim --bindir=/bin/opennt --enable-gui=Athena
3. Edit Makefile to perform the following since the Makefile include syntax
differs from that of gmake:
#include config.mk
.include "config.mk"
4. Change all install links to be "ln -f" and not "ln -s".
5. Change to the 'ctags' directory and configure.
6. Edit the Makefile and remove spurious spaces from lines 99 and 114.
7. Change slink to "ln -f" from "ln -s".
8. Return to the src directory.
9. make
4. Windows 3.1x
===============
make -f Make_w16.mak 16 bit, Borland C++ 5.0
Warning: Be sure to use the right make.exe. It should be Borland make.
You will almost certainly have to change the paths for libs and include files
in the Makefile. Look for "D:\BC5" and "ctl3dv2". You will get a number of
warnings which can be ignored ( _chmod, precompiled header files, and
"possibly incorrect assignment").
The makefile should also work for BC++ 4.0 and 4.5, but may need tweaking to
remove unsupported compiler & liker options.
5. Mingw
========
(written by Ron Aaron: <ronaharon@yahoo.com>)
This is about how to produce a Win32 binary of gvim with Mingw.
First, you need to get the 'mingw32' compiler, which is free for the download
at:
http://www.mingw.org/
Once you have downloaded the compiler binaries, unpack them on your hard disk
somewhere, and put them on your PATH. If you are on Win95/98 you can edit
your AUTOEXEC.BAT file with a line like:
set PATH=C:\GCC-2.95.2\BIN;%PATH%
or on NT/2000, go to the Control Panel, System, and edit the environment from
there.
Test if gcc is on your path. From a CMD (or COMMAND on '95/98):
C:\> gcc --version
2.95.2
C:\> make --version
GNU Make version 3.77 (...etc...)
Now you are ready to rock 'n' roll. Unpack the vim sources (look on
www.vim.org for exactly which version of the vim files you need).
Change directory to 'vim\src':
C:\> cd vim\src
C:\VIM\SRC>
and you type:
make -f Make_ming.mak gvim.exe
After churning for a while, you will end up with 'gvim.exe' in the 'vim\src'
directory.
You should not need to do *any* editing of any files to get vim compiled this
way. If, for some reason, you want the console-mode-only version of vim (this
is NOT recommended on Win32, especially on '95/'98!!!), you need only change
the 'gvim.exe' to 'vim.exe' in the 'make' commands given above.
If you are dismayed by how big the EXE is, I strongly recommend you get 'UPX'
(also free!) and compress the file (typical compression is 50%). UPX can be
found at
http://upx.tsx.org/
ADDITION: NLS support with Mingw
(by Eduardo F. Amatria <eferna1@platea.pntic.mec.es>)
If you want National Language Support, read the file src/po/README_mingw.txt.
You need to uncomment lines in Make_ming.mak to have NLS defined.
6. Cross compiling for Win32 from a Linux machine
=================================================
(written by Ron Aaron: <ronaharon@yahoo.com> with help from
Martin Kahlert <martin.kahlert@infineon.com>)
If you like, you can compile the 'mingw' Win32 version from the comfort of
your Linux (or other unix) box. To do this, you need to follow a few steps:
1) Install the mingw32 cross-compiler (if you have it, go to step 2)
1a) from 'ftp://ftp.nanotech.wisc.edu/pub/khan/gnu-win32/mingw32/snapshots/gcc-2.95.2-1',
get:
binutils-19990818-1-src.tar.gz
mingw-msvcrt-20000203.zip
gcc-2.95.2-1-x86-win32.diff.gz
1b) from 'http://gcc.gnu.org/' get:
gcc-2.95.2.tar.gz
1c) create a place to put the compiler source and binaries:
(assuming you are in the home directory)
mkdir gcc-bin
mkdir gcc-src
1d) unpack the sources:
cd gcc-src
tar xzf ../binutils-19990818-1-src.tar.gz
tar xzf ../gcc-2.95.2.tar.gz
unzip ../mingw-msvcrt-20000203
1e) build the different tools:
export PREFIX=~/gcc-bin/
cd gcc-2.95.2
zcat ../gcc-2.95.2-1-x86-win32.diff.gz | patch -p1 -E
cd ../binutils-19990818
./configure --target=i586-pc-mingw32msvc --prefix=$PREFIX
make
make install
cd ../gcc-2.95.2
./configure --target=i586-pc-mingw32msvc \
--with-libs=~/gcc-bin/i386-mingw32msvc/lib \
--with-headers=~/gcc-bin/i386-mingw32msvc/include \
--enable-languages=c++ \
--prefix=$PREFIX
make
make install
1f) Add $PREFIX/bin to your $PATH.
2) get the *unix* version of the vim sources
3) in 'Make_ming.mak', set 'CROSS' to '1' instead of '0'.
4) make -f Make_ming.mak gvim.exe
Now you have created the Windows binary from your Linux box! Have fun...
7. Building with Python support
=================================================
(written by Ron Aaron: <ronaharon@yahoo.com>)
This has been tested with the mingw32 compiler, and the ActiveState
ActivePython:
http://www.ActiveState.com/Products/ActivePython/
After installing the ActivePython, you will have to create a 'mingw32'
'libpython20.a' to link with:
cd $PYTHON/libs
pexports python20.dll > python20.def
dlltool -d python20.def -l libpython20.a
Once that is done, edit the 'Make_ming.mak' so the PYTHON variable points to
the root of the Python installation (C:\Python20, for example). If you are
cross-compiling on Linux with the mingw32 setup, you need to also convert all
the 'Include' files to *unix* line-endings. This bash command will do it
easily:
for fil in *.h ; do vim -e -c 'set ff=unix|w|q' $fil
Now just do:
make -f Make_ming.mak gvim.exe
and you will end up with a Python-enabled, Win32 version. Enjoy!
8. Building with MzScheme support
=================================================
(written by Sergey Khorev <sergey.khorev@gmail.com>)
Vim with MzScheme (http://www.plt-scheme.org/software/mzscheme) support can
be built with either MSVC, or MinGW, or Cygwin. Supported versions are 205 and
above (including 299 and 30x series).
The MSVC build is quite straightforward. Simply invoke (in one line)
nmake -fMake_mvc.mak MZSCHEME=<Path-to-MzScheme>
[MZSCHEME_VER=<MzScheme-version>] [DYNAMIC_MZSCHEME=<yes or no>]
where <MzScheme-version> is the last seven characters from MzScheme dll name
(libmzschXXXXXXX.dll).
If DYNAMIC_MZSCHEME=yes, resulting executable will not depend on MzScheme
DLL's, but will load them in runtime on demand.
Building dynamic MzScheme support on MinGW and Cygwin is similar. Take into
account that <Path-to-MzScheme> should contain slashes rather than backslashes
(e.g. d:/Develop/MzScheme)
"Static" MzScheme support (Vim executable will depend on MzScheme DLLs
explicitly) on MinGW and Cygwin requires additional step.
libmzschXXXXXXX.dll and libmzgcXXXXXXX.dll should be copied from
%WINDOWS%\System32 to other location (either build directory, some temporary
dir or even MzScheme home).
Pass that path as MZSCHEME_DLLS parameter for Make. E.g.,
make -fMake_cyg.mak MZSCHEME=d:/Develop/MzScheme MZSCHEME_VER=209_000
MZSCHEME_DLLS=c:/Temp DYNAMIC_MZSCHEME=no
After successful build these dlls can be freely removed, leaving them in
%WINDOWS%\System32 only.

View File

@@ -1,7 +1,7 @@
INSTALLvms.txt - Installation of Vim on OpenVMS
Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
Last change: 2005 Jul 12
Last change: 2006 Mar 02
This file contains instructions for compiling Vim on Openvms.
If you already have an executable version of Vim, you don't need this.
@@ -143,7 +143,6 @@ from CVS mirror ftp://ftp.polarhome.com/pub/cvs/SOURCE/
Uncommented - build without support.
Default : Uncommented
Parameter name : VIM_XIM
Description : X Input Method. For entering special languages
like chinese and Japanese. Please define just
@@ -304,9 +303,20 @@ perl_env :
You need also the OpenVMS Porting Library:
http://www.openvms.compaq.com/openvms/products/ips/porting.html
Source code for GTK and porting library that is used to build
VMS executables at polarhome.com are at
http://www.polarhome.com/vim/files/source/vms/
Enable GTK in make_vms.mms file with GTK = YES
Define GTK_ROOT that points to your GTK root directory.
You will need to edit GTKDIR variable in order to point
to GTK header files and libraries.
GTK_DIR = ALPHA$DKA0:[GTK128.]
".]" at the end is very important.
Build it as normally.
Used sharable images are:

View File

@@ -131,9 +131,9 @@
### See feature.h for a list of optionals.
# If you want to build some optional features without modifying the source,
# you can set DEFINES on the command line, e.g.,
# nmake -f makefile.mvc "DEFINES=-DEMACS_TAGS"
# nmake -f Make_mvc.mvc "DEFINES=-DEMACS_TAGS"
# Build on both Windows NT and Windows 95
# Build on both Windows NT/XP and Windows 9x
TARGETOS = BOTH
@@ -167,12 +167,12 @@ OBJDIR = $(OBJDIR)Z
OBJDIR = $(OBJDIR)d
!endif
# ntwin32.mak requires that CPU be set appropriately
# Win32.mak requires that CPU be set appropriately
!ifdef PROCESSOR_ARCHITECTURE
# We're on Windows NT or using VC 6
# We're on Windows NT or using VC 6+
CPU = $(PROCESSOR_ARCHITECTURE)
! if "$(CPU)" == "x86"
! if ("$(CPU)" == "x86") || ("$(CPU)" == "X86")
CPU = i386
! endif
!else # !PROCESSOR_ARCHITECTURE
@@ -190,17 +190,12 @@ MAKEFLAGS_GVIMEXT = DEBUG=yes
!endif
# Build a multithreaded version for the Windows 95 dead keys hack
# Commented out because it doesn't work.
# MULTITHREADED = 1
# Get all sorts of useful, standard macros from the SDK. (Note that
# MSVC 2.2 does not install <ntwin32.mak> in the \msvc20\include
# directory, but you can find it in \msvc20\include on the CD-ROM.
# You may also need <win32.mak> from the same place.)
!include <ntwin32.mak>
!include <Win32.mak>
#>>>>> path of the compiler and linker; name of include and lib directories
@@ -263,12 +258,14 @@ XPM_INC = -I $(XPM)\include
!endif
!endif
# Set which version of the CRT to use
!if defined(USE_MSVCRT)
CVARS = $(cvarsdll)
!elseif defined(MULTITHREADED)
CVARS = $(cvarsmt)
# !elseif defined(MULTITHREADED)
# CVARS = $(cvarsmt)
!else
CVARS = $(cvars)
# CVARS = $(cvars)
CVARS = $(cvarsmt)
!endif
# need advapi32.lib for GetUserName()
@@ -276,7 +273,7 @@ CVARS = $(cvars)
# gdi32.lib and comdlg32.lib for printing support
# ole32.lib and uuid.lib are needed for FEAT_SHORTCUT
CON_LIB = advapi32.lib shell32.lib gdi32.lib comdlg32.lib ole32.lib uuid.lib
!if "$(VC6)" == "yes"
!if "$(DELAYLOAD)" == "yes"
CON_LIB = $(CON_LIB) /DELAYLOAD:comdlg32.dll /DELAYLOAD:ole32.dll DelayImp.lib
!endif
@@ -340,10 +337,14 @@ RCFLAGS = $(rcflags) $(rcvars) -DNDEBUG
! ifdef USE_MSVCRT
CFLAGS = $(CFLAGS) -MD
LIBC = msvcrt.lib
! elseif defined(MULTITHREADED)
LIBC = libcmt.lib
# CFLAGS = $(CFLAGS) $(cvarsdll)
# ! elseif defined(MULTITHREADED)
# LIBC = libcmt.lib
# CFLAGS = $(CFLAGS) $(cvarsmt)
! else
LIBC = libc.lib
# LIBC = libc.lib
LIBC = libcmt.lib
# CFLAGS = $(CFLAGS) $(cvars)
! endif
!else # DEBUG
VIM = vimd
@@ -358,10 +359,14 @@ LIBC = /fixed:no
! ifdef USE_MSVCRT
CFLAGS = $(CFLAGS) -MDd
LIBC = $(LIBC) msvcrtd.lib
! elseif defined(MULTITHREADED)
LIBC = $(LIBC) libcmtd.lib
# CFLAGS = $(CFLAGS) $(cvarsdll)
# ! elseif defined(MULTITHREADED)
# LIBC = $(LIBC) libcmtd.lib
# CFLAGS = $(CFLAGS) $(cvarsmt)
! else
LIBC = $(LIBC) libcd.lib
# LIBC = $(LIBC) libcd.lib
LIBC = $(LIBC) libcmtd.lib
# CFLAGS = $(CFLAGS) $(cvars)
! endif
!endif # DEBUG
@@ -666,7 +671,7 @@ CFLAGS = $(CFLAGS) -DFEAT_$(FEATURES)
# on a crash (doesn't add overhead to the executable).
#
CFLAGS = $(CFLAGS) /Zi /Fd$(OUTDIR)/
LINK_PDB = /PDB:$(OUTDIR)/$(VIM).pdb -debug:full -debugtype:cv,fixup
LINK_PDB = /PDB:$(OUTDIR)/$(VIM).pdb -debug # -debug:full -debugtype:cv,fixup
#
# End extra feature include
@@ -1004,4 +1009,8 @@ proto.h: \
proto/window.pro \
$(NETBEANS_PRO)
.cod.c:
$(CC) $(CFLAGS) /FAc $<
# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0:

View File

@@ -2,7 +2,7 @@
# Makefile for Vim on OpenVMS
#
# Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
# Last change: 2005 Jul 23
# Last change: 2006 Feb 23
#
# This has script been tested on VMS 6.2 to 8.2 on DEC Alpha, VAX and IA64
# with MMS and MMK
@@ -288,7 +288,7 @@ ALL_LIBS = $(LIBS) $(GUI_LIB_DIR) $(GUI_LIB) \
SRC = buffer.c charset.c diff.c digraph.c edit.c eval.c ex_cmds.c ex_cmds2.c \
ex_docmd.c ex_eval.c ex_getln.c if_xcmdsrv.c fileio.c fold.c getchar.c \
hardcopy.c hashtable.c main.c mark.c menu.c mbyte.c memfile.c memline.c message.c misc1.c \
misc2.c move.c normal.c ops.c option.c quickfix.c regexp.c search.c \
misc2.c move.c normal.c ops.c option.c popupmenu.c quickfix.c regexp.c search.c \
spell.c syntax.c tag.c term.c termlib.c ui.c undo.c version.c screen.c \
window.c os_unix.c os_vms.c pathdef.c \
$(GUI_SRC) $(PERL_SRC) $(PYTHON_SRC) $(TCL_SRC) $(SNIFF_SRC) \
@@ -298,7 +298,7 @@ OBJ = buffer.obj charset.obj diff.obj digraph.obj edit.obj eval.obj \
ex_cmds.obj ex_cmds2.obj ex_docmd.obj ex_eval.obj ex_getln.obj \
if_xcmdsrv.obj fileio.obj fold.obj getchar.obj hardcopy.obj hashtable.obj main.obj mark.obj \
menu.obj memfile.obj memline.obj message.obj misc1.obj misc2.obj \
move.obj mbyte.obj normal.obj ops.obj option.obj quickfix.obj \
move.obj mbyte.obj normal.obj ops.obj option.obj popupmenu.obj quickfix.obj \
regexp.obj search.obj spell.obj syntax.obj tag.obj term.obj termlib.obj \
ui.obj undo.obj screen.obj version.obj window.obj os_unix.obj \
os_vms.obj pathdef.obj \
@@ -607,6 +607,10 @@ pathdef.obj : pathdef.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h \
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h
popupmenu.obj : popupmenu.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h \
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
globals.h farsi.h arabic.h
quickfix.obj : quickfix.c vim.h [.auto]config.h feature.h os_unix.h \
ascii.h keymap.h term.h macros.h structs.h regexp.h \
gui.h gui_beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \

View File

@@ -354,7 +354,10 @@ CClink = $(CC)
# DARWIN - detecting Mac OS X
# Uncomment this line when you want to compile a Unix version of Vim on
# Darwin. None of the Mac specific options or files will be used.
# You can also change the architecture supported, default is to test for both.
#CONF_OPT_DARWIN = --disable-darwin
#CONF_OPT_DARWIN = --with-mac-arch=i386
#CONF_OPT_DARWIN = --with-mac-arch=ppc
# PERL
# Uncomment this when you want to include the Perl interface.
@@ -1197,7 +1200,7 @@ PHOTONGUI_BUNDLE =
# CARBON GUI
CARBONGUI_SRC = gui.c gui_mac.c
CARBONGUI_OBJ = objects/gui.o objects/gui_mac.o objects/pty.o
CARBONGUI_DEFS = -DFEAT_GUI_MAC -arch ppc -fno-common -fpascal-strings \
CARBONGUI_DEFS = -DFEAT_GUI_MAC -fno-common -fpascal-strings \
-Wall -Wno-unknown-pragmas \
-mdynamic-no-pic -pipe
CARBONGUI_IPATH = -I. -Iproto
@@ -1267,6 +1270,10 @@ POST_DEFS = $(X_CFLAGS) $(MZSCHEME_CFLAGS) $(PERL_CFLAGS) $(PYTHON_CFLAGS) $(TCL
ALL_CFLAGS = $(PRE_DEFS) $(CFLAGS) $(PROFILE_CFLAGS) $(POST_DEFS)
# Exclude $CFLAGS for osdef.sh, for Mac 10.4 some flags don't work together
# with "-E".
OSDEF_CFLAGS = $(PRE_DEFS) $(POST_DEFS)
LINT_CFLAGS = -DLINT -I. $(PRE_DEFS) $(POST_DEFS) -Dinline= -D__extension__= -Dalloca=alloca
LINT_EXTRA = -DUSE_SNIFF -DHANGUL_INPUT -D"__attribute__(x)="
@@ -1510,6 +1517,8 @@ PRO_AUTO = \
$(ALL_GUI_PRO) \
$(TCL_PRO)
ICON_APP = gui_mac.icns
PRO_MANUAL = os_amiga.pro os_msdos.pro os_win16.pro os_win32.pro \
os_mswin.pro os_beos.pro os_vms.pro os_riscos.pro $(PERL_PRO)
@@ -2131,6 +2140,10 @@ shadow: runtime pixmaps
cp config.mk.dist $(SHADOWDIR)
mkdir $(SHADOWDIR)/xxd
cd $(SHADOWDIR)/xxd; ln -s ../../xxd/*.[ch] ../../xxd/Make* .
if test -f $(ICON_APP); then \
cd $(SHADOWDIR); \
ln -s ../$(ICON_APP) ../os_mac.rsr.hqx ../dehqx.py .; \
fi
mkdir $(SHADOWDIR)/testdir
cd $(SHADOWDIR)/testdir; ln -s ../../testdir/Makefile \
../../testdir/vimrc.unix \
@@ -2210,7 +2223,7 @@ auto/if_perl.c: if_perl.xs
$(PERLLIB)/ExtUtils/typemap if_perl.xs >> $@
auto/osdef.h: auto/config.h osdef.sh osdef1.h.in osdef2.h.in
CC="$(CC) $(ALL_CFLAGS)" srcdir=$(srcdir) sh $(srcdir)/osdef.sh
CC="$(CC) $(OSDEF_CFLAGS)" srcdir=$(srcdir) sh $(srcdir)/osdef.sh
QUOTESED = sed -e 's/"/\\"/g' -e 's/\\"/"/' -e 's/\\";$$/";/'
auto/pathdef.c: Makefile auto/config.mk
@@ -2494,7 +2507,6 @@ M4FLAGSX = $(M4FLAGS) -DAPP_EXE=$(VIMNAME) -DAPP_NAME=$(VIMNAME) \
-DAPP_VER=$(VERSION) -DICON_APP=$(ICON_APP)
### Icons
ICON_APP = gui_mac.icns
ICONS = $(RESDIR)/$(ICON_APP)
# If you uncomment the following lines the *.icns in the src directory will be

154
src/auto/configure vendored
View File

@@ -876,6 +876,7 @@ Optional Features:
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-mac-arch=ARCH intel, ppc or both
--with-vim-name=NAME what to call the Vim executable
--with-ex-name=NAME what to call the Ex executable
--with-view-name=NAME what to call the View executable
@@ -2780,9 +2781,9 @@ if test -z "$CFLAGS"; then
test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall"
fi
if test "$GCC" = yes; then
gccversion=`"$CC" --version | sed -e '2,$d;s/^[^0-9]*\([0-9]\.[0-9.]*\).*$/\1/g'`
gccversion=`"$CC" --version | sed -e '2,$d;s/^[^0-9]*\(darwin.[^0-9]*\)*\([0-9]\.[0-9.]*\).*$/\2/g'`
if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2" -o "$gccversion" = "4.0.1"; then
echo 'GCC 34.0.12 has a bug in the optimizer, disabling "-O#"'
echo 'GCC [34].0.[12] has a bug in the optimizer, disabling "-O#"'
CFLAGS=`echo "$CFLAGS" | sed 's/-O[23456789]/-O/'`
else
if test "$gccversion" = "3.1" -o "$gccversion" = "3.2" -o "$gccversion" = "3.2.1" && `echo "$CFLAGS" | grep -v fno-strength-reduce >/dev/null`; then
@@ -2864,11 +2865,148 @@ echo "${ECHO_T}no, Darwin support disabled" >&6
echo "${ECHO_T}yes, Darwin support excluded" >&6
fi
echo "$as_me:$LINENO: checking --with-mac-arch argument" >&5
echo $ECHO_N "checking --with-mac-arch argument... $ECHO_C" >&6
# Check whether --with-mac-arch or --without-mac-arch was given.
if test "${with_mac_arch+set}" = set; then
withval="$with_mac_arch"
MACARCH="$withval"; echo "$as_me:$LINENO: result: $MACARCH" >&5
echo "${ECHO_T}$MACARCH" >&6
else
MACARCH="both"; echo "$as_me:$LINENO: result: defaulting to $MACARCH" >&5
echo "${ECHO_T}defaulting to $MACARCH" >&6
fi;
if test "x$MACARCH" = "xboth"; then
echo "$as_me:$LINENO: checking for 10.4 universal SDK" >&5
echo $ECHO_N "checking for 10.4 universal SDK... $ECHO_C" >&6
save_cppflags="$CPPFLAGS"
save_cflags="$CFLAGS"
save_ldflags="$LDFLAGS"
CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
echo "$as_me:$LINENO: result: found" >&5
echo "${ECHO_T}found" >&6
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
echo "$as_me:$LINENO: result: not found" >&5
echo "${ECHO_T}not found" >&6
CFLAGS="save_cflags"
echo "$as_me:$LINENO: checking if Intel architecture is supported" >&5
echo $ECHO_N "checking if Intel architecture is supported... $ECHO_C" >&6
CPPFLAGS="$CPPFLAGS -arch i386"
LDFLAGS="$save_ldflags -arch i386"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; MACARCH="intel"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
MACARCH="ppc"
CPPFLAGS="$save_cppflags -arch ppc"
LDFLAGS="$save_ldflags -arch ppc"
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
elif test "x$MACARCH" = "xintel"; then
CPPFLAGS="$CPPFLAGS -arch intel"
LDFLAGS="$LDFLAGS -arch intel"
else
CPPFLAGS="$CPPFLAGS -arch ppc"
LDFLAGS="$LDFLAGS -arch ppc"
fi
if test "$enable_darwin" = "yes"; then
MACOSX=yes
OS_EXTRA_SCR="os_macosx.c os_mac_conv.c";
OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -I/Developer/Headers/FlatCarbon -no-cpp-precomp"
CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
if test "x$MACARCH" = "xboth"; then
CPPFLAGS="$CPPFLAGS -I/Developer/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon"
else
CPPFLAGS="$CPPFLAGS -I/Developer/Headers/FlatCarbon"
fi
echo "$as_me:$LINENO: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
@@ -3256,6 +3394,11 @@ fi
fi
fi
fi
if test "$MACARCH" = "intel" -o "$MACARCH" = "both"; then
CFLAGS=`echo "$CFLAGS" | sed 's/-O[23456789]/-Oz/'`
fi
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
@@ -15082,12 +15225,15 @@ echo "${ECHO_T}yes" >&6
echo "${ECHO_T}no" >&6
fi
fi
if test "x$MACARCH" = "xboth"; then
LDFLAGS="$LDFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
fi
echo "$as_me:$LINENO: checking for GCC 3 or later" >&5
echo $ECHO_N "checking for GCC 3 or later... $ECHO_C" >&6
DEPEND_CFLAGS_FILTER=
if test "$GCC" = yes; then
gccmajor=`"$CC" --version | sed -e '2,$d;s/^[^0-9]*\([1-9]\)\.[0-9.]*.*$/\1/g'`
gccmajor=`"$CC" --version | sed -e '2,$d;s/^[^0-9]*\(darwin.[^0-9]*\)*\([1-9]\)\.[0-9].*$/\2/g'`
if test "$gccmajor" -gt "2"; then
DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'"
fi

View File

@@ -2947,15 +2947,12 @@ fileinfo(fullname, shorthelp, dont_truncate)
{
p = msg_trunc_attr(buffer, FALSE, 0);
if (restart_edit != 0 || (msg_scrolled && !need_wait_return))
{
/* Need to repeat the message after redrawing when:
* - When restart_edit is set (otherwise there will be a delay
* before redrawing).
* - When the screen was scrolled but there is no wait-return
* prompt. */
set_keep_msg(p);
keep_msg_attr = 0;
}
set_keep_msg(p, 0);
}
vim_free(buffer);
@@ -3018,9 +3015,15 @@ maketitle()
if (*p_titlestring != NUL)
{
#ifdef FEAT_STL_OPT
int use_sandbox = FALSE;
# ifdef FEAT_EVAL
use_sandbox = was_set_insecurely((char_u *)"titlestring", 0);
# endif
if (stl_syntax & STL_IN_TITLE)
build_stl_str_hl(curwin, t_str, sizeof(buf),
p_titlestring, 0, maxlen, NULL);
p_titlestring, use_sandbox,
0, maxlen, NULL, NULL);
else
#endif
t_str = p_titlestring;
@@ -3109,9 +3112,15 @@ maketitle()
if (*p_iconstring != NUL)
{
#ifdef FEAT_STL_OPT
int use_sandbox = FALSE;
# ifdef FEAT_EVAL
use_sandbox = was_set_insecurely((char_u *)"iconstring", 0);
# endif
if (stl_syntax & STL_IN_ICON)
build_stl_str_hl(curwin, i_str, sizeof(buf),
p_iconstring, 0, 0, NULL);
p_iconstring, use_sandbox,
0, 0, NULL, NULL);
else
#endif
i_str = p_iconstring;
@@ -3188,11 +3197,14 @@ free_titles()
#endif /* FEAT_TITLE */
#if defined(FEAT_STL_OPT) || defined(PROTO)
#if defined(FEAT_STL_OPT) || defined(FEAT_GUI_TABLINE) || defined(PROTO)
/*
* Build a string from the status line items in fmt.
* Build a string from the status line items in "fmt".
* Return length of string in screen cells.
*
* Normally works for window "wp", except when working for 'tabline' then it
* is "curwin".
*
* Items are drawn interspersed with the text that surrounds it
* Specials: %-<wid>(xxx%) => group, %= => middle marker, %< => truncation
* Item: %-<minwid>.<maxwid><itemch> All but <itemch> are optional
@@ -3200,15 +3212,18 @@ free_titles()
* If maxwidth is not zero, the string will be filled at any middle marker
* or truncated if too long, fillchar is used for all whitespace.
*/
/*ARGSUSED*/
int
build_stl_str_hl(wp, out, outlen, fmt, fillchar, maxwidth, hl)
build_stl_str_hl(wp, out, outlen, fmt, use_sandbox, fillchar, maxwidth, hltab, tabtab)
win_T *wp;
char_u *out; /* buffer to write into */
char_u *out; /* buffer to write into != NameBuff */
size_t outlen; /* length of out[] */
char_u *fmt;
int use_sandbox; /* "fmt" was set insecurely, use sandbox */
int fillchar;
int maxwidth;
struct stl_hlrec *hl;
struct stl_hlrec *hltab; /* return: HL attributes (can be NULL) */
struct stl_hlrec *tabtab; /* return: tab page nrs (can be NULL) */
{
char_u *p;
char_u *s;
@@ -3245,6 +3260,7 @@ build_stl_str_hl(wp, out, outlen, fmt, fillchar, maxwidth, hl)
Group,
Middle,
Highlight,
TabPage,
Trunc
} type;
} item[STL_MAX_ITEM];
@@ -3255,6 +3271,21 @@ build_stl_str_hl(wp, out, outlen, fmt, fillchar, maxwidth, hl)
char_u opt;
#define TMPLEN 70
char_u tmp[TMPLEN];
char_u *usefmt = fmt;
struct stl_hlrec *sp;
#ifdef FEAT_EVAL
/*
* When the format starts with "%!" then evaluate it as an expression and
* use the result as the actual format string.
*/
if (fmt[0] == '%' && fmt[1] == '!')
{
usefmt = eval_to_string_safe(fmt + 2, NULL, use_sandbox);
if (usefmt == NULL)
usefmt = (char_u *)"";
}
#endif
if (fillchar == 0)
fillchar = ' ';
@@ -3270,7 +3301,7 @@ build_stl_str_hl(wp, out, outlen, fmt, fillchar, maxwidth, hl)
curitem = 0;
prevchar_isflag = TRUE;
prevchar_isitem = FALSE;
for (s = fmt; *s;)
for (s = usefmt; *s; )
{
if (*s != NUL && *s != '%')
prevchar_isflag = prevchar_isitem = FALSE;
@@ -3416,7 +3447,7 @@ build_stl_str_hl(wp, out, outlen, fmt, fillchar, maxwidth, hl)
if (minwid < 0) /* overflow */
minwid = 0;
}
if (*s == STL_HIGHLIGHT)
if (*s == STL_USER_HL)
{
item[curitem].type = Highlight;
item[curitem].start = p;
@@ -3425,6 +3456,32 @@ build_stl_str_hl(wp, out, outlen, fmt, fillchar, maxwidth, hl)
curitem++;
continue;
}
if (*s == STL_TABPAGENR || *s == STL_TABCLOSENR)
{
if (*s == STL_TABCLOSENR)
{
if (minwid == 0)
{
/* %X ends the close label, go back to the previously
* define tab label nr. */
for (n = curitem - 1; n >= 0; --n)
if (item[n].type == TabPage && item[n].minwid >= 0)
{
minwid = item[n].minwid;
break;
}
}
else
/* close nrs are stored as negative values */
minwid = - minwid;
}
item[curitem].type = TabPage;
item[curitem].start = p;
item[curitem].minwid = minwid;
s++;
curitem++;
continue;
}
if (*s == '.')
{
s++;
@@ -3501,8 +3558,7 @@ build_stl_str_hl(wp, out, outlen, fmt, fillchar, maxwidth, hl)
curwin = wp;
curbuf = wp->w_buffer;
str = eval_to_string_safe(p, &t,
was_set_insecurely((char_u *)"statusline"));
str = eval_to_string_safe(p, &t, use_sandbox);
curwin = o_curwin;
curbuf = o_curbuf;
@@ -3577,8 +3633,8 @@ build_stl_str_hl(wp, out, outlen, fmt, fillchar, maxwidth, hl)
str = tmp;
break;
case STL_PAGENUM:
#ifdef FEAT_PRINTER
num = get_printer_page_num();
#if defined(FEAT_PRINTER) || defined(FEAT_GUI_TABLINE)
num = printer_page_num;
#else
num = 0;
#endif
@@ -3683,6 +3739,20 @@ build_stl_str_hl(wp, out, outlen, fmt, fillchar, maxwidth, hl)
case 7: str = (char_u *)",+-"; break;
}
break;
case STL_HIGHLIGHT:
t = s;
while (*s != '#' && *s != NUL)
++s;
if (*s == '#')
{
item[curitem].type = Highlight;
item[curitem].start = p;
item[curitem].minwid = -syn_namen2id(t, s - t);
curitem++;
}
++s;
continue;
}
item[curitem].start = p;
@@ -3799,6 +3869,11 @@ build_stl_str_hl(wp, out, outlen, fmt, fillchar, maxwidth, hl)
*p = NUL;
itemcnt = curitem;
#ifdef FEAT_EVAL
if (usefmt != fmt)
vim_free(usefmt);
#endif
width = vim_strsize(out);
if (maxwidth > 0 && width > maxwidth)
{
@@ -3908,26 +3983,46 @@ build_stl_str_hl(wp, out, outlen, fmt, fillchar, maxwidth, hl)
}
}
if (hl != NULL)
/* Store the info about highlighting. */
if (hltab != NULL)
{
sp = hltab;
for (l = 0; l < itemcnt; l++)
{
if (item[l].type == Highlight)
{
hl->start = item[l].start;
hl->userhl = item[l].minwid;
hl++;
sp->start = item[l].start;
sp->userhl = item[l].minwid;
sp++;
}
}
hl->start = NULL;
hl->userhl = 0;
sp->start = NULL;
sp->userhl = 0;
}
/* Store the info about tab pages labels. */
if (tabtab != NULL)
{
sp = tabtab;
for (l = 0; l < itemcnt; l++)
{
if (item[l].type == TabPage)
{
sp->start = item[l].start;
sp->userhl = item[l].minwid;
sp++;
}
}
sp->start = NULL;
sp->userhl = 0;
}
return width;
}
#endif /* FEAT_STL_OPT */
#if defined(FEAT_STL_OPT) || defined(FEAT_CMDL_INFO) || defined(PROTO)
#if defined(FEAT_STL_OPT) || defined(FEAT_CMDL_INFO) \
|| defined(FEAT_GUI_TABLINE) || defined(PROTO)
/*
* Get relative cursor position in window into "str[]", in the form 99%, using
* "Top", "Bot" or "All" when appropriate.
@@ -4096,6 +4191,8 @@ do_arg_all(count, forceit)
int p_ea_save;
alist_T *alist; /* argument list to be used */
buf_T *buf;
tabpage_T *tpnext;
int had_tab = cmdmod.tab;
if (ARGCOUNT <= 0)
{
@@ -4119,79 +4216,97 @@ do_arg_all(count, forceit)
* Also close windows that are not full width;
* When 'hidden' or "forceit" set the buffer becomes hidden.
* Windows that have a changed buffer and can't be hidden won't be closed.
* When the ":tab" modifier was used do this for all tab pages.
*/
for (wp = firstwin; wp != NULL; wp = wpnext)
if (had_tab > 0)
goto_tabpage_tp(first_tabpage);
for (;;)
{
wpnext = wp->w_next;
buf = wp->w_buffer;
if (buf->b_ffname == NULL
|| buf->b_nwindows > 1
tpnext = curtab->tp_next;
for (wp = firstwin; wp != NULL; wp = wpnext)
{
wpnext = wp->w_next;
buf = wp->w_buffer;
if (buf->b_ffname == NULL
|| buf->b_nwindows > 1
#ifdef FEAT_VERTSPLIT
|| wp->w_width != Columns
|| wp->w_width != Columns
#endif
)
i = ARGCOUNT;
else
{
/* check if the buffer in this window is in the arglist */
for (i = 0; i < ARGCOUNT; ++i)
)
i = ARGCOUNT;
else
{
if (ARGLIST[i].ae_fnum == buf->b_fnum
|| fullpathcmp(alist_name(&ARGLIST[i]),
buf->b_ffname, TRUE) & FPC_SAME)
/* check if the buffer in this window is in the arglist */
for (i = 0; i < ARGCOUNT; ++i)
{
if (i < opened_len)
opened[i] = TRUE;
if (wp->w_alist != curwin->w_alist)
if (ARGLIST[i].ae_fnum == buf->b_fnum
|| fullpathcmp(alist_name(&ARGLIST[i]),
buf->b_ffname, TRUE) & FPC_SAME)
{
/* Use the current argument list for all windows
* containing a file from it. */
alist_unlink(wp->w_alist);
wp->w_alist = curwin->w_alist;
++wp->w_alist->al_refcount;
if (i < opened_len)
opened[i] = TRUE;
if (wp->w_alist != curwin->w_alist)
{
/* Use the current argument list for all windows
* containing a file from it. */
alist_unlink(wp->w_alist);
wp->w_alist = curwin->w_alist;
++wp->w_alist->al_refcount;
}
break;
}
break;
}
}
}
wp->w_arg_idx = i;
wp->w_arg_idx = i;
if (i == ARGCOUNT) /* close this window */
{
if (P_HID(buf) || forceit || buf->b_nwindows > 1
|| !bufIsChanged(buf))
if (i == ARGCOUNT) /* close this window */
{
/* If the buffer was changed, and we would like to hide it,
* try autowriting. */
if (!P_HID(buf) && buf->b_nwindows <= 1 && bufIsChanged(buf))
if (P_HID(buf) || forceit || buf->b_nwindows > 1
|| !bufIsChanged(buf))
{
(void)autowrite(buf, FALSE);
#ifdef FEAT_AUTOCMD
/* check if autocommands removed the window */
if (!win_valid(wp) || !buf_valid(buf))
/* If the buffer was changed, and we would like to hide it,
* try autowriting. */
if (!P_HID(buf) && buf->b_nwindows <= 1 && bufIsChanged(buf))
{
wpnext = firstwin; /* start all over... */
continue;
(void)autowrite(buf, FALSE);
#ifdef FEAT_AUTOCMD
/* check if autocommands removed the window */
if (!win_valid(wp) || !buf_valid(buf))
{
wpnext = firstwin; /* start all over... */
continue;
}
#endif
}
#ifdef FEAT_WINDOWS
if (firstwin == lastwin) /* don't close last window */
#endif
use_firstwin = TRUE;
#ifdef FEAT_WINDOWS
else
{
win_close(wp, !P_HID(buf) && !bufIsChanged(buf));
# ifdef FEAT_AUTOCMD
/* check if autocommands removed the next window */
if (!win_valid(wpnext))
wpnext = firstwin; /* start all over... */
# endif
}
#endif
}
#ifdef FEAT_WINDOWS
if (firstwin == lastwin) /* don't close last window */
#endif
use_firstwin = TRUE;
#ifdef FEAT_WINDOWS
else
{
win_close(wp, !P_HID(buf) && !bufIsChanged(buf));
# ifdef FEAT_AUTOCMD
/* check if autocommands removed the next window */
if (!win_valid(wpnext))
wpnext = firstwin; /* start all over... */
# endif
}
#endif
}
}
/* Without the ":tab" modifier only do the current tab page. */
if (had_tab == 0 || tpnext == NULL)
break;
# ifdef FEAT_AUTOCMD
/* check if autocommands removed the next tab page */
if (!valid_tabpage(tpnext))
tpnext = first_tabpage; /* start all over...*/
# endif
goto_tabpage_tp(tpnext);
}
/*
@@ -4264,6 +4379,10 @@ do_arg_all(count, forceit)
use_firstwin = FALSE;
}
ui_breakcheck();
/* When ":tab" was used open a new tab for a new window repeatedly. */
if (had_tab > 0 && tabpage_index(NULL) <= p_tpm)
cmdmod.tab = 9999;
}
/* Remove the "lock" on the argument list. */
@@ -4295,6 +4414,10 @@ ex_buffer_all(eap)
int r;
int count; /* Maximum number of windows to open. */
int all; /* When TRUE also load inactive buffers. */
#ifdef FEAT_WINDOWS
int had_tab = cmdmod.tab;
tabpage_T *tpnext;
#endif
if (eap->addr_count == 0) /* make as many windows as possible */
count = 9999;
@@ -4315,27 +4438,47 @@ ex_buffer_all(eap)
* Close superfluous windows (two windows for the same buffer).
* Also close windows that are not full-width.
*/
for (wp = firstwin; wp != NULL; wp = wpnext)
#ifdef FEAT_WINDOWS
if (had_tab > 0)
goto_tabpage_tp(first_tabpage);
for (;;)
{
wpnext = wp->w_next;
if (wp->w_buffer->b_nwindows > 1
#ifdef FEAT_VERTSPLIT
|| ((cmdmod.split & WSP_VERT)
? wp->w_height + wp->w_status_height < Rows - p_ch
: wp->w_width != Columns)
#endif
)
tpnext = curtab->tp_next;
for (wp = firstwin; wp != NULL; wp = wpnext)
{
win_close(wp, FALSE);
#ifdef FEAT_AUTOCMD
wpnext = firstwin; /* just in case an autocommand does something
strange with windows */
open_wins = 0;
wpnext = wp->w_next;
if ((wp->w_buffer->b_nwindows > 1
#ifdef FEAT_VERTSPLIT
|| ((cmdmod.split & WSP_VERT)
? wp->w_height + wp->w_status_height < Rows - p_ch
- tabline_height()
: wp->w_width != Columns)
#endif
#ifdef FEAT_WINDOWS
|| (had_tab > 0 && wp != firstwin)
#endif
) && firstwin != lastwin)
{
win_close(wp, FALSE);
#ifdef FEAT_AUTOCMD
wpnext = firstwin; /* just in case an autocommand does
something strange with windows */
tpnext = first_tabpage; /* start all over...*/
open_wins = 0;
#endif
}
else
++open_wins;
}
else
++open_wins;
#ifdef FEAT_WINDOWS
/* Without the ":tab" modifier only do the current tab page. */
if (had_tab == 0 || tpnext == NULL)
break;
goto_tabpage_tp(tpnext);
}
#endif
/*
* Go through the buffer list. When a buffer doesn't have a window yet,
@@ -4356,14 +4499,28 @@ ex_buffer_all(eap)
if ((!all && buf->b_ml.ml_mfp == NULL) || !buf->b_p_bl)
continue;
/* Check if this buffer already has a window */
for (wp = firstwin; wp != NULL; wp = wp->w_next)
if (wp->w_buffer == buf)
break;
/* If the buffer already has a window, move it */
if (wp != NULL)
win_move_after(wp, curwin);
else if (split_ret == OK)
#ifdef FEAT_WINDOWS
if (had_tab != 0)
{
/* With the ":tab" modifier don't move the window. */
if (buf->b_nwindows > 0)
wp = lastwin; /* buffer has a window, skip it */
else
wp = NULL;
}
else
#endif
{
/* Check if this buffer already has a window */
for (wp = firstwin; wp != NULL; wp = wp->w_next)
if (wp->w_buffer == buf)
break;
/* If the buffer already has a window, move it */
if (wp != NULL)
win_move_after(wp, curwin);
}
if (wp == NULL && split_ret == OK)
{
/* Split the window and put the buffer in it */
p_ea_save = p_ea;
@@ -4427,6 +4584,11 @@ ex_buffer_all(eap)
/* Autocommands deleted the buffer or aborted script processing!!! */
if (aborting())
break;
#endif
#ifdef FEAT_WINDOWS
/* When ":tab" was used open a new tab for a new window repeatedly. */
if (had_tab > 0 && tabpage_index(NULL) <= p_tpm)
cmdmod.tab = 9999;
#endif
}
#ifdef FEAT_AUTOCMD

View File

@@ -29,10 +29,10 @@ if test -z "$CFLAGS"; then
test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall"
fi
if test "$GCC" = yes; then
gccversion=`"$CC" --version | sed -e '2,$d;s/^[[^0-9]]*\([[0-9]]\.[[0-9.]]*\).*$/\1/g'`
gccversion=`"$CC" --version | sed -e '2,$d;s/^[[^0-9]]*\(darwin.[[^0-9]]*\)*\([[0-9]]\.[[0-9.]]*\).*$/\2/g'`
dnl version 4.0.1 was reported to cause trouble on Macintosh by Marcin Dalecki
if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2" -o "$gccversion" = "4.0.1"; then
echo 'GCC [34].0.[12] has a bug in the optimizer, disabling "-O#"'
echo 'GCC [[34]].0.[[12]] has a bug in the optimizer, disabling "-O#"'
CFLAGS=`echo "$CFLAGS" | sed 's/-O[[23456789]]/-O/'`
else
if test "$gccversion" = "3.1" -o "$gccversion" = "3.2" -o "$gccversion" = "3.2.1" && `echo "$CFLAGS" | grep -v fno-strength-reduce >/dev/null`; then
@@ -102,11 +102,56 @@ if test "`(uname) 2>/dev/null`" = Darwin; then
AC_MSG_RESULT([yes, Darwin support excluded])
fi
AC_MSG_CHECKING(--with-mac-arch argument)
AC_ARG_WITH(mac-arch, [ --with-mac-arch=ARCH intel, ppc or both],
MACARCH="$withval"; AC_MSG_RESULT($MACARCH),
MACARCH="both"; AC_MSG_RESULT(defaulting to $MACARCH))
if test "x$MACARCH" = "xboth"; then
AC_MSG_CHECKING(for 10.4 universal SDK)
dnl There is a terrible inconsistency (but we appear to get away with it):
dnl $CFLAGS uses the 10.4u SDK library for the headers, while $CPPFLAGS
dnl doesn't, because "gcc -E" doesn't grok it. That means the configure
dnl tests using the preprocessor are actually done with the wrong header
dnl files. $LDFLAGS is set at the end, because configure uses it together
dnl with $CFLAGS and we can only have one -sysroot argument.
save_cppflags="$CPPFLAGS"
save_cflags="$CFLAGS"
save_ldflags="$LDFLAGS"
CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
AC_TRY_LINK([ ], [ ],
AC_MSG_RESULT(found, will make universal binary),
AC_MSG_RESULT(not found)
CFLAGS="save_cflags"
AC_MSG_CHECKING(if Intel architecture is supported)
CPPFLAGS="$CPPFLAGS -arch i386"
LDFLAGS="$save_ldflags -arch i386"
AC_TRY_LINK([ ], [ ],
AC_MSG_RESULT(yes); MACARCH="intel",
AC_MSG_RESULT(no, using PowerPC)
MACARCH="ppc"
CPPFLAGS="$save_cppflags -arch ppc"
LDFLAGS="$save_ldflags -arch ppc"))
elif test "x$MACARCH" = "xintel"; then
CPPFLAGS="$CPPFLAGS -arch intel"
LDFLAGS="$LDFLAGS -arch intel"
else
CPPFLAGS="$CPPFLAGS -arch ppc"
LDFLAGS="$LDFLAGS -arch ppc"
fi
if test "$enable_darwin" = "yes"; then
MACOSX=yes
OS_EXTRA_SCR="os_macosx.c os_mac_conv.c";
OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -I/Developer/Headers/FlatCarbon -no-cpp-precomp"
dnl TODO: use -arch i386 on Intel machines
CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
if test "x$MACARCH" = "xboth"; then
CPPFLAGS="$CPPFLAGS -I/Developer/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon"
else
CPPFLAGS="$CPPFLAGS -I/Developer/Headers/FlatCarbon"
fi
dnl If Carbon is found, assume we don't want X11
dnl unless it was specifically asked for (--with-x)
@@ -118,6 +163,14 @@ if test "`(uname) 2>/dev/null`" = Darwin; then
fi
fi
fi
dnl Avoid a bug with -O2 with gcc 4.0. Symptom: malloc() reports double
dnl free. This happens in expand_filename(), because the optimizer swaps
dnl two blocks of code that use "repl" that can't be swapped.
if test "$MACARCH" = "intel" -o "$MACARCH" = "both"; then
CFLAGS=`echo "$CFLAGS" | sed 's/-O[[23456789]]/-Oz/'`
fi
else
AC_MSG_RESULT(no)
fi
@@ -2753,14 +2806,19 @@ if test "x$MACOSX" = "xyes" && test "x$CARBON" = "xyes" \
AC_MSG_RESULT(no)
fi
fi
if test "x$MACARCH" = "xboth"; then
LDFLAGS="$LDFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
fi
dnl gcc 3.1 changed the meaning of -MM. The only solution appears to be to
dnl use "-isystem" instead of "-I" for all non-Vim include dirs.
dnl But only when making dependencies, cproto and lint don't take "-isystem".
dnl Mac gcc returns "powerpc-apple-darwin8-gcc-4.0.1 (GCC)...", need to allow
dnl the number before the version number.
AC_MSG_CHECKING(for GCC 3 or later)
DEPEND_CFLAGS_FILTER=
if test "$GCC" = yes; then
gccmajor=`"$CC" --version | sed -e '2,$d;s/^[[^0-9]]*\([[1-9]]\)\.[[0-9.]]*.*$/\1/g'`
gccmajor=`"$CC" --version | sed -e '2,$d;s/^[[^0-9]]*\(darwin.[[^0-9]]*\)*\([[1-9]]\)\.[[0-9]].*$/\2/g'`
if test "$gccmajor" -gt "2"; then
DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'"
fi

View File

@@ -974,6 +974,9 @@ ex_diffpatch(eap)
#ifdef FEAT_GUI
need_mouse_correct = TRUE;
#endif
/* don't use a new tab page, each tab page has its own diffs */
cmdmod.tab = 0;
if (win_split(0, 0) != FAIL)
{
/* Pretend it was a ":split fname" command */
@@ -1031,6 +1034,9 @@ ex_diffsplit(eap)
#ifdef FEAT_GUI
need_mouse_correct = TRUE;
#endif
/* don't use a new tab page, each tab page has its own diffs */
cmdmod.tab = 0;
if (win_split(0, 0) != FAIL)
{
/* Pretend it was a ":split fname" command */
@@ -1077,7 +1083,7 @@ diff_win_options(wp, addbuf)
curwin = wp;
curbuf = curwin->w_buffer;
set_string_option_direct((char_u *)"fdm", -1, (char_u *)"diff",
OPT_LOCAL|OPT_FREE);
OPT_LOCAL|OPT_FREE, 0);
curwin = old_curwin;
curbuf = curwin->w_buffer;
wp->w_p_fdc = 2;
@@ -1124,7 +1130,7 @@ ex_diffoff(eap)
curwin = wp;
curbuf = curwin->w_buffer;
set_string_option_direct((char_u *)"fdm", -1,
(char_u *)"manual", OPT_LOCAL|OPT_FREE);
(char_u *)"manual", OPT_LOCAL|OPT_FREE, 0);
curwin = old_curwin;
curbuf = curwin->w_buffer;
wp->w_p_fdc = 0;

View File

@@ -9,6 +9,13 @@
/*
* dosinst.h: Common code for dosinst.c and uninstal.c
*/
/* Visual Studio 2005 has 'deprecated' many of the standard CRT functions */
#if _MSC_VER >= 1400
# define _CRT_SECURE_NO_DEPRECATE
# define _CRT_NONSTDC_NO_DEPRECATE
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -16,7 +23,7 @@
#include <fcntl.h>
#ifndef UNIX_LINT
# include <io.h>
# include "vimio.h"
# include <ctype.h>
# ifndef __CYGWIN__

View File

@@ -62,12 +62,13 @@ static char_u e_hitend[] = N_("Hit end of paragraph");
/*
* Structure used to store one match for insert completion.
*/
typedef struct Completion compl_T;
struct Completion
typedef struct compl_S compl_T;
struct compl_S
{
compl_T *cp_next;
compl_T *cp_prev;
char_u *cp_str; /* matched text */
char cp_icase; /* TRUE or FALSE: ignore case */
char_u *cp_extra; /* extra menu text (allocated, can be NULL) */
char_u *cp_info; /* verbose info (can be NULL) */
char_u cp_kind; /* kind of match, single letter, or NUL */
@@ -114,7 +115,6 @@ static int compl_pending = FALSE;
static pos_T compl_startpos;
static colnr_T compl_col = 0; /* column where the text starts
* that is being completed */
static int save_sm = -1;
static char_u *compl_orig_text = NULL; /* text as it was before
* completion started */
static int compl_cont_mode = 0;
@@ -122,19 +122,22 @@ static expand_T compl_xp;
static void ins_ctrl_x __ARGS((void));
static int has_compl_option __ARGS((int dict_opt));
static int ins_compl_equal __ARGS((compl_T *match, char_u *str, int len));
static void ins_compl_longest_match __ARGS((compl_T *match));
static void ins_compl_add_matches __ARGS((int num_matches, char_u **matches));
static void ins_compl_add_matches __ARGS((int num_matches, char_u **matches, int icase));
static int ins_compl_make_cyclic __ARGS((void));
static void ins_compl_upd_pum __ARGS((void));
static void ins_compl_del_pum __ARGS((void));
static int pum_wanted __ARGS((void));
static int pum_two_or_more __ARGS((void));
static int pum_enough_matches __ARGS((void));
static void ins_compl_dictionaries __ARGS((char_u *dict, char_u *pat, int flags, int thesaurus));
static void ins_compl_files __ARGS((int count, char_u **files, int thesaurus, int flags, regmatch_T *regmatch, char_u *buf, int *dir));
static char_u *find_line_end __ARGS((char_u *ptr));
static void ins_compl_free __ARGS((void));
static void ins_compl_clear __ARGS((void));
static int ins_compl_bs __ARGS((void));
static void ins_compl_addleader __ARGS((int c));
static void ins_compl_set_original_text __ARGS((char_u *str));
static void ins_compl_addfrommatch __ARGS((void));
static int ins_compl_prep __ARGS((int c));
static buf_T *ins_compl_next_buf __ARGS((buf_T *buf, int flag));
@@ -145,6 +148,7 @@ static int ins_compl_next __ARGS((int allow_get_expansion, int count, int inser
static int ins_compl_key2dir __ARGS((int c));
static int ins_compl_pum_key __ARGS((int c));
static int ins_compl_key2count __ARGS((int c));
static int ins_compl_use_match __ARGS((int c));
static int ins_complete __ARGS((int c));
static int quote_meta __ARGS((char_u *dest, char_u *str, int len));
#endif /* FEAT_INS_EXPAND */
@@ -200,6 +204,9 @@ static int ins_bs __ARGS((int c, int mode, int *inserted_space_p));
static void ins_mouse __ARGS((int c));
static void ins_mousescroll __ARGS((int up));
#endif
#if defined(FEAT_GUI_TABLINE) || defined(PROTO)
static void ins_tabline __ARGS((int c));
#endif
static void ins_left __ARGS((void));
static void ins_home __ARGS((int c));
static void ins_end __ARGS((int c));
@@ -711,8 +718,8 @@ edit(cmdchar, startln, count)
continue;
}
/* A printable character: Add it to "compl_leader". */
if (vim_isprintc(c))
/* A printable, non-white character: Add to "compl_leader". */
if (vim_isprintc(c) && !vim_iswhite(c))
{
ins_compl_addleader(c);
continue;
@@ -1042,6 +1049,12 @@ doESCkey:
ins_mousescroll(TRUE);
break;
#endif
#ifdef FEAT_GUI_TABLINE
case K_TABLINE:
case K_TABMENU:
ins_tabline(c);
break;
#endif
case K_IGNORE: /* Something mapped to nothing */
break;
@@ -1376,7 +1389,7 @@ ins_redraw(ready)
if (!char_avail())
{
#ifdef FEAT_AUTOCMD
/* Trigger CursorMoved if the cursor moved. */
/* Trigger CursorMoved if the cursor moved. */
if (ready && has_cursormovedI()
&& !equalpos(last_cursormoved, curwin->w_cursor))
{
@@ -1894,7 +1907,8 @@ ins_ctrl_x()
has_compl_option(dict_opt)
int dict_opt;
{
if (dict_opt ? (*curbuf->b_p_dict == NUL && *p_dict == NUL)
if (dict_opt ? (*curbuf->b_p_dict == NUL && *p_dict == NUL
&& !curwin->w_p_spell)
: (*curbuf->b_p_tsr == NUL && *p_tsr == NUL))
{
ctrl_x_mode = 0;
@@ -1983,9 +1997,10 @@ vim_is_ctrl_x_key(c)
* TODO: make this work for multi-byte characters.
*/
int
ins_compl_add_infercase(str, len, fname, dir, flags)
ins_compl_add_infercase(str, len, icase, fname, dir, flags)
char_u *str;
int len;
int icase;
char_u *fname;
int dir;
int flags;
@@ -2039,26 +2054,22 @@ ins_compl_add_infercase(str, len, fname, dir, flags)
/* Copy the original case of the part we typed */
STRNCPY(IObuff, compl_orig_text, compl_length);
return ins_compl_add(IObuff, len, fname, NULL, dir, flags);
return ins_compl_add(IObuff, len, icase, fname, NULL, dir, flags);
}
return ins_compl_add(str, len, fname, NULL, dir, flags);
return ins_compl_add(str, len, icase, fname, NULL, dir, flags);
}
/*
* Add a match to the list of matches.
* If the given string is already in the list of completions, then return
* FAIL, otherwise add it to the list and return OK. If there is an error,
* maybe because alloc() returns NULL, then RET_ERROR is returned -- webb.
*
* New:
* If the given string is already in the list of completions, then return
* NOTDONE, otherwise add it to the list and return OK. If there is an error,
* maybe because alloc() returns NULL, then FAIL is returned -- webb.
* maybe because alloc() returns NULL, then FAIL is returned.
*/
int
ins_compl_add(str, len, fname, extra, cdir, flags)
ins_compl_add(str, len, icase, fname, extra, cdir, flags)
char_u *str;
int len;
int icase;
char_u *fname;
char_u *extra; /* extra text for popup menu or NULL */
int cdir;
@@ -2082,7 +2093,7 @@ ins_compl_add(str, len, fname, extra, cdir, flags)
do
{
if ( !(match->cp_flags & ORIGINAL_TEXT)
&& STRNCMP(match->cp_str, str, (size_t)len) == 0
&& ins_compl_equal(match, str, len)
&& match->cp_str[len] == NUL)
return NOTDONE;
match = match->cp_next;
@@ -2101,15 +2112,13 @@ ins_compl_add(str, len, fname, extra, cdir, flags)
return FAIL;
match->cp_number = -1;
if (flags & ORIGINAL_TEXT)
{
match->cp_number = 0;
match->cp_str = compl_orig_text;
}
else if ((match->cp_str = vim_strnsave(str, len)) == NULL)
if ((match->cp_str = vim_strnsave(str, len)) == NULL)
{
vim_free(match);
return FAIL;
}
match->cp_icase = icase;
/* match-fname is:
* - compl_curr_match->cp_fname if it is a string equal to fname.
@@ -2163,6 +2172,21 @@ ins_compl_add(str, len, fname, extra, cdir, flags)
return OK;
}
/*
* Return TRUE if "str[len]" matches with match->cp_str, considering
* match->cp_icase.
*/
static int
ins_compl_equal(match, str, len)
compl_T *match;
char_u *str;
int len;
{
if (match->cp_icase)
return STRNICMP(match->cp_str, str, (size_t)len) == 0;
return STRNCMP(match->cp_str, str, (size_t)len) == 0;
}
/*
* Reduce the longest common string for match "match".
*/
@@ -2171,7 +2195,7 @@ ins_compl_longest_match(match)
compl_T *match;
{
char_u *p, *s;
int l;
int c1, c2;
int had_match;
if (compl_leader == NULL)
@@ -2180,21 +2204,36 @@ ins_compl_longest_match(match)
else
{
/* Reduce the text if this match differs from compl_leader. */
for (p = compl_leader, s = match->cp_str; *p != NUL; p += l, s += l)
p = compl_leader;
s = match->cp_str;
while (*p != NUL)
{
#ifdef FEAT_MBYTE
if (has_mbyte)
{
l = mb_ptr2len(p);
if (STRNICMP(p, s, l) != 0)
break;
c1 = mb_ptr2char(p);
c2 = mb_ptr2char(s);
}
else
#endif
{
if (MB_TOLOWER(*p) != MB_TOLOWER(*s))
break;
l = 1;
c1 = *p;
c2 = *s;
}
if (match->cp_icase ? (MB_TOLOWER(c1) != MB_TOLOWER(c2))
: (c1 != c2))
break;
#ifdef FEAT_MBYTE
if (has_mbyte)
{
mb_ptr_adv(p);
mb_ptr_adv(s);
}
else
#endif
{
++p;
++s;
}
}
@@ -2222,16 +2261,18 @@ ins_compl_longest_match(match)
* Frees matches[].
*/
static void
ins_compl_add_matches(num_matches, matches)
ins_compl_add_matches(num_matches, matches, icase)
int num_matches;
char_u **matches;
int icase;
{
int i;
int add_r = OK;
int dir = compl_direction;
for (i = 0; i < num_matches && add_r != FAIL; i++)
if ((add_r = ins_compl_add(matches[i], -1, NULL, NULL, dir, 0)) == OK)
if ((add_r = ins_compl_add(matches[i], -1, icase,
NULL, NULL, dir, 0)) == OK)
/* if dir was BACKWARD then honor it just once */
dir = FORWARD;
FreeWild(num_matches, matches);
@@ -2306,7 +2347,7 @@ ins_compl_del_pum()
static int
pum_wanted()
{
/* 'completeopt' must contain "menu" */
/* 'completeopt' must contain "menu" or "menuone" */
if (vim_strchr(p_cot, 'm') == NULL)
return FALSE;
@@ -2322,9 +2363,10 @@ pum_wanted()
/*
* Return TRUE if there are two or more matches to be shown in the popup menu.
* One if 'completopt' contains "menuone".
*/
static int
pum_two_or_more()
pum_enough_matches()
{
compl_T *compl;
int i;
@@ -2341,6 +2383,8 @@ pum_two_or_more()
compl = compl->cp_next;
} while (compl != compl_first_match);
if (strstr((char *)p_cot, "menuone") != NULL)
return (i >= 1);
return (i >= 2);
}
@@ -2360,7 +2404,7 @@ ins_compl_show_pum()
colnr_T col;
int lead_len = 0;
if (!pum_wanted() || !pum_two_or_more())
if (!pum_wanted() || !pum_enough_matches())
return;
/* Update the screen before drawing the popup menu over it. */
@@ -2377,7 +2421,7 @@ ins_compl_show_pum()
{
if ((compl->cp_flags & ORIGINAL_TEXT) == 0
&& (compl_leader == NULL
|| STRNCMP(compl->cp_str, compl_leader, lead_len) == 0))
|| ins_compl_equal(compl, compl_leader, lead_len)))
++compl_match_arraysize;
compl = compl->cp_next;
} while (compl != NULL && compl != compl_first_match);
@@ -2394,8 +2438,7 @@ ins_compl_show_pum()
{
if ((compl->cp_flags & ORIGINAL_TEXT) == 0
&& (compl_leader == NULL
|| STRNCMP(compl->cp_str, compl_leader,
lead_len) == 0))
|| ins_compl_equal(compl, compl_leader, lead_len)))
{
if (!shown_match_ok)
{
@@ -2466,28 +2509,42 @@ ins_compl_show_pum()
#define DICT_EXACT (2) /* "dict" is the exact name of a file */
/*
* Add any identifiers that match the given pattern to the list of
* completions.
* Add any identifiers that match the given pattern in the list of dictionary
* files "dict_start" to the list of completions.
*/
static void
ins_compl_dictionaries(dict, pat, flags, thesaurus)
char_u *dict;
ins_compl_dictionaries(dict_start, pat, flags, thesaurus)
char_u *dict_start;
char_u *pat;
int flags; /* DICT_FIRST and/or DICT_EXACT */
int thesaurus;
int thesaurus; /* Thesaurus completion */
{
char_u *dict = dict_start;
char_u *ptr;
char_u *buf;
FILE *fp;
regmatch_T regmatch;
int add_r;
char_u **files;
int count;
int i;
int save_p_scs;
int dir = compl_direction;
if (*dict == NUL)
{
#ifdef FEAT_SYN_HL
/* When 'dictionary' is empty and spell checking is enabled use
* "spell". */
if (!thesaurus && curwin->w_p_spell)
dict = (char_u *)"spell";
else
#endif
return;
}
buf = alloc(LSIZE);
if (buf == NULL)
return;
/* If 'infercase' is set, don't use 'smartcase' here */
save_p_scs = p_scs;
if (curbuf->b_p_inf)
@@ -2507,12 +2564,15 @@ ins_compl_dictionaries(dict, pat, flags, thesaurus)
vim_free(ptr);
}
else
{
regmatch.regprog = vim_regcomp(pat, p_magic ? RE_MAGIC : 0);
if (regmatch.regprog == NULL)
goto theend;
}
/* ignore case depends on 'ignorecase', 'smartcase' and "pat" */
regmatch.rm_ic = ignorecase(pat);
while (buf != NULL && regmatch.regprog != NULL && *dict != NUL
&& !got_int && !compl_interrupted)
while (*dict != NUL && !got_int && !compl_interrupted)
{
/* copy one dictionary file name into buf */
if (flags == DICT_EXACT)
@@ -2526,105 +2586,142 @@ ins_compl_dictionaries(dict, pat, flags, thesaurus)
* backticks (for security, the 'dict' option may have been set in
* a modeline). */
copy_option_part(&dict, buf, LSIZE, ",");
if (vim_strchr(buf, '`') != NULL
if (!thesaurus && STRCMP(buf, "spell") == 0)
count = -1;
else if (vim_strchr(buf, '`') != NULL
|| expand_wildcards(1, &buf, &count, &files,
EW_FILE|EW_SILENT) != OK)
count = 0;
}
for (i = 0; i < count && !got_int && !compl_interrupted; i++)
if (count == -1)
{
fp = mch_fopen((char *)files[i], "r"); /* open dictionary file */
if (flags != DICT_EXACT)
{
vim_snprintf((char *)IObuff, IOSIZE,
_("Scanning dictionary: %s"), (char *)files[i]);
msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
}
if (fp != NULL)
{
/*
* Read dictionary file line by line.
* Check each line for a match.
*/
while (!got_int && !compl_interrupted
&& !vim_fgets(buf, LSIZE, fp))
{
ptr = buf;
while (vim_regexec(&regmatch, buf, (colnr_T)(ptr - buf)))
{
ptr = regmatch.startp[0];
if (ctrl_x_mode == CTRL_X_WHOLE_LINE)
ptr = find_line_end(ptr);
else
ptr = find_word_end(ptr);
add_r = ins_compl_add_infercase(regmatch.startp[0],
(int)(ptr - regmatch.startp[0]),
files[i], dir, 0);
if (thesaurus)
{
char_u *wstart;
/*
* Add the other matches on the line
*/
while (!got_int)
{
/* Find start of the next word. Skip white
* space and punctuation. */
ptr = find_word_start(ptr);
if (*ptr == NUL || *ptr == NL)
break;
wstart = ptr;
/* Find end of the word and add it. */
#ifdef FEAT_MBYTE
if (has_mbyte)
/* Japanese words may have characters in
* different classes, only separate words
* with single-byte non-word characters. */
while (*ptr != NUL)
{
int l = (*mb_ptr2len)(ptr);
if (l < 2 && !vim_iswordc(*ptr))
break;
ptr += l;
}
else
#endif
ptr = find_word_end(ptr);
add_r = ins_compl_add_infercase(wstart,
(int)(ptr - wstart), files[i], dir, 0);
}
}
if (add_r == OK)
/* if dir was BACKWARD then honor it just once */
dir = FORWARD;
else if (add_r == FAIL)
break;
/* avoid expensive call to vim_regexec() when at end
* of line */
if (*ptr == '\n' || got_int)
break;
}
line_breakcheck();
ins_compl_check_keys(50);
}
fclose(fp);
}
/* Complete from active spelling. Skip "\<" in the pattern, we
* don't use it as a RE. */
if (pat[0] == '\\' && pat[1] == '<')
ptr = pat + 2;
else
ptr = pat;
spell_dump_compl(curbuf, ptr, regmatch.rm_ic, &dir, 0);
}
if (flags != DICT_EXACT)
FreeWild(count, files);
if (flags)
else
{
ins_compl_files(count, files, thesaurus, flags,
&regmatch, buf, &dir);
if (flags != DICT_EXACT)
FreeWild(count, files);
}
if (flags != 0)
break;
}
theend:
p_scs = save_p_scs;
vim_free(regmatch.regprog);
vim_free(buf);
}
static void
ins_compl_files(count, files, thesaurus, flags, regmatch, buf, dir)
int count;
char_u **files;
int thesaurus;
int flags;
regmatch_T *regmatch;
char_u *buf;
int *dir;
{
char_u *ptr;
int i;
FILE *fp;
int add_r;
for (i = 0; i < count && !got_int && !compl_interrupted; i++)
{
fp = mch_fopen((char *)files[i], "r"); /* open dictionary file */
if (flags != DICT_EXACT)
{
vim_snprintf((char *)IObuff, IOSIZE,
_("Scanning dictionary: %s"), (char *)files[i]);
msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
}
if (fp != NULL)
{
/*
* Read dictionary file line by line.
* Check each line for a match.
*/
while (!got_int && !compl_interrupted
&& !vim_fgets(buf, LSIZE, fp))
{
ptr = buf;
while (vim_regexec(regmatch, buf, (colnr_T)(ptr - buf)))
{
ptr = regmatch->startp[0];
if (ctrl_x_mode == CTRL_X_WHOLE_LINE)
ptr = find_line_end(ptr);
else
ptr = find_word_end(ptr);
add_r = ins_compl_add_infercase(regmatch->startp[0],
(int)(ptr - regmatch->startp[0]),
p_ic, files[i], *dir, 0);
if (thesaurus)
{
char_u *wstart;
/*
* Add the other matches on the line
*/
while (!got_int)
{
/* Find start of the next word. Skip white
* space and punctuation. */
ptr = find_word_start(ptr);
if (*ptr == NUL || *ptr == NL)
break;
wstart = ptr;
/* Find end of the word and add it. */
#ifdef FEAT_MBYTE
if (has_mbyte)
/* Japanese words may have characters in
* different classes, only separate words
* with single-byte non-word characters. */
while (*ptr != NUL)
{
int l = (*mb_ptr2len)(ptr);
if (l < 2 && !vim_iswordc(*ptr))
break;
ptr += l;
}
else
#endif
ptr = find_word_end(ptr);
add_r = ins_compl_add_infercase(wstart,
(int)(ptr - wstart),
p_ic, files[i], *dir, 0);
}
}
if (add_r == OK)
/* if dir was BACKWARD then honor it just once */
*dir = FORWARD;
else if (add_r == FAIL)
break;
/* avoid expensive call to vim_regexec() when at end
* of line */
if (*ptr == '\n' || got_int)
break;
}
line_breakcheck();
ins_compl_check_keys(50);
}
fclose(fp);
}
}
}
/*
* Find the start of the next word.
* Returns a pointer to the first char of the word. Also stops at a NUL.
@@ -2733,10 +2830,18 @@ ins_compl_clear()
compl_pattern = NULL;
vim_free(compl_leader);
compl_leader = NULL;
save_sm = -1;
edit_submode_extra = NULL;
}
/*
* Return TRUE when Insert completion is active.
*/
int
ins_compl_active()
{
return compl_started;
}
/*
* Delete one character before the cursor and show the subset of the matches
* that match the word that is now before the cursor.
@@ -2769,7 +2874,9 @@ ins_compl_bs()
ins_compl_delete();
ins_bytes(compl_leader + curwin->w_cursor.col - compl_col);
if (!compl_started)
if (compl_started)
ins_compl_set_original_text(compl_leader);
else
{
/* Matches were cleared, need to search for them now. */
if (ins_complete(Ctrl_N) == FAIL)
@@ -2823,6 +2930,28 @@ ins_compl_addleader(c)
ins_compl_del_pum();
ins_compl_show_pum();
compl_used_match = FALSE;
ins_compl_set_original_text(compl_leader);
}
}
/*
* Set the first match, the original text.
*/
static void
ins_compl_set_original_text(str)
char_u *str;
{
char_u *p;
/* Replace the original text entry. */
if (compl_first_match->cp_flags & ORIGINAL_TEXT) /* safety check */
{
p = vim_strsave(str);
if (p != NULL)
{
vim_free(compl_first_match->cp_str);
compl_first_match->cp_str = p;
}
}
}
@@ -2838,7 +2967,7 @@ ins_compl_addfrommatch()
int c;
p = compl_shown_match->cp_str;
if (STRLEN(p) <= len) /* the match is too short */
if ((int)STRLEN(p) <= len) /* the match is too short */
return;
p += len;
#ifdef FEAT_MBYTE
@@ -3071,8 +3200,6 @@ ins_compl_prep(c)
compl_matches = 0;
msg_clr_cmdline(); /* necessary for "noshowmode" */
ctrl_x_mode = 0;
if (save_sm >= 0)
p_sm = save_sm;
if (edit_submode != NULL)
{
edit_submode = NULL;
@@ -3165,6 +3292,7 @@ expand_by_function(type, base)
pos_T pos;
int dir = compl_direction;
char_u *x;
int icase;
funcname = (type == CTRL_X_FUNCTION) ? curbuf->b_p_cfu : curbuf->b_p_ofu;
if (*funcname == NUL)
@@ -3183,10 +3311,15 @@ expand_by_function(type, base)
/* Go through the List with matches and add each of them. */
for (li = matchlist->lv_first; li != NULL; li = li->li_next)
{
icase = p_ic;
if (li->li_tv.v_type == VAR_DICT && li->li_tv.vval.v_dict != NULL)
{
p = get_dict_string(li->li_tv.vval.v_dict, (char_u *)"word", FALSE);
x = get_dict_string(li->li_tv.vval.v_dict, (char_u *)"menu", FALSE);
if (get_dict_string(li->li_tv.vval.v_dict, (char_u *)"icase",
FALSE) != NULL)
icase = get_dict_number(li->li_tv.vval.v_dict,
(char_u *)"icase");
}
else
{
@@ -3195,7 +3328,7 @@ expand_by_function(type, base)
}
if (p != NULL && *p != NUL)
{
if (ins_compl_add(p, -1, NULL, x, dir, 0) == OK)
if (ins_compl_add(p, -1, icase, NULL, x, dir, 0) == OK)
/* if dir was BACKWARD then honor it just once */
dir = FORWARD;
}
@@ -3369,7 +3502,7 @@ ins_compl_get_exp(ini)
case CTRL_X_DICTIONARY:
case CTRL_X_THESAURUS:
ins_compl_dictionaries(
dict ? dict
dict != NULL ? dict
: (type == CTRL_X_THESAURUS
? (*curbuf->b_p_tsr == NUL
? p_tsr
@@ -3378,7 +3511,8 @@ ins_compl_get_exp(ini)
? p_dict
: curbuf->b_p_dict)),
compl_pattern,
dict ? dict_f : 0, type == CTRL_X_THESAURUS);
dict != NULL ? dict_f
: 0, type == CTRL_X_THESAURUS);
dict = NULL;
break;
@@ -3394,7 +3528,7 @@ ins_compl_get_exp(ini)
TAG_INS_COMP | (ctrl_x_mode ? TAG_VERBOSE : 0),
TAG_MANY, curbuf->b_ffname) == OK && num_matches > 0)
{
ins_compl_add_matches(num_matches, matches);
ins_compl_add_matches(num_matches, matches, p_ic);
}
p_ic = save_p_ic;
break;
@@ -3406,7 +3540,13 @@ ins_compl_get_exp(ini)
/* May change home directory back to "~". */
tilde_replace(compl_pattern, num_matches, matches);
ins_compl_add_matches(num_matches, matches);
ins_compl_add_matches(num_matches, matches,
#ifdef CASE_INSENSITIVE_FILENAME
TRUE
#else
FALSE
#endif
);
}
break;
@@ -3414,7 +3554,7 @@ ins_compl_get_exp(ini)
if (expand_cmdline(&compl_xp, compl_pattern,
(int)STRLEN(compl_pattern),
&num_matches, &matches) == EXPAND_OK)
ins_compl_add_matches(num_matches, matches);
ins_compl_add_matches(num_matches, matches, FALSE);
break;
#ifdef FEAT_COMPL_FUNC
@@ -3429,7 +3569,7 @@ ins_compl_get_exp(ini)
num_matches = expand_spelling(first_match_pos.lnum,
first_match_pos.col, compl_pattern, &matches);
if (num_matches > 0)
ins_compl_add_matches(num_matches, matches);
ins_compl_add_matches(num_matches, matches, FALSE);
#endif
break;
@@ -3464,7 +3604,7 @@ ins_compl_get_exp(ini)
found_new_match = searchit(NULL, ins_buf, pos,
compl_direction,
compl_pattern, 1L, SEARCH_KEEP + SEARCH_NFMSG,
RE_LAST);
RE_LAST, (linenr_T)0);
if (!compl_started)
{
/* set "compl_started" even on fail */
@@ -3563,7 +3703,7 @@ ins_compl_get_exp(ini)
continue;
}
}
if (ins_compl_add_infercase(ptr, len,
if (ins_compl_add_infercase(ptr, len, p_ic,
ins_buf == curbuf ? NULL : ins_buf->b_sfname,
0, flags) != NOTDONE)
{
@@ -3645,7 +3785,10 @@ ins_compl_delete()
ins_compl_insert()
{
ins_bytes(compl_shown_match->cp_str + curwin->w_cursor.col - compl_col);
compl_used_match = TRUE;
if (compl_shown_match->cp_flags & ORIGINAL_TEXT)
compl_used_match = FALSE;
else
compl_used_match = TRUE;
}
/*
@@ -3682,8 +3825,8 @@ ins_compl_next(allow_get_expansion, count, insert_match)
{
/* Set "compl_shown_match" to the actually shown match, it may differ
* when "compl_leader" is used to omit some of the matches. */
while (STRNCMP(compl_shown_match->cp_str,
compl_leader, STRLEN(compl_leader)) != 0
while (!ins_compl_equal(compl_shown_match,
compl_leader, STRLEN(compl_leader))
&& compl_shown_match->cp_next != NULL
&& compl_shown_match->cp_next != compl_first_match)
compl_shown_match = compl_shown_match->cp_next;
@@ -3727,8 +3870,8 @@ ins_compl_next(allow_get_expansion, count, insert_match)
}
if ((compl_shown_match->cp_flags & ORIGINAL_TEXT) == 0
&& compl_leader != NULL
&& STRNCMP(compl_shown_match->cp_str,
compl_leader, STRLEN(compl_leader)) != 0)
&& !ins_compl_equal(compl_shown_match,
compl_leader, STRLEN(compl_leader)))
++todo;
else
/* Remember a matching item. */
@@ -3885,6 +4028,29 @@ ins_compl_key2count(c)
return 1;
}
/*
* Return TRUE if completion with "c" should insert the match, FALSE if only
* to change the currently selected completion.
*/
static int
ins_compl_use_match(c)
int c;
{
switch (c)
{
case K_UP:
case K_DOWN:
case K_PAGEDOWN:
case K_KPAGEDOWN:
case K_S_DOWN:
case K_PAGEUP:
case K_KPAGEUP:
case K_S_UP:
return FALSE;
}
return TRUE;
}
/*
* Do Insert mode completion.
* Called when character "c" was typed, which has a meaning for completion.
@@ -3904,10 +4070,6 @@ ins_complete(c)
{
/* First time we hit ^N or ^P (in a row, I mean) */
/* Turn off 'sm' so we don't show matches with ^X^L */
save_sm = p_sm;
p_sm = FALSE;
did_ai = FALSE;
#ifdef FEAT_SMARTINDENT
did_si = FALSE;
@@ -4246,12 +4408,11 @@ ins_complete(c)
else
edit_submode = (char_u *)_(CTRL_X_MSG(ctrl_x_mode));
/* Always add completion for the original text. Note that
* "compl_orig_text" itself (not a copy) is added, it will be freed
* when the list of matches is freed. */
/* Always add completion for the original text. */
vim_free(compl_orig_text);
compl_orig_text = vim_strnsave(line + compl_col, compl_length);
if (compl_orig_text == NULL || ins_compl_add(compl_orig_text,
-1, NULL, NULL, 0, ORIGINAL_TEXT) != OK)
-1, FALSE, NULL, NULL, 0, ORIGINAL_TEXT) != OK)
{
vim_free(compl_pattern);
compl_pattern = NULL;
@@ -4277,7 +4438,7 @@ ins_complete(c)
/*
* Find next match (and following matches).
*/
n = ins_compl_next(TRUE, ins_compl_key2count(c), c != K_UP && c != K_DOWN);
n = ins_compl_next(TRUE, ins_compl_key2count(c), ins_compl_use_match(c));
/* may undisplay the popup menu */
ins_compl_upd_pum();
@@ -5697,6 +5858,8 @@ free_last_insert()
{
vim_free(last_insert);
last_insert = NULL;
vim_free(compl_orig_text);
compl_orig_text = NULL;
}
#endif
@@ -7441,7 +7604,7 @@ ins_bs(c, mode, inserted_space_p)
int in_indent;
int oldState;
#ifdef FEAT_MBYTE
int p1, p2;
int cpc[MAX_MCO]; /* composing characters */
#endif
/*
@@ -7757,16 +7920,16 @@ ins_bs(c, mode, inserted_space_p)
{
#ifdef FEAT_MBYTE
if (enc_utf8 && p_deco)
(void)utfc_ptr2char(ml_get_cursor(), &p1, &p2);
(void)utfc_ptr2char(ml_get_cursor(), cpc);
#endif
(void)del_char(FALSE);
#ifdef FEAT_MBYTE
/*
* If p1 or p2 is non-zero, there are combining characters we
* need to take account of. Don't back up before the base
* If there are combining characters and 'delcombine' is set
* move the cursor back. Don't back up before the base
* character.
*/
if (enc_utf8 && p_deco && (p1 != NUL || p2 != NUL))
if (enc_utf8 && p_deco && cpc[0] != NUL)
inc_cursor();
#endif
#ifdef FEAT_RIGHTLEFT
@@ -7905,7 +8068,31 @@ ins_mousescroll(up)
}
#endif
#ifdef FEAT_GUI
#if defined(FEAT_GUI_TABLINE) || defined(PROTO)
void
ins_tabline(c)
int c;
{
/* We will be leaving the current window, unless closing another tab. */
if (c != K_TABMENU || current_tabmenu != TABLINE_MENU_CLOSE
|| (current_tab != 0 && current_tab != tabpage_index(curtab)))
{
undisplay_dollar();
start_arrow(&curwin->w_cursor);
# ifdef FEAT_CINDENT
can_cindent = TRUE;
# endif
}
if (c == K_TABLINE)
goto_tabpage(current_tab);
else
handle_tabmenu();
}
#endif
#if defined(FEAT_GUI) || defined(PROTO)
void
ins_scroll()
{

File diff suppressed because it is too large Load Diff

View File

@@ -52,12 +52,12 @@ do_ascii(eap)
char buf2[20];
char_u buf3[7];
#ifdef FEAT_MBYTE
int c1 = 0;
int c2 = 0;
int cc[MAX_MCO];
int ci = 0;
int len;
if (enc_utf8)
c = utfc_ptr2char(ml_get_cursor(), &c1, &c2);
c = utfc_ptr2char(ml_get_cursor(), cc);
else
#endif
c = gchar_cursor();
@@ -95,9 +95,7 @@ do_ascii(eap)
_("<%s>%s%s %d, Hex %02x, Octal %03o"),
transchar(c), buf1, buf2, c, c, c);
#ifdef FEAT_MBYTE
c = c1;
c1 = c2;
c2 = 0;
c = cc[ci++];
#endif
}
@@ -120,9 +118,9 @@ do_ascii(eap)
vim_snprintf((char *)IObuff + len, IOSIZE - len,
c < 0x10000 ? _("> %d, Hex %04x, Octal %o")
: _("> %d, Hex %08x, Octal %o"), c, c, c);
c = c1;
c1 = c2;
c2 = 0;
if (ci == MAX_MCO)
break;
c = cc[ci++];
}
#endif
@@ -1212,11 +1210,8 @@ do_filter(line1, line2, eap, cmd, do_in, do_out)
vim_snprintf((char *)msg_buf, sizeof(msg_buf),
_("%ld lines filtered"), (long)linecount);
if (msg(msg_buf) && !msg_scroll)
{
/* save message to display it after redraw */
set_keep_msg(msg_buf);
keep_msg_attr = 0;
}
set_keep_msg(msg_buf, 0);
}
else
msgmore((long)linecount);
@@ -3268,7 +3263,7 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags)
curbuf->b_help = TRUE;
#ifdef FEAT_QUICKFIX
set_string_option_direct((char_u *)"buftype", -1,
(char_u *)"help", OPT_FREE|OPT_LOCAL);
(char_u *)"help", OPT_FREE|OPT_LOCAL, 0);
#endif
/*
@@ -3287,7 +3282,7 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags)
if (STRCMP(curbuf->b_p_isk, p) != 0)
{
set_string_option_direct((char_u *)"isk", -1, p,
OPT_FREE|OPT_LOCAL);
OPT_FREE|OPT_LOCAL, 0);
check_buf_options(curbuf);
(void)buf_init_chartab(curbuf, FALSE);
}
@@ -3425,7 +3420,7 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags)
* autocommands. This allows for the autocommands to position the
* cursor.
*/
win_init(curwin);
curwin_init();
#ifdef FEAT_FOLDING
/* It's like all lines in the buffer changed. Need to update
@@ -4910,11 +4905,8 @@ do_sub_msg(count_only)
vim_snprintf((char *)msg_buf + len, sizeof(msg_buf) - len,
_(" on %ld lines"), (long)sub_nlines);
if (msg(msg_buf))
{
/* save message to display it after redraw */
set_keep_msg(msg_buf);
keep_msg_attr = 0;
}
set_keep_msg(msg_buf, 0);
return TRUE;
}
if (got_int)
@@ -5300,13 +5292,21 @@ ex_help(eap)
/*
* Re-use an existing help window or open a new one.
* Always open a new one for ":tab help".
*/
if (!curwin->w_buffer->b_help)
if (!curwin->w_buffer->b_help
#ifdef FEAT_WINDOWS
|| cmdmod.tab != 0
#endif
)
{
#ifdef FEAT_WINDOWS
for (wp = firstwin; wp != NULL; wp = wp->w_next)
if (wp->w_buffer != NULL && wp->w_buffer->b_help)
break;
if (cmdmod.tab != 0)
wp = NULL;
else
for (wp = firstwin; wp != NULL; wp = wp->w_next)
if (wp->w_buffer != NULL && wp->w_buffer->b_help)
break;
if (wp != NULL && wp->w_buffer->b_nwindows > 0)
win_enter(wp, TRUE);
else
@@ -5325,19 +5325,21 @@ ex_help(eap)
#ifdef FEAT_WINDOWS
/* Split off help window; put it at far top if no position
* specified, the current window is vertically split and narrow. */
* specified, the current window is vertically split and
* narrow. */
n = WSP_HELP;
# ifdef FEAT_VERTSPLIT
if (cmdmod.split == 0 && curwin->w_width != Columns
&& curwin->w_width < 80)
&& curwin->w_width < 80)
n |= WSP_TOP;
# endif
if (win_split(0, n) == FAIL)
goto erret;
#else
/* use current window */
if (!can_abandon(curbuf, FALSE))
#endif
goto erret;
#endif
#ifdef FEAT_WINDOWS
if (curwin->w_height < p_hh)

View File

@@ -582,7 +582,7 @@ EX(CMD_mapclear, "mapclear", ex_mapclear,
EX(CMD_marks, "marks", do_marks,
EXTRA|TRLBAR|CMDWIN),
EX(CMD_match, "match", ex_match,
EXTRA|CMDWIN),
RANGE|NOTADR|EXTRA|CMDWIN),
EX(CMD_menu, "menu", ex_menu,
RANGE|NOTADR|ZEROR|BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
EX(CMD_menutranslate, "menutranslate", ex_menutranslate,
@@ -831,12 +831,16 @@ EX(CMD_split, "split", ex_splitview,
BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR),
EX(CMD_spellgood, "spellgood", ex_spell,
BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR),
EX(CMD_spellwrong, "spellwrong", ex_spell,
BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR),
EX(CMD_spelldump, "spelldump", ex_spelldump,
BANG|TRLBAR),
EX(CMD_spellinfo, "spellinfo", ex_spellinfo,
TRLBAR),
EX(CMD_spellrepall, "spellrepall", ex_spellrepall,
TRLBAR),
EX(CMD_spellundo, "spellundo", ex_spell,
BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR),
EX(CMD_spellwrong, "spellwrong", ex_spell,
BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR),
EX(CMD_sprevious, "sprevious", ex_previous,
EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR),
EX(CMD_srewind, "srewind", ex_rewind,
@@ -877,16 +881,34 @@ EX(CMD_tag, "tag", ex_tag,
RANGE|NOTADR|BANG|WORD1|TRLBAR|ZEROR),
EX(CMD_tags, "tags", do_tags,
TRLBAR|CMDWIN),
EX(CMD_tab, "tab", ex_tab,
RANGE|NOTADR|COUNT|TRLBAR),
EX(CMD_tab, "tab", ex_wrongmodifier,
NEEDARG|EXTRA|NOTRLCOM),
EX(CMD_tabclose, "tabclose", ex_tabclose,
RANGE|NOTADR|COUNT|BANG|TRLBAR|CMDWIN),
EX(CMD_tabedit, "tabedit", ex_tabedit,
EX(CMD_tabdo, "tabdo", ex_listdo,
NEEDARG|EXTRA|NOTRLCOM),
EX(CMD_tabedit, "tabedit", ex_splitview,
BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR),
EX(CMD_tabfind, "tabfind", ex_tabedit,
EX(CMD_tabfind, "tabfind", ex_splitview,
BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|NEEDARG|TRLBAR),
EX(CMD_tabfirst, "tabfirst", ex_tabnext,
TRLBAR),
EX(CMD_tabmove, "tabmove", ex_tabmove,
RANGE|NOTADR|COUNT|TRLBAR|ZEROR),
EX(CMD_tablast, "tablast", ex_tabnext,
TRLBAR),
EX(CMD_tabnext, "tabnext", ex_tabnext,
RANGE|NOTADR|COUNT|TRLBAR),
EX(CMD_tabnew, "tabnew", ex_splitview,
BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR),
EX(CMD_tabonly, "tabonly", ex_tabonly,
TRLBAR|CMDWIN),
EX(CMD_tabprevious, "tabprevious", ex_tabnext,
RANGE|NOTADR|COUNT|TRLBAR),
EX(CMD_tabNext, "tabNext", ex_tabnext,
RANGE|NOTADR|COUNT|TRLBAR),
EX(CMD_tabrewind, "tabrewind", ex_tabnext,
TRLBAR),
EX(CMD_tabs, "tabs", ex_tabs,
TRLBAR|CMDWIN),
EX(CMD_tcl, "tcl", ex_tcl,
@@ -923,6 +945,8 @@ EX(CMD_tunmenu, "tunmenu", ex_menu,
EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
EX(CMD_undo, "undo", ex_undo,
TRLBAR|CMDWIN),
EX(CMD_undojoin, "undojoin", ex_undojoin,
TRLBAR|CMDWIN),
EX(CMD_unabbreviate, "unabbreviate", ex_abbreviate,
EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
EX(CMD_unhide, "unhide", ex_buffer_all,

View File

@@ -12,7 +12,7 @@
*/
#if defined(WIN32) && defined(FEAT_CSCOPE)
# include <io.h>
# include "vimio.h"
#endif
#include "vim.h"
@@ -1983,7 +1983,8 @@ do_argfile(eap, argn)
#endif
#ifdef FEAT_WINDOWS
if (*eap->cmd == 's') /* split window first */
/* split window or create new tab page first */
if (*eap->cmd == 's' || cmdmod.tab != 0)
{
if (win_split(0, 0) == FAIL)
return;
@@ -2154,7 +2155,7 @@ ex_argdelete(eap)
}
/*
* ":argdo", ":windo", ":bufdo"
* ":argdo", ":windo", ":bufdo", ":tabdo"
*/
void
ex_listdo(eap)
@@ -2162,7 +2163,8 @@ ex_listdo(eap)
{
int i;
#ifdef FEAT_WINDOWS
win_T *win;
win_T *wp;
tabpage_T *tp;
#endif
buf_T *buf;
int next_fnum = 0;
@@ -2187,13 +2189,15 @@ ex_listdo(eap)
#endif
if (eap->cmdidx == CMD_windo
|| eap->cmdidx == CMD_tabdo
|| P_HID(curbuf)
|| !check_changed(curbuf, TRUE, FALSE, eap->forceit, FALSE))
{
/* start at the first argument/window/buffer */
i = 0;
#ifdef FEAT_WINDOWS
win = firstwin;
wp = firstwin;
tp = first_tabpage;
#endif
/* set pcmark now */
if (eap->cmdidx == CMD_bufdo)
@@ -2228,11 +2232,19 @@ ex_listdo(eap)
#ifdef FEAT_WINDOWS
else if (eap->cmdidx == CMD_windo)
{
/* go to window "win" */
if (!win_valid(win))
/* go to window "wp" */
if (!win_valid(wp))
break;
win_goto(win);
win = curwin->w_next;
win_goto(wp);
wp = curwin->w_next;
}
else if (eap->cmdidx == CMD_tabdo)
{
/* go to window "tp" */
if (!valid_tabpage(tp))
break;
goto_tabpage_tp(tp);
tp = tp->tp_next;
}
#endif
else if (eap->cmdidx == CMD_bufdo)
@@ -3077,13 +3089,15 @@ get_scriptname(id)
scid_T id;
{
if (id == SID_MODELINE)
return (char_u *)"modeline";
return (char_u *)_("modeline");
if (id == SID_CMDARG)
return (char_u *)"--cmd argument";
return (char_u *)_("--cmd argument");
if (id == SID_CARG)
return (char_u *)"-c argument";
return (char_u *)_("-c argument");
if (id == SID_ENV)
return (char_u *)"environment variable";
return (char_u *)_("environment variable");
if (id == SID_ERROR)
return (char_u *)_("error handler");
return SCRIPT_ITEM(id).sn_name;
}

View File

@@ -155,6 +155,8 @@ static void ex_resize __ARGS((exarg_T *eap));
static void ex_stag __ARGS((exarg_T *eap));
static void ex_tabclose __ARGS((exarg_T *eap));
static void ex_tabonly __ARGS((exarg_T *eap));
static void ex_tabnext __ARGS((exarg_T *eap));
static void ex_tabmove __ARGS((exarg_T *eap));
static void ex_tabs __ARGS((exarg_T *eap));
#else
# define ex_close ex_ni
@@ -163,8 +165,8 @@ static void ex_tabs __ARGS((exarg_T *eap));
# define ex_resize ex_ni
# define ex_splitview ex_ni
# define ex_stag ex_ni
# define ex_tabedit ex_ni
# define ex_tab ex_ni
# define ex_tabnext ex_ni
# define ex_tabmove ex_ni
# define ex_tabs ex_ni
# define ex_tabclose ex_ni
# define ex_tabonly ex_ni
@@ -238,6 +240,7 @@ static void ex_popup __ARGS((exarg_T *eap));
# define ex_spell ex_ni
# define ex_mkspell ex_ni
# define ex_spelldump ex_ni
# define ex_spellinfo ex_ni
# define ex_spellrepall ex_ni
#endif
#ifndef FEAT_MZSCHEME
@@ -1823,7 +1826,7 @@ do_one_cmd(cmdlinep, sourcing,
* existing option value, we restore it later. */
cmdmod.save_ei = vim_strsave(p_ei);
set_string_option_direct((char_u *)"ei", -1,
(char_u *)"all", OPT_FREE);
(char_u *)"all", OPT_FREE, SID_NONE);
}
#endif
continue;
@@ -1858,7 +1861,18 @@ do_one_cmd(cmdlinep, sourcing,
}
continue;
case 't': if (!checkforcmd(&ea.cmd, "topleft", 2))
case 't': if (checkforcmd(&p, "tab", 3))
{
#ifdef FEAT_WINDOWS
if (vim_isdigit(*ea.cmd))
cmdmod.tab = atoi((char *)ea.cmd) + 1;
else
cmdmod.tab = tabpage_index(curtab) + 1;
ea.cmd = p;
#endif
continue;
}
if (!checkforcmd(&ea.cmd, "topleft", 2))
break;
#ifdef FEAT_WINDOWS
cmdmod.split |= WSP_TOP;
@@ -2381,7 +2395,7 @@ do_one_cmd(cmdlinep, sourcing,
{
n = getdigits(&ea.arg);
ea.arg = skipwhite(ea.arg);
if (n <= 0 && !ni)
if (n <= 0 && !ni && (ea.argt & ZEROR) == 0)
{
errormsg = (char_u *)_(e_zerocount);
goto doend;
@@ -2496,6 +2510,7 @@ do_one_cmd(cmdlinep, sourcing,
case CMD_snomagic:
case CMD_substitute:
case CMD_syntax:
case CMD_tab:
case CMD_tcl:
case CMD_throw:
case CMD_tilde:
@@ -2635,7 +2650,8 @@ doend:
if (cmdmod.save_ei != NULL)
{
/* Restore 'eventignore' to the value before ":noautocmd". */
set_string_option_direct((char_u *)"ei", -1, cmdmod.save_ei, OPT_FREE);
set_string_option_direct((char_u *)"ei", -1, cmdmod.save_ei,
OPT_FREE, SID_NONE);
free_string_option(cmdmod.save_ei);
}
#endif
@@ -2950,6 +2966,7 @@ cmd_exists(name)
{"rightbelow", 6},
{"sandbox", 3},
{"silent", 3},
{"tab", 3},
{"topleft", 2},
{"verbose", 4},
{"vertical", 4},
@@ -3273,10 +3290,17 @@ set_one_cmd_context(xp, buff)
if (bow != NULL && in_quote)
xp->xp_pattern = bow;
xp->xp_context = EXPAND_FILES;
#ifndef BACKSLASH_IN_FILENAME
/* For a shell command more chars need to be escaped. */
if (usefilter || ea.cmdidx == CMD_bang)
{
xp->xp_shell = TRUE;
/* When still after the command name expand executables. */
if (xp->xp_pattern == skipwhite(arg))
xp->xp_context = EXPAND_SHELLCMD;
}
#endif
/* Check for environment variable */
@@ -3340,6 +3364,7 @@ set_one_cmd_context(xp, buff)
case CMD_rightbelow:
case CMD_sandbox:
case CMD_silent:
case CMD_tab:
case CMD_topleft:
case CMD_verbose:
case CMD_vertical:
@@ -3867,7 +3892,8 @@ get_address(ptr, skip, to_other_file)
if (searchit(curwin, curbuf, &pos,
*cmd == '?' ? BACKWARD : FORWARD,
(char_u *)"", 1L,
SEARCH_MSG + SEARCH_START, i) != FAIL)
SEARCH_MSG + SEARCH_START,
i, (linenr_T)0) != FAIL)
lnum = pos.lnum;
else
{
@@ -4374,7 +4400,7 @@ repl_cmdline(eap, src, srclen, repl, cmdlinep)
*/
len = (int)STRLEN(repl);
i = (int)(src - *cmdlinep) + (int)STRLEN(src + srclen) + len + 3;
if (eap->nextcmd)
if (eap->nextcmd != NULL)
i += (int)STRLEN(eap->nextcmd);/* add space for next command */
if ((new_cmdline = alloc((unsigned)i)) == NULL)
return NULL; /* out of memory! */
@@ -4393,7 +4419,7 @@ repl_cmdline(eap, src, srclen, repl, cmdlinep)
STRCPY(new_cmdline + i, src + srclen);
src = new_cmdline + i; /* remember where to continue */
if (eap->nextcmd) /* append next command */
if (eap->nextcmd != NULL) /* append next command */
{
i = (int)STRLEN(new_cmdline) + 1;
STRCPY(new_cmdline + i, eap->nextcmd);
@@ -5071,6 +5097,7 @@ static struct
{EXPAND_MAPPINGS, "mapping"},
{EXPAND_MENUS, "menu"},
{EXPAND_SETTINGS, "option"},
{EXPAND_SHELLCMD, "shellcmd"},
{EXPAND_TAGS, "tag"},
{EXPAND_TAGS_LISTFILES, "tag_listfiles"},
{EXPAND_USER_VARS, "var"},
@@ -6220,7 +6247,7 @@ ex_tabclose(eap)
exarg_T *eap;
{
tabpage_T *tp;
int h = tabpageline_height();
int h = tabline_height();
# ifdef FEAT_CMDWIN
if (cmdwin_type != 0)
@@ -6228,7 +6255,7 @@ ex_tabclose(eap)
else
# endif
if (first_tabpage->tp_next == NULL)
EMSG(_("E999: Cannot close last tab page"));
EMSG(_("E784: Cannot close last tab page"));
else
{
if (eap->addr_count > 0)
@@ -6239,7 +6266,7 @@ ex_tabclose(eap)
beep_flush();
return;
}
if (tp->tp_topframe != topframe)
if (tp != curtab)
{
tabpage_close_other(tp, eap->forceit);
return;
@@ -6249,7 +6276,7 @@ ex_tabclose(eap)
tabpage_close(eap->forceit);
}
if (h != tabpageline_height())
if (h != tabline_height())
shell_new_rows();
}
@@ -6262,7 +6289,7 @@ ex_tabonly(eap)
{
tabpage_T *tp;
int done;
int h = tabpageline_height();
int h = tabline_height();
# ifdef FEAT_CMDWIN
if (cmdwin_type != 0)
@@ -6292,7 +6319,7 @@ ex_tabonly(eap)
}
}
if (h != tabpageline_height())
if (h != tabline_height())
shell_new_rows();
}
@@ -6305,7 +6332,8 @@ tabpage_close(forceit)
{
/* First close all the windows but the current one. If that worked then
* close the last window in this tab, that will close it. */
close_others(TRUE, forceit);
if (lastwin != firstwin)
close_others(TRUE, forceit);
if (lastwin == firstwin)
ex_win_close(forceit, curwin, NULL);
# ifdef FEAT_GUI
@@ -6863,12 +6891,17 @@ ex_wrongmodifier(eap)
* :new [[+command] file] split window with no or new file
* :vnew [[+command] file] split vertically window with no or new file
* :sfind [+command] file split window with file in 'path'
*
* :tabedit open new Tab page with empty window
* :tabedit [+command] file open new Tab page and edit "file"
* :tabnew [[+command] file] just like :tabedit
* :tabfind [+command] file open new Tab page and find "file"
*/
void
ex_splitview(eap)
exarg_T *eap;
{
win_T *old_curwin;
win_T *old_curwin = curwin;
# if defined(FEAT_SEARCHPATH) || defined(FEAT_BROWSE)
char_u *fname = NULL;
# endif
@@ -6884,7 +6917,6 @@ ex_splitview(eap)
}
# endif
old_curwin = curwin;
# ifdef FEAT_GUI
need_mouse_correct = TRUE;
# endif
@@ -6904,7 +6936,7 @@ ex_splitview(eap)
# endif
# ifdef FEAT_SEARCHPATH
if (eap->cmdidx == CMD_sfind)
if (eap->cmdidx == CMD_sfind || eap->cmdidx == CMD_tabfind)
{
fname = find_file_in_path(eap->arg, (int)STRLEN(eap->arg),
FNAME_MESS, TRUE, curbuf->b_ffname);
@@ -6946,7 +6978,26 @@ ex_splitview(eap)
cmdmod.browse = FALSE; /* Don't browse again in do_ecmd(). */
# endif
if (win_split(eap->addr_count > 0 ? (int)eap->line2 : 0,
/*
* Either open new tab page or split the window.
*/
if (eap->cmdidx == CMD_tabedit
|| eap->cmdidx == CMD_tabfind
|| eap->cmdidx == CMD_tabnew)
{
if (win_new_tabpage(cmdmod.tab) != FAIL)
{
do_exedit(eap, NULL);
/* set the alternate buffer for the window we came from */
if (curwin != old_curwin
&& win_valid(old_curwin)
&& old_curwin->w_buffer != curbuf
&& !cmdmod.keepalt)
old_curwin->w_alt_fnum = curbuf->b_fnum;
}
}
else if (win_split(eap->addr_count > 0 ? (int)eap->line2 : 0,
*eap->cmd == 'v' ? WSP_VERT : 0) != FAIL)
{
# ifdef FEAT_SCROLLBIND
@@ -6975,91 +7026,54 @@ theend:
}
/*
* :tabedit [[+command] file] open new Tab page with empty window
* :tabedit [[+command] file] open new Tab page and edit "file"
* :tabfind [[+command] file] open new Tab page and find "file"
* Open a new tab page.
*/
void
ex_tabedit(eap)
exarg_T *eap;
tabpage_new()
{
# if defined(FEAT_SEARCHPATH) || defined(FEAT_BROWSE)
char_u *fname = NULL;
# endif
# ifdef FEAT_BROWSE
int browse_flag = cmdmod.browse;
# endif
exarg_T ea;
# ifdef FEAT_GUI
need_mouse_correct = TRUE;
# endif
# ifdef FEAT_SEARCHPATH
if (eap->cmdidx == CMD_tabfind)
{
fname = find_file_in_path(eap->arg, (int)STRLEN(eap->arg),
FNAME_MESS, TRUE, curbuf->b_ffname);
if (fname == NULL)
goto theend;
eap->arg = fname;
}
# ifdef FEAT_BROWSE
else
# endif
# endif
# ifdef FEAT_BROWSE
if (cmdmod.browse)
{
if (
# ifdef FEAT_GUI
!gui.in_use &&
# endif
au_has_group((char_u *)"FileExplorer"))
{
/* No browsing supported but we do have the file explorer:
* Edit the directory. */
if (*eap->arg == NUL || !mch_isdir(eap->arg))
eap->arg = (char_u *)".";
}
else
{
fname = do_browse(0, (char_u *)_("Edit File in new tab page"),
eap->arg, NULL, NULL, NULL, curbuf);
if (fname == NULL)
goto theend;
eap->arg = fname;
}
}
cmdmod.browse = FALSE; /* Don't browse again in do_ecmd(). */
# endif
if (win_new_tabpage() != FAIL)
{
# ifdef FEAT_SCROLLBIND
curwin->w_p_scb = FALSE;
# endif
if (*eap->arg != NUL)
do_exedit(eap, NULL);
}
# ifdef FEAT_BROWSE
cmdmod.browse = browse_flag;
# endif
# if defined(FEAT_SEARCHPATH) || defined(FEAT_BROWSE)
theend:
vim_free(fname);
# endif
vim_memset(&ea, 0, sizeof(ea));
ea.cmdidx = CMD_tabnew;
ea.cmd = (char_u *)"tabn";
ea.arg = (char_u *)"";
ex_splitview(&ea);
}
/*
* :tab command
* :tabnext command
*/
void
ex_tab(eap)
static void
ex_tabnext(eap)
exarg_T *eap;
{
goto_tabpage((int)eap->line2);
switch (eap->cmdidx)
{
case CMD_tabfirst:
case CMD_tabrewind:
goto_tabpage(1);
break;
case CMD_tablast:
goto_tabpage(9999);
break;
case CMD_tabprevious:
case CMD_tabNext:
goto_tabpage(eap->addr_count == 0 ? -1 : -(int)eap->line2);
break;
default: /* CMD_tabnext */
goto_tabpage(eap->addr_count == 0 ? 0 : (int)eap->line2);
break;
}
}
/*
* :tabmove command
*/
static void
ex_tabmove(eap)
exarg_T *eap;
{
tabpage_move(eap->addr_count == 0 ? 9999 : (int)eap->line2);
}
/*
@@ -7084,13 +7098,15 @@ ex_tabs(eap)
out_flush(); /* output one line at a time */
ui_breakcheck();
if (tp->tp_topframe == topframe)
if (tp == curtab)
wp = firstwin;
else
wp = tp->tp_firstwin;
for ( ; wp != NULL && !got_int; wp = wp->w_next)
{
msg_puts((char_u *)"\n ");
msg_putchar('\n');
msg_putchar(wp == curwin ? '>' : ' ');
msg_putchar(' ');
msg_putchar(bufIsChanged(wp->w_buffer) ? '+' : ' ');
msg_putchar(' ');
if (buf_spname(wp->w_buffer) != NULL)
@@ -7315,12 +7331,14 @@ do_exedit(eap, old_curwin)
}
if ((eap->cmdidx == CMD_new
|| eap->cmdidx == CMD_tabnew
|| eap->cmdidx == CMD_tabedit
#ifdef FEAT_VERTSPLIT
|| eap->cmdidx == CMD_vnew
#endif
) && *eap->arg == NUL)
{
/* ":new" without argument: edit an new empty buffer */
/* ":new" or ":tabnew" without argument: edit an new empty buffer */
setpcmark();
(void)do_ecmd(0, NULL, NULL, eap, ECMD_ONE,
ECMD_HIDE + (eap->forceit ? ECMD_FORCEIT : 0));
@@ -9278,7 +9296,7 @@ eval_vars(src, usedlen, lnump, errormsg, srcstart)
#ifdef FEAT_SEARCHPATH
case SPEC_CFILE: /* file name under cursor */
result = file_name_at_cursor(FNAME_MESS|FNAME_HYP, 1L);
result = file_name_at_cursor(FNAME_MESS|FNAME_HYP, 1L, NULL);
if (result == NULL)
{
*errormsg = (char_u *)"";
@@ -10574,7 +10592,7 @@ ex_nohlsearch(eap)
}
/*
* ":match {group} {pattern}"
* ":[N]match {group} {pattern}"
* Sets nextcmd to the start of the next command, if any. Also called when
* skipping commands to find the next command.
*/
@@ -10585,12 +10603,21 @@ ex_match(eap)
char_u *p;
char_u *end;
int c;
int mi;
if (eap->line2 <= 3)
mi = eap->line2 - 1;
else
{
EMSG(e_invcmd);
return;
}
/* First clear any old pattern. */
if (!eap->skip)
{
vim_free(curwin->w_match.regprog);
curwin->w_match.regprog = NULL;
vim_free(curwin->w_match[mi].regprog);
curwin->w_match[mi].regprog = NULL;
redraw_later(NOT_VALID); /* always need a redraw */
}
@@ -10604,8 +10631,9 @@ ex_match(eap)
p = skiptowhite(eap->arg);
if (!eap->skip)
{
curwin->w_match_id = syn_namen2id(eap->arg, (int)(p - eap->arg));
if (curwin->w_match_id == 0)
curwin->w_match_id[mi] = syn_namen2id(eap->arg,
(int)(p - eap->arg));
if (curwin->w_match_id[mi] == 0)
{
EMSG2(_(e_nogroup), eap->arg);
return;
@@ -10626,12 +10654,17 @@ ex_match(eap)
eap->errmsg = e_trailing;
return;
}
if (*end != *p)
{
EMSG2(_(e_invarg2), p);
return;
}
c = *end;
*end = NUL;
curwin->w_match.regprog = vim_regcomp(p + 1, RE_MAGIC);
curwin->w_match[mi].regprog = vim_regcomp(p + 1, RE_MAGIC);
*end = c;
if (curwin->w_match.regprog == NULL)
if (curwin->w_match[mi].regprog == NULL)
{
EMSG2(_(e_invarg2), p);
return;

View File

@@ -518,7 +518,8 @@ getcmdline(firstc, count, indent)
xpc.xp_context = EXPAND_NOTHING;
}
}
if (xpc.xp_context == EXPAND_FILES && p_wmnu)
if ((xpc.xp_context == EXPAND_FILES
|| xpc.xp_context == EXPAND_SHELLCMD) && p_wmnu)
{
char_u upseg[5];
@@ -1224,21 +1225,21 @@ getcmdline(firstc, count, indent)
# endif
if (!mouse_has(MOUSE_COMMAND))
goto cmdline_not_changed; /* Ignore mouse */
#ifdef FEAT_CLIPBOARD
# ifdef FEAT_CLIPBOARD
if (clip_star.available)
cmdline_paste('*', TRUE);
else
#endif
# endif
cmdline_paste(0, TRUE);
redrawcmd();
goto cmdline_changed;
#ifdef FEAT_DND
# ifdef FEAT_DND
case K_DROP:
cmdline_paste('~', TRUE);
redrawcmd();
goto cmdline_changed;
#endif
# endif
case K_LEFTDRAG:
case K_LEFTRELEASE:
@@ -1291,7 +1292,7 @@ getcmdline(firstc, count, indent)
if (mouse_row <= cmdline_row + ccline.cmdspos / Columns
&& mouse_col < ccline.cmdspos % Columns + i)
break;
#ifdef FEAT_MBYTE
# ifdef FEAT_MBYTE
if (has_mbyte)
{
/* Count ">" for double-wide char that doesn't fit. */
@@ -1299,7 +1300,7 @@ getcmdline(firstc, count, indent)
ccline.cmdpos += (*mb_ptr2len)(ccline.cmdbuff
+ ccline.cmdpos) - 1;
}
#endif
# endif
ccline.cmdspos += i;
}
goto cmdline_not_changed;
@@ -1339,6 +1340,16 @@ getcmdline(firstc, count, indent)
}
goto cmdline_not_changed;
#endif
#ifdef FEAT_GUI_TABLINE
case K_TABLINE:
case K_TABMENU:
/* Don't want to change any tabs here. Make sure the same tab
* is still selected. */
if (gui_use_tabline())
gui_mch_set_curtab(tabpage_index(curtab));
goto cmdline_not_changed;
#endif
case K_SELECT: /* end of Select mode mapping - ignore */
goto cmdline_not_changed;
@@ -2456,9 +2467,9 @@ draw_cmdline(start, len)
int pc, pc1;
int prev_c = 0;
int prev_c1 = 0;
int u8c, u8c_c1, u8c_c2;
int u8c;
int u8cc[MAX_MCO];
int nc = 0;
int dummy;
/*
* Do arabic shaping into a temporary buffer. This is very
@@ -2485,7 +2496,7 @@ draw_cmdline(start, len)
for (j = start; j < start + len; j += mb_l)
{
p = ccline.cmdbuff + j;
u8c = utfc_ptr2char_len(p, &u8c_c1, &u8c_c2, start + len - j);
u8c = utfc_ptr2char_len(p, u8cc, start + len - j);
mb_l = utfc_ptr2len_len(p, start + len - j);
if (ARABIC_CHAR(u8c))
{
@@ -2495,7 +2506,7 @@ draw_cmdline(start, len)
/* displaying from right to left */
pc = prev_c;
pc1 = prev_c1;
prev_c1 = u8c_c1;
prev_c1 = u8cc[0];
if (j + mb_l >= start + len)
nc = NUL;
else
@@ -2507,20 +2518,25 @@ draw_cmdline(start, len)
if (j + mb_l >= start + len)
pc = NUL;
else
pc = utfc_ptr2char_len(p + mb_l, &pc1, &dummy,
{
int pcc[MAX_MCO];
pc = utfc_ptr2char_len(p + mb_l, pcc,
start + len - j - mb_l);
pc1 = pcc[0];
}
nc = prev_c;
}
prev_c = u8c;
u8c = arabic_shape(u8c, NULL, &u8c_c1, pc, pc1, nc);
u8c = arabic_shape(u8c, NULL, &u8cc[0], pc, pc1, nc);
newlen += (*mb_char2bytes)(u8c, arshape_buf + newlen);
if (u8c_c1 != 0)
if (u8cc[0] != 0)
{
newlen += (*mb_char2bytes)(u8c_c1, arshape_buf + newlen);
if (u8c_c2 != 0)
newlen += (*mb_char2bytes)(u8c_c2,
newlen += (*mb_char2bytes)(u8cc[0], arshape_buf + newlen);
if (u8cc[1] != 0)
newlen += (*mb_char2bytes)(u8cc[1],
arshape_buf + newlen);
}
}
@@ -2939,6 +2955,14 @@ redrawcmd()
if (cmd_silent)
return;
/* when 'incsearch' is set there may be no command line while redrawing */
if (ccline.cmdbuff == NULL)
{
windgoto(cmdline_row, 0);
msg_clr_eos();
return;
}
msg_start();
redrawcmdprompt();
@@ -3335,6 +3359,7 @@ ExpandOne(xp, str, orig, options, mode)
#ifdef CASE_INSENSITIVE_FILENAME
if (xp->xp_context == EXPAND_DIRECTORIES
|| xp->xp_context == EXPAND_FILES
|| xp->xp_context == EXPAND_SHELLCMD
|| xp->xp_context == EXPAND_BUFFERS)
{
if (TOLOWER_LOC(xp->xp_files[i][len]) !=
@@ -3436,6 +3461,7 @@ ExpandEscape(xp, str, numfiles, files, options)
if (options & WILD_ESCAPE)
{
if (xp->xp_context == EXPAND_FILES
|| xp->xp_context == EXPAND_SHELLCMD
|| xp->xp_context == EXPAND_BUFFERS
|| xp->xp_context == EXPAND_DIRECTORIES)
{
@@ -3630,6 +3656,7 @@ showmatches(xp, wildmenu)
for (i = 0; i < num_files; ++i)
{
if (!showtail && (xp->xp_context == EXPAND_FILES
|| xp->xp_context == EXPAND_SHELLCMD
|| xp->xp_context == EXPAND_BUFFERS))
{
home_replace(NULL, files_found[i], NameBuff, MAXPATHL, TRUE);
@@ -3682,6 +3709,7 @@ showmatches(xp, wildmenu)
for (j = maxlen - lastlen; --j >= 0; )
msg_putchar(' ');
if (xp->xp_context == EXPAND_FILES
|| xp->xp_context == EXPAND_SHELLCMD
|| xp->xp_context == EXPAND_BUFFERS)
{
/* highlight directories */
@@ -3771,7 +3799,9 @@ expand_showtail(xp)
char_u *end;
/* When not completing file names a "/" may mean something different. */
if (xp->xp_context != EXPAND_FILES && xp->xp_context != EXPAND_DIRECTORIES)
if (xp->xp_context != EXPAND_FILES
&& xp->xp_context != EXPAND_SHELLCMD
&& xp->xp_context != EXPAND_DIRECTORIES)
return FALSE;
end = gettail(xp->xp_pattern);
@@ -3808,7 +3838,9 @@ addstar(fname, len, context)
int new_len;
char_u *tail;
if (context != EXPAND_FILES && context != EXPAND_DIRECTORIES)
if (context != EXPAND_FILES
&& context != EXPAND_SHELLCMD
&& context != EXPAND_DIRECTORIES)
{
/*
* Matching will be done internally (on something other than files).
@@ -3925,6 +3957,7 @@ addstar(fname, len, context)
* EXPAND_DIRECTORIES In some cases this is used instead of the latter
* when we know only directories are of interest. eg
* :set dir=^I
* EXPAND_SHELLCMD After ":!cmd", ":r !cmd" or ":w !cmd".
* EXPAND_SETTINGS Complete variable names. eg :set d^I
* EXPAND_BOOL_SETTINGS Complete boolean variables only, eg :set no^I
* EXPAND_TAGS Complete tags from the files in p_tags. eg :ta a^I
@@ -4147,6 +4180,93 @@ ExpandFromContext(xp, pat, num_file, file, options)
return ret;
}
if (xp->xp_context == EXPAND_SHELLCMD)
{
/*
* Expand shell command.
*/
int i;
char_u *path;
int mustfree = FALSE;
garray_T ga;
char_u *buf = alloc(MAXPATHL);
int l;
char_u *s, *e;
if (buf == NULL)
return FAIL;
/* for ":set path=" and ":set tags=" halve backslashes for escaped
* space */
pat = vim_strsave(pat);
for (i = 0; pat[i]; ++i)
if (pat[i] == '\\' && pat[i + 1] == ' ')
STRCPY(pat + i, pat + i + 1);
flags |= EW_FILE | EW_EXEC;
/* For an absolute name we don't use $PATH. */
if ((pat[0] == '.' && (vim_ispathsep(pat[1])
|| (pat[1] == '.' && vim_ispathsep(pat[2])))))
path = (char_u *)".";
else
path = vim_getenv((char_u *)"PATH", &mustfree);
ga_init2(&ga, (int)sizeof(char *), 10);
for (s = path; *s != NUL; s = e)
{
#if defined(MSDOS) || defined(MSWIN) || defined(OS2)
e = vim_strchr(s, ';');
#else
e = vim_strchr(s, ':');
#endif
if (e == NULL)
e = s + STRLEN(s);
l = e - s;
if (l > MAXPATHL - 5)
break;
vim_strncpy(buf, s, l);
add_pathsep(buf);
l = STRLEN(buf);
vim_strncpy(buf + l, pat, MAXPATHL - 1 - l);
/* Expand matches in one directory of $PATH. */
ret = expand_wildcards(1, &buf, num_file, file, flags);
if (ret == OK)
{
if (ga_grow(&ga, *num_file) == FAIL)
FreeWild(*num_file, *file);
else
{
for (i = 0; i < *num_file; ++i)
{
s = (*file)[i];
if (STRLEN(s) > l)
{
/* Remove the path again. */
mch_memmove(s, s + l, STRLEN(s + l) + 1);
((char_u **)ga.ga_data)[ga.ga_len] = s;
++ga.ga_len;
}
else
vim_free(s);
}
vim_free(*file);
}
}
if (*e != NUL)
++e;
}
*file = ga.ga_data;
*num_file = ga.ga_len;
vim_free(buf);
vim_free(pat);
if (mustfree)
vim_free(path);
return ret;
}
*file = (char_u **)"";
*num_file = 0;
if (xp->xp_context == EXPAND_HELP)
@@ -5635,6 +5755,9 @@ ex_window()
/* Don't execute autocommands while creating the window. */
++autocmd_block;
# endif
/* don't use a new tab page */
cmdmod.tab = 0;
/* Create a window for the command-line buffer. */
if (win_split((int)p_cwh, WSP_BOT) == FAIL)
{

View File

@@ -609,6 +609,10 @@
# define FEAT_MBYTE
#endif
/* Define this if you want to use 16 bit Unicode only, reduces memory used for
* the screen structures. */
/* #define UNICODE16 */
/*
* +multi_byte_ime Win32 IME input method. Requires +multi_byte.
* Only for far-east Windows, so IME can be used to input
@@ -729,6 +733,13 @@
# define FEAT_MENU
#endif
/*
* GUI tabline
*/
#if defined(FEAT_GUI_GTK) && defined(FEAT_WINDOWS)
# define FEAT_GUI_TABLINE
#endif
/*
* +browse ":browse" command.
*/
@@ -1187,6 +1198,11 @@
# define FEAT_BEVAL_TIP /* balloon eval used for toolbar tooltip */
#endif
/* both Motif and Athena are X11 and share some code */
#if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA)
# define FEAT_GUI_X11
#endif
#if defined(FEAT_SUN_WORKSHOP) || defined(FEAT_NETBEANS_INTG)
/*
* The following features are (currently) only used by Sun Visual WorkShop 6

View File

@@ -12,11 +12,11 @@
*/
#if defined(MSDOS) || defined(WIN16) || defined(WIN32) || defined(_WIN64)
# include <io.h> /* for lseek(), must be before vim.h */
# include "vimio.h" /* for lseek(), must be before vim.h */
#endif
#if defined __EMX__
# include <io.h> /* for mktemp(), CJW 1997-12-03 */
# include "vimio.h" /* for mktemp(), CJW 1997-12-03 */
#endif
#include "vim.h"
@@ -66,6 +66,11 @@ static int check_mtime __ARGS((buf_T *buf, struct stat *s));
static int time_differs __ARGS((long t1, long t2));
#ifdef FEAT_AUTOCMD
static int apply_autocmds_exarg __ARGS((event_T event, char_u *fname, char_u *fname_io, int force, buf_T *buf, exarg_T *eap));
static int au_find_group __ARGS((char_u *name));
# define AUGROUP_DEFAULT -1 /* default autocmd group */
# define AUGROUP_ERROR -2 /* errornouse autocmd group */
# define AUGROUP_ALL -3 /* all autocmd groups */
#endif
#if defined(FEAT_CRYPT) || defined(FEAT_MBYTE)
@@ -579,7 +584,7 @@ readfile(fname, sfname, from, lines_to_skip, lines_to_read, eap, flags)
fenc = enc_canonize(eap->cmd + eap->force_enc);
if (fenc != NULL)
set_string_option_direct((char_u *)"fenc", -1,
fenc, OPT_FREE|OPT_LOCAL);
fenc, OPT_FREE|OPT_LOCAL, 0);
vim_free(fenc);
}
#endif
@@ -2104,7 +2109,7 @@ failed:
/* If editing a new file: set 'fenc' for the current buffer. */
if (newfile)
set_string_option_direct((char_u *)"fenc", -1, fenc,
OPT_FREE|OPT_LOCAL);
OPT_FREE|OPT_LOCAL, 0);
if (fenc_alloced)
vim_free(fenc);
# ifdef USE_ICONV
@@ -2313,16 +2318,13 @@ failed:
p = msg_trunc_attr(IObuff, FALSE, 0);
if (read_stdin || read_buffer || restart_edit != 0
|| (msg_scrolled != 0 && !need_wait_return))
{
/* Need to repeat the message after redrawing when:
* - When reading from stdin (the screen will be cleared next).
* - When restart_edit is set (otherwise there will be a delay
* before redrawing).
* - When the screen was scrolled but there is no wait-return
* prompt. */
set_keep_msg(p);
keep_msg_attr = 0;
}
set_keep_msg(p, 0);
msg_scrolled_ign = FALSE;
}
@@ -2330,6 +2332,7 @@ failed:
if (newfile && (error
#ifdef FEAT_MBYTE
|| conv_error != 0
|| (illegal_byte > 0 && bad_char_behavior != BAD_KEEP)
#endif
))
curbuf->b_p_ro = TRUE;
@@ -2354,6 +2357,22 @@ failed:
curbuf->b_op_start.col = 0;
curbuf->b_op_end.lnum = from + linecnt;
curbuf->b_op_end.col = 0;
#ifdef WIN32
/*
* Work around a weird problem: When a file has two links (only
* possible on NTFS) and we write through one link, then stat() it
* throught the other link, the timestamp information may be wrong.
* It's correct again after reading the file, thus reset the timestamp
* here.
*/
if (newfile && !read_stdin && !read_buffer
&& mch_stat((char *)fname, &st) >= 0)
{
buf_store_time(curbuf, &st, fname);
curbuf->b_mtime_read = curbuf->b_mtime;
}
#endif
}
msg_scroll = msg_save;
@@ -3260,6 +3279,13 @@ buf_write(buf, fname, sfname, start, end, eap, append, forceit,
)
backup_copy = TRUE;
else
# else
# ifdef WIN32
/* On NTFS file systems hard links are possible. */
if (mch_is_linked(fname))
backup_copy = TRUE;
else
# endif
# endif
{
/*
@@ -4372,8 +4398,7 @@ restore_backup:
STRCAT(IObuff, shortmess(SHM_WRI) ? _(" [w]") : _(" written"));
}
set_keep_msg(msg_trunc_attr(IObuff, FALSE, 0));
keep_msg_attr = 0;
set_keep_msg(msg_trunc_attr(IObuff, FALSE, 0), 0);
}
/* When written everything correctly: reset 'modified'. Unless not
@@ -4628,7 +4653,8 @@ set_rw_fname(fname, sfname)
/* Do filetype detection now if 'filetype' is empty. */
if (*curbuf->b_p_ft == NUL)
{
(void)do_doautocmd((char_u *)"filetypedetect BufRead", TRUE);
if (au_find_group((char_u *)"filetypedetect") != AUGROUP_ERROR)
(void)do_doautocmd((char_u *)"filetypedetect BufRead", FALSE);
do_modelines(FALSE);
}
#endif
@@ -6960,8 +6986,10 @@ static struct event_name
{"SpellFileMissing",EVENT_SPELLFILEMISSING},
{"StdinReadPost", EVENT_STDINREADPOST},
{"StdinReadPre", EVENT_STDINREADPRE},
{"Syntax", EVENT_SYNTAX},
{"SwapExists", EVENT_SWAPEXISTS},
{"Syntax", EVENT_SYNTAX},
{"TabEnter", EVENT_TABENTER},
{"TabLeave", EVENT_TABLEAVE},
{"TermChanged", EVENT_TERMCHANGED},
{"TermResponse", EVENT_TERMRESPONSE},
{"User", EVENT_USER},
@@ -7011,9 +7039,6 @@ static garray_T augroups = {0, 0, sizeof(char_u *), 10, NULL};
/*
* The ID of the current group. Group 0 is the default one.
*/
#define AUGROUP_DEFAULT -1 /* default autocmd group */
#define AUGROUP_ERROR -2 /* errornouse autocmd group */
#define AUGROUP_ALL -3 /* all autocmd groups */
static int current_augroup = AUGROUP_DEFAULT;
static int au_need_clean = FALSE; /* need to delete marked patterns */
@@ -7024,7 +7049,6 @@ static void au_remove_cmds __ARGS((AutoPat *ap));
static void au_cleanup __ARGS((void));
static int au_new_group __ARGS((char_u *name));
static void au_del_group __ARGS((char_u *name));
static int au_find_group __ARGS((char_u *name));
static event_T event_name2nr __ARGS((char_u *start, char_u **end));
static char_u *event_nr2name __ARGS((event_T event));
static char_u *find_end_event __ARGS((char_u *arg, int have_group));
@@ -7492,7 +7516,8 @@ au_event_disable(what)
if (new_ei != NULL)
{
STRCAT(new_ei, what);
set_string_option_direct((char_u *)"ei", -1, new_ei, OPT_FREE);
set_string_option_direct((char_u *)"ei", -1, new_ei,
OPT_FREE, SID_NONE);
vim_free(new_ei);
}
}
@@ -7505,7 +7530,8 @@ au_event_restore(old_ei)
{
if (old_ei != NULL)
{
set_string_option_direct((char_u *)"ei", -1, old_ei, OPT_FREE);
set_string_option_direct((char_u *)"ei", -1, old_ei,
OPT_FREE, SID_NONE);
vim_free(old_ei);
}
}

View File

@@ -1939,7 +1939,7 @@ get_foldtext(wp, lnum, lnume, foldinfo, buf)
++emsg_off;
text = eval_to_string_safe(wp->w_p_fdt, NULL,
was_set_insecurely((char_u *)"foldtext"));
was_set_insecurely((char_u *)"foldtext", OPT_LOCAL));
--emsg_off;
curwin = save_curwin;

View File

@@ -53,8 +53,9 @@ EXTERN char_u *LineWraps INIT(= NULL); /* line wraps to next line */
* Note: These three are only allocated when enc_utf8 is set!
*/
EXTERN u8char_T *ScreenLinesUC INIT(= NULL); /* decoded UTF-8 characters */
EXTERN u8char_T *ScreenLinesC1 INIT(= NULL); /* first composing char */
EXTERN u8char_T *ScreenLinesC2 INIT(= NULL); /* second composing char */
EXTERN u8char_T *ScreenLinesC[MAX_MCO]; /* composing characters */
EXTERN int Screen_mco INIT(= 0); /* value of p_mco used when
allocating ScreenLinesC[] */
/* Only used for euc-jp: Second byte of a character that starts with 0x8e.
* These are single-width. */
@@ -62,7 +63,14 @@ EXTERN schar_T *ScreenLines2 INIT(= NULL);
#endif
#ifdef FEAT_WINDOWS
EXTERN char_u *TabPageIdxs INIT(= NULL); /* indexes for tab page line */
/*
* Indexes for tab page line:
* N > 0 for label of tab page N
* N == 0 for no label
* N < 0 for closing tab page -N
* N == -999 for closing current tab page
*/
EXTERN short *TabPageIdxs INIT(= NULL);
#endif
EXTERN int screen_Rows INIT(= 0); /* actual size of ScreenLines[] */
@@ -428,6 +436,16 @@ EXTERN vimmenu_T *current_menu;
/* Set to TRUE after adding/removing menus to ensure they are updated */
EXTERN int force_menu_update INIT(= FALSE);
# endif
# ifdef FEAT_GUI_TABLINE
/* Tab in tab pages line just selected, set by check_termcode() */
EXTERN int current_tab;
/* Menu entry in tab pages line menu just selected, set by check_termcode() */
EXTERN int current_tabmenu;
# define TABLINE_MENU_CLOSE 1
# define TABLINE_MENU_NEW 2
# define TABLINE_MENU_OPEN 3
# endif
/* Scrollbar moved and new value, set by check_termcode() */
EXTERN int current_scrollbar;
@@ -472,6 +490,10 @@ EXTERN VimClipboard clip_plus; /* CLIPBOARD selection in X11 */
# else
# define clip_plus clip_star /* there is only one clipboard */
# endif
EXTERN int clip_unnamed INIT(= FALSE);
EXTERN int clip_autoselect INIT(= FALSE);
EXTERN int clip_autoselectml INIT(= FALSE);
EXTERN regprog_T *clip_exclude_prog INIT(= NULL);
#endif
/*
@@ -488,13 +510,14 @@ EXTERN win_T *prevwin INIT(= NULL); /* previous window */
# define FOR_ALL_WINDOWS(wp) for (wp = firstwin; wp != NULL; wp = wp->w_next)
#define FOR_ALL_TAB_WINDOWS(tp, wp) \
for ((tp) = first_tabpage; (tp) != NULL; (tp) = (tp)->tp_next) \
for ((wp) = ((tp)->tp_topframe == topframe) \
for ((wp) = ((tp) == curtab) \
? firstwin : (tp)->tp_firstwin; (wp); (wp) = (wp)->w_next)
#else
# define firstwin curwin
# define lastwin curwin
# define W_NEXT(wp) NULL
# define FOR_ALL_WINDOWS(wp) wp = curwin;
# define FOR_ALL_TAB_WINDOWS(tp, wp) wp = curwin;
#endif
EXTERN win_T *curwin; /* currently active window */
@@ -1188,6 +1211,12 @@ EXTERN option_table_T printer_opts[OPT_PRINT_NUM_OPTIONS]
# define PRT_UNIT_NAMES {"pc", "in", "mm", "pt"}
#endif
#if (defined(FEAT_PRINTER) && defined(FEAT_STL_OPT)) \
|| defined(FEAT_GUI_TABLINE)
/* Page number used for %N in 'pageheader' and 'guitablabel'. */
EXTERN linenr_T printer_page_num;
#endif
#ifdef FEAT_XCLIPBOARD
EXTERN char *xterm_display INIT(= NULL); /* xterm display name; points
into argv[] */

218
src/gui.c
View File

@@ -26,6 +26,9 @@ static int gui_screenstr __ARGS((int off, int len, int flags, guicolor_T fg, gui
static void gui_delete_lines __ARGS((int row, int count));
static void gui_insert_lines __ARGS((int row, int count));
static void fill_mouse_coord __ARGS((char_u *p, int col, int row));
#if defined(FEAT_GUI_TABLINE) || defined(PROTO)
static int gui_has_tabline __ARGS((void));
#endif
static void gui_do_scrollbar __ARGS((win_T *wp, int which, int enable));
static colnr_T scroll_line_len __ARGS((linenr_T lnum));
static void gui_update_horiz_scrollbar __ARGS((int));
@@ -343,7 +346,7 @@ gui_init()
*/
if (!option_was_set((char_u *)"mouse"))
set_string_option_direct((char_u *)"mouse", -1,
(char_u *)"a", OPT_FREE);
(char_u *)"a", OPT_FREE, SID_NONE);
/*
* If -U option given, use only the initializations from that file and
@@ -785,7 +788,7 @@ set_guifontwide(name)
gui_mch_free_font(gui.wide_font);
gui.wide_font = font;
set_string_option_direct((char_u *)"gfw", -1,
wide_name, OPT_FREE);
wide_name, OPT_FREE, 0);
}
}
break;
@@ -1407,7 +1410,7 @@ gui_set_shellsize(mustset, fit_to_display)
min_width = base_width + MIN_COLUMNS * gui.char_width;
min_height = base_height + MIN_LINES * gui.char_height;
# ifdef FEAT_WINDOWS
min_height += tabpageline_height() * gui.char_height;
min_height += tabline_height() * gui.char_height;
# endif
gui_mch_set_shellsize(width, height, min_width, min_height,
@@ -3078,7 +3081,7 @@ static int prev_which_scrollbars[3] = {-1, -1, -1};
/*
* Set which components are present.
* If "oldval" is not NULL, "oldval" is the previous value, the new * value is
* If "oldval" is not NULL, "oldval" is the previous value, the new value is
* in p_go.
*/
/*ARGSUSED*/
@@ -3093,6 +3096,9 @@ gui_init_which_components(oldval)
static int prev_toolbar = -1;
int using_toolbar = FALSE;
#endif
#ifdef FEAT_GUI_TABLINE
int using_tabline;
#endif
#ifdef FEAT_FOOTER
static int prev_footer = -1;
int using_footer = FALSE;
@@ -3182,10 +3188,27 @@ gui_init_which_components(oldval)
/* Ignore options that are not supported */
break;
}
if (gui.in_use)
{
need_set_size = FALSE;
fix_size = FALSE;
#ifdef FEAT_GUI_TABLINE
/* Update the GUI tab line, it may appear or disappear. This may
* cause the non-GUI tab line to disappear or appear. */
using_tabline = gui_has_tabline();
if (!gui_mch_showing_tabline() != !using_tabline)
{
gui_update_tabline();
need_set_size = TRUE;
if (using_tabline)
fix_size = TRUE;
if (!gui_use_tabline())
redraw_tabline = TRUE; /* may draw non-GUI tab line */
}
#endif
for (i = 0; i < 3; i++)
{
if (gui.which_scrollbars[i] != prev_which_scrollbars[i])
@@ -3252,7 +3275,6 @@ gui_init_which_components(oldval)
if (need_set_size)
{
#ifdef FEAT_GUI_GTK
long r = Rows;
long c = Columns;
#endif
/* Adjust the size of the window to make the text area keep the
@@ -3268,16 +3290,169 @@ gui_init_which_components(oldval)
* character here to avoid this effect.
* If you remove this, please test this command for resizing
* effects (with optional left scrollbar): ":vsp|q|vsp|q|vsp|q".
* Don't do this while starting up though. */
* Don't do this while starting up though.
* And don't change Rows, it may have be reduced intentionally
* when adding menu/toolbar/tabline. */
if (!gui.starting)
(void)char_avail();
Rows = r;
Columns = c;
#endif
}
#ifdef FEAT_WINDOWS
/* When the console tabline appears or disappears the window positions
* change. */
if (firstwin->w_winrow != tabline_height())
shell_new_rows(); /* recompute window positions and heights */
#endif
}
}
#if defined(FEAT_GUI_TABLINE) || defined(PROTO)
/*
* Return TRUE if the GUI is taking care of the tabline.
* It may still be hidden if 'showtabline' is zero.
*/
int
gui_use_tabline()
{
return gui.in_use && vim_strchr(p_go, GO_TABLINE) != NULL;
}
/*
* Return TRUE if the GUI is showing the tabline.
* This uses 'showtabline'.
*/
static int
gui_has_tabline()
{
if (!gui_use_tabline()
|| p_stal == 0
|| (p_stal == 1 && first_tabpage->tp_next == NULL))
return FALSE;
return TRUE;
}
/*
* Update the tabline.
* This may display/undisplay the tabline and update the labels.
*/
void
gui_update_tabline()
{
int showit = gui_has_tabline();
if (!gui.starting && starting == 0)
{
gui_mch_show_tabline(showit);
if (showit != 0)
gui_mch_update_tabline();
}
}
/*
* Get the label for tab page "tp" into NameBuff[].
*/
void
get_tabline_label(tp)
tabpage_T *tp;
{
int modified = FALSE;
char_u buf[40];
int wincount;
win_T *wp;
/* Use 'guitablabel' if it's set. */
if (*p_gtl != NUL)
{
int use_sandbox = FALSE;
int save_called_emsg = called_emsg;
char_u res[MAXPATHL];
tabpage_T *save_curtab;
called_emsg = FALSE;
printer_page_num = tabpage_index(tp);
# ifdef FEAT_EVAL
set_vim_var_nr(VV_LNUM, printer_page_num);
use_sandbox = was_set_insecurely((char_u *)"guitablabel", 0);
# endif
/* It's almost as going to the tabpage, but without autocommands. */
curtab->tp_firstwin = firstwin;
curtab->tp_lastwin = lastwin;
curtab->tp_curwin = curwin;
save_curtab = curtab;
curtab = tp;
topframe = curtab->tp_topframe;
firstwin = curtab->tp_firstwin;
lastwin = curtab->tp_lastwin;
curwin = curtab->tp_curwin;
curbuf = curwin->w_buffer;
/* Can't use NameBuff directly, build_stl_str_hl() uses it. */
build_stl_str_hl(curwin, res, MAXPATHL, p_gtl, use_sandbox,
0, (int)Columns, NULL, NULL);
STRCPY(NameBuff, res);
/* Back to the original curtab. */
curtab = save_curtab;
topframe = curtab->tp_topframe;
firstwin = curtab->tp_firstwin;
lastwin = curtab->tp_lastwin;
curwin = curtab->tp_curwin;
curbuf = curwin->w_buffer;
if (called_emsg)
set_string_option_direct((char_u *)"guitablabel", -1,
(char_u *)"", OPT_FREE, SID_ERROR);
called_emsg |= save_called_emsg;
}
else
{
/* Get the buffer name into NameBuff[] */
get_trans_bufname(tp == curtab ? curbuf : tp->tp_curwin->w_buffer);
wp = (tp == curtab) ? firstwin : tp->tp_firstwin;
for (wincount = 0; wp != NULL; wp = wp->w_next, ++wincount)
if (bufIsChanged(wp->w_buffer))
modified = TRUE;
if (modified || wincount > 1)
{
if (wincount > 1)
vim_snprintf((char *)buf, sizeof(buf), "%d", wincount);
else
buf[0] = NUL;
if (modified)
STRCAT(buf, "+");
STRCAT(buf, " ");
mch_memmove(NameBuff + STRLEN(buf), NameBuff, STRLEN(NameBuff) + 1);
mch_memmove(NameBuff, buf, STRLEN(buf));
}
}
}
/*
* Send the event for clicking to select tab page "nr".
* Returns TRUE if it was done, FALSE when skipped because we are already at
* that tab page.
*/
int
send_tabline_event(nr)
int nr;
{
char_u string[3];
if (nr == tabpage_index(curtab))
return FALSE;
string[0] = CSI;
string[1] = KS_TABLINE;
string[2] = KE_FILLER;
add_to_input_buf(string, 3);
string[0] = nr;
add_to_input_buf_csi(string, 1);
return TRUE;
}
#endif
/*
* Scrollbar stuff:
@@ -3598,14 +3773,9 @@ gui_update_scrollbars(force)
* have both a left and right scrollbar, and we drag one of them, we still
* need to update the other one.
*/
if ( (gui.dragged_sb == SBAR_LEFT
|| gui.dragged_sb == SBAR_RIGHT)
&& (!gui.which_scrollbars[SBAR_LEFT]
|| !gui.which_scrollbars[SBAR_RIGHT])
&& !force)
return;
if (!force && (gui.dragged_sb == SBAR_LEFT || gui.dragged_sb == SBAR_RIGHT))
if (!force && (gui.dragged_sb == SBAR_LEFT || gui.dragged_sb == SBAR_RIGHT)
&& gui.which_scrollbars[SBAR_LEFT]
&& gui.which_scrollbars[SBAR_RIGHT])
{
/*
* If we have two scrollbars and one of them is being dragged, just
@@ -3618,7 +3788,6 @@ gui_update_scrollbars(force)
gui.dragged_wp->w_scrollbars[0].value,
gui.dragged_wp->w_scrollbars[0].size,
gui.dragged_wp->w_scrollbars[0].max);
return;
}
/* avoid that moving components around generates events */
@@ -3628,6 +3797,12 @@ gui_update_scrollbars(force)
{
if (wp->w_buffer == NULL) /* just in case */
continue;
/* Skip a scrollbar that is being dragged. */
if (!force && (gui.dragged_sb == SBAR_LEFT
|| gui.dragged_sb == SBAR_RIGHT)
&& gui.dragged_wp == wp)
continue;
#ifdef SCROLL_PAST_END
max = wp->w_buffer->b_ml.ml_line_count - 1;
#else
@@ -3759,11 +3934,12 @@ gui_update_scrollbars(force)
#endif
sb->size = size;
sb->max = max;
if (gui.which_scrollbars[SBAR_LEFT] && gui.dragged_sb != SBAR_LEFT)
if (gui.which_scrollbars[SBAR_LEFT]
&& (gui.dragged_sb != SBAR_LEFT || gui.dragged_wp != wp))
gui_mch_set_scrollbar_thumb(&wp->w_scrollbars[SBAR_LEFT],
val, size, max);
if (gui.which_scrollbars[SBAR_RIGHT]
&& gui.dragged_sb != SBAR_RIGHT)
&& (gui.dragged_sb != SBAR_RIGHT || gui.dragged_wp != wp))
gui_mch_set_scrollbar_thumb(&wp->w_scrollbars[SBAR_RIGHT],
val, size, max);
}
@@ -4643,7 +4819,11 @@ gui_do_findrepl(flags, find_text, repl_text, down)
if (type == FRD_REPLACEALL)
{
ga_concat(&ga, (char_u *)"/");
concat_esc(&ga, repl_text, '/'); /* escape slashes */
/* escape / and \ */
p = vim_strsave_escaped(repl_text, (char_u *)"/\\");
if (p != NULL)
ga_concat(&ga, p);
vim_free(p);
ga_concat(&ga, (char_u *)"/g");
}
ga_append(&ga, NUL);

View File

@@ -8,12 +8,10 @@
*/
#ifdef FEAT_GUI_MOTIF
# define FEAT_GUI_X11
# include <Xm/Xm.h>
#endif
#ifdef FEAT_GUI_ATHENA
# define FEAT_GUI_X11
# include <X11/Intrinsic.h>
# include <X11/StringDefs.h>
#endif
@@ -394,6 +392,9 @@ typedef struct Gui
PangoFont *ascii_font; /* cached font for ASCII strings */
PangoGlyphString *ascii_glyphs; /* cached code point -> glyph map */
# endif
# ifdef FEAT_GUI_TABLINE
GtkWidget *tabline; /* tab pages line handle */
# endif
GtkAccelGroup *accel_group;
# ifndef HAVE_GTK2

View File

@@ -55,13 +55,13 @@ general_beval_cb(beval, state)
set_vim_var_string(VV_BEVAL_TEXT, text, -1);
vim_free(text);
use_sandbox = was_set_insecurely((char_u *)"balloonexpr");
use_sandbox = was_set_insecurely((char_u *)"balloonexpr", 0);
if (use_sandbox)
++sandbox;
++textlock;
vim_free(result);
result = eval_to_string(p_bexpr, NULL);
result = eval_to_string(p_bexpr, NULL, TRUE);
if (use_sandbox)
--sandbox;
@@ -103,7 +103,11 @@ general_beval_cb(beval, state)
# else
/* Assume Athena */
# include <X11/Shell.h>
# include <X11/Xaw/Label.h>
# ifdef FEAT_GUI_NEXTAW
# include <X11/neXtaw/Label.h>
# else
# include <X11/Xaw/Label.h>
# endif
# endif
#endif

View File

@@ -2827,6 +2827,145 @@ delete_event_cb(GtkWidget *widget, GdkEventAny *event, gpointer data)
return TRUE;
}
#if defined(FEAT_MENU) || defined(FEAT_TOOLBAR) || defined(FEAT_GUI_TABLINE)
static int
get_item_dimensions(GtkWidget *widget, GtkOrientation orientation)
{
GtkOrientation item_orientation = GTK_ORIENTATION_HORIZONTAL;
#ifdef FEAT_GUI_GNOME
if (using_gnome && widget != NULL)
{
# ifdef HAVE_GTK2
BonoboDockItem *dockitem;
widget = gtk_widget_get_parent(widget);
dockitem = BONOBO_DOCK_ITEM(widget);
if (dockitem == NULL || dockitem->is_floating)
return 0;
item_orientation = bonobo_dock_item_get_orientation(dockitem);
# else
GnomeDockItem *dockitem;
widget = widget->parent;
dockitem = GNOME_DOCK_ITEM(widget);
if (dockitem == NULL || dockitem->is_floating)
return 0;
item_orientation = gnome_dock_item_get_orientation(dockitem);
# endif
}
#endif
if (widget != NULL
&& item_orientation == orientation
&& GTK_WIDGET_REALIZED(widget)
&& GTK_WIDGET_VISIBLE(widget))
{
if (orientation == GTK_ORIENTATION_HORIZONTAL)
return widget->allocation.height;
else
return widget->allocation.width;
}
return 0;
}
#endif
static int
get_menu_tool_width(void)
{
int width = 0;
#ifdef FEAT_GUI_GNOME /* these are never vertical without GNOME */
# ifdef FEAT_MENU
width += get_item_dimensions(gui.menubar, GTK_ORIENTATION_VERTICAL);
# endif
# ifdef FEAT_TOOLBAR
width += get_item_dimensions(gui.toolbar, GTK_ORIENTATION_VERTICAL);
# endif
# ifdef FEAT_GUI_TABLINE
width += get_item_dimensions(gui.tabline, GTK_ORIENTATION_VERTICAL);
# endif
#endif
return width;
}
static int
get_menu_tool_height(void)
{
int height = 0;
#ifdef FEAT_MENU
height += get_item_dimensions(gui.menubar, GTK_ORIENTATION_HORIZONTAL);
#endif
#ifdef FEAT_TOOLBAR
height += get_item_dimensions(gui.toolbar, GTK_ORIENTATION_HORIZONTAL);
#endif
#ifdef FEAT_GUI_TABLINE
height += get_item_dimensions(gui.tabline, GTK_ORIENTATION_HORIZONTAL);
#endif
return height;
}
static void
update_window_manager_hints(void)
{
static int old_width = 0;
static int old_height = 0;
static int old_char_width = 0;
static int old_char_height = 0;
int width;
int height;
/* This also needs to be done when the main window isn't there yet,
* otherwise the hints don't work. */
width = gui_get_base_width();
height = gui_get_base_height();
# ifdef FEAT_MENU
height += tabline_height() * gui.char_height;
# endif
# ifdef HAVE_GTK2
width += get_menu_tool_width();
height += get_menu_tool_height();
# endif
/* Avoid an expose event when the size didn't change. */
if (width != old_width
|| height != old_height
|| gui.char_width != old_char_width
|| gui.char_height != old_char_height)
{
GdkGeometry geometry;
GdkWindowHints geometry_mask;
geometry.width_inc = gui.char_width;
geometry.height_inc = gui.char_height;
geometry.base_width = width;
geometry.base_height = height;
geometry.min_width = width + MIN_COLUMNS * gui.char_width;
geometry.min_height = height + MIN_LINES * gui.char_height;
geometry_mask = GDK_HINT_BASE_SIZE|GDK_HINT_RESIZE_INC
|GDK_HINT_MIN_SIZE;
# ifdef HAVE_GTK2
/* Using gui.formwin as geometry widget doesn't work as expected
* with GTK+ 2 -- dunno why. Presumably all the resizing hacks
* in Vim confuse GTK+. */
gtk_window_set_geometry_hints(GTK_WINDOW(gui.mainwin), gui.mainwin,
&geometry, geometry_mask);
# else
gtk_window_set_geometry_hints(GTK_WINDOW(gui.mainwin), gui.formwin,
&geometry, geometry_mask);
# endif
old_width = width;
old_height = height;
old_char_width = gui.char_width;
old_char_height = gui.char_height;
}
}
#ifdef FEAT_TOOLBAR
# ifdef HAVE_GTK2
@@ -2920,6 +3059,249 @@ set_toolbar_style(GtkToolbar *toolbar)
#endif /* FEAT_TOOLBAR */
#if defined(FEAT_GUI_TABLINE) || defined(PROTO)
static int ignore_tabline_evt = FALSE;
static GtkWidget *tabline_menu;
static int clicked_page; /* page clicked in tab line */
/*
* Handle selecting an item in the tab line popup menu.
*/
/*ARGSUSED*/
static void
tabline_menu_handler(GtkMenuItem *item, gpointer user_data)
{
char_u string[3];
/* Add the string cmd into input buffer */
string[0] = CSI;
string[1] = KS_TABMENU;
string[2] = KE_FILLER;
add_to_input_buf(string, 3);
string[0] = clicked_page;
string[1] = (char_u)(long)user_data;
add_to_input_buf_csi(string, 2);
if (gtk_main_level() > 0)
gtk_main_quit();
}
/*
* Create a menu for the tab line.
*/
static GtkWidget *
create_tabline_menu(void)
{
GtkWidget *menu, *item;
menu = gtk_menu_new();
item = gtk_menu_item_new_with_label(_("Close"));
gtk_widget_show(item);
gtk_container_add(GTK_CONTAINER(menu), item);
gtk_signal_connect(GTK_OBJECT(item), "activate",
GTK_SIGNAL_FUNC(tabline_menu_handler),
(gpointer)TABLINE_MENU_CLOSE);
item = gtk_menu_item_new_with_label(_("New tab"));
gtk_widget_show(item);
gtk_container_add(GTK_CONTAINER(menu), item);
gtk_signal_connect(GTK_OBJECT(item), "activate",
GTK_SIGNAL_FUNC(tabline_menu_handler),
(gpointer)TABLINE_MENU_NEW);
item = gtk_menu_item_new_with_label(_("Open Tab..."));
gtk_widget_show(item);
gtk_container_add(GTK_CONTAINER(menu), item);
gtk_signal_connect(GTK_OBJECT(item), "activate",
GTK_SIGNAL_FUNC(tabline_menu_handler),
(gpointer)TABLINE_MENU_OPEN);
return menu;
}
static gboolean
on_tabline_menu(GtkWidget *widget, GdkEvent *event)
{
/* Was this button press event ? */
if (event->type == GDK_BUTTON_PRESS)
{
GdkEventButton *bevent = (GdkEventButton *)event;
int x = bevent->x;
GtkWidget *page;
GtkWidget *label;
/* Find out where the click was. */
for (clicked_page = 1; ; ++clicked_page)
{
page = gtk_notebook_get_nth_page(GTK_NOTEBOOK(gui.tabline),
clicked_page - 1);
if (page == NULL)
{
/* Past all the labels, return zero. */
clicked_page = 0;
break;
}
label = gtk_notebook_get_tab_label(GTK_NOTEBOOK(gui.tabline), page);
/* The label size apparently doesn't include the spacing, estimate
* it by the page position. */
if (page->allocation.x * 2 + label->allocation.x
+ label->allocation.width + 1>= x)
break;
}
/* If the event was generated for 3rd button popup the menu. */
if (bevent->button == 3)
{
gtk_menu_popup(GTK_MENU(widget), NULL, NULL, NULL, NULL,
bevent->button, bevent->time);
/* We handled the event. */
return TRUE;
}
else if (bevent->button == 1 && clicked_page == 0)
{
/* Click after all tabs moves to next tab page. */
if (send_tabline_event(0) && gtk_main_level() > 0)
gtk_main_quit();
}
}
/* We didn't handle the event. */
return FALSE;
}
/*
* Handle selecting one of the tabs.
*/
/*ARGSUSED*/
static void
on_select_tab(
GtkNotebook *notebook,
GtkNotebookPage *page,
gint index,
gpointer data)
{
if (!ignore_tabline_evt)
{
if (send_tabline_event(index + 1) && gtk_main_level() > 0)
gtk_main_quit();
}
}
#ifndef HAVE_GTK2
static int showing_tabline = 0;
#endif
/*
* Show or hide the tabline.
*/
void
gui_mch_show_tabline(int showit)
{
if (gui.tabline == NULL)
return;
#ifdef HAVE_GTK2
/* gtk_notebook_get_show_tabs does not exist in gtk+-1.2.10 */
if (!showit != !gtk_notebook_get_show_tabs(GTK_NOTEBOOK(gui.tabline)))
#else
if (!showit != !showing_tabline)
#endif
{
/* Note: this may cause a resize event */
gtk_notebook_set_show_tabs(GTK_NOTEBOOK(gui.tabline), showit);
update_window_manager_hints();
#ifndef HAVE_GTK2
showing_tabline = showit;
#endif
}
}
/*
* Return TRUE when tabline is displayed.
*/
int
gui_mch_showing_tabline(void)
{
return gui.tabline != NULL
#ifdef HAVE_GTK2
/* gtk_notebook_get_show_tabs does not exist in gtk+-1.2.10 */
&& gtk_notebook_get_show_tabs(GTK_NOTEBOOK(gui.tabline))
#else
&& showing_tabline
#endif
;
}
/*
* Update the labels of the tabline.
*/
void
gui_mch_update_tabline(void)
{
GtkWidget *page;
GtkWidget *label;
tabpage_T *tp;
int nr = 0;
int curtabidx = 0;
if (gui.tabline == NULL)
return;
ignore_tabline_evt = TRUE;
/* Add a label for each tab page. They all contain the same text area. */
for (tp = first_tabpage; tp != NULL; tp = tp->tp_next, ++nr)
{
if (tp == curtab)
curtabidx = nr;
page = gtk_notebook_get_nth_page(GTK_NOTEBOOK(gui.tabline), nr);
if (page == NULL)
{
/* Add notebook page */
page = gtk_vbox_new(FALSE, 0);
gtk_widget_show(page);
label = gtk_label_new("-Empty-");
gtk_widget_show(label);
gtk_notebook_insert_page(GTK_NOTEBOOK(gui.tabline),
page,
label,
nr++);
}
get_tabline_label(tp);
gtk_notebook_set_tab_label_text(GTK_NOTEBOOK(gui.tabline), page,
(const gchar *)NameBuff);
}
/* Remove any old labels. */
while (gtk_notebook_get_nth_page(GTK_NOTEBOOK(gui.tabline), nr) != NULL)
gtk_notebook_remove_page(GTK_NOTEBOOK(gui.tabline), nr);
if (gtk_notebook_current_page(GTK_NOTEBOOK(gui.tabline)) != curtabidx)
gtk_notebook_set_page(GTK_NOTEBOOK(gui.tabline), curtabidx);
ignore_tabline_evt = FALSE;
}
/*
* Set the current tab to "nr". First tab is 1.
*/
void
gui_mch_set_curtab(nr)
int nr;
{
if (gui.tabline == NULL)
return;
ignore_tabline_evt = TRUE;
if (gtk_notebook_current_page(GTK_NOTEBOOK(gui.tabline)) != nr - 1)
gtk_notebook_set_page(GTK_NOTEBOOK(gui.tabline), nr - 1);
ignore_tabline_evt = FALSE;
}
#endif /* FEAT_GUI_TABLINE */
/*
* Initialize the GUI. Create all the windows, set up all the callbacks etc.
* Returns OK for success, FAIL when the GUI can't be started.
@@ -3060,6 +3442,7 @@ gui_mch_init(void)
gui.accel_group = gtk_accel_group_get_default();
#endif
/* A vertical box holds the menubar, toolbar and main text window. */
vbox = gtk_vbox_new(FALSE, 0);
#ifdef FEAT_GUI_GNOME
@@ -3194,6 +3577,35 @@ gui_mch_init(void)
}
#endif /* FEAT_TOOLBAR */
#ifdef FEAT_GUI_TABLINE
/* Use a Notebook for the tab pages labels. The labels are hidden by
* default. */
gui.tabline = gtk_notebook_new();
gtk_widget_show(gui.tabline);
gtk_box_pack_start(GTK_BOX(vbox), gui.tabline, FALSE, FALSE, 0);
gtk_notebook_set_show_border(GTK_NOTEBOOK(gui.tabline), FALSE);
gtk_notebook_set_show_tabs(GTK_NOTEBOOK(gui.tabline), FALSE);
{
GtkWidget *page, *label;
/* Add the first tab. */
page = gtk_vbox_new(FALSE, 0);
gtk_widget_show(page);
gtk_container_add(GTK_CONTAINER(gui.tabline), page);
label = gtk_label_new("-Empty-");
gtk_widget_show(label);
gtk_notebook_set_tab_label(GTK_NOTEBOOK(gui.tabline), page, label);
}
gtk_signal_connect(GTK_OBJECT(gui.tabline), "switch_page",
GTK_SIGNAL_FUNC(on_select_tab), NULL);
/* Create a popup menu for the tab line and connect it. */
tabline_menu = create_tabline_menu();
gtk_signal_connect_object(GTK_OBJECT(gui.tabline), "button_press_event",
GTK_SIGNAL_FUNC(on_tabline_menu), GTK_OBJECT(tabline_menu));
#endif
gui.formwin = gtk_form_new();
gtk_container_border_width(GTK_CONTAINER(gui.formwin), 0);
gtk_widget_set_events(gui.formwin, GDK_EXPOSURE_MASK);
@@ -3365,139 +3777,6 @@ gui_mch_new_colors(void)
}
}
#if defined(FEAT_MENU) || defined(FEAT_TOOLBAR)
static int
get_item_dimensions(GtkWidget *widget, GtkOrientation orientation)
{
GtkOrientation item_orientation = GTK_ORIENTATION_HORIZONTAL;
#ifdef FEAT_GUI_GNOME
if (using_gnome && widget != NULL)
{
# ifdef HAVE_GTK2
BonoboDockItem *dockitem;
widget = gtk_widget_get_parent(widget);
dockitem = BONOBO_DOCK_ITEM(widget);
if (dockitem == NULL || dockitem->is_floating)
return 0;
item_orientation = bonobo_dock_item_get_orientation(dockitem);
# else
GnomeDockItem *dockitem;
widget = widget->parent;
dockitem = GNOME_DOCK_ITEM(widget);
if (dockitem == NULL || dockitem->is_floating)
return 0;
item_orientation = gnome_dock_item_get_orientation(dockitem);
# endif
}
#endif
if (widget != NULL
&& item_orientation == orientation
&& GTK_WIDGET_REALIZED(widget)
&& GTK_WIDGET_VISIBLE(widget))
{
if (orientation == GTK_ORIENTATION_HORIZONTAL)
return widget->allocation.height;
else
return widget->allocation.width;
}
return 0;
}
#endif
static int
get_menu_tool_width(void)
{
int width = 0;
#ifdef FEAT_GUI_GNOME /* these are never vertical without GNOME */
# ifdef FEAT_MENU
width += get_item_dimensions(gui.menubar, GTK_ORIENTATION_VERTICAL);
# endif
# ifdef FEAT_TOOLBAR
width += get_item_dimensions(gui.toolbar, GTK_ORIENTATION_VERTICAL);
# endif
#endif
return width;
}
static int
get_menu_tool_height(void)
{
int height = 0;
#ifdef FEAT_MENU
height += get_item_dimensions(gui.menubar, GTK_ORIENTATION_HORIZONTAL);
#endif
#ifdef FEAT_TOOLBAR
height += get_item_dimensions(gui.toolbar, GTK_ORIENTATION_HORIZONTAL);
#endif
return height;
}
static void
update_window_manager_hints(void)
{
static int old_width = 0;
static int old_height = 0;
static int old_char_width = 0;
static int old_char_height = 0;
int width;
int height;
/* This also needs to be done when the main window isn't there yet,
* otherwise the hints don't work. */
width = gui_get_base_width();
height = gui_get_base_height();
# ifdef FEAT_MENU
height += tabpageline_height() * gui.char_height;
# endif
# ifdef HAVE_GTK2
width += get_menu_tool_width();
height += get_menu_tool_height();
# endif
/* Avoid an expose event when the size didn't change. */
if (width != old_width
|| height != old_height
|| gui.char_width != old_char_width
|| gui.char_height != old_char_height)
{
GdkGeometry geometry;
GdkWindowHints geometry_mask;
geometry.width_inc = gui.char_width;
geometry.height_inc = gui.char_height;
geometry.base_width = width;
geometry.base_height = height;
geometry.min_width = width + MIN_COLUMNS * gui.char_width;
geometry.min_height = height + MIN_LINES * gui.char_height;
geometry_mask = GDK_HINT_BASE_SIZE|GDK_HINT_RESIZE_INC
|GDK_HINT_MIN_SIZE;
# ifdef HAVE_GTK2
/* Using gui.formwin as geometry widget doesn't work as expected
* with GTK+ 2 -- dunno why. Presumably all the resizing hacks
* in Vim confuse GTK+. */
gtk_window_set_geometry_hints(GTK_WINDOW(gui.mainwin), gui.mainwin,
&geometry, geometry_mask);
# else
gtk_window_set_geometry_hints(GTK_WINDOW(gui.mainwin), gui.formwin,
&geometry, geometry_mask);
# endif
old_width = width;
old_height = height;
old_char_width = gui.char_width;
old_char_height = gui.char_height;
}
}
/*
* This signal informs us about the need to rearrange our sub-widgets.
*/
@@ -4195,7 +4474,9 @@ gui_mch_font_dialog(char_u *oldval)
if (gui.fontname != NULL)
{
fontname = vim_strsave(gui.fontname);
/* Apparently some font names include a comma, need to escape that,
* because in 'guifont' it separates names. */
fontname = vim_strsave_escaped(gui.fontname, (char_u *)",");
g_free(gui.fontname);
gui.fontname = NULL;
}
@@ -4265,11 +4546,19 @@ gui_mch_font_dialog(char_u *oldval)
GTK_FONT_SELECTION_DIALOG(dialog));
if (name != NULL)
{
if (input_conv.vc_type != CONV_NONE)
fontname = string_convert(&input_conv, (char_u *)name, NULL);
else
fontname = vim_strsave((char_u *)name);
char_u *p;
/* Apparently some font names include a comma, need to escape
* that, because in 'guifont' it separates names. */
p = vim_strsave_escaped((char_u *)name, (char_u *)",");
g_free(name);
if (input_conv.vc_type != CONV_NONE)
{
fontname = string_convert(&input_conv, p, NULL);
vim_free(p);
}
else
fontname = p;
}
}

Some files were not shown because too many files have changed in this diff Show More