aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/CMakeLists.txt90
-rw-r--r--runtime/autoload/phpcomplete.vim74
-rw-r--r--runtime/autoload/provider/clipboard.vim14
-rw-r--r--runtime/autoload/provider/script_host.py8
-rw-r--r--runtime/autoload/remote/host.vim16
-rw-r--r--runtime/colors/darkblue.vim1
-rw-r--r--runtime/colors/delek.vim1
-rw-r--r--runtime/colors/desert.vim2
-rw-r--r--runtime/colors/evening.vim1
-rw-r--r--runtime/colors/morning.vim1
-rw-r--r--runtime/colors/peachpuff.vim1
-rw-r--r--runtime/colors/shine.vim1
-rw-r--r--runtime/colors/slate.vim1
-rw-r--r--runtime/doc/change.txt11
-rw-r--r--runtime/doc/cmdline.txt3
-rw-r--r--runtime/doc/diff.txt2
-rw-r--r--runtime/doc/editing.txt26
-rw-r--r--runtime/doc/eval.txt142
-rw-r--r--runtime/doc/gui.txt49
-rw-r--r--runtime/doc/gui_w32.txt35
-rw-r--r--runtime/doc/gui_x11.txt528
-rw-r--r--runtime/doc/help.txt3
-rw-r--r--runtime/doc/if_cscop.txt3
-rw-r--r--runtime/doc/indent.txt2
-rw-r--r--runtime/doc/index.txt3
-rw-r--r--runtime/doc/intro.txt5
-rw-r--r--runtime/doc/map.txt5
-rw-r--r--runtime/doc/message.txt2
-rw-r--r--runtime/doc/motion.txt4
-rw-r--r--runtime/doc/nvim.txt24
-rw-r--r--runtime/doc/nvim_clipboard.txt29
-rw-r--r--runtime/doc/nvim_from_vim.txt49
-rw-r--r--runtime/doc/nvim_intro.txt26
-rw-r--r--runtime/doc/nvim_python.txt15
-rw-r--r--runtime/doc/options.txt112
-rw-r--r--runtime/doc/os_dos.txt20
-rw-r--r--runtime/doc/os_win32.txt108
-rw-r--r--runtime/doc/pi_netrw.txt2
-rw-r--r--runtime/doc/quickref.txt6
-rw-r--r--runtime/doc/recover.txt4
-rw-r--r--runtime/doc/syntax.txt6
-rw-r--r--runtime/doc/term.txt13
-rw-r--r--runtime/doc/tips.txt7
-rw-r--r--runtime/doc/todo.txt191
-rw-r--r--runtime/doc/usr_09.txt4
-rw-r--r--runtime/doc/usr_21.txt7
-rw-r--r--runtime/doc/usr_40.txt4
-rw-r--r--runtime/doc/usr_42.txt7
-rw-r--r--runtime/doc/various.txt15
-rw-r--r--runtime/doc/vi_diff.txt59
-rw-r--r--runtime/doc/vim_diff.txt23
-rw-r--r--runtime/doc/windows.txt10
-rw-r--r--runtime/filetype.vim6
-rw-r--r--runtime/gvimrc_example.vim57
-rw-r--r--runtime/indent/php.vim87
-rw-r--r--runtime/macros/editexisting.vim4
-rw-r--r--runtime/optwin.vim2
-rw-r--r--runtime/syntax/vim.vim170
-rw-r--r--runtime/syntax/zimbu.vim64
-rw-r--r--runtime/vimrc_example.vim65
60 files changed, 782 insertions, 1448 deletions
diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt
new file mode 100644
index 0000000000..4271418e0c
--- /dev/null
+++ b/runtime/CMakeLists.txt
@@ -0,0 +1,90 @@
+set(SYN_VIM_GENERATOR ${PROJECT_SOURCE_DIR}/scripts/genvimvim.lua)
+set(GENERATED_RUNTIME_DIR ${PROJECT_BINARY_DIR}/runtime)
+set(GENERATED_SYN_VIM ${GENERATED_RUNTIME_DIR}/syntax/vim/generated.vim)
+set(GENERATED_HELP_TAGS ${GENERATED_RUNTIME_DIR}/doc/tags)
+
+file(MAKE_DIRECTORY ${GENERATED_RUNTIME_DIR})
+file(MAKE_DIRECTORY ${GENERATED_RUNTIME_DIR}/syntax)
+file(MAKE_DIRECTORY ${GENERATED_RUNTIME_DIR}/syntax/vim)
+
+add_custom_command(OUTPUT ${GENERATED_SYN_VIM}
+ COMMAND ${LUA_PRG} ${SYN_VIM_GENERATOR}
+ ${PROJECT_SOURCE_DIR}/src/nvim ${GENERATED_SYN_VIM}
+ DEPENDS
+ ${SYN_VIM_GENERATOR}
+ ${PROJECT_SOURCE_DIR}/src/nvim/ex_cmds.lua
+ ${PROJECT_SOURCE_DIR}/src/nvim/auevents.lua
+ ${PROJECT_SOURCE_DIR}/src/nvim/options.lua
+ ${PROJECT_SOURCE_DIR}/src/nvim/eval.c
+)
+
+file(GLOB DOCFILES ${PROJECT_SOURCE_DIR}/runtime/doc/*.txt)
+
+set(BUILDDOCFILES)
+foreach(DF ${DOCFILES})
+ get_filename_component(F ${DF} NAME)
+ list(APPEND BUILDDOCFILES ${GENERATED_RUNTIME_DIR}/doc/${F})
+endforeach()
+
+add_custom_command(OUTPUT ${BUILDDOCFILES}
+ COMMAND ${CMAKE_COMMAND} -E copy_directory
+ ${PROJECT_SOURCE_DIR}/runtime/doc ${GENERATED_RUNTIME_DIR}/doc
+ DEPENDS
+ ${DOCFILES})
+
+add_custom_command(OUTPUT ${GENERATED_HELP_TAGS}
+ COMMAND ${CMAKE_COMMAND} -E copy_directory
+ ${PROJECT_SOURCE_DIR}/runtime/doc ${GENERATED_RUNTIME_DIR}/doc
+ COMMAND "${PROJECT_BINARY_DIR}/bin/nvim"
+ -u NONE
+ -i NONE
+ -esX
+ -c "helptags ++t ."
+ -c quit
+ DEPENDS
+ ${BUILDDOCFILES}
+ nvim
+ WORKING_DIRECTORY "${GENERATED_RUNTIME_DIR}/doc"
+)
+
+add_custom_target(
+ runtime ALL
+ DEPENDS
+ ${GENERATED_SYN_VIM}
+ ${GENERATED_HELP_TAGS}
+)
+
+# CMake is painful here. It will create the destination using the user's
+# current umask, and we don't want that. And we don't just want to install
+# the target directory, as it will mess with existing permissions. So this
+# seems like the best compromise. If we create it, then everyone can see it.
+# If it's preexisting, leave it alone.
+
+install_helper(
+ FILES ${GENERATED_HELP_TAGS} ${BUILDDOCFILES}
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim/runtime/doc)
+
+install_helper(
+ FILES ${GENERATED_SYN_VIM}
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim/runtime/syntax/vim)
+
+file(GLOB_RECURSE RUNTIME_PROGRAMS
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ *.awk *.sh *.bat)
+
+foreach(PROG ${RUNTIME_PROGRAMS})
+ get_filename_component(BASEDIR ${PROG} PATH)
+ install_helper(PROGRAMS ${PROG}
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim/runtime/${BASEDIR})
+endforeach()
+
+file(GLOB_RECURSE RUNTIME_FILES
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ *.vim *.dict *.py *.ps)
+list(APPEND RUNTIME_FILES macros/dvorak)
+
+foreach(F ${RUNTIME_FILES})
+ get_filename_component(BASEDIR ${F} PATH)
+ install_helper(FILES ${F}
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim/runtime/${BASEDIR})
+endforeach()
diff --git a/runtime/autoload/phpcomplete.vim b/runtime/autoload/phpcomplete.vim
index b014b4cdcf..5ddad88873 100644
--- a/runtime/autoload/phpcomplete.vim
+++ b/runtime/autoload/phpcomplete.vim
@@ -3,7 +3,7 @@
" Maintainer: Dávid Szabó ( complex857 AT gmail DOT com )
" Previous Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" URL: https://github.com/shawncplus/phpcomplete.vim
-" Last Change: 2014 Oct 02
+" Last Change: 2014 Dec 01
"
" OPTIONS:
"
@@ -1172,11 +1172,11 @@ function! phpcomplete#GetCurrentInstruction(line_number, col_number, phpbegin) "
" break if we are on a "naked" stop_char (operators, colon, openparent...)
if index(stop_chars, current_char) != -1
let do_break = 1
- " dont break does not look like a "->"
+ " dont break if it does look like a "->"
if (prev_char == '-' && current_char == '>') || (current_char == '-' && next_char == '>')
let do_break = 0
endif
- " dont break if its looks like a "::"
+ " dont break if it does look like a "::"
if (prev_char == ':' && current_char == ':') || (current_char == ':' && next_char == ':')
let do_break = 0
endif
@@ -1356,8 +1356,12 @@ function! phpcomplete#GetCallChainReturnType(classname_candidate, class_candidat
endif
" make @return self, static, $this the same way
" (not exactly what php means by these)
- if returnclass == 'self' || returnclass == 'static' || returnclass == '$this'
- let classname_candidate = a:classname_candidate
+ if returnclass == 'self' || returnclass == 'static' || returnclass == '$this' || returnclass == 'self[]' || returnclass == 'static[]' || returnclass == '$this[]'
+ if returnclass =~ '\[\]$'
+ let classname_candidate = a:classname_candidate.'[]'
+ else
+ let classname_candidate = a:classname_candidate
+ endif
let class_candidate_namespace = a:class_candidate_namespace
else
let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(returnclass, fullnamespace, a:imports)
@@ -1527,7 +1531,7 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
let function_boundary = phpcomplete#GetCurrentFunctionBoundaries()
let search_end_line = max([1, function_boundary[0][0]])
" -1 makes us ignore the current line (where the completion was invoked
- let lines = reverse(getline(search_end_line, line('.') - 1))
+ let lines = reverse(getline(search_end_line, a:start_line - 1))
" check Constant lookup
let constant_object = matchstr(a:context, '\zs'.class_name_pattern.'\ze::')
@@ -1638,9 +1642,32 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
" assignment for the variable in question with a variable on the right hand side
if line =~# '^\s*'.object.'\s*=&\?\s*'.variable_name_pattern
- let tailing_semicolon = match(line, ';\s*$')
- let tailing_semicolon = tailing_semicolon != -1 ? tailing_semicolon : strlen(getline(a:start_line - i))
- let prev_context = phpcomplete#GetCurrentInstruction(a:start_line - i, tailing_semicolon - 1, b:phpbegin)
+
+ " try to find the next non-comment or string ";" char
+ let start_col = match(line, '^\s*'.object.'\C\s*=\zs&\?\s*'.variable_name_pattern)
+ let filelines = reverse(lines)
+ let [pos, char] = s:getNextCharWithPos(filelines, [a:start_line - i - 1, start_col])
+ let chars_read = 1
+ " read while end of the file
+ while char != 'EOF' && chars_read < 1000
+ let last_pos = pos
+ let [pos, char] = s:getNextCharWithPos(filelines, pos)
+ let chars_read += 1
+ " we got a candidate
+ if char == ';'
+ let synIDName = synIDattr(synID(pos[0] + 1, pos[1] + 1, 0), 'name')
+ " it's not a comment or string, end search
+ if synIDName !~? 'comment\|string'
+ break
+ endif
+ endif
+ endwhile
+
+ let prev_context = phpcomplete#GetCurrentInstruction(last_pos[0] + 1, last_pos[1], b:phpbegin)
+ if prev_context == ''
+ " cannot get previous context give up
+ return
+ endif
let prev_class = phpcomplete#GetClassName(a:start_line - i, prev_context, a:current_namespace, a:imports)
if stridx(prev_class, '\') != -1
@@ -1656,9 +1683,32 @@ function! phpcomplete#GetClassName(start_line, context, current_namespace, impor
" assignment for the variable in question with a function on the right hand side
if line =~# '^\s*'.object.'\s*=&\?\s*'.function_invocation_pattern
- let tailing_semicolon = match(line, ';\s*$')
- let tailing_semicolon = tailing_semicolon != -1 ? tailing_semicolon : strlen(getline(a:start_line - i))
- let prev_context = phpcomplete#GetCurrentInstruction(a:start_line - i, tailing_semicolon - 1, b:phpbegin)
+
+ " try to find the next non-comment or string ";" char
+ let start_col = match(line, '\C^\s*'.object.'\s*=\zs&\?\s*'.function_invocation_pattern)
+ let filelines = reverse(lines)
+ let [pos, char] = s:getNextCharWithPos(filelines, [a:start_line - i - 1, start_col])
+ let chars_read = 1
+ " read while end of the file
+ while char != 'EOF' && chars_read < 1000
+ let last_pos = pos
+ let [pos, char] = s:getNextCharWithPos(filelines, pos)
+ let chars_read += 1
+ " we got a candidate
+ if char == ';'
+ let synIDName = synIDattr(synID(pos[0] + 1, pos[1] + 1, 0), 'name')
+ " it's not a comment or string, end search
+ if synIDName !~? 'comment\|string'
+ break
+ endif
+ endif
+ endwhile
+
+ let prev_context = phpcomplete#GetCurrentInstruction(last_pos[0] + 1, last_pos[1], b:phpbegin)
+ if prev_context == ''
+ " cannot get previous context give up
+ return
+ endif
let function_name = matchstr(prev_context, '^'.function_invocation_pattern.'\ze')
let function_name = matchstr(function_name, '^\zs.\+\ze\s*($') " strip the trailing (
diff --git a/runtime/autoload/provider/clipboard.vim b/runtime/autoload/provider/clipboard.vim
index d20b3a9bf1..5d1ce7896d 100644
--- a/runtime/autoload/provider/clipboard.vim
+++ b/runtime/autoload/provider/clipboard.vim
@@ -55,13 +55,21 @@ endif
let s:clipboard = {}
function! s:clipboard.get(reg)
- if s:selections[a:reg].owner > 0
- return s:selections[a:reg].data
+ let reg = a:reg == '"' ? '+' : a:reg
+ if s:selections[reg].owner > 0
+ return s:selections[reg].data
end
- return s:try_cmd(s:paste[a:reg])
+ return s:try_cmd(s:paste[reg])
endfunction
function! s:clipboard.set(lines, regtype, reg)
+ if a:reg == '"'
+ call s:clipboard.set(a:lines,a:regtype,'+')
+ if s:copy['*'] != s:copy['+']
+ call s:clipboard.set(a:lines,a:regtype,'*')
+ end
+ return 0
+ end
if s:cache_enabled == 0
call s:try_cmd(s:copy[a:reg], a:lines)
return 0
diff --git a/runtime/autoload/provider/script_host.py b/runtime/autoload/provider/script_host.py
index e0b9ee6012..0a7eb53a0e 100644
--- a/runtime/autoload/provider/script_host.py
+++ b/runtime/autoload/provider/script_host.py
@@ -32,10 +32,6 @@ class ScriptHost(object):
# it seems some plugins assume 'sys' is already imported, so do it now
exec('import sys', self.module.__dict__)
self.legacy_vim = nvim.with_hook(LegacyEvalHook())
- if IS_PYTHON3:
- self.legacy_vim = self.legacy_vim.with_hook(
- neovim.DecodeHook(
- encoding=nvim.options['encoding']))
sys.modules['vim'] = self.legacy_vim
def setup(self, nvim):
@@ -93,10 +89,6 @@ class ScriptHost(object):
stop -= 1
fname = '_vim_pydo'
- # Python3 code (exec) must be a string, mixing bytes with
- # function_def would use bytes.__repr__ instead
- if isinstance and isinstance(code, bytes):
- code = code.decode(nvim.options['encoding'])
# define the function
function_def = 'def %s(line, linenr):\n %s' % (fname, code,)
exec(function_def, self.module.__dict__)
diff --git a/runtime/autoload/remote/host.vim b/runtime/autoload/remote/host.vim
index 5a3097af5d..64f6ddb759 100644
--- a/runtime/autoload/remote/host.vim
+++ b/runtime/autoload/remote/host.vim
@@ -40,7 +40,11 @@ function! remote#host#Require(name)
endif
let host = s:hosts[a:name]
if !host.channel && !host.initialized
- let host.channel = call(host.factory, [a:name])
+ let host_info = {
+ \ 'name': a:name,
+ \ 'orig_name': get(host, 'orig_name', a:name)
+ \ }
+ let host.channel = call(host.factory, [host_info])
let host.initialized = 1
endif
return host.channel
@@ -77,7 +81,7 @@ function! remote#host#RegisterPlugin(host, path, specs)
endif
endfor
- if remote#host#IsRunning(a:host)
+ if has_key(s:hosts, a:host) && remote#host#IsRunning(a:host)
" For now we won't allow registration of plugins when the host is already
" running.
throw 'Host "'.a:host.'" is already running'
@@ -189,16 +193,14 @@ endfunction
" Registration of standard hosts
" Python/Python3 {{{
-function! s:RequirePythonHost(name)
- let ver_name = has_key(s:hosts[a:name], 'orig_name') ?
- \ s:hosts[a:name].orig_name : a:name
- let ver = (ver_name ==# 'python') ? 2 : 3
+function! s:RequirePythonHost(host)
+ let ver = (a:host.orig_name ==# 'python') ? 2 : 3
" Python host arguments
let args = ['-c', 'import neovim; neovim.start_host()']
" Collect registered Python plugins into args
- let python_plugins = remote#host#PluginsForHost(a:name)
+ let python_plugins = remote#host#PluginsForHost(a:host.name)
for plugin in python_plugins
call add(args, plugin.path)
endfor
diff --git a/runtime/colors/darkblue.vim b/runtime/colors/darkblue.vim
index 4117122728..88f0bd73b9 100644
--- a/runtime/colors/darkblue.vim
+++ b/runtime/colors/darkblue.vim
@@ -17,7 +17,6 @@ let colors_name = "darkblue"
hi Normal guifg=#c0c0c0 guibg=#000040 ctermfg=gray ctermbg=black
hi ErrorMsg guifg=#ffffff guibg=#287eff ctermfg=white ctermbg=lightblue
hi Visual guifg=#8080ff guibg=fg gui=reverse ctermfg=lightblue ctermbg=fg cterm=reverse
-hi VisualNOS guifg=#8080ff guibg=fg gui=reverse,underline ctermfg=lightblue ctermbg=fg cterm=reverse,underline
hi Todo guifg=#d14a14 guibg=#1248d1 ctermfg=red ctermbg=darkblue
hi Search guifg=#90fff0 guibg=#2050d0 ctermfg=white ctermbg=darkblue cterm=underline term=underline
hi IncSearch guifg=#b0ffff guibg=#2050d0 ctermfg=darkblue ctermbg=gray
diff --git a/runtime/colors/delek.vim b/runtime/colors/delek.vim
index 8c5f7f4fe3..dd3a33a9e8 100644
--- a/runtime/colors/delek.vim
+++ b/runtime/colors/delek.vim
@@ -39,7 +39,6 @@ hi StatusLineNC cterm=bold ctermbg=blue ctermfg=black guibg=gold guifg=blue
hi Title ctermfg=DarkMagenta gui=bold guifg=Magenta
hi VertSplit cterm=reverse gui=reverse
hi Visual ctermbg=NONE cterm=reverse gui=reverse guifg=Grey guibg=fg
-hi VisualNOS cterm=underline,bold gui=underline,bold
hi WarningMsg ctermfg=DarkRed guifg=Red
hi WildMenu ctermfg=Black ctermbg=Yellow guibg=Yellow guifg=Black
diff --git a/runtime/colors/desert.vim b/runtime/colors/desert.vim
index 7166220f26..542e5ae015 100644
--- a/runtime/colors/desert.vim
+++ b/runtime/colors/desert.vim
@@ -47,7 +47,6 @@ hi StatusLine guibg=#c2bfa5 guifg=black gui=none
hi StatusLineNC guibg=#c2bfa5 guifg=grey50 gui=none
hi Title guifg=indianred
hi Visual gui=none guifg=khaki guibg=olivedrab
-"hi VisualNOS
hi WarningMsg guifg=salmon
"hi WildMenu
"hi Menu
@@ -83,7 +82,6 @@ hi StatusLineNC cterm=reverse
hi VertSplit cterm=reverse
hi Title ctermfg=5
hi Visual cterm=reverse
-hi VisualNOS cterm=bold,underline
hi WarningMsg ctermfg=1
hi WildMenu ctermfg=0 ctermbg=3
hi Folded ctermfg=darkgrey ctermbg=NONE
diff --git a/runtime/colors/evening.vim b/runtime/colors/evening.vim
index 298fd24811..5dae08280e 100644
--- a/runtime/colors/evening.vim
+++ b/runtime/colors/evening.vim
@@ -23,7 +23,6 @@ hi StatusLine term=reverse,bold cterm=reverse,bold gui=reverse,bold
hi StatusLineNC term=reverse cterm=reverse gui=reverse
hi VertSplit term=reverse cterm=reverse gui=reverse
hi Visual term=reverse ctermbg=black guibg=grey60
-hi VisualNOS term=underline,bold cterm=underline,bold gui=underline,bold
hi DiffText term=reverse cterm=bold ctermbg=Red gui=bold guibg=Red
hi Cursor guibg=Green guifg=Black
hi lCursor guibg=Cyan guifg=Black
diff --git a/runtime/colors/morning.vim b/runtime/colors/morning.vim
index f1ab841416..fca9c2a742 100644
--- a/runtime/colors/morning.vim
+++ b/runtime/colors/morning.vim
@@ -23,7 +23,6 @@ hi StatusLine term=reverse,bold cterm=reverse,bold gui=reverse,bold
hi StatusLineNC term=reverse cterm=reverse gui=reverse
hi VertSplit term=reverse cterm=reverse gui=reverse
hi Visual term=reverse ctermbg=grey guibg=grey80
-hi VisualNOS term=underline,bold cterm=underline,bold gui=underline,bold
hi DiffText term=reverse cterm=bold ctermbg=Red gui=bold guibg=Red
hi Cursor guibg=Green guifg=NONE
hi lCursor guibg=Cyan guifg=NONE
diff --git a/runtime/colors/peachpuff.vim b/runtime/colors/peachpuff.vim
index 3c15305b00..1c0c2390f8 100644
--- a/runtime/colors/peachpuff.vim
+++ b/runtime/colors/peachpuff.vim
@@ -34,7 +34,6 @@ hi StatusLineNC term=reverse cterm=reverse gui=bold guifg=PeachPuff guibg=Gray45
hi VertSplit term=reverse cterm=reverse gui=bold guifg=White guibg=Gray45
hi Title term=bold ctermfg=5 gui=bold guifg=DeepPink3
hi Visual term=reverse cterm=reverse gui=reverse guifg=Grey80 guibg=fg
-hi VisualNOS term=bold,underline cterm=bold,underline gui=bold,underline
hi WarningMsg term=standout ctermfg=1 gui=bold guifg=Red
hi WildMenu term=standout ctermfg=0 ctermbg=3 guifg=Black guibg=Yellow
hi Folded term=standout ctermfg=4 ctermbg=7 guifg=Black guibg=#e3c1a5
diff --git a/runtime/colors/shine.vim b/runtime/colors/shine.vim
index afc72b30fb..eedb9c9b25 100644
--- a/runtime/colors/shine.vim
+++ b/runtime/colors/shine.vim
@@ -24,7 +24,6 @@ hi StatusLine term=reverse,bold cterm=reverse,bold gui=reverse,bold
hi StatusLineNC term=reverse cterm=reverse gui=reverse
hi VertSplit term=reverse cterm=reverse gui=reverse
hi Visual term=reverse cterm=reverse gui=reverse guifg=Grey guibg=fg
-hi VisualNOS term=underline,bold cterm=underline,bold gui=underline,bold
hi DiffText term=reverse cterm=bold ctermbg=Red gui=bold guibg=Red
hi Cursor ctermbg=Green guibg=Green guifg=Black
hi lCursor guibg=Cyan guifg=Black
diff --git a/runtime/colors/slate.vim b/runtime/colors/slate.vim
index f9a70b8777..ffc13b822a 100644
--- a/runtime/colors/slate.vim
+++ b/runtime/colors/slate.vim
@@ -45,7 +45,6 @@ let colors_name = "slate"
:hi Todo guifg=orangered guibg=yellow2
:hi Directory ctermfg=darkcyan
:hi ErrorMsg cterm=bold guifg=White guibg=Red cterm=bold ctermfg=7 ctermbg=1
-:hi VisualNOS cterm=bold,underline
:hi WildMenu ctermfg=0 ctermbg=3
:hi DiffAdd ctermbg=4
:hi DiffChange ctermbg=5
diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt
index 122e76d0d3..813d741f5d 100644
--- a/runtime/doc/change.txt
+++ b/runtime/doc/change.txt
@@ -714,9 +714,6 @@ When the {string} starts with "\=" it is evaluated as an expression, see
characters.
Otherwise these characters in {string} have a special meaning:
- *:s%*
-When {string} is equal to "%" and '/' is included with the 'cpoptions' option,
-then the {string} of the previous substitute command is used, see |cpo-/|
magic nomagic action ~
& \& replaced with the whole matched pattern *s/\&*
@@ -1158,12 +1155,8 @@ register.
7. Selection and drop registers "*, "+ and "~
Use these registers for storing and retrieving the selected text for the GUI.
See |quotestar| and |quoteplus|. When the clipboard is not available or not
-working, the unnamed register is used instead. For Unix systems the clipboard
-is only available when the |+xterm_clipboard| feature is present.
-
-Note that there is only a distinction between "* and "+ for X11 systems. For
-an explanation of the difference, see |x11-selection|. Under MS-Windows, use
-of "* and "+ is actually synonymous and refers to the |gui-clipboard|.
+working, the unnamed register is used instead. For Unix systems and Mac OS X,
+see |nvim-clipboard|.
*quote_~* *quote~* *<Drop>*
The read-only "~ register stores the dropped text from the last drag'n'drop
diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt
index 932d230a59..85f16ca8ca 100644
--- a/runtime/doc/cmdline.txt
+++ b/runtime/doc/cmdline.txt
@@ -54,8 +54,7 @@ history tables:
- one for debug mode commands
These are completely separate. Each history can only be accessed when
entering the same type of line.
-Use the 'history' option to set the number of lines that are remembered
-(default: 50).
+Use the 'history' option to set the number of lines that are remembered.
Notes:
- When you enter a command-line that is exactly the same as an older one, the
old one is removed (to avoid repeated commands moving older commands out of
diff --git a/runtime/doc/diff.txt b/runtime/doc/diff.txt
index 909aedb221..250275d80a 100644
--- a/runtime/doc/diff.txt
+++ b/runtime/doc/diff.txt
@@ -163,7 +163,7 @@ in diff mode in one window and "normal" in another window. It is also
possible to view the changes you have made to a buffer since the file was
loaded. Since Vim doesn't allow having two buffers for the same file, you
need another buffer. This command is useful: >
- command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_
+ command DiffOrig vert new | set buftype=nofile | read ++edit # | 0d_
\ | diffthis | wincmd p | diffthis
(this is in |vimrc_example.vim|). Use ":DiffOrig" to see the differences
between the current buffer and the file it was loaded from.
diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt
index 63c27b2ff2..bb3d89e4ac 100644
--- a/runtime/doc/editing.txt
+++ b/runtime/doc/editing.txt
@@ -569,7 +569,10 @@ list of the current window.
Also see |++opt| and |+cmd|.
:[count]arga[dd] {name} .. *:arga* *:argadd* *E479*
- Add the {name}s to the argument list.
+:[count]arga[dd]
+ Add the {name}s to the argument list. When {name} is
+ omitted add the current buffer name to the argument
+ list.
If [count] is omitted, the {name}s are added just
after the current entry in the argument list.
Otherwise they are added after the [count]'th file.
@@ -579,7 +582,8 @@ list of the current window.
:argadd x a b x c
:0argadd x x a b c
:1argadd x a x b c
- :99argadd x a b c x
+ :$argadd x a b c x
+ :+2argadd y a b c x y
There is no check for duplicates, it is possible to
add a file to the argument list twice.
The currently edited file is not changed.
@@ -597,11 +601,19 @@ list of the current window.
Example: >
:argdel *.obj
-:{range}argd[elete] Delete the {range} files from the argument list.
+:[range]argd[elete] Delete the {range} files from the argument list.
+ Example: >
+ :10,$argdel
+< Deletes arguments 10 and further, keeping 1-9. >
+ :$argd
+< Deletes just the last one. >
+ :argd
+ :.argd
+< Deletes the current argument. >
+ :%argd
+< Removes all the files from the arglist.
When the last number in the range is too high, up to
- the last argument is deleted. Example: >
- :10,1000argdel
-< Deletes arguments 10 and further, keeping 1-9.
+ the last argument is deleted.
*:argu* *:argument*
:[count]argu[ment] [count] [++opt] [+cmd]
@@ -1018,7 +1030,7 @@ The names can be in upper- or lowercase.
:q[uit]! Quit without writing, also when currently visible
buffers have changes. Does not exit when this is the
- last window and there are is a changed hidden buffer.
+ last window and there is a changed hidden buffer.
In this case, the first changed hidden buffer becomes
the current buffer.
Use ":qall!" to exit always.
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index e1c84d37a6..5c2b570695 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 7.4. Last change: 2014 Nov 15
+*eval.txt* For Vim version 7.4. Last change: 2014 Nov 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1517,6 +1517,12 @@ v:mouse_col Column number for a mouse click obtained with |getchar()|.
This is the screen column number, like with |virtcol()|. The
value is zero when there was no mouse button click.
+ *v:msgpack_types* *msgpack_types-variable*
+v:msgpack_types Dictionary containing msgpack types used by |msgpackparse()|
+ and |msgpackdump()|. All types inside dictionary are fixed
+ (not editable) empty lists. To check whether some list is one
+ of msgpack types, use |is| operator.
+
*v:oldfiles* *oldfiles-variable*
v:oldfiles List of file names that is loaded from the |viminfo| file on
startup. These are the files that Vim remembers marks for.
@@ -1833,6 +1839,7 @@ getwinvar( {nr}, {varname} [, {def}])
any variable {varname} in window {nr}
glob( {expr} [, {nosuf} [, {list}]])
any expand file wildcards in {expr}
+glob2regpat( {expr}) String convert a glob pat into a search pat
globpath( {path}, {expr} [, {nosuf} [, {list}]])
String do glob({expr}) for all dirs in {path}
has( {feature}) Number TRUE if feature {feature} supported
@@ -1903,6 +1910,8 @@ min( {list}) Number minimum value of items in {list}
mkdir( {name} [, {path} [, {prot}]])
Number create directory {name}
mode( [expr]) String current editing mode
+msgpackdump( {list}) List dump a list of objects to msgpack
+msgpackparse( {list}) List parse msgpack to a list of objects
nextnonblank( {lnum}) Number line nr of non-blank line >= {lnum}
nr2char( {expr}[, {utf8}]) String single char with ASCII/UTF8 value {expr}
or( {expr}, {expr}) Number bitwise OR
@@ -3302,6 +3311,17 @@ getchar([expr]) *getchar()*
: endif
: endwhile
:endfunction
+<
+ You may also receive syntetic characters, such as
+ |<CursorHold>|. Often you will want to ignore this and get
+ another character: >
+ :function GetKey()
+ : let c = getchar()
+ : while c == "\<CursorHold>"
+ : let c = getchar()
+ : endwhile
+ : return c
+ :endfunction
getcharmod() *getcharmod()*
The result is a Number which is the state of the modifiers for
@@ -3512,7 +3532,7 @@ getpos({expr}) Get the position for {expr}. For possible values of {expr}
This can be used to save and restore the position of a mark: >
let save_a_mark = getpos("'a")
...
- call setpos(''a', save_a_mark
+ call setpos("'a", save_a_mark)
< Also see |getcurpos()| and |setpos()|.
@@ -3646,6 +3666,14 @@ glob({expr} [, {nosuf} [, {list}]]) *glob()*
See |expand()| for expanding special Vim variables. See
|system()| for getting the raw output of an external command.
+glob2regpat({expr}) *glob2regpat()*
+ Convert a file pattern, as used by glob(), into a search
+ pattern. The result can be used to match with a string that
+ is a file name. E.g. >
+ if filename =~ glob2regpat('Make*.mak')
+< This is equivalent to: >
+ if filename =~ '^Make.*\.mak$'
+<
globpath({path}, {expr} [, {nosuf} [, {list}]]) *globpath()*
Perform glob() on all directories in {path} and concatenate
the results. Example: >
@@ -4564,15 +4592,16 @@ mkdir({name} [, {path} [, {prot}]])
If {prot} is given it is used to set the protection bits of
the new directory. The default is 0755 (rwxr-xr-x: r/w for
the user readable for others). Use 0700 to make it unreadable
- for others. This is only used for the last part of {name}.
- Thus if you create /tmp/foo/bar then /tmp/foo will be created
- with 0755.
- Example: >
+ for others.
+ {Nvim}
+ {prot} is applied for all parts of {name}. Thus if you create
+ /tmp/foo/bar then /tmp/foo will be created with 0700. Example: >
:call mkdir($HOME . "/tmp/foo/bar", "p", 0700)
< This function is not available in the |sandbox|.
- Not available on all systems. To check use: >
- :if exists("*mkdir")
-<
+
+ If you try to create an existing directory with {path} set to
+ "p" mkdir() will silently exit.
+
*mode()*
mode([expr]) Return a string that indicates the current mode.
If [expr] is supplied and it evaluates to a non-zero Number or
@@ -4604,6 +4633,92 @@ mode([expr]) Return a string that indicates the current mode.
"c" or "n".
Also see |visualmode()|.
+msgpackdump({list}) {Nvim} *msgpackdump()*
+ Convert a list of VimL objects to msgpack. Returned value is
+ |readfile()|-style list. Example: >
+ call writefile(msgpackdump([{}]), 'fname.mpack', 'b')
+< This will write the single 0x80 byte to `fname.mpack` file
+ (dictionary with zero items is represented by 0x80 byte in
+ messagepack).
+
+ Limitations:
+ 1. |Funcref|s cannot be dumped.
+ 2. Containers that reference themselves cannot be dumped.
+ 3. Dictionary keys are always dumped as STR strings.
+ 4. Other strings are always dumped as BIN strings.
+ 5. Points 3. and 4. do not apply to |msgpack-special-dict|s.
+
+msgpackparse({list}) {Nvim} *msgpackparse()*
+ Convert a |readfile()|-style list to a list of VimL objects.
+ Example: >
+ let fname = expand('~/.nvim/shada/main.shada')
+ let mpack = readfile(fname, 'b')
+ let shada_objects = msgpackparse(mpack)
+< This will read ~/.nvim/shada/main.shada file to
+ `shada_objects` list.
+
+ Limitations:
+ 1. Mapping ordering is not preserved unless messagepack
+ mapping is dumped using generic mapping
+ (|msgpack-special-map|).
+ 2. Since the parser aims to preserve all data untouched
+ (except for 1.) some strings are parsed to
+ |msgpack-special-dict| format which is not convenient to
+ use.
+ *msgpack-special-dict*
+ Some messagepack strings may be parsed to special
+ dictionaries. Special dictionaries are dictionaries which
+
+ 1. Contain exactly two keys: `_TYPE` and `_VAL`.
+ 2. `_TYPE` key is one of the types found in |v:msgpack_types|
+ variable.
+ 3. Value for `_VAL` has the following format (Key column
+ contains name of the key from |v:msgpack_types|):
+
+ Key Value ~
+ nil Zero, ignored when dumping.
+ boolean One or zero. When dumping it is only checked that
+ value is a |Number|.
+ integer |List| with four numbers: sign (-1 or 1), highest two
+ bits, number with bits from 62nd to 31st, lowest 31
+ bits. I.e. to get actual number one will need to use
+ code like >
+ _VAL[0] * ((_VAL[1] << 62)
+ & (_VAL[2] << 31)
+ & _VAL[3])
+< Special dictionary with this type will appear in
+ |msgpackparse()| output under one of the following
+ circumstances:
+ 1. |Number| is 32-bit and value is either above
+ INT32_MAX or below INT32_MIN.
+ 2. |Number| is 64-bit and value is above INT64_MAX. It
+ cannot possibly be below INT64_MIN because msgpack
+ C parser does not support such values.
+ float |Float|. This value cannot possibly appear in
+ |msgpackparse()| output.
+ string |readfile()|-style list of strings. This value will
+ appear in |msgpackparse()| output if string contains
+ zero byte or if string is a mapping key and mapping is
+ being represented as special dictionary for other
+ reasons.
+ binary |readfile()|-style list of strings. This value will
+ appear in |msgpackparse()| output if binary string
+ contains zero byte.
+ array |List|. This value cannot appear in |msgpackparse()|
+ output.
+ *msgpack-special-map*
+ map |List| of |List|s with two items (key and value) each.
+ This value will appear in |msgpackparse()| output if
+ parsed mapping contains one of the following keys:
+ 1. Any key that is not a string (including keys which
+ are binary strings).
+ 2. String with NUL byte inside.
+ 3. Duplicate key.
+ 4. Empty key.
+ ext |List| with two values: first is a signed integer
+ representing extension type. Second is
+ |readfile()|-style list of strings.
+
nextnonblank({lnum}) *nextnonblank()*
Return the line number of the first line at or below {lnum}
that is not blank. Example: >
@@ -6722,8 +6837,6 @@ dialog_con Compiled with console dialog support.
dialog_gui Compiled with GUI dialog support.
digraphs Compiled with support for digraphs.
dnd Compiled with support for the "~ register |quote_~|.
-dos16 16 bits DOS version of Vim.
-dos32 32 bits DOS (DJGPP) version of Vim.
eval Compiled with expression evaluation support. Always
true, of course!
ex_extra Compiled with extra Ex commands |+ex_extra|.
@@ -6824,12 +6937,10 @@ visualextra Compiled with extra Visual mode commands.
vreplace Compiled with |gR| and |gr| commands.
wildignore Compiled with 'wildignore' option.
wildmenu Compiled with 'wildmenu' option.
-win16 Win16 version of Vim (MS-Windows 3.1).
win32 Win32 version of Vim (MS-Windows 95 and later, 32 or
64 bits)
win32unix Win32 version of Vim, using Unix files (Cygwin)
win64 Win64 version of Vim (MS-Windows 64 bit).
-win95 Win32 version for MS-Windows 95/98/ME.
winaltkeys Compiled with 'winaltkeys' option.
windows Compiled with support for more than one window.
writebackup Compiled with 'writebackup' default on.
@@ -6838,11 +6949,6 @@ xim Compiled with X input method support |xim|.
xpm Compiled with pixmap support.
xpm_w32 Compiled with pixmap support for Win32. (Only for
backward compatibility. Use "xpm" instead.)
-xsmp Compiled with X session management support.
-xsmp_interact Compiled with interactive X session management support.
-xterm_clipboard Compiled with support for xterm clipboard.
-xterm_save Compiled with support for saving and restoring the
- xterm screen.
x11 Compiled with X11 support.
*string-match*
diff --git a/runtime/doc/gui.txt b/runtime/doc/gui.txt
index ba88ee242c..12fca33d64 100644
--- a/runtime/doc/gui.txt
+++ b/runtime/doc/gui.txt
@@ -12,10 +12,8 @@ Vim's Graphical User Interface *gui* *GUI*
4. Making GUI Selections |gui-selections|
5. Menus |menus|
6. Extras |gui-extras|
-7. Shell Commands |gui-shell|
Other GUI documentation:
-|gui_x11.txt| For specific items of the X11 GUI.
|gui_w32.txt| For specific items of the Win32 GUI.
==============================================================================
@@ -28,9 +26,6 @@ How to start the GUI depends on the system used. Mostly you can run the
GUI version of Vim with:
gvim [options] [files...]
-The X11 version of Vim can run both in GUI and in non-GUI mode. See
-|gui-x11-start|.
-
*gui-init* *gvimrc* *.gvimrc* *_gvimrc* *$MYGVIMRC*
The gvimrc file is where GUI-specific startup commands should be placed. It
is always sourced after the |vimrc| file. If you have one then the $MYGVIMRC
@@ -97,12 +92,9 @@ The personal initialization files are searched in the order specified above
and only the first one that is found is read.
There are a number of options which only have meaning in the GUI version of
-Vim. These are 'guicursor', 'guifont', 'guipty' and 'guioptions'. They are
+Vim. These are 'guicursor', 'guifont', and 'guioptions'. They are
documented in |options.txt| with all the other options.
-If using the Motif or Athena version of the GUI (but not for the GTK+ or
-Win32 version), a number of X resources are available. See |gui-resources|.
-
Another way to set the colors for different occasions is with highlight
groups. The "Normal" group is used to set the background and foreground
colors. Example (which looks nice): >
@@ -423,8 +415,7 @@ You may make selections with the mouse (see |gui-mouse-select|), or by using
Vim's Visual mode (see |v|). If 'a' is present in 'guioptions', then
whenever a selection is started (Visual or Select mode), or when the selection
is changed, Vim becomes the owner of the windowing system's primary selection
-(on MS-Windows the |gui-clipboard| is used; under X11, the |x11-selection| is
-used - you should read whichever of these is appropriate now).
+(on MS-Windows the |gui-clipboard| is used).
*clipboard*
There is a special register for storing this selection, it is the "*
@@ -443,13 +434,9 @@ selection (contents of the clipboard): >
"*p
-When using this register under X11, also see |x11-selection|. This also
-explains the related "+ register.
-
Note that when pasting text from one Vim into another separate Vim, the type
of selection (character, line, or block) will also be copied. For other
-applications the type is always character. However, if the text gets
-transferred via the |x11-cut-buffer|, the selection type is ALWAYS lost.
+applications the type is always character.
When the "unnamed" string is included in the 'clipboard' option, the unnamed
register is the same as the "* register. Thus you can yank to and paste the
@@ -502,18 +489,6 @@ Pressing <F4> will start the menu. You can now use the cursor keys to select
a menu entry. Hit <Enter> to execute it. Hit <Esc> if you want to cancel.
This does require the |+menu| feature enabled at compile time.
- *tear-off-menus*
-GTK+ and Motif support Tear-off menus. These are sort of sticky menus or
-pop-up menus that are present all the time. If the resizing does not work
-correctly, this may be caused by using something like "Vim*geometry" in the
-defaults. Use "Vim.geometry" instead.
-
-The Win32 GUI version emulates Motif's tear-off menus. Actually, a Motif user
-will spot the differences easily, but hopefully they're just as useful. You
-can also use the |:tearoff| command together with |hidden-menus| to create
-floating menus that do not appear on the main menu bar.
-
-
5.2 Creating New Menus *creating-menus*
*:me* *:menu* *:noreme* *:noremenu*
@@ -763,8 +738,7 @@ nr Name Normal action ~
*hidden-menus* *win32-hidden-menus*
In the Win32 and GTK+ GUI, starting a menu name with ']' excludes that menu
-from the main menu bar. You must then use the |:popup| or |:tearoff| command
-to display it.
+from the main menu bar. You must then use the |:popup| command to display it.
*popup-menu*
You can define the special menu "PopUp". This is the menu that is displayed
@@ -988,19 +962,4 @@ This section describes other features which are related to the GUI.
A recommended Japanese font is MS Mincho. You can find info here:
http://www.lexikan.com/mincho.htm
-==============================================================================
-7. Shell Commands *gui-shell*
-
-For the X11 GUI the external commands are executed inside the gvim window.
-See |gui-pty|.
-
-WARNING: Executing an external command from the X11 GUI will not always
-work. "normal" commands like "ls", "grep" and "make" mostly work fine.
-Commands that require an intelligent terminal like "less" and "ispell" won't
-work. Some may even hang and need to be killed from another terminal. So be
-careful!
-
-For the Win32 GUI the external commands are executed in a separate window.
-See |gui-shell-win32|.
-
vim:tw=78:sw=4:ts=8:ft=help:norl:
diff --git a/runtime/doc/gui_w32.txt b/runtime/doc/gui_w32.txt
index 9449347259..2bf4d72343 100644
--- a/runtime/doc/gui_w32.txt
+++ b/runtime/doc/gui_w32.txt
@@ -262,12 +262,6 @@ WARNING: If you close this window with the "X" button, and confirm the
question if you really want to kill the application, Vim may be killed too!
(This does not apply to commands run asynchronously with ":!start".)
-In Windows 95, the window in which the commands are executed is always 25x80
-characters, to be as DOS compatible as possible (this matters!). The default
-system font is used. On NT, the window will be the default you have set up for
-"Console" in Control Panel. On Win32s, the properties of the DOS box are
-determined by _default.pif in the windows directory.
-
*msdos-mode*
If you get a dialog that says "This program is set to run in MS-DOS mode..."
when you run an external program, you can solve this by changing the
@@ -359,35 +353,6 @@ changes this.
When prepending ":browse" before file editing commands, a file requester is
used to allow you to select an existing file. See |:browse|.
-
-6.3 Tearoff Menus
-
-The Win32 GUI emulates Motif's tear-off menus. At the top of each menu you
-will see a small graphic "rip here" sign. Selecting it will cause a floating
-window to be created with the same menu entries on it. The floating menu can
-then be accessed just as if it was the original (including sub-menus), but
-without having to go to the menu bar each time.
-This is most useful if you find yourself using a command buried in a sub-menu
-over and over again.
-The tearoff menus can be positioned where you like, and always stay just above
-the Main Vim window. You can get rid of them by closing them as usual; they
-also of course close when you exit Vim.
-
- *:tearoff* *:te*
-:te[aroff] {name} Tear-off the menu {name}. The menu named must have at
- least one subentry, but need not appear on the
- menu-bar (see |win32-hidden-menus|).
-
-Example: >
- :tearoff File
-will make the "File" menu (if there is one) appear as a tearoff menu. >
-
- :amenu ]Toolbar.Make :make<CR>
- :tearoff ]Toolbar
-This creates a floating menu that doesn't exist on the main menu-bar.
-
-Note that a menu that starts with ']' will not be displayed.
-
==============================================================================
7. Command line arguments *gui-w32-cmdargs*
diff --git a/runtime/doc/gui_x11.txt b/runtime/doc/gui_x11.txt
deleted file mode 100644
index 7f60ae2e10..0000000000
--- a/runtime/doc/gui_x11.txt
+++ /dev/null
@@ -1,528 +0,0 @@
-*gui_x11.txt* For Vim version 7.4. Last change: 2014 Mar 08
-
-
- VIM REFERENCE MANUAL by Bram Moolenaar
-
-
-Vim's Graphical User Interface *gui-x11* *GUI-X11*
- *Athena* *Motif*
-1. Starting the X11 GUI |gui-x11-start|
-2. GUI Resources |gui-resources|
-3. Shell Commands |gui-pty|
-4. Various |gui-x11-various|
-5. GTK version |gui-gtk|
-6. GNOME version |gui-gnome|
-7. KDE version |gui-kde|
-8. Compiling |gui-x11-compiling|
-9. X11 selection mechanism |x11-selection|
-
-Other relevant documentation:
-|gui.txt| For generic items of the GUI.
-
-==============================================================================
-1. Starting the X11 GUI *gui-x11-start* *E665*
-
-Then you can run the GUI version of Vim in either of these ways:
- gvim [options] [files...]
- vim -g [options] [files...]
-
-So if you call the executable "gvim", or make "gvim" a link to the executable,
-then the GUI version will automatically be used. Additional characters may be
-added after "gvim", for example "gvim-5".
-
-You may also start up the GUI from within the terminal version by using one of
-these commands:
- :gui [++opt] [+cmd] [-f|-b] [files...] *:gu* *:gui*
- :gvim [++opt] [+cmd] [-f|-b] [files...] *:gv* *:gvim*
-The "-f" option runs Vim in the foreground.
-The "-b" option runs Vim in the background (this is the default).
-Also see |++opt| and |+cmd|.
-
-==============================================================================
-2. GUI Resources *gui-resources* *.Xdefaults*
-
-If using the Motif or Athena version of the GUI (not for the KDE, GTK+ or Win32
-version), a number of X resources are available. You should use Vim's class
-"Vim" when setting these. They are as follows:
-
- Resource name Meaning ~
-
- reverseVideo Boolean: should reverse video be used?
- background Color of background.
- foreground Color of normal text.
- scrollBackground Color of trough portion of scrollbars.
- scrollForeground Color of slider and arrow portions of scrollbars.
- menuBackground Color of menu backgrounds.
- menuForeground Color of menu foregrounds.
- tooltipForeground Color of tooltip and balloon foreground.
- tooltipBackground Color of tooltip and balloon background.
-
- font Name of font used for normal text.
- boldFont Name of font used for bold text.
- italicFont Name of font used for italic text.
- boldItalicFont Name of font used for bold, italic text.
- menuFont Name of font used for the menus, used when compiled
- without the |+xfontset| feature
- menuFontSet Name of fontset used for the menus, used when compiled
- with the |+xfontset| feature
- tooltipFont Name of the font used for the tooltip and balloons.
- When compiled with the |+xfontset| feature this is a
- fontset name.
-
- geometry Initial geometry to use for gvim's window (default
- is same size as terminal that started it).
- scrollbarWidth Thickness of scrollbars.
- borderWidth Thickness of border around text area.
- menuHeight Height of the menu bar (only for Athena).
-
-A special font for italic, bold, and italic-bold text will only be used if
-the user has specified one via a resource. No attempt is made to guess what
-fonts should be used for these based on the normal text font.
-
-Note that the colors can also be set with the ":highlight" command, using the
-"Normal", "Menu", "Tooltip", and "Scrollbar" groups. Example: >
- :highlight Menu guibg=lightblue
- :highlight Tooltip guibg=yellow
- :highlight Scrollbar guibg=lightblue guifg=blue
- :highlight Normal guibg=grey90
-<
- *font-sizes*
-Note: All fonts (except for the menu and tooltip) must be of the same size!!!
-If you don't do this, text will disappear or mess up the display. Vim does
-not check the font sizes. It's the size in screen pixels that must be the
-same. Note that some fonts that have the same point size don't have the same
-pixel size! Additionally, the positioning of the fonts must be the same
-(ascent and descent). You can check this with "xlsfonts -l {fontname}".
-
-If any of these things are also set with Vim commands, e.g. with
-":set guifont=Screen15", then this will override the X resources (currently
-'guifont' is the only option that is supported).
-
-Here is an example of what you might put in your ~/.Xdefaults file: >
-
- Vim*useSchemes: all
- Vim*sgiMode: true
- Vim*useEnhancedFSB: true
- Vim.foreground: Black
- Vim.background: Wheat
- Vim*fontList: 7x13
-
-The first three of these are standard resources on Silicon Graphics machines
-which make Motif applications look even better, highly recommended!
-
-The "Vim*fontList" is to set the menu font for Motif. Example: >
- Vim*menuBar*fontList: -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*
-With Athena: >
- Vim*menuBar*SmeBSB*font: -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*
- Vim*menuBar*MenuButton*font: -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*
-
-NOTE: A more portable, and indeed more correct, way to specify the menu font
-in either Motif or Athena is through the resource: >
- Vim.menuFont: -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*
-Or, when compiled with the |+xfontset| feature: >
- Vim.menuFontSet: -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*
-
-Don't use "Vim*geometry" in the defaults. This will break the menus. Use
-"Vim.geometry" instead.
-
-If you get an error message "Cannot allocate colormap entry for "gray60",
-try adding this to your Vim resources (change the colors to your liking): >
-
- Vim*scrollBackground: Black
- Vim*scrollForeground: Blue
-
-The resources can also be set with arguments to Vim:
-
- argument meaning ~
- *-gui*
- -display {display} Run vim on {display} *-display*
- -iconic Start vim iconified *-iconic*
- -background {color} Use {color} for the background *-background*
- -bg {color} idem *-bg*
- -foreground {color} Use {color} for normal text *-foreground*
- -fg {color} idem *-fg*
- -ul {color} idem *-ul*
- -font {font} Use {font} for normal text *-font*
- -fn {font} idem *-fn*
- -boldfont {font} Use {font} for bold text *-boldfont*
- -italicfont {font} Use {font} for italic text *-italicfont*
- -menufont {font} Use {font} for menu items *-menufont*
- -menufontset {fontset} Use {fontset} for menu items *-menufontset*
- -mf {font} idem *-mf*
- -geometry {geom} Use {geom} for initial geometry *-geometry*
- -geom {geom} idem, see |-geometry-example| *-geom*
- -borderwidth {width} Use a border width of {width} *-borderwidth*
- -bw {width} idem *-bw*
- *-scrollbarwidth*
- -scrollbarwidth {width} Use a scrollbar width of {width}
- -sw {width} idem *-sw*
- -menuheight {height} Use a menu bar height of {height} *-menuheight*
- -mh {height} idem *-mh*
- NOTE: On Motif the value is ignored, the menu height
- is computed to fit the menus.
- -reverse Use reverse video *-reverse*
- -rv idem *-rv*
- +reverse Don't use reverse video *-+reverse*
- +rv idem *-+rv*
- -xrm {resource} Set the specified resource *-xrm*
-
-Note about reverse video: Vim checks that the result is actually a light text
-on a dark background. The reason is that some X11 versions swap the colors,
-and some don't. These two examples will both give yellow text on a blue
-background:
- gvim -fg Yellow -bg Blue -reverse
- gvim -bg Yellow -fg Blue -reverse
-
- *-geometry-example*
-An example for the geometry argument: >
- gvim -geometry 80x63+8+100
-This creates a window with 80 columns and 63 lines at position 8 pixels from
-the left and 100 pixels from the top of the screen.
-
-==============================================================================
-3. Shell Commands *gui-pty*
-
-WARNING: Executing an external command from the GUI will not always work.
-"normal" commands like "ls", "grep" and "make" mostly work fine. Commands
-that require an intelligent terminal like "less" and "ispell" won't work.
-Some may even hang and need to be killed from another terminal. So be
-careful!
-
-There are two ways to do the I/O with a shell command: Pipes and a pseudo-tty.
-The default is to use a pseudo-tty. This should work best on most systems.
-
-Unfortunately, the implementation of the pseudo-tty is different on every Unix
-system. And some systems require root permission. To avoid running into
-problems with a pseudo-tty when you least expect it, test it when not editing
-a file. Be prepared to "kill" the started command or Vim. Commands like
-":r !cat" may hang!
-
-If using a pseudo-tty does not work for you, reset the 'guipty' option: >
-
- :set noguipty
-
-Using a pipe should work on any Unix system, but there are disadvantages:
-- Some shell commands will notice that a pipe is being used and behave
- differently. E.g., ":!ls" will list the files in one column.
-- The ":sh" command won't show a prompt, although it will sort of work.
-- When using ":make" it's not possible to interrupt with a CTRL-C.
-
-Typeahead while the external command is running is often lost. This happens
-both with a pipe and a pseudo-tty. This is a known problem, but it seems it
-can't be fixed (or at least, it's very difficult).
-
- *gui-pty-erase*
-When your erase character is wrong for an external command, you should fix
-this in your "~/.cshrc" file, or whatever file your shell uses for
-initializations. For example, when you want to use backspace to delete
-characters, but hitting backspaces produces "^H" instead, try adding this to
-your "~/.cshrc": >
- stty erase ^H
-The ^H is a real CTRL-H, type it as CTRL-V CTRL-H.
-
-==============================================================================
-4. Various *gui-x11-various*
-
- *gui-x11-printing*
-The "File/Print" menu simply sends the current buffer to "lpr". No options or
-whatever. If you want something else, you can define your own print command.
-For example: >
-
- :10amenu File.Print :w !lpr -Php3
- :10vmenu File.Print :w !lpr -Php3
-<
-Mouse Pointers Available in X11 *X11_mouse_shapes*
-
-By using the |'mouseshape'| option, the mouse pointer can be automatically
-changed whenever Vim enters one of its various modes (e.g., Insert or
-Command). Currently, the available pointers are:
-
- arrow an arrow pointing northwest
- beam a I-like vertical bar
- size an arrow pointing up and down
- busy a wristwatch
- blank an invisible pointer
- crosshair a thin "+" sign
- hand1 a dark hand pointing northeast
- hand2 a light hand pointing northwest
- pencil a pencil pointing southeast
- question question_arrow
- right_arrow an arrow pointing northeast
- up_arrow an arrow pointing upwards
-
-Additionally, any of the mouse pointers that are built into X11 may be
-used by specifying an integer from the X11/cursorfont.h include file.
-
-If a name is used that exists on other systems, but not in X11, the default
-"arrow" pointer is used.
-
-==============================================================================
-5. GTK version *gui-gtk* *GTK+* *GTK*
-
-The GTK version of the GUI works a little bit different.
-
-GTK does _not_ use the traditional X resource settings. Thus items in your
-~/.Xdefaults or app-defaults files are not used.
-Many of the traditional X command line arguments are not supported. (e.g.,
-stuff like -bg, -fg, etc). The ones that are supported are:
-
- command line argument resource name meaning ~
- -fn or -font .font font name for the text
- -geom or -geometry .geometry size of the gvim window
- -rv or -reverse *reverseVideo white text on black background
- -display display to be used
- -fg -foreground {color} foreground color
- -bg -background {color} background color
-
-To set the font, see |'guifont'|. For GTK, there's also a menu option that
-does this.
-
-Additionally, there are these command line arguments, which are handled by GTK
-internally. Look in the GTK documentation for how they are used:
- --sync
- --gdk-debug
- --gdk-no-debug
- --no-xshm (not in GTK+ 2)
- --xim-preedit (not in GTK+ 2)
- --xim-status (not in GTK+ 2)
- --gtk-debug
- --gtk-no-debug
- --g-fatal-warnings
- --gtk-module
- --display (GTK+ counterpart of -display; works the same way.)
- --screen (The screen number; for GTK+ 2.2 multihead support.)
-
-As for colors, Vim's color settings (for syntax highlighting) is still
-done the traditional Vim way. See |:highlight| for more help.
-
-If you want to set the colors of remaining gui components (e.g., the
-menubar, scrollbar, whatever), those are GTK specific settings and you
-need to set those up in some sort of gtkrc file. You'll have to refer
-to the GTK documentation, however little there is, on how to do this.
-See http://developer.gnome.org/doc/API/2.0/gtk/gtk-Resource-Files.html
-for more information.
-
- *gtk-tooltip-colors*
-Example, which sets the tooltip colors to black on light-yellow: >
-
- style "tooltips"
- {
- bg[NORMAL] = "#ffffcc"
- fg[NORMAL] = "#000000"
- }
-
- widget "gtk-tooltips*" style "tooltips"
-
-Write this in the file ~/.gtkrc and it will be used by GTK+. For GTK+ 2
-you might have to use the file ~/.gtkrc-2.0 instead, depending on your
-distribution.
-
-Using Vim as a GTK+ plugin *gui-gtk-socketid*
-
-When the GTK+ version of Vim starts up normally, it creates its own top level
-window (technically, a 'GtkWindow'). GTK+ provides an embedding facility with
-its GtkSocket and GtkPlug widgets. If one GTK+ application creates a
-GtkSocket widget in one of its windows, an entirely different GTK+ application
-may embed itself into the first application by creating a top-level GtkPlug
-widget using the socket's ID.
-
-If you pass Vim the command-line option '--socketid' with a decimal or
-hexadecimal value, Vim will create a GtkPlug widget using that value instead
-of the normal GtkWindow. This enables Vim to act as a GTK+ plugin.
-
-This really is a programmer's interface, and is of no use without a supporting
-application to spawn the Vim correctly. For more details on GTK+ sockets, see
-http://www.gtk.org/api/
-
-Note that this feature requires the latest GTK version. GTK 1.2.10 still has
-a small problem. The socket feature has not yet been tested with GTK+ 2 --
-feel free to volunteer.
-
-==============================================================================
-6. GNOME version *gui-gnome* *Gnome* *GNOME*
-
-The GNOME GUI works just like the GTK+ version. See |GTK+| above for how it
-works. It looks a bit different though, and implements one important feature
-that's not available in the plain GTK+ GUI: Interaction with the session
-manager. |gui-gnome-session|
-
-These are the different looks:
-- Uses GNOME dialogs (GNOME 1 only). The GNOME 2 GUI uses the same nice
- dialogs as the GTK+ 2 version.
-- Uses the GNOME dock, so that the toolbar and menubar can be moved to
- different locations other than the top (e.g., the toolbar can be placed on
- the left, right, top, or bottom). The placement of the menubar and
- toolbar is only saved in the GNOME 2 version.
-- That means the menubar and toolbar handles are back! Yeah! And the
- resizing grid still works too.
-
-GNOME is compiled with if it was found by configure and the
---enable-gnome-check argument was used.
-
-
-GNOME session support *gui-gnome-session* *gnome-session*
-
-On logout, Vim shows the well-known exit confirmation dialog if any buffers
-are modified. Clicking [Cancel] will stop the logout process. Otherwise the
-current session is stored to disk by using the |:mksession| command, and
-restored the next time you log in.
-
-The GNOME session support should also work with the KDE session manager.
-If you are experiencing any problems please report them as bugs.
-
-Note: The automatic session save works entirely transparent, in order to
-avoid conflicts with your own session files, scripts and autocommands. That
-means in detail:
-- The session file is stored to a separate directory (usually $HOME/.gnome2).
-- 'sessionoptions' is ignored, and a hardcoded set of appropriate flags is
- used instead: >
- blank,curdir,folds,globals,help,options,tabpages,winsize
-- The internal variable |v:this_session| is not changed when storing the
- session. Also, it is restored to its old value when logging in again.
-
-==============================================================================
-7. KDE version *gui-kde* *kde* *KDE* *KVim*
- *gui-x11-kde*
-There is no KDE version of Vim. There has been some work on a port using the
-Qt toolkit, but it never worked properly and it has been abandoned. Work
-continues on Yzis: https://github.com/chrizel/Yzis.
-
-==============================================================================
-8. Compiling *gui-x11-compiling*
-
-If using X11, Vim's Makefile will by default first try to find the necessary
-GTK+ files on your system. If the GTK+ files cannot be found, then the Motif
-files will be searched for. Finally, if this fails, the Athena files will be
-searched for. If all three fail, the GUI will be disabled.
-
-For GTK+, Vim's configuration process requires that GTK+ be properly
-installed. That is, the shell script 'gtk-config' must be in your PATH, and
-you can already successful compile, build, and execute a GTK+ program. The
-reason for this is that the compiler flags (CFLAGS) and link flags (LDFLAGS)
-are obtained through the 'gtk-config' shell script.
-
-If you want to build with GTK+ 2 support pass the --enable-gtk2-check argument
-to ./configure. Optionally, support for GNOME 2 will be compiled if the
---enable-gnome-check option is also given.
-
-Otherwise, if you are using Motif or Athena, when you have the Motif or Athena
-files in a directory where configure doesn't look, edit the Makefile to enter
-the names of the directories. Search for "GUI_INC_LOC" for an example to set
-the Motif directories, "CONF_OPT_X" for Athena.
-
- *gui-x11-gtk*
-At the time of this writing, GTK+ version 1.0.6 and 1.2 are outdated. It
-is suggested that you use GTK 2. The GTK 1 support will most likely be
-dropped soon.
-
-For the GTK+ 2 GUI, using the latest release of the GTK+ 2.0 or GTK+ 2.2
-series is recommended.
-
-Lastly, although GTK+ has supposedly been ported to the Win32 platform, this
-has not been tested with Vim and is also unsupported. Also, it's unlikely to
-even compile since GTK+ GUI uses parts of the generic X11 code. This might
-change in distant future; particularly because getting rid of the X11 centric
-code parts is also required for GTK+ framebuffer support.
-
- *gui-x11-motif*
-For Motif, you need at least Motif version 1.2 and/or X11R5. Motif 2.0 and
-X11R6 are OK. Motif 1.1 and X11R4 might work, no guarantee (there may be a
-few problems, but you might make it compile and run with a bit of work, please
-send me the patches if you do). The newest releases of LessTif have been
-reported to work fine too.
-
- *gui-x11-athena*
-The Athena version uses the Xaw widget set by default. If you have the 3D
-version, you might want to link with Xaw3d instead. This will make the
-menus look a bit better. Edit the Makefile and look for "XAW_LIB". The
-scrollbars will remain the same, because Vim has its own, which are already
-3D (in fact, they look more like Motif).
-
- *gui-x11-neXtaw*
-The neXtaw version is mostly like Athena, but uses different widgets.
-
- *gui-x11-misc*
-In general, do not try to mix files from different GTK+, Motif, Athena and X11
-versions. This will cause problems. For example, using header files for
-X11R5 with a library for X11R6 probably doesn't work (although the linking
-won't give an error message, Vim will crash later).
-
-==============================================================================
-9. X11 selection mechanism *x11-selection*
-
-If using X11, in either the GUI or an xterm with an X11-aware Vim, then Vim
-provides varied access to the X11 selection and clipboard. These are accessed
-by using the two selection registers "* and "+.
-
-X11 provides two basic types of global store, selections and cut-buffers,
-which differ in one important aspect: selections are "owned" by an
-application, and disappear when that application (e.g., Vim) exits, thus
-losing the data, whereas cut-buffers, are stored within the X-server itself
-and remain until written over or the X-server exits (e.g., upon logging out).
-
-The contents of selections are held by the originating application (e.g., upon
-a copy), and only passed on to another application when that other application
-asks for them (e.g., upon a paste).
-
-The contents of cut-buffers are immediately written to, and are then
-accessible directly from the X-server, without contacting the originating
-application.
-
- *quoteplus* *quote+*
-There are three documented X selections: PRIMARY (which is expected to
-represent the current visual selection - as in Vim's Visual mode), SECONDARY
-(which is ill-defined) and CLIPBOARD (which is expected to be used for
-cut, copy and paste operations).
-
-Of these three, Vim uses PRIMARY when reading and writing the "* register
-(hence when the X11 selections are available, Vim sets a default value for
-|'clipboard'| of "autoselect"), and CLIPBOARD when reading and writing the "+
-register. Vim does not access the SECONDARY selection.
-
-Examples: (assuming the default option values)
-- Select an URL in Visual mode in Vim. Go to your browser and click the
- middle mouse button in the URL text field. The selected text will be
- inserted (hopefully!). Note: in Firefox you can set the
- middlemouse.contentLoadURL preference to true in about:config, then the
- selected URL will be used when pressing middle mouse button in most places
- in the window.
-- Select some text in your browser by dragging with the mouse. Go to Vim and
- press the middle mouse button: The selected text is inserted.
-- Select some text in Vim and do "+y. Go to your browser, select some text in
- a textfield by dragging with the mouse. Now use the right mouse button and
- select "Paste" from the popup menu. The selected text is overwritten by the
- text from Vim.
-Note that the text in the "+ register remains available when making a Visual
-selection, which makes other text available in the "* register. That allows
-overwriting selected text.
- *x11-cut-buffer*
-There are, by default, 8 cut-buffers: CUT_BUFFER0 to CUT_BUFFER7. Vim only
-uses CUT_BUFFER0, which is the one that xterm uses by default.
-
-Whenever Vim is about to become unavailable (either via exiting or becoming
-suspended), and thus unable to respond to another application's selection
-request, it writes the contents of any owned selection to CUT_BUFFER0. If the
-"+ CLIPBOARD selection is owned by Vim, then this is written in preference,
-otherwise if the "* PRIMARY selection is owned by Vim, then that is written.
-
-Similarly, when Vim tries to paste from "* or "+ (either explicitly, or, in
-the case of the "* register, when the middle mouse button is clicked), if the
-requested X selection is empty or unavailable, Vim reverts to reading the
-current value of the CUT_BUFFER0.
-
-Note that when text is copied to CUT_BUFFER0 in this way, the type of
-selection (character, line or block) is always lost, even if it is a Vim which
-later pastes it.
-
-Xterm, by default, always writes visible selections to both PRIMARY and
-CUT_BUFFER0. When it pastes, it uses PRIMARY if this is available, or else
-falls back upon CUT_BUFFER0. For this reason, when cutting and pasting
-between Vim and an xterm, you should use the "* register. Xterm doesn't use
-CLIPBOARD, thus the "+ doesn't work with xterm.
-
-Most newer applications will provide their current selection via PRIMARY ("*)
-and use CLIPBOARD ("+) for cut/copy/paste operations. You thus have access to
-both by choosing to use either of the "* or "+ registers.
-
-
- vim:tw=78:sw=4:ts=8:ft=help:norl:
diff --git a/runtime/doc/help.txt b/runtime/doc/help.txt
index 4265a81767..e1c05365f7 100644
--- a/runtime/doc/help.txt
+++ b/runtime/doc/help.txt
@@ -148,7 +148,6 @@ Special issues ~
GUI ~
|gui.txt| Graphical User Interface (GUI)
|gui_w32.txt| Win32 GUI
-|gui_x11.txt| X11 GUI
Interfaces ~
|if_cscop.txt| using Cscope with Vim
@@ -163,7 +162,7 @@ Versions ~
Remarks about specific systems ~
|os_mac.txt| Macintosh
|os_unix.txt| Unix
-|os_win32.txt| MS-Windows 95/98/NT
+|os_win32.txt| MS-Windows
*standard-plugin-list*
Standard plugins ~
|pi_getscript.txt| Downloading latest version of Vim scripts
diff --git a/runtime/doc/if_cscop.txt b/runtime/doc/if_cscop.txt
index 5f13d4d176..4f8c0e2065 100644
--- a/runtime/doc/if_cscop.txt
+++ b/runtime/doc/if_cscop.txt
@@ -360,9 +360,6 @@ cscope version for Win32 see:
http://iamphet.nm.ru/cscope/index.html
-The DJGPP-built version from http://cscope.sourceforge.net is known to not
-work with Vim.
-
Hard-coded limitation: doing a |:tjump| when |:cstag| searches the tag files
is not configurable (e.g., you can't do a tselect instead).
diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt
index fc16b1a7e7..3f61e28651 100644
--- a/runtime/doc/indent.txt
+++ b/runtime/doc/indent.txt
@@ -1,4 +1,4 @@
-*indent.txt* For Vim version 7.4. Last change: 2014 Apr 23
+*indent.txt* For Vim version 7.4. Last change: 2014 Dec 06
VIM REFERENCE MANUAL by Bram Moolenaar
diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt
index 2338906db2..a1f593765f 100644
--- a/runtime/doc/index.txt
+++ b/runtime/doc/index.txt
@@ -1070,7 +1070,6 @@ tag command action ~
|:@| :@ execute contents of a register
|:@@| :@@ repeat the previous ":@"
|:Next| :N[ext] go to previous file in the argument list
-|:Print| :P[rint] print lines
|:append| :a[ppend] append text
|:abbreviate| :ab[breviate] enter abbreviation
|:abclear| :abc[lear] remove all abbreviations
@@ -1522,7 +1521,7 @@ tag command action ~
|:tab| :tab create new tab when opening new window
|:tag| :ta[g] jump to tag
|:tags| :tags show the contents of the tag stack
-|:tearoff| :te[aroff] tear-off a menu
+|:terminal| :te[rminal] open a terminal buffer
|:tfirst| :tf[irst] jump to first matching tag
|:throw| :th[row] throw an exception
|:tjump| :tj[ump] like ":tselect", but jump directly when there
diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt
index d15f8b3dd3..0825ca8848 100644
--- a/runtime/doc/intro.txt
+++ b/runtime/doc/intro.txt
@@ -269,11 +269,6 @@ Vi "the original". Without further remarks this is the version
to. Only runs under Unix. Source code only available with a
license. More information on Vi can be found through:
http://vi-editor.org [doesn't currently work...]
- *Posix*
-Posix From the IEEE standard 1003.2, Part 2: Shell and utilities.
- Generally known as "Posix". This is a textual description of
- how Vi is supposed to work.
- See |posix-compliance|.
*Nvi*
Nvi The "New" Vi. The version of Vi that comes with BSD 4.4 and FreeBSD.
Very good compatibility with the original Vi, with a few extensions.
diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt
index 699915a86f..37e1235a81 100644
--- a/runtime/doc/map.txt
+++ b/runtime/doc/map.txt
@@ -1132,9 +1132,7 @@ For starters: See section |40.2| in the user manual.
All user defined commands must start with an uppercase letter, to avoid
confusion with builtin commands. Exceptions are these builtin commands:
:Next
- :X
-They cannot be used for a user defined command. ":Print" is also an existing
-command, but it is deprecated and can be overruled.
+They cannot be used for a user defined command.
The other characters of the user command can be uppercase letters, lowercase
letters or digits. When using digits, note that other commands that take a
@@ -1154,7 +1152,6 @@ Example: >
:Renu " Means "Renumber"
:Ren " Error - ambiguous
:command Paste ...
- :P " The built-in :Print
It is recommended that full names for user-defined commands are used in
scripts.
diff --git a/runtime/doc/message.txt b/runtime/doc/message.txt
index f5fc8ee03b..7d674ae4d7 100644
--- a/runtime/doc/message.txt
+++ b/runtime/doc/message.txt
@@ -317,7 +317,7 @@ You can switch the 'write' option on with ":set write".
*E25* >
Nvim does not have a built-in GUI
-Neovim does not have a built in GUI, so |:gvim| and |:gui| don't work.
+Neovim does not have a built in GUI, so `:gvim` and `:gui` don't work.
*E49* >
Invalid scroll size
diff --git a/runtime/doc/motion.txt b/runtime/doc/motion.txt
index 7f64168663..8e96aedba6 100644
--- a/runtime/doc/motion.txt
+++ b/runtime/doc/motion.txt
@@ -469,9 +469,7 @@ the macros ".IP", ".LP", etc. (These are nroff macros, so the dot must be in
the first column). A section boundary is also a paragraph boundary.
Note that a blank line (only containing white space) is NOT a paragraph
boundary.
-Also note that this does not include a '{' or '}' in the first column. When
-the '{' flag is in 'cpoptions' then '{' in the first column is used as a
-paragraph boundary |posix|.
+Note: this does not include a '{' or '}' in the first column.
*section*
A section begins after a form-feed (<C-L>) in the first column and at each of
diff --git a/runtime/doc/nvim.txt b/runtime/doc/nvim.txt
new file mode 100644
index 0000000000..a7c512d1dc
--- /dev/null
+++ b/runtime/doc/nvim.txt
@@ -0,0 +1,24 @@
+*nvim.txt* For Nvim. {Nvim}
+
+
+ NVIM REFERENCE MANUAL *nvim*
+
+
+Introduction to Nvim *nvim-intro*
+
+This is an introduction for Vim users who are just getting started with Nvim.
+It is not meant for Vim beginners. For a basic introduction to Vim,
+see |help.txt|.
+
+1. Transitioning from Vim |nvim-from-vim|
+2. Differences from Vim |vim-differences|
+3. Msgpack-RPC |msgpack-rpc|
+4. Job control |job-control|
+5. Python plugins |nvim-python|
+6. Clipboard integration |nvim-clipboard|
+7. Remote plugins |remote-plugin|
+8. Provider infrastructure |nvim-provider|
+9. Integrated terminal emulator |nvim-terminal-emulator|
+
+==============================================================================
+ vim:tw=78:ts=8:noet:ft=help:norl:
diff --git a/runtime/doc/nvim_clipboard.txt b/runtime/doc/nvim_clipboard.txt
index cf63685499..1183ad7a3c 100644
--- a/runtime/doc/nvim_clipboard.txt
+++ b/runtime/doc/nvim_clipboard.txt
@@ -4,7 +4,13 @@
NVIM REFERENCE MANUAL by Thiago de Arruda
-Clipboard integration for Nvim *nvim-clipboard*
+Clipboard integration for Nvim *nvim-clipboard*
+
+1. Intro |nvim-clipboard-intro|
+2. X11 selection mechanism |nvim-clipboard-x11|
+
+==============================================================================
+1. Intro *nvim-clipboard-intro*
Nvim has no direct connection to the system clipboard. Instead, it is
accessible through the |nvim-provider| infrastructure, which transparently
@@ -29,4 +35,25 @@ following option:
See 'clipboard' for details and more options.
==============================================================================
+2. X11 selection mechanism *nvim-clipboard-x11* *x11-selection*
+
+The clipboard providers for X11 store text in what is known as "selections".
+Selections are "owned" by an application, so when the application is closed,
+the selection text is lost.
+
+The contents of selections are held by the originating application (e.g., upon
+a copy), and only passed on to another application when that other application
+asks for them (e.g., upon a paste).
+
+ *quoteplus* *quote+*
+
+There are three documented X11 selections: `PRIMARY`, `SECONDARY`, and `CLIPBOARD`.
+`CLIPBOARD` is typically used in X11 applications for copy/paste operations
+(`Ctrl-c`/`v`), while `PRIMARY` is used for the last selected text, which is
+generally inserted with the middle mouse button.
+
+Nvim's X11 clipboard providers only utilize the `PRIMARY` and `CLIPBOARD`
+selections, used for the '*' and '+' registers, respectively.
+
+==============================================================================
vim:tw=78:ts=8:noet:ft=help:norl:
diff --git a/runtime/doc/nvim_from_vim.txt b/runtime/doc/nvim_from_vim.txt
new file mode 100644
index 0000000000..220e67d0e7
--- /dev/null
+++ b/runtime/doc/nvim_from_vim.txt
@@ -0,0 +1,49 @@
+*nvim_from_vim.txt* For Nvim. {Nvim}
+
+
+ NVIM REFERENCE MANUAL
+
+
+Transitioning from Vim *nvim-from-vim*
+
+Nvim is emphatically a fork of Vim, so compatibility to Vim should be pretty
+good.
+
+To start the transition, link your previous configuration so Nvim can use
+it:
+>
+ ln -s ~/.vimrc ~/.nvimrc
+ ln -s ~/.vim ~/.nvim
+<
+See |nvim-intro|, especially |nvim-python| and |nvim-clipboard|, for
+additional software you might need to install to use all of Nvim's features.
+
+Your Vim configuration might not be entirely compatible with Nvim. For a
+full list of differences between Vim and Nvim, see |vim-differences|.
+
+The |'ttymouse'| option, for example, was removed from Nvim (mouse support
+should work without it). If you use the same |vimrc| for Vim and Nvim,
+consider guarding |'ttymouse'| in your configuration like so:
+>
+ if !has('nvim')
+ set ttymouse=xterm2
+ endif
+<
+Conversely, if you have Nvim specific configuration items, you could do
+this:
+>
+ if has('nvim')
+ tnoremap <Esc> <C-\><C-n>
+ endif
+<
+For a more granular approach, use |exists()|:
+>
+ if exists(':tnoremap')
+ tnoremap <Esc> <C-\><C-n>
+ endif
+<
+Now you should be able to explore Nvim more comfortably. Check |nvim| for more
+information.
+
+==============================================================================
+ vim:tw=78:ts=8:noet:ft=help:norl:
diff --git a/runtime/doc/nvim_intro.txt b/runtime/doc/nvim_intro.txt
deleted file mode 100644
index 40f65620af..0000000000
--- a/runtime/doc/nvim_intro.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-*nvim_intro.txt* For Nvim. {Nvim}
-
-
- NVIM REFERENCE MANUAL by Thiago de Arruda
-
-
-Introduction to Nvim *nvim* *nvim-intro*
-
-This is an introduction for Vim users who are just getting started with Nvim.
-It is not meant for Vim beginners. For a basic introduction to Vim,
-see |help.txt|.
-
-For now, it is just an index with the most relevant topics/features that
-differentiate Nvim from Vim:
-
-1. Differences from Vim |vim-differences|
-2. Msgpack-RPC |msgpack-rpc|
-3. Job control |job-control|
-4. Python plugins |nvim-python|
-5. Clipboard integration |nvim-clipboard|
-6. Remote plugins |remote-plugin|
-7. Provider infrastructure |nvim-provider|
-8. Integrated terminal emulator |nvim-terminal-emulator|
-
-==============================================================================
- vim:tw=78:ts=8:noet:ft=help:norl:
diff --git a/runtime/doc/nvim_python.txt b/runtime/doc/nvim_python.txt
index 1117480a1a..1c345b4532 100644
--- a/runtime/doc/nvim_python.txt
+++ b/runtime/doc/nvim_python.txt
@@ -20,16 +20,25 @@ Note: For now only the old Vim 7.3 API is supported.
==============================================================================
2. Quickstart *nvim-python-quickstart*
+If you used a package manager to install Nvim, there's a good chance that
+it also provides the `neovim` Python package. If it doesn't, follow these
+steps to install the package with Python's package manager, `pip`.
+
+Note: Depending on your system, `pip` might refer to Python 2 or Python 3,
+ which is why the following instructions mention `pip2` or `pip3`
+ explicitly. If one of these is not available for you, maybe `pip`
+ is what you want.
+
To use Vim Python 2/3 plugins with Nvim, do the following:
- For Python 2 plugins, make sure an interpreter for Python 2.6 or 2.7 is
available in your `$PATH`, then install the `neovim` Python package systemwide:
>
- $ sudo pip install neovim
+ $ sudo pip2 install neovim
<
or for the current user:
>
- $ pip install --user neovim
+ $ pip2 install --user neovim
<
- For Python 3 plugins, make sure an interpreter for Python 3.3 or above is
available in your `$PATH`, then install the `neovim` Python package systemwide:
@@ -61,7 +70,7 @@ To disable Python 2 interface, set `g:loaded_python_provider` to 1:
<
*g:loaded_python3_provider*
-To disable Python 3 interface, set `g:loaded_python3_provider` to 0:
+To disable Python 3 interface, set `g:loaded_python3_provider` to 1:
>
let g:loaded_python3_provider = 1
<
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index bb29c8825b..e8c844f7d2 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1402,8 +1402,8 @@ A jump table for the options with a short description can be found at |Q_op|.
register '*' for all yank, delete, change and put
operations which would normally go to the unnamed
register. When "unnamed" is also included to the
- option, yank operations (but not delete, change or
- put) will additionally copy the text into register
+ option, yank and delete operations (but not put)
+ will additionally copy the text into register
'*'. See |nvim-clipboard|.
<
*clipboard-autoselect*
@@ -1427,35 +1427,6 @@ A jump table for the options with a short description can be found at |Q_op|.
autoselectml Like "autoselect", but for the modeless selection
only. Compare to the 'A' flag in 'guioptions'.
- *clipboard-html*
- html When the clipboard contains HTML, use this when
- pasting. When putting text on the clipboard, mark it
- as HTML. This works to copy rendered HTML from
- Firefox, paste it as raw HTML in Vim, select the HTML
- in Vim and paste it in a rich edit box in Firefox.
- You probably want to add this only temporarily,
- possibly use BufEnter autocommands.
- Only supported for GTK version 2 and later.
- Only available with the |+multi_byte| feature.
-
- *clipboard-exclude*
- exclude:{pattern}
- Defines a pattern that is matched against the name of
- the terminal 'term'. If there is a match, no
- connection will be made to the X server. This is
- useful in this situation:
- - Running Vim in a console.
- - $DISPLAY is set to start applications on another
- display.
- - You do not want to connect to the X server in the
- console, but do want this in a terminal emulator.
- To never connect to the X server use: >
- exclude:.*
- The value of 'magic' is ignored, {pattern} is
- interpreted as if 'magic' was on.
- The rest of the option value will be used for
- {pattern}, this must be the last entry.
-
*'cmdheight'* *'ch'*
'cmdheight' 'ch' number (default 1)
global
@@ -1493,8 +1464,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'columns' 'co' number (default 80 or terminal width)
global
Number of columns of the screen. Normally this is set by the terminal
- initialization and does not have to be set by hand. Also see
- |posix-screen-size|.
+ initialization and does not have to be set by hand.
When Vim is running in the GUI or in a resizable window, setting this
option will cause the window size to be changed. When you only want
to use the size for the GUI, put the command in your |gvimrc| file.
@@ -1701,10 +1671,6 @@ A jump table for the options with a short description can be found at |Q_op|.
Commas can be added for readability.
To avoid problems with flags that are added in the future, use the
"+=" and "-=" feature of ":set" |add-option-flags|.
- NOTE: This option is set to the POSIX default value at startup when
- the Vi default value would be used and the $VIM_POSIX environment
- variable exists |posix|. This means Vim tries to behave like the
- POSIX specification.
contains behavior ~
*cpo-a*
@@ -1802,7 +1768,6 @@ A jump table for the options with a short description can be found at |Q_op|.
See |/[]|
'l' included: "/[ \t]" finds <Space>, '\' and 't'
'l' excluded: "/[ \t]" finds <Space> and <Tab>
- Also see |cpo-\|.
*cpo-L*
L When the 'list' option is set, 'wrapmargin',
'textwidth', 'softtabstop' and Virtual Replace mode
@@ -1942,38 +1907,6 @@ A jump table for the options with a short description can be found at |Q_op|.
the cursor would skip over it and jump to the
following occurrence.
- POSIX flags. These are not included in the Vi default value, except
- when $VIM_POSIX was set on startup. |posix|
-
- contains behavior ~
- *cpo-#*
- # A count before "D", "o" and "O" has no effect.
- *cpo-&*
- & When ":preserve" was used keep the swap file when
- exiting normally while this buffer is still loaded.
- This flag is tested when exiting.
- *cpo-\*
- \ Backslash in a [] range in a search pattern is taken
- literally, only "\]" is special See |/[]|
- '\' included: "/[ \-]" finds <Space>, '\' and '-'
- '\' excluded: "/[ \-]" finds <Space> and '-'
- Also see |cpo-l|.
- *cpo-/*
- / When "%" is used as the replacement string in a |:s|
- command, use the previous replacement string. |:s%|
- *cpo-{*
- { The |{| and |}| commands also stop at a "{" character
- at the start of a line.
- *cpo-.*
- . The ":chdir" and ":cd" commands fail if the current
- buffer is modified, unless ! is used. Vim doesn't
- need this, since it remembers the full path of an
- opened file.
- *cpo-bar*
- | The value of the $LINES and $COLUMNS environment
- variables overrule the terminal size values obtained
- with system specific functions.
-
*'cryptmethod'* *'cm'*
'cryptmethod' Removed. |vim-differences| {Nvim}
@@ -3185,7 +3118,7 @@ A jump table for the options with a short description can be found at |Q_op|.
- Examples: >
:set guifont=courier_new:h12:w5:b:cRUSSIAN
:set guifont=Andale_Mono:h7.5:w4.5
-< See also |font-sizes|.
+<
*'guifontset'* *'gfs'*
*E250* *E252* *E234* *E597* *E598*
@@ -3256,8 +3189,8 @@ A jump table for the options with a short description can be found at |Q_op|.
screen.
*'guioptions'* *'go'*
-'guioptions' 'go' string (default "egmrLtT" (MS-Windows),
- "aegimrLtT" (GTK, Motif and Athena))
+'guioptions' 'go' string (default "egmrLT" (MS-Windows),
+ "aegimrLT" (GTK, Motif and Athena))
global
{only available when compiled with GUI enabled}
This option only has an effect in the GUI version of Vim. It is a
@@ -3319,9 +3252,6 @@ A jump table for the options with a short description can be found at |Q_op|.
'g' Grey menu items: Make menu items that are not active grey. If
'g' is not included inactive menu items are not shown at all.
Exception: Athena will always use grey menu items.
- *'go-t'*
- 't' Include tearoff menu items. Currently only works for Win32,
- GTK+, and Motif 1.2 GUI.
*'go-T'*
'T' Include Toolbar. Currently only in Win32, GTK+, Motif,
and Athena GUIs.
@@ -3361,11 +3291,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'guipty'* *'noguipty'*
-'guipty' boolean (default on)
- global
- {only available when compiled with GUI enabled}
- 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|.
+'guipty' Removed. |vim-differences| {Nvim}
*'guitablabel'* *'gtl'*
'guitablabel' 'gtl' string (default empty)
@@ -3496,9 +3422,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|hl-Title| t Titles for output from ":set all", ":autocmd" etc.
|hl-VertSplit| c column used to separate vertically split windows
|hl-Visual| v Visual mode
- |hl-VisualNOS| V Visual mode when Vim does is "Not Owning the
- Selection" Only X11 Gui's |gui-x11| and
- |xterm-clipboard|.
|hl-WarningMsg| w warning messages
|hl-WildMenu| W wildcard matches displayed for 'wildmenu'
|hl-Folded| f line used for closed folds
@@ -3562,7 +3485,7 @@ A jump table for the options with a short description can be found at |Q_op|.
with the 'h' flag in 'viminfo' |viminfo-h|.
*'history'* *'hi'*
-'history' 'hi' number (Vim default: 50, Vi default: 0)
+'history' 'hi' number (Vim default: 10000, Vi default: 0)
global
A history of ":" commands, and a history of previous search patterns
is remembered. This option decides how many entries may be stored in
@@ -4167,7 +4090,7 @@ A jump table for the options with a short description can be found at |Q_op|.
global
Number of lines of the Vim window.
Normally you don't need to set this. It is done automatically by the
- terminal initialization code. Also see |posix-screen-size|.
+ terminal initialization code.
When Vim is running in the GUI or in a resizable window, setting this
option will cause the window size to be changed. When you only want
to use the size for the GUI, put the command in your |gvimrc| file.
@@ -4777,6 +4700,8 @@ A jump table for the options with a short description can be found at |Q_op|.
*'paste'* *'nopaste'*
'paste' boolean (default off)
global
+ You probably don't have to set this option: |bracketed-paste-mode|.
+
Put Vim in Paste mode. This is useful if you want to cut or copy
some text from one window and paste it in Vim. This will avoid
unexpected effects.
@@ -5468,17 +5393,7 @@ A jump table for the options with a short description can be found at |Q_op|.
"-f" is not inside the quotes, because it is not part of the command
name. And Vim automagically recognizes the backslashes that are path
separators.
- For Dos 32 bits (DJGPP), you can set the $DJSYSFLAGS environment
- variable to change the way external commands are executed. See the
- libc.inf file of DJGPP.
- Under MS-Windows, when the executable ends in ".com" it must be
- included. Thus setting the shell to "command.com" or "4dos.com"
- works, but "command" and "4dos" do not work for all commands (e.g.,
- filtering).
- For unknown reasons, when using "4dos.com" the current directory is
- changed to "C:\". To avoid this set 'shell' like this: >
- :set shell=command.com\ /c\ 4dos
-< This option cannot be set from a |modeline| or in the |sandbox|, for
+ This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'shellcmdflag'* *'shcf'*
@@ -5650,8 +5565,7 @@ A jump table for the options with a short description can be found at |Q_op|.
function to get the effective shiftwidth value.
*'shortmess'* *'shm'*
-'shortmess' 'shm' string (Vim default "filnxtToO", Vi default: "",
- POSIX default: "A")
+'shortmess' 'shm' string (Vim default "filnxtToO", Vi default: "")
global
This option helps to avoid all the |hit-enter| prompts caused by file
messages, for example with CTRL-G, and to avoid some other messages.
diff --git a/runtime/doc/os_dos.txt b/runtime/doc/os_dos.txt
index 03170cf1d8..1c80f4d7a5 100644
--- a/runtime/doc/os_dos.txt
+++ b/runtime/doc/os_dos.txt
@@ -87,15 +87,15 @@ key key code Normal/Visual mode Insert mode ~
CTRL-PageUp <M-N><M-C-D> H <C-O>H
CTRL-PageDown <M-N>v L$ <C-O>L<C-O>$
-Additionally, these keys are available for copy/cut/paste. In the Win32
-and DJGPP versions, they also use the clipboard.
+Additionally, these keys are available for copy/cut/paste.
+In the Win32 version, they also use the clipboard.
Shift-Insert paste text (from clipboard) *<S-Insert>*
CTRL-Insert copy Visual text (to clipboard) *<C-Insert>*
CTRL-Del cut Visual text (to clipboard) *<C-Del>*
Shift-Del cut Visual text (to clipboard) *<S-Del>*
-These mappings accomplish this (Win32 and DJGPP versions of Vim):
+These mappings accomplish this (Win32 version of Vim):
key key code Normal Visual Insert ~
Shift-Insert <M-N><M-T> "*P "-d"*P <C-R><C-O>*
@@ -276,18 +276,14 @@ If you are running a third-party shell, you may need to set the
|'shellcmdflag'| ('shcf') and |'shellquote'| ('shq') or |'shellxquote'|
('sxq') options. Unfortunately, this also depends on the version of Vim used.
For example, with the MKS Korn shell or with bash, the values of the options
-should be:
+on Win32 should be:
- DOS 16 bit DOS 32 bit Win32 ~
-'shellcmdflag' -c -c -c
-'shellquote' "
-'shellxquote' "
+'shellcmdflag' -c
+'shellquote' (empty)
+'shellxquote' "
-For Dos 16 bit this starts the shell as:
- <shell> -c "command name" >file
-For Win32 as:
+For Win32, this starts the shell as:
<shell> -c "command name >file"
-For DOS 32 bit, DJGPP does this internally somehow.
When starting up, Vim checks for the presence of "sh" anywhere in the 'shell'
option. If it is present, Vim sets the 'shellcmdflag' and 'shellquote' or
diff --git a/runtime/doc/os_win32.txt b/runtime/doc/os_win32.txt
index a2ee0e1255..603dbcddce 100644
--- a/runtime/doc/os_win32.txt
+++ b/runtime/doc/os_win32.txt
@@ -7,8 +7,8 @@
*win32* *Win32* *MS-Windows*
This file documents the idiosyncrasies of the Win32 version of Vim.
-The Win32 version of Vim works on Windows NT, 95, 98, ME, XP, Vista and
-Windows 7. There are both console and GUI versions.
+The Win32 version of Vim works on Windows NT, XP, Vista and Windows 7.
+There are both console and GUI versions.
The 32 bit version also runs on 64 bit MS-Windows systems.
@@ -37,23 +37,8 @@ The Win32 version was written by George V. Reilly <george@reilly.org>.
The original Windows NT port was done by Roger Knobbe <RogerK@wonderware.com>.
The GUI version was made by George V. Reilly and Robert Webb.
-For compiling see "src/INSTALLpc.txt". *win32-compiling*
-
==============================================================================
-1. Known problems *windows95* *win32-problems*
-
-There are a few known problems with running in a console on Windows 95. As
-far as we know, this is the same in Windows 98 and Windows ME.
-
-Comments from somebody working at Microsoft: "Win95 console support has always
-been and will always be flaky".
-1. Dead key support doesn't work.
-2. Resizing the window with ":set columns=nn lines=nn" works, but executing
- external commands MAY CAUSE THE SYSTEM TO HANG OR CRASH.
-3. Screen updating is slow, unless you change 'columns' or 'lines' to a
- non-DOS value. But then the second problem applies!
-
-If this bothers you, use the 32 bit MS-DOS version or the Win32 GUI version.
+1. Known problems *win32-problems*
When doing file name completion, Vim also finds matches for the short file
name. But Vim will still find and use the corresponding long file name. For
@@ -143,99 +128,12 @@ running under Win32s the following differences apply:
==============================================================================
6. Win32 mini FAQ *win32-faq*
-Q. Why does the Win32 version of Vim update the screen so slowly on Windows 95?
-A. The support for Win32 console mode applications is very buggy in Win95.
- For some unknown reason, the screen updates very slowly when Vim is run at
- one of the standard resolutions (80x25, 80x43, or 80x50) and the 16-bit DOS
- version updates the screen much more quickly than the Win32 version.
- However, if the screen is set to some other resolution, such as by ":set
- columns=100" or ":set lines=40", screen updating becomes about as fast as
- it is with the 16-bit version.
-
- WARNING: Changing 'columns' may make Windows 95 crash while updating the
- window (complaints --> Microsoft). Since this mostly works, this has not
- been disabled, but be careful with changing 'columns'.
-
- Changing the screen resolution makes updates faster, but it brings
- additional problems. External commands (e.g., ":!dir") can cause Vim to
- freeze when the screen is set to a non-standard resolution, particularly
- when 'columns' is not equal to 80. It is not possible for Vim to reliably
- set the screen resolution back to the value it had upon startup before
- running external commands, so if you change the number of 'lines' or
- 'columns', be very, very careful. In fact, Vim will not allow you to
- execute external commands when 'columns' is not equal to 80, because it is
- so likely to freeze up afterwards.
-
- None of the above applies on Windows NT. Screen updates are fast, no
- matter how many 'lines' or 'columns' the window has, and external commands
- do not cause Vim to freeze.
-
-Q. So if the Win32 version updates the screen so slowly on Windows 95 and the
- 16-bit DOS version updates the screen quickly, why would I want to run the
- Win32 version?
-A. Firstly, the Win32 version isn't that slow, especially when the screen is
- set to some non-standard number of 'lines' or 'columns'. Secondly, the
- 16-bit DOS version has some severe limitations: It can't do big changes and
- it doesn't know about long file names. The Win32 version doesn't have these
- limitations and it's faster overall (the same is true for the 32-bit DJGPP
- DOS version of Vim). The Win32 version is smarter about handling the
- screen, the mouse, and the keyboard than the DJGPP version is.
-
-Q. And what about the 16-bit DOS version versus the Win32 version on NT?
-A. There are no good reasons to run the 16-bit DOS version on NT. The Win32
- version updates the screen just as fast as the 16-bit version does when
- running on NT. All of the above disadvantages apply. Finally, DOS
- applications can take a long time to start up and will run more slowly. On
- non-Intel NT platforms, the DOS version is almost unusably slow, because it
- runs on top of an 80x86 emulator.
-
Q. How do I change the font?
A. In the GUI version, you can use the 'guifont' option. Example: >
:set guifont=Lucida_Console:h15:cDEFAULT
< In the console version, you need to set the font of the console itself.
You cannot do this from within Vim.
-Q. When I change the size of the console window with ':set lines=xx' or
- similar, the font changes! (Win95)
-A. You have the console font set to 'Auto' in Vim's (or your MS-DOS prompt's)
- properties. This makes W95 guess (badly!) what font is best. Set an explicit
- font instead.
-
-Q. Why can't I paste into Vim when running Windows 95?
-A. In the properties dialog box for the MS-DOS window, go to "MS-DOS
- Prompt/Misc/Fast pasting" and make sure that it is NOT checked. You should
- also do ":set paste" in Vim to avoid unexpected effects. |'paste'|
-
-Q. How do I type dead keys on Windows 95, in the console version?
- (A dead key is an accent key, such as acute, grave, or umlaut, that doesn't
- produce a character by itself, but when followed by another key, produces
- an accented character, such as a-acute, e-grave, u-umlaut, n-tilde, and so
- on. Very useful for most European languages. English-language keyboard
- layouts don't use dead keys, as far as we know.)
-A. You don't. The console mode input routines simply do not work correctly in
- Windows 95, and I have not been able to work around them. In the words
- of a senior developer at Microsoft:
- Win95 console support has always been and will always be flaky.
-
- The flakiness is unavoidable because we are stuck between the world of
- MS-DOS keyboard TSRs like KEYB (which wants to cook the data;
- important for international) and the world of Win32.
-
- So keys that don't "exist" in MS-DOS land (like dead keys) have a
- very tenuous existence in Win32 console land. Keys that act
- differently between MS-DOS land and Win32 console land (like
- capslock) will act flaky.
-
- Don't even _mention_ the problems with multiple language keyboard
- layouts...
-
- You may be able to fashion some sort of workaround with the digraphs
- mechanism. |digraphs|
-
- The best solution is to use the Win32 GUI version gvim.exe. Alternatively,
- you can try one of the DOS versions of Vim where dead keys reportedly do
- work.
-
Q. How do I type dead keys on Windows NT?
A. Dead keys work on NT 3.51. Just type them as you would in any other
application.
diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt
index f7a7aa1ad5..80815a70ec 100644
--- a/runtime/doc/pi_netrw.txt
+++ b/runtime/doc/pi_netrw.txt
@@ -2060,7 +2060,7 @@ MARKED FILES: DIFF *netrw-md* {{{2
(See |netrw-mf| and |netrw-mr| for how to mark files)
(uses the global marked file list)
-Use vimdiff to visualize difference between selected files (two or
+Use |diff-mode| to visualize difference between selected files (two or
three may be selected for this). Uses the global marked file list.
MARKED FILES: EDITING *netrw-me* {{{2
diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt
index 14b241cae0..b9ee60318a 100644
--- a/runtime/doc/quickref.txt
+++ b/runtime/doc/quickref.txt
@@ -717,7 +717,6 @@ Short explanation of each option: *option-list*
'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
'guitabtooltip' 'gtt' GUI: custom tooltip for a tab page
'helpfile' 'hf' full path name of the main help file
@@ -1113,8 +1112,6 @@ Context-sensitive completion on the command-line:
Most useful Vim arguments (for full list see |startup-options|)
-|-gui| -g start GUI (also allows other options)
-
|-+| +[num] put the cursor at line [num] (default: last line)
|-+c| +{command} execute {command} after loading the file
|-+/| +/{pat} {file} .. put the cursor at the first occurrence of {pat}
@@ -1342,9 +1339,6 @@ Context-sensitive completion on the command-line:
------------------------------------------------------------------------------
*Q_gu* GUI commands
-|:gui| :gui UNIX: start the GUI
-|:gui| :gui {fname} .. idem, and edit {fname} ..
-
|:menu| :menu list all menus
|:menu| :menu {mpath} list menus starting with {mpath}
|:menu| :menu {mpath} {rhs} add menu {mpath}, giving {rhs}
diff --git a/runtime/doc/recover.txt b/runtime/doc/recover.txt
index 53cb31f813..0b67732cd1 100644
--- a/runtime/doc/recover.txt
+++ b/runtime/doc/recover.txt
@@ -111,10 +111,6 @@ command:
*:pre* *:preserve* *E313* *E314*
:pre[serve] Write all text for all buffers into swap file. The
original file is no longer needed for recovery.
- This sets a flag in the current buffer. When the '&'
- flag is present in 'cpoptions' the swap file will not
- be deleted for this buffer when Vim exits and the
- buffer is still loaded |cpo-&|.
A Vim swap file can be recognized by the first six characters: "b0VIM ".
After that comes the version number, e.g., "3.0".
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 7e1488651e..88f23e6c76 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1,4 +1,4 @@
-*syntax.txt* For Vim version 7.4. Last change: 2014 Sep 27
+*syntax.txt* For Vim version 7.4. Last change: 2014 Nov 19
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -4836,8 +4836,7 @@ Title titles for output from ":set all", ":autocmd" etc.
*hl-Visual*
Visual Visual mode selection
*hl-VisualNOS*
-VisualNOS Visual mode selection when vim is "Not Owning the Selection".
- Only X11 Gui's |gui-x11| and |xterm-clipboard| supports this.
+VisualNOS Removed. |vim-differences| {Nvim}
*hl-WarningMsg*
WarningMsg warning messages
*hl-WildMenu*
@@ -5056,6 +5055,7 @@ This will set the "w:current_syntax" variable to "foo". The value of
restoring "b:current_syntax", since the syntax files do set
"b:current_syntax". The value set by the syntax file is assigned to
"w:current_syntax".
+Note: This resets the 'spell', 'spellcapcheck' and 'spellfile' options.
Once a window has its own syntax, syntax commands executed from other windows
on the same buffer (including :syntax clear) have no effect. Conversely,
diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt
index d7b9395aeb..3b8bf4507f 100644
--- a/runtime/doc/term.txt
+++ b/runtime/doc/term.txt
@@ -592,6 +592,19 @@ before using the mouse:
"g<LeftMouse>" is "<C-LeftMouse> (jump to tag under mouse click)
"g<RightMouse>" is "<C-RightMouse> ("CTRL-T")
+ *bracketed-paste-mode*
+Bracketed paste mode allows terminal emulators to distinguish between typed
+text and pasted text.
+
+For terminal emulators that support it, this mode is enabled by default. Thus
+you can paste text without Neovim giving any special meaning to it. Most
+notably it won't try reindenting those lines.
+
+If your terminal emulator doesn't support it yet, you can get the old Vim
+behaviour by enabling |'paste'| temporarily.
+
+NOTE: See https://cirw.in/blog/bracketed-paste for technical details.
+
*mouse-mode-table* *mouse-overview*
A short overview of what the mouse buttons do, when 'mousemodel' is "extend":
diff --git a/runtime/doc/tips.txt b/runtime/doc/tips.txt
index e1d02da292..9ed8f1f544 100644
--- a/runtime/doc/tips.txt
+++ b/runtime/doc/tips.txt
@@ -160,13 +160,6 @@ entries similar to: >
PS: If you find any difference, someone (your sysadmin?) should better check
the complete termcap and terminfo database for consistency.
-NOTE 1: If you recompile Vim with FEAT_XTERM_SAVE defined in feature.h, the
-builtin xterm will include the mentioned "te" and "ti" entries.
-
-NOTE 2: If you want to disable the screen switching, and you don't want to
-change your termcap, you can add these lines to your .vimrc: >
- :set t_ti= t_te=
-
==============================================================================
Scrolling in Insert mode *scroll-insert*
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index ca4a2e58d7..78ae536c5a 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 7.4. Last change: 2014 Nov 19
+*todo.txt* For Vim version 7.4. Last change: 2014 Dec 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -34,9 +34,23 @@ not be repeated below, unless there is extra information.
*known-bugs*
-------------------- Known bugs and current work -----------------------
+Patch to fix list range assign crash. (Yukihiro Nakadaira, 2014 Dec 1)
+
+Patch to fix range with user command. (Marcin Szamotulski, 2014 Dec 2)
+Update Dec 6, with support for user commands.
+
+When window number in Ex range is too high, give an error?
+Only when backwards compatible.
+
+:s/\n// doesn't change anything. Since 7.4.232? (Eliseo Martínez, 2014 Nov
+28) Patch on Issue 287
+
+Using vim_snprintf() in window.c can be in a function.
+
Regexp problems:
- The NFA engine does not implement the time limit passed to
nfa_regexec_multi()
+- Very slow with a long line and Ruby highlighting. (John Whitley, 2014 Dec 4)
- Bug with pattern: '\vblock (\d+)\.\n.*\d+%(\1)@<!\.$'
(Lech Lorens, 2014 Feb 3)
- Issue 164: freeze on regexp search.
@@ -64,17 +78,11 @@ Breaks test_eval. Inefficient, can we only compute y_width when needed?
Problem that a previous silent ":throw" causes a following try/catch not to
work. (ZyX, 2013 Sep 28)
+Patch to fix recognizing function name. (Ozaki Kiichi, 2014 Nov 28)
+
":cd C:\Windows\System32\drivers\etc*" does not work, even though the
directory exists. (Sergio Gallelli, 2013 Dec 29)
-Patch by Marcin Szamotulski to add count to :close (2014 Aug 10, update Aug
-14, Aug 30)
- Make ":1close" close the first window.
- Make ":+1close" close the next window.
- Make ":-1close" close the previous window.
-Doesn't look right, asked for updates.
-Update 2014 Nov 8. Replied with suggestions.
-
The entries added by matchaddpos() are returned by getmatches() but can't be
set with setmatches(). (lcd47, 2014 Jun 29)
@@ -84,34 +92,34 @@ Problem using ":try" inside ":execute". (ZyX, 2013 Sep 15)
Python: ":py raw_input('prompt')" doesn't work. (Manu Hack)
-Patch to fix issue 78. (Christian Brabandt, 2014 Oct 8)
-
-Patch to fix leak in map() with error. (Christian Brabandt, 2014 Oct 11)
-
-Patch to fix incsearch for "2/pattern/e".
-
-Patch to fix memory leak in :hardcopy. (Christian Brabandt, 2014 Nov 16)
-
-Patch to fix warnings in if_ruby.c. (Ken Takata, 2014 Nov 17)
-
-Patch to make test 63 pass when in a B&W terminal. (Christian Brabandt, 2014
-Nov 15) Other patch (better) on Nov 17.
-
Change behavior of v:hlsearch? Patch from Christian, 2014 Oct 22.
+Patch to recover from X server restart: hint on Issue 203 (2014 Nov 21 18:44)
+
MS-Windows: When editing a file with a leading space, writing it uses the
wrong name. (Aram, 2014 Nov 7) Vim 7.4.
+Add LessCss support. (Jenoma / Alessandro Vioni, 2014 Nov 24)
+Now with updated license, Nov 24.
+
patch to remove FEAT_OSFILETYPE from fileio.c. (Christian, 2014 Nov 12)
Value returned by virtcol() changes depending on how lines wrap. This is
inconsistent with the documentation.
-Patch to fix relatie numbers. (Christian Brabandt, 2014 Nov 17)
+Ukrainian vimtutor. (Issue 288)
+
+Regenerate the Unicode tables in mbyte.c.
+Diff from ZyX, 2014 Dec 6.
+
+Patch to fix relative numbers. (Christian Brabandt, 2014 Nov 17)
+Update Nov 26.
Patch to fix wrong formatting if 'linebreak' is set. (Christian Brabandt, 2014
Nov 12)
+Patch to avoid recognizing polkit as hog files. (Issue 292)
+
Patch to support hex values for setting option value.
(Zyx, 2015 Nov 6)
@@ -122,17 +130,29 @@ Update Nov 5.
MS-Windows: Crash opening very long file name starting with "\\".
(Christian Brock, 2012 Jun 29)
+Cursorline background color not mixed with character highlight.
+Patch by Yasuhiro Matsumoto, 2014 Dec 3.
+
Problem using diff syntax with cp932 encoding. Idea from Yasuhiro Matsumoto,
patch from Ken Takata (2014 Nov 6)
ml_updatechunk() is slow when retrying for another encoding. (John Little,
2014 Sep 11)
+Patch to add a different escape sequence for replace mode.
+(Omar Sandoval, 2014 Nov 30)
+
+Patch to allow values greater than 255 for ctermfg/ctermbg on Windows.
+(Yasuhiro Matsumoto, 2014 Dec 5)
+
When 'balloonexpr' returns a list the result has a trailing newline.
Just remove one trailing newline. (lcd, 2014 Oct 17)
Make comments in the test Makefile silent. (Kartik Agaram, 2014 Sep 24)
+Result of systemlist() does not show whether text ended in line break.
+(Bjorn Linse, 2014 Nov 27)
+
When in 'comments' "n:x" follows after three-part comment directly it repeats
any one-character from the previous line. (Kartik Agaram, 2014 Sep 19)
@@ -147,6 +167,15 @@ Plugins need to make a lot of effort, lots of mappings, to know what happened
before pressing the key that triggers a plugin action. How about keeping the
last N pressed keys, so that they do not need to be mapped?
+":q!" should reset modified flag for current buffer, if another buffer is
+modified no need to abandon it again.
+Patch from Yasuhiro Matsumoto, 2014 Nov 21.
+Update from Hirohito Higashi, 2014 Nov 21.
+With test, Nov 23.
+
+Wrong scrolling when using incsearch. Patch by Christian Brabandt, 2014 Dec 4.
+Is this a good solution?
+
Can assign to s:type when a function s:type has been defined.
Also the other way around: define a function while a variable with that name
was already defined.
@@ -175,6 +204,7 @@ Bug: Autocompleting ":tag/pat" replaces "/pat" with a match but does not
insert a space. (Micha Mos, 2014 Nov 7)
Patch to add the :bvimgrep command. (Christian Brabandt, 2014 Nov 12)
+Update Dec 6.
Patch to add argument to :cquit. (Thinca, 2014 Oct 12)
@@ -287,6 +317,10 @@ Yasuhiro Matsumoto, 2013 May 31.
Or should we add a more general mechanism, like a lambda() function?
Patch by Yasuhiro Matsumoto, 2014 Sep 16.
+Patch to fix display of listchars on the cursorline. (Nayuri Aohime, 2013)
+Update suggested by Yasuhiro Matsumoto, 2014 Nov 25:
+https://gist.github.com/presuku/d3d6b230b9b6dcfc0477
+
Patch for XDG base directory support. (Jean François Bignolles, 2014 Mar 4)
Remark on the docs. Should not be a compile time feature. But then what?
@@ -537,6 +571,14 @@ MS-Windows resizing problems:
causes the window to move unnecessarily. (William E. Skeith III, 2012 Jan
12) Patch: 2012 Jan 13 Needs more work (2012 Feb 2)
+Patch to use Modern UI 2.0 for the Nsis installer. (Guopeng Wen, 2010 Jul 30)
+Latest version: 2011 May 18
+8 Windows install with NSIS: make it possible to do a silent install, see
+ http://nsis.sourceforge.net/Docs/Chapter4.html#4.12
+ Version from Guopeng Wen that does this (2010 Dec 27)
+Alternative: MSI installer: https://github.com/petrkle/vim-msi/
+Or the one on Issue 279
+
'iminsert' global value set when using ":setlocal iminsert"? (Wu, 2012 Jun 23)
Patch to append regexp to tag commands to make it possible to select one out
@@ -583,9 +625,6 @@ Update Vim app icon (for Gnome). (Jakub Steiner, 2013 Dec 6)
Patch to use .png icons for the toolbar on MS-Windows. (Martin Gieseking, 2013
Apr 18)
-Patch for has('unnamedplus') docs. (Tony Mechelynck, 2011 Sep 27)
-And one for gui_x11.txt.
-
":cd" doesn't work when current directory path contains "**".
finddir() has the same problem. (Yukihiro Nakadaira, 2012 Jan 10)
Requires a rewrite of the file_file_in_path code.
@@ -850,7 +889,7 @@ Assume the system converts between the actual encoding of the filesystem to
the system encoding (usually utf-8).
Patch to add GUI colors to the terminal, when it supports it. (ZyX, 2013 Jan
-26, update 2013 Dec 14)
+26, update 2013 Dec 14, another 2014 Nov 22)
Problem producing tags file when hebrew.frx is present. It has a BOM.
Results in E670. (Tony Mechelynck, 2010 May 2)
@@ -1482,13 +1521,6 @@ with "gvim -nb:localhost:55555:foo". From nc do: '1:editFile!0 "foo"'. Then
go to Insert mode and add a few lines. Then backspacing every other time
moves the cursor instead of deleting. (Chris Kaiser, 2007 Sep 25)
-Patch to use Modern UI 2.0 for the Nsis installer. (Guopeng Wen, 2010 Jul 30)
-Latest version: 2011 May 18
-8 Windows install with NSIS: make it possible to do a silent install, see
- http://nsis.sourceforge.net/Docs/Chapter4.html#4.12
- Version from Guopeng Wen that does this (2010 Dec 27)
-Alternative: MSI installer: https://github.com/petrkle/vim-msi/
-
Windows installer should install 32-bit version of right-click handler also on
64-bit systems. (Brian Cunningham, 2011 Dec 28)
@@ -1522,8 +1554,6 @@ patches by Mathias, see mail Feb 22)
Win32: compiling with normal features and OLE fails. Patch by Mathias
Michaelis, 2006 Jun 4.
-Win16: include patches to make Win16 version work. (Vince Negri, 2006 May 22)
-
Win32: after "[I" showing matches, scroll wheel messes up screen. (Tsakiridis,
2007 Feb 18)
Patch by Alex Dobrynin, 2007 Jun 3. Also fixes other scroll wheel problems.
@@ -1999,71 +2029,6 @@ Awaiting updated patches:
- 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)
- Also: A mark is lost after: make change, undo, redo and undo.
- Example: "{d''" then "u" then "d''": deletes an extra line, because the ''
- position is one line down. (Veselinovic)
-8 When stdin is not a tty, and Vim reads commands from it, an error should
- make Vim exit.
-7 Unix Vim (not gvim): Typing CTRL-C in Ex mode should finish the line
- (currently you can continue typing, but it's truncated later anyway).
- Requires a way to make CTRL-C interrupt select() when in cooked input.
-8 When loading a file in the .exrc, Vi loads the argument anyway. Vim skips
- loading the argument if there is a file already. When no file argument
- given, Vi starts with an empty buffer, Vim keeps the loaded file. (Bearded)
-6 In Insert mode, when using <BS> or <Del>, don't wipe out the text, but
- only move back the cursor. Behaves like '$' in 'cpoptions'. Use a flag
- in 'cpoptions' to switch this on/off.
-8 When editing a file which is a symbolic link, and then opening another
- symbolic link on the same file, Vim uses the name of the first one.
- Adjust the file name in the buffer to the last one used? Use several file
- names in one buffer???
- Also: When first editing file "test", which is symlink to "test2", and
- then editing "test2", you end up editing buffer "test" again. It's not
- logical that the name that was first used sticks with the buffer.
-7 The ":undo" command works differently in Ex mode. Edit a file, make some
- changes, "Q", "undo" and _all_ changes are undone, like the ":visual"
- command was one command.
- On the other hand, an ":undo" command in an Ex script only undoes the last
- change (e.g., use two :append commands, then :undo).
-7 The ":map" command output overwrites the command. Perhaps it should keep
- the ":map" when it's used without arguments?
-7 CTRL-L is not the end of a section? It is for Posix! Make it an option.
-7 Implement 'prompt' option. Init to off when stdin is not a tty.
-7 CTRL-T in Insert mode inserts 'shiftwidth' of spaces at the cursor. Add a
- flag in 'cpoptions' for this.
-7 Add a way to send an email for a crashed edit session. Create a file when
- making changes (containing name of the swap file), delete it when writing
- the file. Supply a program that can check for crashed sessions (either
- all, for a system startup, or for one user, for in a .login file).
-7 Vi doesn't do autoindenting when input is not from a tty (in Ex mode).
-7 "z3<CR>" should still use the whole window, but only redisplay 3 lines.
-7 ":tag xx" should move the cursor to the first non-blank. Or should it go
- to the match with the tag? Option?
-7 Implement 'autoprint'/'ap' option.
-7 Add flag in 'cpoptions' that makes <BS> after a count work like <Del>
- (Sayre).
-7 Add flag in 'cpoptions' that makes operator (yank, filter) not move the
- cursor, at least when cancelled. (default Vi compatible).
-7 This Vi-trick doesn't work: "Q" to go to Ex mode, then "g/pattern/visual".
- In Vi you can edit in visual mode, and when doing "Q" you jump to the next
- match. Nvi can do it too.
-7 Support '\' for line continuation in Ex mode for these commands: (Luebking)
- g/./a\ g/pattern1/ s/pattern2/rep1\\
- line 1\ line 2\\
- line 2\ line 3\\
- . line4/
-6 ":e /tmp/$tty" doesn't work. ":e $uid" does. Is $tty not set because of
- the way the shell is started?
-6 Vi compatibility (optional): make "ia<CR><ESC>10." do the same strange
- thing. (only repeat insert for the first line).
-
-
MSDOS and Win32:
8 Should $USERPROFILE be preferred above $HOMEDRIVE/$HOMEPATH? No, but it's
a good fallback, thus use:
@@ -2091,14 +2056,6 @@ MSDOS and Win32:
backslashes. (Ronald Hoellwarth)
-Windows 95:
-8 Editing a file by its short file name and writing it, makes the long file
- name disappear. Setting 'backupcopy' helps.
- Use FindFirstFile()->cAlternateFileName in fname_case() (George Reilly).
-8 Doing wildcard expansion, will match the short filename, but result in the
- long filename (both DJGPP and Win32).
-
-
Win32 console:
9 When editing a file by its short file name, it should be expanded into its
long file name, to avoid problems like these: (Mccollister)
@@ -2264,9 +2221,6 @@ Macintosh:
one for B&W printing (if that can be detected).
8 In Visual block mode with 'lbr' set, a change command doesn't insert the
text in following lines where the linebreak changes.
-9 dosinst.c: The DJGPP version can't uninstall the Uninstall registry key on
- Windows NT. How to install a .inf file on Windows NT and how to detect
- that Windows NT is being used?
8 When 'virtualedit' is "block,insert" and encoding is "utf-8", selecting a
block of one double-wide character, then "d" deletes only half of it.
8 When 'virtualedit' is set, should "I" in blockwise visual mode also insert
@@ -2298,11 +2252,6 @@ Macintosh:
Or ask for permission to overwrite it (if file can be made writable) and
restore file to readonly afterwards.
Overwriting a file for which a swap file exists is similar issue.
-7 When compiled with "xterm_clipboard", startup can be slower and might get
- error message for invalid $DISPLAY. Try connecting to the X server in the
- background (forked), so that Vim starts up quicker? Connect as soon as
- the clipboard is to be used (Visual select mode starts, paste from
- clipboard)
7 X11: Some people prefer to use CLIPBOARD instead of PRIMARY for the normal
selection. Add an "xclipboard" argument to the 'clipboard' option? (Mark
Waggoner)
@@ -2441,7 +2390,7 @@ Problems that will (probably) not be solved:
- Win32: All files created on the day of switching from winter to summer
time cause "changed since editing started" messages. It goes away when
the file is written again the next day, or the timezone is adjusted.
- DJGPP version is OK. (Zaimi) Looks like a problem with the Win32 library.
+ Looks like a problem with the Win32 library.
Rebooting doesn't help. Time stamps look OK in directory. (Penn)
Is this on FAT (stores wall clock time) or NTFS (stores UTS)?
- Win32, MS-Windows XP: $HOME uses the wrong drive when the user profiles
@@ -2573,10 +2522,6 @@ User Friendlier:
7 When Vim detects a file is being edited elsewhere and it's a gvim session
of the same user it should offer a "Raise" button, so that the other gvim
window can be displayed. (Eduard)
-8 Support saving and restoring session for X windows? It should work to do
- ":mksession" and use "-S fname" for the restart command. The
- gui_x11_wm_protocol_handler() already takes care of the rest.
- global_event_filter() for GTK.
Tab pages:
@@ -3158,8 +3103,6 @@ Performance:
8 When displaying a space with only foreground highlighting, it's the same
as a space without attributes. Avoid displaying spaces for the "~" lines
when starting up in a color terminal.
-8 Avoid alloc() for scratch buffer use, esp. in syntax.c. It's very slow on
- Win16.
8 Profiling shows that in_id_list() is used very often for C code. Can this
function be improved?
8 For an existing file, the page size of the swap file is always the
diff --git a/runtime/doc/usr_09.txt b/runtime/doc/usr_09.txt
index 68575f5184..05cc32bceb 100644
--- a/runtime/doc/usr_09.txt
+++ b/runtime/doc/usr_09.txt
@@ -81,10 +81,6 @@ is Edit/Global Settings. You will find these entries:
Toggle Left Scrollbar make a scrollbar appear/disappear at the left
Toggle Right Scrollbar make a scrollbar appear/disappear at the right
-On most systems you can tear-off the menus. Select the top item of the menu,
-the one that looks like a dashed line. You will get a separate window with
-the items of the menu. It will hang around until you close the window.
-
THE TOOLBAR
diff --git a/runtime/doc/usr_21.txt b/runtime/doc/usr_21.txt
index f7555df071..2ce23f0abf 100644
--- a/runtime/doc/usr_21.txt
+++ b/runtime/doc/usr_21.txt
@@ -77,13 +77,6 @@ better at it. You can start a new shell this way: >
This is similar to using CTRL-Z to suspend Vim. The difference is that a new
shell is started.
-When using the GUI the shell will be using the Vim window for its input and
-output. Since Vim is not a terminal emulator, this will not work perfectly.
-If you have trouble, try toggling the 'guipty' option. If this still doesn't
-work well enough, start a new terminal to run the shell in. For example with:
->
- :!xterm&
-
==============================================================================
*21.3* Remembering information; viminfo
diff --git a/runtime/doc/usr_40.txt b/runtime/doc/usr_40.txt
index 9d706481df..b802c9534a 100644
--- a/runtime/doc/usr_40.txt
+++ b/runtime/doc/usr_40.txt
@@ -290,8 +290,8 @@ deletes the first line.
Note:
User-defined commands must start with a capital letter. You cannot
- use ":X", ":Next" and ":Print". The underscore cannot be used! You
- can use digits, but this is discouraged.
+ use ":Next". The underscore cannot be used! You can use digits, but
+ this is discouraged.
To list the user-defined commands, execute the following command: >
diff --git a/runtime/doc/usr_42.txt b/runtime/doc/usr_42.txt
index 1d16112aa0..b9102f3f7b 100644
--- a/runtime/doc/usr_42.txt
+++ b/runtime/doc/usr_42.txt
@@ -268,13 +268,6 @@ command like: >
but are completely removed. (Does not work on all
systems.)
- t When removed the tearoff feature is not enabled.
-
-The dotted line at the top of a menu is not a separator line. When you select
-this item, the menu is "teared-off": It is displayed in a separate window.
-This is called a tearoff menu. This is useful when you use the same menu
-often.
-
For translating menu items, see |:menutrans|.
Since the mouse has to be used to select a menu item, it is a good idea to use
diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt
index fa57a91da4..5fb6dac402 100644
--- a/runtime/doc/various.txt
+++ b/runtime/doc/various.txt
@@ -91,13 +91,6 @@ g8 Print the hex values of the bytes used in the
current line |cmdline-ranges|).
See |ex-flags| for [flags].
- *:P* *:Print*
-:[range]P[rint] [count] [flags]
- Just as ":print". Was apparently added to Vi for
- people that keep the shift key pressed too long...
- Note: A user command can overrule this command.
- See |ex-flags| for [flags].
-
*:l* *:list*
:[range]l[ist] [count] [flags]
Same as :print, but display unprintable characters
@@ -213,8 +206,8 @@ g8 Print the hex values of the bytes used in the
*:sh* *:shell* *E371* *E360*
:sh[ell] Removed. |vim-differences| {Nvim}
- *:term* *:terminal*
-:term[inal][!] {cmd} Spawns {cmd} using the current value of 'shell' and
+ *:terminal* *:te*
+:te[rminal][!] {cmd} Spawns {cmd} using the current value of 'shell' and
'shellcmdflag' in a new terminal buffer. This is
equivalent to: >
@@ -409,10 +402,6 @@ m *+xim* X input method |xim|
*+xfontset* X fontset support |xfontset|
*+xpm* pixmap support
m *+xpm_w32* Win32 GUI only: pixmap support |w32-xpm-support|
- *+xsmp* XSMP (X session management) support
- *+xsmp_interact* interactive XSMP (X session management) support
-N *+xterm_clipboard* Unix only: xterm clipboard handling
-m *+xterm_save* save and restore xterm screen |xterm-screens|
*/dyn* *E370* *E448*
To some of the features "/dyn" is added when the
diff --git a/runtime/doc/vi_diff.txt b/runtime/doc/vi_diff.txt
index 45d81bba2e..e76c0163b5 100644
--- a/runtime/doc/vi_diff.txt
+++ b/runtime/doc/vi_diff.txt
@@ -10,17 +10,12 @@ Throughout the help files differences between Vim and Vi/Ex are given in
curly braces, like "{not in Vi}". This file only lists what has not been
mentioned in other files and gives an overview.
-Vim is mostly POSIX 1003.2-1 compliant. The only command known to be missing
-is ":open". There are probably a lot of small differences (either because Vim
-is missing something or because Posix is beside the mark).
-
1. Simulated command |simulated-command|
2. Missing options |missing-options|
3. Limits |limits|
4. The most interesting additions |vim-additions|
5. Other vim features |other-features|
6. Command-line arguments |cmdline-arguments|
-7. POSIX compliance |posix-compliance|
==============================================================================
1. Simulated command *simulated-command*
@@ -919,59 +914,5 @@ Only Vim is able to accept options in between and after the file names.
@{cmdfile} Vile: use {cmdfile} as startup file.
-==============================================================================
-7. POSIX compliance *posix* *posix-compliance*
-
-In 2005 the POSIX test suite was run to check the compatibility of Vim. Most
-of the test was executed properly. There are the few things where Vim
-is not POSIX compliant, even when run in Vi compatibility mode.
-
-Set the $VIM_POSIX environment variable to have 'cpoptions' include the POSIX
-flags when Vim starts up. This makes Vim run as POSIX as it can. That's
-a bit different from being Vi compatible.
-
-This is where Vim does not behave as POSIX specifies and why:
-
- *posix-screen-size*
- The $COLUMNS and $LINES environment variables are ignored by Vim if
- the size can be obtained from the terminal in a more reliable way.
- Add the '|' flag to 'cpoptions' to have $COLUMNS and $LINES overrule
- sizes obtained in another way.
-
- The "{" and "}" commands don't stop at a "{" in the original Vi, but
- POSIX specifies it does. Add the '{' flag to 'cpoptions' if you want
- it the POSIX way.
-
- The "D", "o" and "O" commands accept a count. Also when repeated.
- Add the '#' flag to 'cpoptions' if you want to ignore the count.
-
- The ":cd" command fails if the current buffer is modified when the '.'
- flag is present in 'cpoptions'.
-
- There is no ATTENTION message, the "A" flag is added to 'shortmess'.
-
-These are remarks about running the POSIX test suite:
-- vi test 33 sometimes fails for unknown reasons
-- vi test 250 fails; behavior will be changed in a new revision
- http://www.opengroup.org/austin/mailarchives/ag-review/msg01710.html
- (link no longer works, perhaps it's now:
- https://www.opengroup.org/sophocles/show_mail.tpl?CALLER=show_archive.tpl&source=L&listname=austin-review-l&id=1711)
-- vi test 310 fails; exit code non-zero when any error occurred?
-- ex test 24 fails because test is wrong. Changed between SUSv2 and SUSv3.
-- ex tests 47, 48, 49, 72, 73 fail because .exrc file isn't read in silent
- mode and $EXINIT isn't used.
-- ex tests 76, 78 fail because echo is used instead of printf. (fixed)
- Also: problem with \s not changed to space.
-- ex test 355 fails because 'window' isn't used for "30z".
-- ex test 368 fails because shell command isn't echoed in silent mode.
-- ex test 394 fails because "=" command output isn't visible in silent mode.
-- ex test 411 fails because test file is wrong, contains stray ':'.
-- ex test 475 and 476 fail because reprint output isn't visible in silent mode.
-- ex test 480 and 481 fail because the tags file has spaces instead of a tab.
-- ex test 502 fails because .exrc isn't read in silent mode.
-- ex test 509 fails because .exrc isn't read in silent mode. and exit code is
- 1 instead of 2.
-- ex test 534 fails because .exrc isn't read in silent mode.
-
vim:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index 19f56c4e18..5d4e6861f5 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -28,13 +28,14 @@ these differences.
==============================================================================
2. Option defaults *nvim-option-defaults*
-- 'autoindent' is set by default.
+- 'autoindent' is set by default
- 'autoread' is set by default
- 'backspace' defaults to "indent,eol,start"
- 'complete' doesn't include "i"
- 'display' defaults to "lastline"
- 'encoding' defaults to "utf-8"
- 'formatoptions' defaults to "tcqj"
+- 'history' defaults to 10000 (the maximum)
- 'hlsearch' is set by default
- 'incsearch' is set by default
- 'langnoremap' is set by default
@@ -63,11 +64,21 @@ are always available and may be used simultaneously in separate plugins. The
`neovim` pip package must be installed to use Python plugins in Nvim (see
|nvim-python|).
+|mkdir()| behaviour changed:
+1. Assuming /tmp/foo does not exist and /tmp can be written to
+ mkdir('/tmp/foo/bar', 'p', 0700) will create both /tmp/foo and /tmp/foo/bar
+ with 0700 permissions. Vim mkdir will create /tmp/foo with 0755.
+2. If you try to create an existing directory with `'p'` (e.g. mkdir('/',
+ 'p')) mkdir() will silently exit. In Vim this was an error.
+3. mkdir() error messages now include strerror() text when mkdir fails.
+
==============================================================================
4. New Features *nvim-features-new*
See |nvim-intro| for a list of Nvim's largest new features.
+|bracketed-paste-mode| is built-in and enabled by default.
+
Meta (alt) chords are recognized (even in the terminal).
<M-1>, <M-2>, ...
<M-BS>, <M-Del>, <M-Ins>, ...
@@ -131,7 +142,13 @@ MS-DOS support:
'bioskey'
'conskey'
+Highlight groups:
+ |hl-VisualNOS|
+
Other options:
+ 'cpoptions' ('g', 'w', 'H', '*', '-', 'j', and all POSIX flags were removed)
+ 'guioptions' (only the 't' flag was removed)
+ 'guipty'
'macatsui'
'shelltype'
'shortname'
@@ -143,9 +160,11 @@ Other options:
'weirdinvert'
Other commands:
+ :Print
:fixdel
- :mode no longer accepts an argument
+ :mode (no longer accepts an argument)
:shell
+ :tearoff
Other compile-time features:
EBCDIC
diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt
index ba69b7cf2f..39d3c43d97 100644
--- a/runtime/doc/windows.txt
+++ b/runtime/doc/windows.txt
@@ -1,4 +1,4 @@
-*windows.txt* For Vim version 7.4. Last change: 2014 Sep 23
+*windows.txt* For Vim version 7.4. Last change: 2014 Dec 05
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -280,7 +280,7 @@ CTRL-W CTRL-Q *CTRL-W_CTRL-Q*
" if there are less than 9 windows opened
:-quit " quit the previous window
:+quit " quit the next window
- :+2quit " will also work as expected
+ :+2quit " quit the second next window
<
:q[uit]!
:{count}q[uit]!
@@ -324,9 +324,9 @@ CTRL-W CTRL-C *CTRL-W_CTRL-C*
screen. For {count} see |:quit|.
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|
+ editing it or 'bufhidden' is `unload`, `delete` or `wipe`).
+ 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
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 025a947a1f..66e747a06f 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2014 Nov 05
+" Last Change: 2014 Dec 06
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -1852,7 +1852,7 @@ au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog')
" Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc.
" Gentoo ebuilds and Arch Linux PKGBUILDs are actually bash scripts
-au BufNewFile,BufRead .bashrc*,bashrc,bash.bashrc,.bash_profile*,.bash_logout*,*.bash,*.ebuild,PKGBUILD* call SetFileTypeSH("bash")
+au BufNewFile,BufRead .bashrc*,bashrc,bash.bashrc,.bash_profile*,.bash_logout*,.bash_aliases*,*.bash,*.ebuild,PKGBUILD* call SetFileTypeSH("bash")
au BufNewFile,BufRead .kshrc*,*.ksh call SetFileTypeSH("ksh")
au BufNewFile,BufRead */etc/profile,.profile*,*.sh,*.env call SetFileTypeSH(getline(1))
@@ -2509,6 +2509,8 @@ au BufNewFile,BufRead */etc/yum.conf setf dosini
" Zimbu
au BufNewFile,BufRead *.zu setf zimbu
+" Zimbu Templates
+au BufNewFile,BufRead *.zut setf zimbutempl
" Zope
" dtml (zope dynamic template markup language), pt (zope page template),
diff --git a/runtime/gvimrc_example.vim b/runtime/gvimrc_example.vim
deleted file mode 100644
index ab9803413b..0000000000
--- a/runtime/gvimrc_example.vim
+++ /dev/null
@@ -1,57 +0,0 @@
-" An example for a gvimrc file.
-" The commands in this are executed when the GUI is started.
-"
-" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last change: 2001 Sep 02
-"
-" To use it, copy it to
-" for Unix: ~/.gvimrc
-" for MS-DOS and Win32: $VIM\_gvimrc
-
-" Make external commands work through a pipe instead of a pseudo-tty
-"set noguipty
-
-" set the X11 font to use
-" set guifont=-misc-fixed-medium-r-normal--14-130-75-75-c-70-iso8859-1
-
-set ch=2 " Make command line two lines high
-
-set mousehide " Hide the mouse when typing text
-
-" Make shift-insert work like in Xterm
-map <S-Insert> <MiddleMouse>
-map! <S-Insert> <MiddleMouse>
-
-" Only do this for Vim version 5.0 and later.
-if version >= 500
-
- " I like highlighting strings inside C comments
- let c_comment_strings=1
-
- " Switch on syntax highlighting if it wasn't on yet.
- if !exists("syntax_on")
- syntax on
- endif
-
- " Switch on search pattern highlighting.
- set hlsearch
-
- " For Win32 version, have "K" lookup the keyword in a help file
- "if has("win32")
- " let winhelpfile='windows.hlp'
- " map K :execute "!start winhlp32 -k <cword> " . winhelpfile <CR>
- "endif
-
- " Set nice colors
- " background for normal text is light grey
- " Text below the last line is darker grey
- " Cursor is green, Cyan when ":lmap" mappings are active
- " Constants are not underlined but have a slightly lighter background
- highlight Normal guibg=grey90
- highlight Cursor guibg=Green guifg=NONE
- highlight lCursor guibg=Cyan guifg=NONE
- highlight NonText guibg=grey80
- highlight Constant gui=NONE guibg=grey95
- highlight Special gui=NONE guibg=grey95
-
-endif
diff --git a/runtime/indent/php.vim b/runtime/indent/php.vim
index b83a1923ed..1bffa7f195 100644
--- a/runtime/indent/php.vim
+++ b/runtime/indent/php.vim
@@ -3,8 +3,8 @@
" Author: John Wellesz <John.wellesz (AT) teaser (DOT) fr>
" URL: http://www.2072productions.com/vim/indent/php.vim
" Home: https://github.com/2072/PHP-Indenting-for-VIm
-" Last Change: 2014 April 3rd
-" Version: 1.49
+" Last Change: 2014 November 26th
+" Version: 1.57
"
"
" Type :help php-indent for available options
@@ -48,7 +48,7 @@ endif
let b:did_indent = 1
-let php_sync_method = 0
+let g:php_sync_method = 0
@@ -112,7 +112,7 @@ setlocal nocindent
setlocal nolisp
setlocal indentexpr=GetPhpIndent()
-setlocal indentkeys=0{,0},0),:,!^F,o,O,e,*<Return>,=?>,=<?,=*/
+setlocal indentkeys=0{,0},0),0],:,!^F,o,O,e,*<Return>,=?>,=<?,=*/
@@ -128,11 +128,14 @@ if exists("*GetPhpIndent")
endif
+let s:PHP_validVariable = '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'
let s:notPhpHereDoc = '\%(break\|return\|continue\|exit\|die\|else\)'
let s:blockstart = '\%(\%(\%(}\s*\)\=else\%(\s\+\)\=\)\=if\>\|\%(}\s*\)\?else\>\|do\>\|while\>\|switch\>\|case\>\|default\>\|for\%(each\)\=\>\|declare\>\|class\>\|trait\>\|use\>\|interface\>\|abstract\>\|final\>\|try\>\|\%(}\s*\)\=catch\>\|\%(}\s*\)\=finally\>\)'
-let s:functionDecl = '\<function\>\%(\s\+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\)\=\s*(.*'
+let s:functionDecl = '\<function\>\%(\s\+'.s:PHP_validVariable.'\)\=\s*(.*'
let s:endline= '\s*\%(//.*\|#.*\|/\*.*\*/\s*\)\=$'
-let s:terminated = '\%(\%(;\%(\s*\%(?>\|}\)\)\=\|<<<''\=\a\w*''\=$\|^\s*}\)'.s:endline.'\)\|^[^''"`]*[''"`]$'
+
+
+let s:terminated = '\%(\%(;\%(\s*\%(?>\|}\)\)\=\|<<<''\=\a\w*''\=$\|^\s*}\|^\s*'.s:PHP_validVariable.':\)'.s:endline.'\)\|^[^''"`]*[''"`]$'
let s:PHP_startindenttag = '<?\%(.*?>\)\@!\|<script[^>]*>\%(.*<\/script>\)\@!'
@@ -140,7 +143,7 @@ let s:PHP_startindenttag = '<?\%(.*?>\)\@!\|<script[^>]*>\%(.*<\/script>\)\@!'
let s:escapeDebugStops = 0
function! DebugPrintReturn(scriptLine)
- if ! s:escapeDebugStops
+ if ! s:escapeDebugStops
echo "debug:" . a:scriptLine
let c = getchar()
if c == "\<Del>"
@@ -158,8 +161,6 @@ function! GetLastRealCodeLNum(startline) " {{{
let lnum = b:GetLastRealCodeLNum_ADD
endif
- let old_lnum = lnum
-
while lnum > 1
let lnum = prevnonblank(lnum)
let lastline = getline(lnum)
@@ -217,7 +218,7 @@ function! GetLastRealCodeLNum(startline) " {{{
let lnum=0
endif
- if b:InPHPcode_and_script && !b:InPHPcode
+ if b:InPHPcode_and_script && 1 > b:InPHPcode
let b:InPHPcode_and_script = 0
endif
@@ -237,7 +238,7 @@ endfun
function! Skippmatch() " {{{
let synname = synIDattr(synID(line("."), col("."), 0), "name")
- if synname == "Delimiter" || synname == "phpRegionDelimiter" || synname =~# "^phpParent" || synname == "phpArrayParens" || synname =~# '^php\%(Block\|Brace\)' || synname == "javaScriptBraces" || synname =~# "^phpComment" && b:UserIsTypingComment
+ if synname == "Delimiter" || synname == "phpRegionDelimiter" || synname =~# "^phpParent" || synname == "phpArrayParens" || synname =~# '^php\%(Block\|Brace\)' || synname == "javaScriptBraces" || synname =~# '^php\%(Doc\)\?Comment' && b:UserIsTypingComment
return 0
else
return 1
@@ -249,7 +250,7 @@ function! FindOpenBracket(lnum, blockStarter) " {{{
let line = searchpair('{', '', '}', 'bW', 'Skippmatch()')
if a:blockStarter == 1
- while line > 1
+ while line > 1
let linec = getline(line)
if linec =~ s:terminated || linec =~ '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . s:endline
@@ -310,7 +311,6 @@ let s:defaultORcase = '^\s*\%(default\|case\).*:'
function! FindTheSwitchIndent (lnum) " {{{
-
let test = GetLastRealCodeLNum(a:lnum - 1)
if test <= 1
@@ -353,7 +353,7 @@ function! IslinePHP (lnum, tofind) " {{{
if synname == 'phpStringSingle' || synname == 'phpStringDouble' || synname == 'phpBacktick'
if cline !~ '^\s*[''"`]'
- return ""
+ return "SpecStringEntrails"
else
return synname
end
@@ -372,7 +372,7 @@ if ! s:autoresetoptions
endif
function! ResetPhpOptions()
- if ! b:optionsset && &filetype == "php"
+ if ! b:optionsset && &filetype =~ "php"
if b:PHP_autoformatcomment
setlocal comments=s1:/*,mb:*,ex:*/,://,:#
@@ -418,7 +418,7 @@ function! GetPhpIndent()
let b:PHP_indentinghuge = 0
let b:PHP_CurrentIndentLevel = b:PHP_default_indenting
endif
- let b:PHP_lastindented = v:lnum
+ let real_PHP_lastindented = v:lnum
let b:PHP_LastIndentedWasComment=0
let b:PHP_InsideMultilineComment=0
let b:PHP_indentbeforelast = 0
@@ -430,9 +430,12 @@ function! GetPhpIndent()
elseif v:lnum > b:PHP_lastindented
let real_PHP_lastindented = b:PHP_lastindented
- let b:PHP_lastindented = v:lnum
+ else
+ let real_PHP_lastindented = v:lnum
endif
+ let b:PHP_lastindented = v:lnum
+
if !b:InPHPcode_checked " {{{ One time check
let b:InPHPcode_checked = 1
@@ -443,11 +446,15 @@ function! GetPhpIndent()
endif
if synname!=""
- if synname != "phpHereDoc" && synname != "phpHereDocDelimiter"
+ if synname == "SpecStringEntrails"
+ let b:InPHPcode = -1 " thumb down
+ let b:UserIsTypingComment = 0
+ let b:InPHPcode_tofind = ""
+ elseif synname != "phpHereDoc" && synname != "phpHereDocDelimiter"
let b:InPHPcode = 1
let b:InPHPcode_tofind = ""
- if synname =~# "^phpComment"
+ if synname =~# '^php\%(Doc\)\?Comment'
let b:UserIsTypingComment = 1
else
let b:UserIsTypingComment = 0
@@ -483,9 +490,16 @@ function! GetPhpIndent()
if b:InPHPcode_tofind!=""
if cline =~? b:InPHPcode_tofind
- let b:InPHPcode = 1
let b:InPHPcode_tofind = ""
let b:UserIsTypingComment = 0
+
+ if b:InPHPcode == -1
+ let b:InPHPcode = 1
+ return -1
+ end
+
+ let b:InPHPcode = 1
+
if cline =~ '\*/'
call cursor(v:lnum, 1)
if cline !~ '^\*/'
@@ -510,7 +524,7 @@ function! GetPhpIndent()
endif
endif
- if b:InPHPcode
+ if 1 == b:InPHPcode
if !b:InPHPcode_and_script && last_line =~ '\%(<?.*\)\@<!?>\%(.*<?\)\@!' && IslinePHP(lnum, '?>')=~"Delimiter"
if cline !~? s:PHP_startindenttag
@@ -520,8 +534,8 @@ function! GetPhpIndent()
let b:InPHPcode_and_script = 1
endif
- elseif last_line =~ '^[^''"`]\+[''"`]$' " a string identifier with nothing after it and no other string identifier before
- let b:InPHPcode = 0
+ elseif last_line =~ '^[^''"`]\+[''"`]$'
+ let b:InPHPcode = -1
let b:InPHPcode_tofind = substitute( last_line, '^.*\([''"`]\).*$', '^[^\1]*\1[;,]$', '')
elseif last_line =~? '<<<''\=\a\w*''\=$'
let b:InPHPcode = 0
@@ -538,7 +552,7 @@ function! GetPhpIndent()
endif " }}}
- if !b:InPHPcode && !b:InPHPcode_and_script
+ if 1 > b:InPHPcode && !b:InPHPcode_and_script
return -1
endif
@@ -568,7 +582,7 @@ function! GetPhpIndent()
endif
endif
- if !b:PHP_InsideMultilineComment && cline =~ '^\s*/\*' && cline !~ '\*/\s*$'
+ if !b:PHP_InsideMultilineComment && cline =~ '^\s*/\*\%(.*\*/\)\@!'
if getline(v:lnum + 1) !~ '^\s*\*'
return -1
endif
@@ -669,17 +683,17 @@ function! GetPhpIndent()
endwhile
elseif last_line =~# unstated && cline !~ '^\s*);\='.endline
- let ind = ind + &sw " we indent one level further when the preceding line is not stated
+ let ind = ind + &sw
return ind + addSpecial
- elseif (ind != b:PHP_default_indenting || last_line =~ '^[)\]]' ) && last_line =~ terminated " Added || last_line =~ '^)' on 2007-12-30 (array indenting problem broke other things)
+ elseif (ind != b:PHP_default_indenting || last_line =~ '^[)\]]' ) && last_line =~ terminated
let previous_line = last_line
let last_line_num = lnum
let LastLineClosed = 1
let isSingleLineBlock = 0
while 1
- if ! isSingleLineBlock && previous_line =~ '^\s*}\|;\s*}'.endline " XXX
+ if ! isSingleLineBlock && previous_line =~ '^\s*}\|;\s*}'.endline
call cursor(last_line_num, 1)
if previous_line !~ '^}'
@@ -740,14 +754,19 @@ function! GetPhpIndent()
endif
endif
- let plinnum = GetLastRealCodeLNum(lnum - 1)
+ if (last_line !~ '^\s*}\%(}}\)\@!')
+ let plinnum = GetLastRealCodeLNum(lnum - 1)
+ else
+ let plinnum = GetLastRealCodeLNum(FindOpenBracket(lnum, 1) - 1)
+ endif
+
let AntepenultimateLine = getline(plinnum)
let last_line = substitute(last_line,"\\(//\\|#\\)\\(\\(\\([^\"']*\\([\"']\\)[^\"']*\\5\\)\\+[^\"']*$\\)\\|\\([^\"']*$\\)\\)",'','')
if ind == b:PHP_default_indenting
- if last_line =~ terminated
+ if last_line =~ terminated && last_line !~# s:defaultORcase
let LastLineClosed = 1
endif
endif
@@ -755,10 +774,10 @@ function! GetPhpIndent()
if !LastLineClosed
- if last_line =~# '[{(\[]'.endline || last_line =~? '\h\w*\s*(.*,$' && AntepenultimateLine !~ '[,(]'.endline
+ if last_line =~# '[{(\[]'.endline || last_line =~? '\h\w*\s*(.*,$' && AntepenultimateLine !~ '[,(\[]'.endline
let dontIndent = 0
- if last_line =~ '\S\+\s*{'.endline && last_line !~ '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . s:endline
+ if last_line =~ '\S\+\s*{'.endline && last_line !~ '^\s*)\s*{'.endline && last_line !~ '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . s:endline
let dontIndent = 1
endif
@@ -774,7 +793,7 @@ function! GetPhpIndent()
elseif last_line =~ '\S\+\s*),'.endline
call cursor(lnum, 1)
- call search('),'.endline, 'W') " line never begins with ) so no need for 'c' flag
+ call search('),'.endline, 'W')
let openedparent = searchpair('(', '', ')', 'bW', 'Skippmatch()')
if openedparent != lnum
let ind = indent(openedparent)
@@ -784,7 +803,7 @@ function! GetPhpIndent()
let ind = ind + &sw
- elseif AntepenultimateLine =~ '\%(;\%(\s*\%(?>\|}\)\)\=\|<<<''\=\a\w*''\=$\|^\s*}\|{\)'.endline . '\|' . s:defaultORcase
+ elseif AntepenultimateLine =~ '{'.endline || AntepenultimateLine =~ terminated || AntepenultimateLine =~# s:defaultORcase
let ind = ind + &sw
endif
diff --git a/runtime/macros/editexisting.vim b/runtime/macros/editexisting.vim
index c18f22569f..3530e29dc4 100644
--- a/runtime/macros/editexisting.vim
+++ b/runtime/macros/editexisting.vim
@@ -1,6 +1,6 @@
" Vim Plugin: Edit the file with an existing Vim if possible
" Maintainer: Bram Moolenaar
-" Last Change: 2013 Feb 24
+" Last Change: 2014 Dec 06
" This is a plugin, drop it in your (Unix) ~/.vim/plugin or (Win32)
" $VIM/vimfiles/plugin directory. Or make a symbolic link, so that you
@@ -112,7 +112,7 @@ func! EditExisting(fname, command)
endif
if a:command != ''
- exe "normal " . a:command
+ exe "normal! " . a:command
endif
redraw
diff --git a/runtime/optwin.vim b/runtime/optwin.vim
index e172bbba10..636fa4b328 100644
--- a/runtime/optwin.vim
+++ b/runtime/optwin.vim
@@ -592,8 +592,6 @@ if has("gui")
call append("$", "guiheadroom\troom (in pixels) left above/below the window")
call append("$", " \tset ghr=" . &ghr)
endif
- call append("$", "guipty\tuse a pseudo-tty for I/O to external commands")
- call <SID>BinOptionG("guipty", &guipty)
if has("browse")
call append("$", "browsedir\t\"last\", \"buffer\" or \"current\": which directory used for the file browser")
call <SID>OptionG("bsdir", &bsdir)
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index b200d43f73..e23232bbbe 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: Vim 7.4 script
" Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
-" Last Change: Mar 20, 2014
-" Version: 7.4-27
+" Last Change: Apr 02, 2015
+" Version: 7.4-33
" Automatically generated keyword lists: {{{1
" Quit when a syntax file was already loaded {{{2
@@ -14,67 +14,48 @@ set cpo&vim
" vimTodo: contains common special-notices for comments {{{2
" Use the vimCommentGroup cluster to add your own.
+syn keyword vimTodo contained COMBAK FIXME TODO XXX
syn cluster vimCommentGroup contains=vimTodo,@Spell
-" regular vim commands {{{2
-syn keyword vimCommand contained a arga[dd] ar[gs] bd[elete] bN[ext] breakd[el] bufdo cabc[lear] cat[ch] cex[pr] c[hange] cla[st] cnew[er] cNf[ile] con cp[revious] cuna[bbrev] del deletep delm[arks] diffp[atch] dig[raphs] do e echon endf endw[hile] f[ile] fin[d] folddoc[losed] fu[nction] gvim helpt[ags] iabc[lear] intro k l lan lc[d] lefta[bove] lg[etfile] lla[st] lnew[er] lNf[ile] lockv[ar] ls lvimgrepa[dd] mat[ch] mk[exrc] mo n n[ext] o ownsyntax pre[serve] promptf[ind] ptl[ast] ptr[ewind] py3do qa[ll] r[ead] redr[aw] retu[rn] rub[y] rv[iminfo] sba[ll] sbN[ext] scripte[ncoding] setf[iletype] sh[ell] sim[alt] sm[ap] sni[ff] sor[t] spelli[nfo] spr[evious] start st[op] sunmenu syn ta tabf[ind] tabnew tabr[ewind] tj[ump] tN tr tu[nmenu] undoj[oin] uns[ilent] ve[rsion] vimgrepa[dd] vs[plit] winc[md] wN[ext] ws[verb] x[it] xnoremenu
-syn keyword vimCommand contained ab argd[elete] argu[ment] bel[owright] bo[tright] breakl[ist] b[uffer] cad cb[uffer] cf[ile] changes cl[ist] cn[ext] col[der] conf[irm] cq[uit] cw[indow] delc[ommand] deletl delp diffpu[t] dir doau ea e[dit] endfo[r] ene[w] files fini[sh] foldd[oopen] g h hi if is[earch] keepa la lan[guage] lch[dir] lex[pr] lgr[ep] lli[st] lne[xt] lo lol[der] lt[ag] lw[indow] menut mks[ession] mod[e] nbc[lose] nmapc[lear] ol[dfiles] p po[p] prev[ious] promptr[epl] ptn pts[elect] pydo q[uit] rec[over] redraws[tatus] rew[ind] sal[l] sbf[irst] sbp[revious] scrip[tnames] setg[lobal] si sl sme sno[magic] so[urce] spellr[epall] sre[wind] startg[replace] stopi[nsert] sus[pend] sync tab tabfir[st] tabn[ext] tabs tl[ast] tn[ext] tr[ewind] u undol[ist] up[date] vert[ical] vi[sual] w windo wp[revious] wundo xmapc[lear] xunme
-syn keyword vimCommand contained abc[lear] argdo as[cii] bf[irst] bp[revious] br[ewind] buffers caddb[uffer] cc cfir[st] chd[ir] clo[se] cN[ext] colo[rscheme] con[tinue] cr[ewind] d delel deletp dep diffs[plit] di[splay] dp earlier el[se] endfun ex filet fir[st] foldo[pen] go[to] ha[rdcopy] hid[e] ij[ump] isp[lit] keepalt lad la[st] lcl[ose] lf[ile] lgrepa[dd] lmak[e] lN[ext] loadk lop[en] ma menut[ranslate] mksp[ell] m[ove] nb[key] noa omapc[lear] pc[lose] popu p[rint] ps[earch] ptN pu[t] pyf[ile] quita[ll] red reg[isters] ri[ght] san[dbox] sbl[ast] sbr[ewind] scs setl[ocal] sig sla[st] smenu snoreme spe spellu[ndo] st star[tinsert] sts[elect] sv[iew] syncbind tabc[lose] tabl[ast] tabN[ext] ta[g] te[aroff] tm tN[ext] try un unh[ide] v vi viu[sage] wa[ll] winp[os] wq wv[iminfo] xme xunmenu
-syn keyword vimCommand contained abo[veleft] arge[dit] au bl[ast] br bro[wse] bun[load] cad[dexpr] ccl[ose] cgetb[uffer] che[ckpath] cmapc[lear] cnf com cope[n] cs de delep delf di difft[his] dj[ump] dr[op] ec elsei[f] endf[unction] exi[t] filetype fix[del] for gr[ep] h[elp] his[tory] il[ist] iuna[bbrev] keepj[umps] laddb[uffer] lat lcs lfir[st] lh[elpgrep] lmapc[lear] lnf loadkeymap lpf[ile] mak[e] mes mkv nbs[tart] noautocmd on[ly] pe popu[p] pro pta[g] ptn[ext] pw[d] py[thon] r redi[r] res[ize] rightb[elow] rundo sa[rgument] sbm[odified] sb[uffer] scscope sf[ind] sign sl[eep] sn[ext] snoremenu spelld[ump] spellw[rong] sta[g] startr[eplace] sun[hide] sw[apname] syntime tabd[o] tabm[ove] tabo[nly] tags tf[irst] tm[enu] to[pleft] ts[elect] una[bbreviate] unl ve vie[w] vmapc[lear] wh[ile] win[size] wqa[ll] x xmenu xwininfo
-syn keyword vimCommand contained al[l] argg[lobal] bad[d] bm[odified] brea[k] bu bw[ipeout] caddf[ile] cd cgete[xpr] checkt[ime] cn cNf comc[lear] co[py] cscope debug d[elete] delf[unction] diffg[et] diffu[pdate] dl ds[earch] echoe[rr] em[enu] en[dif] exu[sage] fin fo[ld] fu grepa[dd] helpf[ind] i imapc[lear] j[oin] kee[pmarks] lad[dexpr] later lcscope lgetb[uffer] l[ist] lN lNf lo[adview] lp[revious] ma[rk] messages mkvie[w] ne noh[lsearch] o[pen] ped[it] pp[op] profd[el] ptf[irst] ptN[ext] py python3 re red[o] ret[ab] ru ru[ntime] sav[eas] sbn[ext] scrip se[t] sfir[st] sil[ent] sm[agic] sN[ext] so spe[llgood] sp[lit] star stj[ump] sunme sy t tabe[dit] tabN tabp[revious] tc[l] th[row] tn tp[revious] tu u[ndo] unlo[ckvar] verb[ose] vim[grep] vne[w] win wn[ext] w[rite] xa[ll] xnoreme y[ank]
-syn keyword vimCommand contained ar argl[ocal] ba[ll] bn[ext] breaka[dd] buf c cal[l] ce[nter] cg[etfile] cl cN cnf[ile] comp[iler] cpf[ile] cstag debugg[reedy] deletel dell diffo[ff] dig dli[st] dsp[lit] echom[sg] en endt[ry] f fina[lly] foldc[lose] fun gui helpg[rep] ia in ju[mps] keepp[atterns] laddf[ile] lb[uffer] le[ft] lgete[xpr] ll lne lnf[ile] loc[kmarks] lr[ewind] lv[imgrep] marks mk mkv[imrc] new nu[mber] opt[ions] pe[rl] pr prof[ile] ptj[ump] ptp[revious] py3 q
+" Special and plugin vim commands {{{2
syn match vimCommand contained "\<z[-+^.=]\="
-syn keyword vimStdPlugin contained DiffOrig Man N[ext] P[rint] S TOhtml XMLent XMLns
-
-" vimOptions are caught only when contained in a vimSet {{{2
-syn keyword vimOption contained acd ambiwidth arabicshape autowriteall backupdir bdlay binary breakat bufhidden cd ci cinw co commentstring confirm cpoptions cscoperelative csre cursorcolumn delcombine diffopt ea efm ep et fdc fdo ffs filetype fo foldlevelstart formatexpr ft gfw gtt guipty hh hkmap ic imaf iminsert includeexpr inf isident langmap lines lmap ma matchtime mco ml modeline mousefocus mousetime nrformats ofu para pdev pi previewwindow printmbfont qe relativenumber rightleftcmd ru sbr scrolloff selection shellcmdflag shellxescape showbreak si smartcase softtabstop spelllang sps sta su swb synmaxcol tagbsearch thesaurus titlestring tpm ttm ttytype undodir ut vfile vop wcm whichwrap wildignore winaltkeys winminwidth wmnu write
-syn keyword vimOption contained ai ambw ari aw backupext beval brk buflisted cdpath cin cinwords cocu compatible cpt cscopetag cst cursorline dex digraph ead ei equalalways eventignore fde fdt fic fillchars foldclose foldmarker formatlistpat gcr ghr guicursor guitablabel hi hkmapp icon imak ims incsearch infercase isk keymap langmenu linespace loadplugins maxcombine mef mls modelines mousehide mp nu omnifunc paragraphs penc pm printdevice printoptions quoteescape remap rl ruf sc scrollopt selectmode shellpipe shellxquote showcmd sidescroll smartindent sol spellsuggest sr stal sua swf syntax taglength tbidi terse tildeop tl tr tty tw undofile vb vi wa wd wi wildignorecase window winwidth wmw writeany
-syn keyword vimOption contained akm anti arshape awa backupskip bex browsedir buftype cedit cindent clipboard cole complete crb cscopetagorder csto cwh dg dip eadirection ek equalprg ex fdi fen fileencoding fk foldcolumn foldmethod formatoptions gd go guifont guitabtooltip hid hkp iconstring imc imsearch inde insertmode iskeyword keymodel laststatus lisp lpl magic maxfuncdepth menuitems mm modifiable mousem mps number opendevice paste pex pmbcs printencoding prompt rdt report rlc ruler scb scs sessionoptions shellquote shiftround showfulltag sidescrolloff smarttab sp spf srr startofline suffixes switchbuf ta tagrelative tbis textauto timeout tm ts tx undolevels vbs viewdir wak wic wildmenu winfixheight wop writebackup
-syn keyword vimOption contained al antialias autochdir background balloondelay bexpr bk bs casemap cf cink cmdheight colorcolumn completefunc copyindent cscopeverbose csverb debug dict dir eb enc errorbells expandtab fdl fenc fileencodings fkmap foldenable foldminlines formatprg gdefault gp guifontset helpfile hidden hl ignorecase imcmdline imsf indentexpr is isp keywordprg lazyredraw lispwords ls makeef maxmapdepth mfd mmd modified mousemodel msm numberwidth operatorfunc pastetoggle pexpr pmbfn printexpr pt re restorescreen rnu rulerformat scr sect sft shellredir shiftwidth showmatch siso smc spc spl ss statusline suffixesadd sws tabline tags tbs textmode timeoutlen to uc undoreload vdir viewoptions warn wfh wig wildmode winfixwidth wiw wrap writedelay
-syn keyword vimOption contained aleph ar autoindent backspace ballooneval bg bkc bsdir cb cfu cinkeys cmdwinheight columns completeopt cot cscopepathcomp cspc cuc deco dictionary directory ed encoding errorfile exrc fdls fencs fileformat flp foldexpr foldnestmax fp gfm grepformat guifontwide helpheight highlight hlg im imd imstatusfunc indentkeys isf isprint km lbr list lsp makeprg maxmem mh mmp more mouses nuw opfunc patchexpr pfn popt printfont pumheight readonly revins ro runtimepath scroll sections sh shellslash shm showmode sj smd spell splitbelow ssl stl sw sxe tabpagemax tagstack textwidth title toolbar tsr udf updatecount ve viminfo wb wfw wildchar wildoptions winheight wm wrapmargin ws
-syn keyword vimOption contained allowrevins arab autoread backup balloonexpr bh bl bsk cc ch cino cmp com concealcursor cp cscopeprg csprg cul def diff display endofline errorformat fcl fdm fex fileformats fml foldignore foldopen fs gfn grepprg guiheadroom helplang history hls imactivatefunc imdisable inc indk isfname joinspaces kmp lcs listchars lw mat maxmempattern mis mmt mouse mouseshape odev patchmode ph preserveindent printheader pvh redrawtime ri rs sb scrollbind secure shcf shelltemp shortmess showtabline slm spellcapcheck splitright ssop stmp swapfile sxq tabstop tal term titlelen toolbariconsize ttimeout udir updatetime verbose virtualedit wc wh wildcharm wim winminheight wmh wrapscan ww
-syn keyword vimOption contained altkeymap arabic autowrite backupcopy bdir bin bomb bt ccv charconvert cinoptions cms comments conceallevel cpo cscopequickfix csqf cursorbind define diffexpr dy ef eol esckeys fcs fdn ff fileignorecase fmr foldlevel foldtext fsync gfs gtl guioptions hf hk hlsearch imactivatekey imi include inex isi js kp linebreak lm lz matchpairs maxmemtot mkspellmem mod mousef mouset nf pa path pheader previewheight printmbcharset pvw regexpengine rightleft rtp sbo scrolljump sel shell shq sm so spellfile spr st sts swapsync syn tag tb termbidi tgst titleold top ttimeoutlen ul ur unnamedclip unc verbosefile visualbell
-
-" vimOptions: These are the turn-off setting variants {{{2
-syn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoread noaw noballooneval nobinary nobk nobuflisted nocin noconfirm nocopyindent nocscoperelative nocsre nocuc nocursorcolumn nodelcombine nodigraph noendofline noerrorbells noex nofen nofk nogd nohid nohkmap nohkp nohlsearch noicon noim noimcmdline noimdisable noinf noinsertmode nojoinspaces nolazyredraw nolinebreak nolist nolpl noma nomagic noml nomodeline nomodified nomousef nomousehide nonumber noopendevice nopi nopreviewwindow nopvw norelativenumber norestorescreen nori norl noro noru nosb noscb noscs nosft noshelltemp noshowfulltag noshowmode nosm nosmartindent nosmd nosol nosplitbelow nospr nossl nostartofline noswapfile nota notagrelative notbs noterse notextmode notgst notimeout noto notr notx noundofile novisualbell nowarn nowfw nowildignorecase nowinfixheight nowrap nowrite nowritebackup
-syn keyword vimOption contained noai noaltkeymap noar noarabicshape noautochdir noautowrite noawa nobeval nobl nocf nocindent nocp nocscopetag nocst nocul nocursorline nodg noea noeol noesckeys noexpandtab nofic nofkmap nogdefault nohidden nohkmapp nohls noic noignorecase noimc noimd noincsearch noinfercase nois nojs nolbr nolisp noloadplugins nolz nomh nomod nomodifiable nomore nomousefocus nonu noodev nopaste nopreserveindent noprompt noreadonly noremap norevins norightleft nornu nors noruler nosc noscrollbind nosecure noshellslash noshiftround noshowcmd noshowmatch nosi nosmartcase nosmarttab nospell nosplitright nosr nosta nostmp noswf notagbsearch notagstack notbidi notermbidi notextauto notildeop notitle notop nottimeout noudf novb nowa nowb nowfh nowic nowildmenu nowinfixwidth nowmnu nowrapscan nowriteany nows
-syn keyword vimOption contained noakm noanti noarab noari noautoindent noautowriteall nobackup nobin nobomb noci nocompatible nocrb nocscopeverbose nocsverb nocursorbind nodeco nodiff noeb noek noequalalways noet noexrc nofileignorecase nofoldenable noguipty nohk
-
-" vimOptions: These are the invertible variants {{{2
-syn keyword vimOption contained invacd invallowrevins invantialias invarabic invarshape invautoread invaw invballooneval invbinary invbk invbuflisted invcin invconfirm invcopyindent invcscoperelative invcsre invcuc invcursorcolumn invdelcombine invdigraph invendofline inverrorbells invex invfen invfk invgd invhid invhkmap invhkp invhlsearch invicon invim invimcmdline invimdisable invinf invinsertmode invjoinspaces invlazyredraw invlinebreak invlist invlpl invma invmagic invml invmodeline invmodified invmousef invmousehide invnumber invopendevice invpi invpreviewwindow invpvw invrelativenumber invrestorescreen invri invrl invro invru invsb invscb invscs invsft invshelltemp invshowfulltag invshowmode invsm invsmartindent invsmd invsol invsplitbelow invspr invssl invstartofline invswapfile invta invtagrelative invtbs invterse invtextmode invtgst invtimeout invto invtr invtx invundofile invvisualbell invwarn invwfw invwildignorecase invwinfixheight invwrap invwrite invwritebackup
-syn keyword vimOption contained invai invaltkeymap invar invarabicshape invautochdir invautowrite invawa invbeval invbl invcf invcindent invcp invcscopetag invcst invcul invcursorline invdg invea inveol invesckeys invexpandtab invfic invfkmap invgdefault invhidden invhkmapp invhls invic invignorecase invimc invimd invincsearch invinfercase invis invjs invlbr invlisp invloadplugins invlz invmh invmod invmodifiable invmore invmousefocus invnu invodev invpaste invpreserveindent invprompt invreadonly invremap invrevins invrightleft invrnu invrs invruler invsc invscrollbind invsecure invshellslash invshiftround invshowcmd invshowmatch invsi invsmartcase invsmarttab invspell invsplitright invsr invsta invstmp invswf invtagbsearch invtagstack invtbidi invtermbidi invtextauto invtildeop invtitle invtop invttimeout invudf invvb invwa invwb invwfh invwic invwildmenu invwinfixwidth invwmnu invwrapscan invwriteany invws
-syn keyword vimOption contained invakm invanti invarab invari invautoindent invautowriteall invbackup invbin invbomb invci invcompatible invcrb invcscopeverbose invcsverb invcursorbind invdeco invdiff inveb invek invequalalways invet invexrc invfileignorecase invfoldenable invguipty invhk
+syn keyword vimOnlyCommand contained fix[del] sh[ell] P[rint]
+syn keyword vimStdPlugin contained DiffOrig Man N[ext] S TOhtml XMLent XMLns
+" Vim-specific options {{{2
+syn keyword vimOnlyOption contained biosk bioskey cp compatible consk conskey cm cryptmethod edcompatible guipty key macatsui mzq mzquantum osfiletype oft renderoptions rop st shelltype sn shortname tenc termencoding ta textauto tx textmode tf ttyfast ttym ttymouse tbi ttybuiltin wiv weirdinvert
+
+" Turn-off setting variants
+syn keyword vimOnlyOption contained nobiosk nobioskey noconsk noconskey nocp nocompatible noguipty nomacatsui nosn noshortname nota notextauto notx notextmode notf nottyfast notbi nottybuiltin nowiv noweirdinvert
+
+" Invertible setting variants
+syn keyword vimOnlyOption contained invbiosk invbioskey invconsk invconskey invcp invcompatible invguipty invmacatsui invsn invshortname invta invtextauto invtx invtextmode invtf invttyfast invtbi invttybuiltin invwiv invweirdinvert
" termcap codes (which can also be set) {{{2
-syn keyword vimOption contained t_AB t_al t_bc t_ce t_cl t_Co t_Cs t_CS t_CV t_da t_db t_dl t_DL t_EI t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 t_fs t_IE t_IS t_k1 t_K1 t_k2 t_k3 t_K3 t_k4 t_K4 t_k5 t_K5 t_k6 t_K6 t_k7 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_ke t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RI t_RV t_Sb t_se t_Sf t_SI t_so t_sr t_te t_ti t_ts t_u7 t_ue t_us t_ut t_vb t_ve t_vi t_vs t_WP t_WS t_xs t_ZH t_ZR
-syn keyword vimOption contained t_AF t_AL t_cd t_Ce t_cm t_cs
-syn match vimOption contained "t_%1"
-syn match vimOption contained "t_#2"
-syn match vimOption contained "t_#4"
-syn match vimOption contained "t_@7"
-syn match vimOption contained "t_*7"
-syn match vimOption contained "t_&8"
-syn match vimOption contained "t_%i"
-syn match vimOption contained "t_k;"
-
-" AutoCmd Events {{{2
+syn keyword vimTermOption contained t_AB t_al t_bc t_ce t_cl t_Co t_Cs t_CS t_CV t_da t_db t_dl t_DL t_EI t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 t_fs t_IE t_IS t_k1 t_K1 t_k2 t_k3 t_K3 t_k4 t_K4 t_k5 t_K5 t_k6 t_K6 t_k7 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_ke t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RI t_RV t_Sb t_se t_Sf t_SI t_so t_sr t_te t_ti t_ts t_u7 t_ue t_us t_ut t_vb t_ve t_vi t_vs t_WP t_WS t_xs t_ZH t_ZR
+syn keyword vimTermOption contained t_AF t_AL t_cd t_Ce t_cm t_cs
+syn match vimTermOption contained "t_%1"
+syn match vimTermOption contained "t_#2"
+syn match vimTermOption contained "t_#4"
+syn match vimTermOption contained "t_@7"
+syn match vimTermOption contained "t_*7"
+syn match vimTermOption contained "t_&8"
+syn match vimTermOption contained "t_%i"
+syn match vimTermOption 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
+"}}}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 CompleteDone CursorHold CursorHoldI CursorMoved CursorMovedI EncodingChanged FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave MenuPopup QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SessionLoadPost ShellCmdPost ShellFilterPost SourceCmd SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabEnter TabLeave TabNew TabNewEntered TabClosed TermChanged TermResponse TextChanged TextChangedI User UserGettingBored VimEnter VimLeave VimLeavePre VimResized 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 ColorColumn Cursor CursorColumn CursorIM CursorLine CursorLineNr DiffAdd DiffChange DiffDelete DiffText Directory EndOfBuffer 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 TermCursor TermCursorNC Title Tooltip VertSplit Visual VisualNOS WarningMsg WildMenu
+syn keyword vimHLGroup contained ColorColumn Cursor CursorColumn CursorIM CursorLine CursorLineNr 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 WarningMsg WildMenu
syn match vimHLGroup contained "Conceal"
+syn keyword vimOnlyHLGroup contained VisualNOS
+syn keyword nvimHLGroup contained EndOfBuffer TermCursor TermCursorNC
+"}}}2
syn case match
-
-" Function Names {{{2
-syn keyword vimFuncName contained abs and argidx atan browsedir bufloaded bufwinnr byteidxcomp changenr clearmatches complete_add copy count deepcopy diff_filler escape executable expand feedkeys filter float2nr fnameescape foldclosedend foldtextresult garbagecollect getbufvar getcmdline getcwd getfsize getline getpid getreg gettabwinvar getwinvar has hasmapto histget hlID indent inputdialog inputsave invert items len line localtime mapcheck matcharg matchlist min or prevnonblank py3eval readfile remote_expr remote_read rename reverse screenchar search searchpairpos serverlist setcmdpos setloclist setpos setreg settabwinvar sha256 shiftwidth sin sort spellbadword split str2float strchars strftime string strpart strtrans submatch synconcealed synIDattr synstack tabpagebuflist tabpagewinnr taglist tanh tolower tr type undotree virtcol wildmenumode wincol winline winrestcmd winsaveview writefile
-syn keyword vimFuncName contained acos append argv atan2 bufexists bufname byte2line call char2nr col complete_check cos cscope_connection delete diff_hlID eval exists expr8 filereadable finddir floor fnamemodify foldlevel foreground get getchar getcmdpos getfontname getftime getloclist getpos getregtype getwinposx glob has_key histadd histnr hostname index inputlist inputsecret isdirectory join libcall line2byte log map match matchdelete matchstr mkdir nextnonblank pathshorten printf pyeval reltime remote_foreground remote_send repeat round screencol searchdecl searchpos setbufvar setline setmatches setqflist settabvar setwinvar shellescape simplify sinh soundfold spellsuggest sqrt str2nr strdisplaywidth stridx strlen strridx strwidth substitute synID synIDtrans system tabpagenr tagfiles tan tempname toupper trunc undofile values visualmode winbufnr winheight winnr winrestview winwidth xor
-syn keyword vimFuncName contained add argc asin browse buflisted bufnr byteidx ceil cindent complete confirm cosh cursor did_filetype empty eventhandler exp extend filewritable findfile fmod foldclosed foldtext function getbufline getcharmod getcmdtype getfperm getftype getmatches getqflist gettabvar getwinposy globpath haslocaldir histdel hlexists iconv input inputrestore insert islocked keys libcallnr lispindent log10 maparg matchadd matchend max mode nr2char pow pumvisible range reltimestr remote_peek remove resolve screenattr screenrow searchpair server2client jobsend jobstart jobstop rpcnotify rpcrequest rpcstart rpcstop
-
-"--- syntax here and above generated by mkvimvim ---
" Special Vim Highlighting (not automatic) {{{1
" commands not picked up by the generator (due to non-standard format)
@@ -96,11 +77,11 @@ endif
syn match vimNumber "\<\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand
syn match vimNumber "-\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand
syn match vimNumber "\<0[xX]\x\+"
-syn match vimNumber "#\x\{6}"
+syn match vimNumber "\%(^\|[^a-zA-Z]\)\zs#\x\{6}"
" All vimCommands are contained by vimIsCommands. {{{2
-syn match vimCmdSep "[:|]\+" skipwhite nextgroup=vimAddress,vimAutoCmd,vimCommand,vimExtCmd,vimFilter,vimLet,vimMap,vimMark,vimSet,vimSyntax,vimUserCmd
-syn match vimIsCommand "\<\h\w*\>" contains=vimCommand
+syn match vimCmdSep "[:|]\+" skipwhite nextgroup=vimAddress,vimAutoCmd,vimCommand,vimIsCommand,vimExtCmd,vimFilter,vimLet,vimMap,vimMark,vimSet,vimSyntax,vimUserCmd,vimOnlyCommand
+syn match vimIsCommand "\<\h\w*\>" contains=vimCommand,vimOnlyCommand
syn match vimVar contained "\<\h[a-zA-Z0-9#_]*\>"
syn match vimVar "\<[bwglsav]:\h[a-zA-Z0-9#_]*\>"
syn match vimFBVar contained "\<[bwglsav]:\h[a-zA-Z0-9#_]*\>"
@@ -131,13 +112,13 @@ syn keyword vimFTOption contained detect indent off on plugin
" Augroup : vimAugroupError removed because long augroups caused sync'ing problems. {{{2
" ======= : Trade-off: Increasing synclines with slower editing vs augroup END error checking.
-syn cluster vimAugroupList contains=vimIsCommand,vimCommand,vimUserCmd,vimExecute,vimNotFunc,vimFuncName,vimFunction,vimFunctionError,vimLineComment,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vimString,vimSubst,vimMark,vimRegister,vimAddress,vimFilter,vimCmplxRepeat,vimComment,vimLet,vimSet,vimAutoCmd,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue
+syn cluster vimAugroupList contains=vimAugroup,vimIsCommand,vimCommand,vimUserCmd,vimExecute,vimNotFunc,vimFuncName,vimFunction,vimFunctionError,vimLineComment,vimMap,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vimString,vimSubst,vimMark,vimRegister,vimAddress,vimFilter,vimCmplxRepeat,vimComment,vimLet,vimSet,vimAutoCmd,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue
if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'a'
- syn region vimAugroup fold start="\<aug\%[roup]\>\s\+\h\w*" end="\<aug\%[roup]\>\s\+[eE][nN][dD]\>" contains=vimAugroupKey,vimAutoCmd,@vimAugroupList keepend
+ syn region vimAugroup fold matchgroup=vimAugroupKey start="\<aug\%[roup]\>\ze\s\+\K\k*" end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList
else
- syn region vimAugroup start="\<aug\%[roup]\>\s\+\h\w*" end="\<aug\%[roup]\>\s\+[eE][nN][dD]\>" contains=vimAugroupKey,vimAutoCmd,@vimAugroupList keepend
+ syn region vimAugroup matchgroup=vimAugroupKey start="\<aug\%[roup]\>\ze\s\+\K\k*" end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList
endif
-syn match vimAugroup "aug\%[roup]!" contains=vimAugroupKey
+syn match vimAugroup "aug\%[roup]!" contains=vimAugroupKey
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noaugrouperror")
syn match vimAugroupError "\<aug\%[roup]\>\s\+[eE][nN][dD]\>"
endif
@@ -145,7 +126,6 @@ syn keyword vimAugroupKey contained aug[roup]
" Operators: {{{2
" =========
-" COMBAK: vimOperParen used to have "oneline"
syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimRegister,vimContinue
syn match vimOper "\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile
syn match vimOper "||\|&&\|[-+.]" skipwhite nextgroup=vimString,vimSpecFile
@@ -158,15 +138,15 @@ endif
" Functions : Tag is provided for those who wish to highlight tagged functions {{{2
" =========
syn cluster vimFuncList contains=vimCommand,vimFunctionError,vimFuncKey,Tag,vimFuncSID
-syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vimComment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimExecute,vimIf,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimHighlight,vimIsCommand,vimLet,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand
+syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vimComment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimExecute,vimIf,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimGlobal,vimHighlight,vimIsCommand,vimLet,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand,nvimUnmap,nvimMap
syn match vimFunction "\<fu\%[nction]!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'f'
- syn region vimFuncBody contained fold start="\ze(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)" contains=@vimFuncBodyList
+ syn region vimFuncBody contained fold start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)" contains=@vimFuncBodyList
else
- syn region vimFuncBody contained start="\ze(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)" contains=@vimFuncBodyList
+ syn region vimFuncBody contained start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)" contains=@vimFuncBodyList
endif
-syn match vimFuncVar contained "a:\(\h\w*\|\d\+\)"
+syn match vimFuncVar contained "a:\(\K\k*\|\d\+\)"
syn match vimFuncSID contained "\c<sid>\|\<s:"
syn keyword vimFuncKey contained fu[nction]
syn match vimFuncBlank contained "\s\+"
@@ -187,14 +167,16 @@ syn match vimSpecFileMod "\(:[phtre]\)\+" contained
" =======================
syn cluster vimUserCmdList contains=vimAddress,vimSyntax,vimHighlight,vimAutoCmd,vimCmplxRepeat,vimComment,vimCtrlChar,vimEscapeBrace,vimFilter,vimFunc,vimFuncName,vimFunction,vimFunctionError,vimIsCommand,vimMark,vimNotation,vimNumber,vimOper,vimRegion,vimRegister,vimLet,vimSet,vimSetEqual,vimSetString,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange,vimSynLine
syn keyword vimUserCommand contained com[mand]
-syn match vimUserCmd "\<com\%[mand]!\=\>.*$" contains=vimUserAttrb,vimUserCommand,@vimUserCmdList
-syn match vimUserAttrb contained "-n\%[args]=[01*?+]" contains=vimUserAttrbKey,vimOper
-syn match vimUserAttrb contained "-com\%[plete]=" contains=vimUserAttrbKey,vimOper nextgroup=vimUserAttrbCmplt,vimUserCmdError
-syn match vimUserAttrb contained "-ra\%[nge]\(=%\|=\d\+\)\=" contains=vimNumber,vimOper,vimUserAttrbKey
-syn match vimUserAttrb contained "-cou\%[nt]=\d\+" contains=vimNumber,vimOper,vimUserAttrbKey
-syn match vimUserAttrb contained "-bang\=\>" contains=vimOper,vimUserAttrbKey
-syn match vimUserAttrb contained "-bar\>" contains=vimOper,vimUserAttrbKey
-syn match vimUserAttrb contained "-re\%[gister]\>" contains=vimOper,vimUserAttrbKey
+syn match vimUserCmd "\<com\%[mand]!\=\>.*$" contains=vimUserAttrb,vimUserAttrbError,vimUserCommand,@vimUserCmdList
+syn match vimUserAttrbError contained "-\a\+\ze\s"
+syn match vimUserAttrb contained "-nargs=[01*?+]" contains=vimUserAttrbKey,vimOper
+syn match vimUserAttrb contained "-complete=" contains=vimUserAttrbKey,vimOper nextgroup=vimUserAttrbCmplt,vimUserCmdError
+syn match vimUserAttrb contained "-range\(=%\|=\d\+\)\=" contains=vimNumber,vimOper,vimUserAttrbKey
+syn match vimUserAttrb contained "-count\(=\d\+\)\=" contains=vimNumber,vimOper,vimUserAttrbKey
+syn match vimUserAttrb contained "-bang\>" contains=vimOper,vimUserAttrbKey
+syn match vimUserAttrb contained "-bar\>" contains=vimOper,vimUserAttrbKey
+syn match vimUserAttrb contained "-buffer\>" contains=vimOper,vimUserAttrbKey
+syn match vimUserAttrb contained "-register\>" contains=vimOper,vimUserAttrbKey
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_nousercmderror")
syn match vimUserCmdError contained "\S\+\>"
endif
@@ -268,7 +250,7 @@ syn match vimMark "\<norm\%[al]\s\zs'[a-zA-Z0-9]" nextgroup=vimOper,vimMarkNumbe
syn match vimMarkNumber "[-+]\d\+" nextgroup=vimSubst contained contains=vimOper
syn match vimPlainMark contained "'[a-zA-Z0-9]"
-syn match vimRegister '[^,;[{]\zs"[a-zA-Z0-9.%#:_\-/]\ze[^a-zA-Z_":0-9]'
+syn match vimRegister '[^,;[{: \t]\zs"[a-zA-Z0-9.%#:_\-/]\ze[^a-zA-Z_":0-9]'
syn match vimRegister '\<norm\s\+\zs"[a-zA-Z0-9]'
syn match vimRegister '\<normal\s\+\zs"[a-zA-Z0-9]'
syn match vimRegister '@"'
@@ -285,10 +267,10 @@ syn match vimCmplxRepeat '[^a-zA-Z_/\\()]q[0-9a-zA-Z"]\>'lc=1
syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\>\)'
" Set command and associated set-options (vimOptions) with comment {{{2
-syn region vimSet matchgroup=vimCommand start="\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skip="\%(\\\\\)*\\." end="$" matchgroup=vimNotation end="<[cC][rR]>" keepend oneline contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vimSetString,vimSetMod
+syn region vimSet matchgroup=vimCommand start="\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skip="\%(\\\\\)*\\." end="$" matchgroup=vimNotation end="<[cC][rR]>" keepend oneline contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vimSetString,vimSetMod,vimTermOption,vimOnlyOption
syn region vimSetEqual contained start="[=:]\|[-+^]=" skip="\\\\\|\\\s" end="[| \t]\|$"me=e-1 contains=vimCtrlChar,vimSetSep,vimNotation,vimEnvvar oneline
syn region vimSetString contained start=+="+hs=s+1 skip=+\\\\\|\\"+ end=+"+ contains=vimCtrlChar
-syn match vimSetSep contained "[,:]"
+syn match vimSetSep contained "[,:]" skipwhite nextgroup=vimCommand
syn match vimSetMod contained "&vim\=\|[!&?<]\|all&"
" Let {{{2
@@ -301,7 +283,7 @@ syn keyword vimAbb ab[breviate] ca[bbrev] inorea[bbrev] cnorea[bbrev] norea[bbre
" Autocmd {{{2
" =======
-syn match vimAutoEventList contained "\(!\s\+\)\=\(\a\+,\)*\a\+" contains=vimAutoEvent nextgroup=vimAutoCmdSpace
+syn match vimAutoEventList contained "\(!\s\+\)\=\(\a\+,\)*\a\+" contains=vimAutoEvent,nvimAutoEvent nextgroup=vimAutoCmdSpace
syn match vimAutoCmdSpace contained "\s\+" nextgroup=vimAutoCmdSfxList
syn match vimAutoCmdSfxList contained "\S*"
syn keyword vimAutoCmd au[tocmd] do[autocmd] doautoa[ll] skipwhite nextgroup=vimAutoEventList
@@ -310,7 +292,7 @@ syn keyword vimAutoCmd au[tocmd] do[autocmd] doautoa[ll] skipwhite nextgroup=vim
" ================
syn region vimEcho oneline excludenl matchgroup=vimCommand start="\<ec\%[ho]\>" skip="\(\\\\\)*\\|" end="$\||" contains=vimFunc,vimFuncVar,vimString,vimVar
syn region vimExecute oneline excludenl matchgroup=vimCommand start="\<exe\%[cute]\>" skip="\(\\\\\)*\\|" end="$\||\|<[cC][rR]>" contains=vimFuncVar,vimIsCommand,vimOper,vimNotation,vimOperParen,vimString,vimVar
-syn match vimEchoHL "echohl\=" skipwhite nextgroup=vimGroup,vimHLGroup,vimEchoHLNone
+syn match vimEchoHL "echohl\=" skipwhite nextgroup=vimGroup,vimHLGroup,vimEchoHLNone,vimOnlyHLGroup,nvimHLGroup
syn case ignore
syn keyword vimEchoHLNone none
syn case match
@@ -319,15 +301,17 @@ syn case match
" ====
syn match vimMap "\<map\>!\=\ze\s*[^(]" skipwhite nextgroup=vimMapMod,vimMapLhs
syn keyword vimMap cm[ap] cno[remap] im[ap] ino[remap] lm[ap] ln[oremap] nm[ap] nn[oremap] no[remap] om[ap] ono[remap] smap snor[emap] vm[ap] vn[oremap] xm[ap] xn[oremap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
+syn keyword nvimMap tn[oremap] tm[ap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
syn keyword vimMap mapc[lear] smapc[lear]
syn keyword vimUnmap cu[nmap] iu[nmap] lu[nmap] nun[map] ou[nmap] sunm[ap] unm[ap] unm[ap] vu[nmap] xu[nmap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
+syn keyword nvimUnmap tunm[ap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
syn match vimMapLhs contained "\S\+" contains=vimNotation,vimCtrlChar skipwhite nextgroup=vimMapRhs
syn match vimMapBang contained "!" skipwhite nextgroup=vimMapMod,vimMapLhs
-syn match vimMapMod contained "\c<\(buffer\|expr\|\(local\)\=leader\|plug\|script\|sid\|unique\|silent\)\+>" contains=vimMapModKey,vimMapModErr skipwhite nextgroup=vimMapMod,vimMapLhs
+syn match vimMapMod contained "\c<\(buffer\|expr\|\(local\)\=leader\|nowait\|plug\|script\|sid\|unique\|silent\)\+>" contains=vimMapModKey,vimMapModErr skipwhite nextgroup=vimMapMod,vimMapLhs
syn match vimMapRhs contained ".*" contains=vimNotation,vimCtrlChar skipnl nextgroup=vimMapRhsExtend
-syn match vimMapRhsExtend contained "^\s*\\.*$" contains=vimNotation,vimCtrlChar,vimContinue skipnl nextgroup=vimMapRhsExtend
+syn match vimMapRhsExtend contained "^\s*\\.*$" contains=vimContinue
syn case ignore
-syn keyword vimMapModKey contained buffer expr leader localleader plug script sid silent unique
+syn keyword vimMapModKey contained buffer expr leader localleader nowait plug script sid silent unique
syn case match
" Menus {{{2
@@ -357,8 +341,8 @@ syn case match
" User Function Highlighting {{{2
" (following Gautam Iyer's suggestion)
" ==========================
-syn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%([a-zA-Z0-9_]\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*(" contains=vimFuncName,vimUserFunc,vimExecute
-syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%([a-zA-Z0-9_]\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimNotation
+syn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%([a-zA-Z0-9_.]\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*(" contains=vimFuncName,vimUserFunc,vimExecute
+syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%([a-zA-Z0-9_.]\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimNotation
syn match vimNotFunc "\<if\>\|\<el\%[seif]\>\|\<return\>\|\<while\>"
" Errors And Warnings: {{{2
@@ -404,7 +388,7 @@ syn keyword vimSynType contained clear skipwhite nextgroup=vimGroupList
" Syntax: cluster {{{2
syn keyword vimSynType contained cluster skipwhite nextgroup=vimClusterName
-syn region vimClusterName contained matchgroup=vimGroupName start="\h\w*" skip="\\\\\|\\|" matchgroup=vimSep end="$\||" contains=vimGroupAdd,vimGroupRem,vimSynContains,vimSynError
+syn region vimClusterName contained matchgroup=vimGroupName start="\k\+" skip="\\\\\|\\|" matchgroup=vimSep end="$\||" contains=vimGroupAdd,vimGroupRem,vimSynContains,vimSynError
syn match vimGroupAdd contained "add=" nextgroup=vimGroupList
syn match vimGroupRem contained "remove=" nextgroup=vimGroupList
syn cluster vimFuncBodyList add=vimSynType,vimGroupAdd,vimGroupRem
@@ -416,14 +400,14 @@ syn cluster vimFuncBodyList add=vimSynType
" Syntax: keyword {{{2
syn cluster vimSynKeyGroup contains=vimSynNextgroup,vimSynKeyOpt,vimSynKeyContainedin
syn keyword vimSynType contained keyword skipwhite nextgroup=vimSynKeyRegion
-syn region vimSynKeyRegion contained oneline keepend matchgroup=vimGroupName start="\h\w*" skip="\\\\\|\\|" matchgroup=vimSep end="|\|$" contains=@vimSynKeyGroup
+syn region vimSynKeyRegion contained oneline keepend matchgroup=vimGroupName start="\k\+" skip="\\\\\|\\|" matchgroup=vimSep end="|\|$" contains=@vimSynKeyGroup
syn match vimSynKeyOpt contained "\<\(conceal\|contained\|transparent\|skipempty\|skipwhite\|skipnl\)\>"
syn cluster vimFuncBodyList add=vimSynType
" Syntax: match {{{2
syn cluster vimSynMtchGroup contains=vimMtchComment,vimSynContains,vimSynError,vimSynMtchOpt,vimSynNextgroup,vimSynRegPat,vimNotation
syn keyword vimSynType contained match skipwhite nextgroup=vimSynMatchRegion
-syn region vimSynMatchRegion contained keepend matchgroup=vimGroupName start="\h\w*" matchgroup=vimSep end="|\|$" contains=@vimSynMtchGroup
+syn region vimSynMatchRegion contained keepend matchgroup=vimGroupName start="\k\+" matchgroup=vimSep end="|\|$" contains=@vimSynMtchGroup
syn match vimSynMtchOpt contained "\<\(conceal\|transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>"
if has("conceal")
syn match vimSynMtchOpt contained "\<cchar=" nextgroup=vimSynMtchCchar
@@ -438,10 +422,10 @@ syn keyword vimSynType contained enable list manual off on reset
syn cluster vimSynRegPatGroup contains=vimPatSep,vimNotPatSep,vimSynPatRange,vimSynNotPatRange,vimSubstSubstr,vimPatRegion,vimPatSepErr,vimNotation
syn cluster vimSynRegGroup contains=vimSynContains,vimSynNextgroup,vimSynRegOpt,vimSynReg,vimSynMtchGrp
syn keyword vimSynType contained region skipwhite nextgroup=vimSynRegion
-syn region vimSynRegion contained keepend matchgroup=vimGroupName start="\h\w*" skip="\\\\\|\\|" end="|\|$" contains=@vimSynRegGroup
+syn region vimSynRegion contained keepend matchgroup=vimGroupName start="\k\+" skip="\\\\\|\\|" end="|\|$" contains=@vimSynRegGroup
syn match vimSynRegOpt contained "\<\(conceal\(ends\)\=\|transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|keepend\|oneline\|extend\|skipnl\|fold\)\>"
syn match vimSynReg contained "\(start\|skip\|end\)="he=e-1 nextgroup=vimSynRegPat
-syn match vimSynMtchGrp contained "matchgroup=" nextgroup=vimGroup,vimHLGroup
+syn match vimSynMtchGrp contained "matchgroup=" nextgroup=vimGroup,vimHLGroup,vimOnlyHLGroup,nvimHLGroup
syn region vimSynRegPat contained extend start="\z([-`~!@#$%^&*_=+;:'",./?]\)" skip="\\\\\|\\\z1" end="\z1" contains=@vimSynRegPatGroup skipwhite nextgroup=vimSynPatMod,vimSynReg
syn match vimSynPatMod contained "\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\="
syn match vimSynPatMod contained "\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\=," nextgroup=vimSynPatMod
@@ -464,9 +448,9 @@ syn keyword vimSyncRegion contained region skipwhite nextgroup=vimSynReg
syn match vimSyncLinebreak contained "\<linebreaks=" skipwhite nextgroup=vimNumber
syn keyword vimSyncLinecont contained linecont skipwhite nextgroup=vimSynRegPat
syn match vimSyncLines contained "\(min\|max\)\=lines=" nextgroup=vimNumber
-syn match vimSyncGroupName contained "\h\w*" skipwhite nextgroup=vimSyncKey
+syn match vimSyncGroupName contained "\k\+" skipwhite nextgroup=vimSyncKey
syn match vimSyncKey contained "\<groupthere\|grouphere\>" skipwhite nextgroup=vimSyncGroup
-syn match vimSyncGroup contained "\h\w*" skipwhite nextgroup=vimSynRegPat,vimSyncNone
+syn match vimSyncGroup contained "\k\+" skipwhite nextgroup=vimSynRegPat,vimSyncNone
syn keyword vimSyncNone contained NONE
" Additional IsCommand, here by reasons of precedence {{{2
@@ -518,7 +502,7 @@ syn match vimHiNmbr contained '\d\+'
syn keyword vimHiClear contained clear nextgroup=vimHiGroup
" Highlight: link {{{2
-syn region vimHiLink contained oneline matchgroup=vimCommand start="\(\<hi\%[ghlight]\s\+\)\@<=\(\(def\%[ault]\s\+\)\=link\>\|\<def\>\)" end="$" contains=vimHiGroup,vimGroup,vimHLGroup,vimNotation
+syn region vimHiLink contained oneline matchgroup=vimCommand start="\(\<hi\%[ghlight]\s\+\)\@<=\(\(def\%[ault]\s\+\)\=link\>\|\<def\>\)" end="$" contains=vimHiGroup,vimGroup,vimHLGroup,vimNotation,vimOnlyHLGroup,nvimHLGroup
syn cluster vimFuncBodyList add=vimHiLink
" Control Characters {{{2
@@ -701,6 +685,10 @@ if !exists("g:vimsyn_noerror")
hi def link vimSubstFlagErr vimError
hi def link vimSynCaseError vimError
hi def link vimBufnrWarn vimWarn
+ hi def link vimOnlyCommand vimError
+ hi def link vimTermOption vimError
+ hi def link vimOnlyOption vimError
+ hi def link vimOnlyHLGroup vimError
endif
hi def link vimAbb vimCommand
@@ -710,6 +698,7 @@ hi def link vimAuHighlight vimHighlight
hi def link vimAutoCmdOpt vimOption
hi def link vimAutoCmd vimCommand
hi def link vimAutoEvent Type
+hi def link nvimAutoEvent vimAutoEvent
hi def link vimAutoSet vimCommand
hi def link vimBehaveModel vimBehave
hi def link vimBehave vimCommand
@@ -756,6 +745,7 @@ hi def link vimHiNmbr Number
hi def link vimHiStartStop vimHiTerm
hi def link vimHiTerm Type
hi def link vimHLGroup vimGroup
+hi def link nvimHLGroup vimHLGroup
hi def link vimHLMod PreProc
hi def link vimInsert vimString
hi def link vimKeyCode vimSpecFile
@@ -766,6 +756,7 @@ hi def link vimMapBang vimCommand
hi def link vimMapModKey vimFuncSID
hi def link vimMapMod vimBracket
hi def link vimMap vimCommand
+hi def link nvimMap vimMap
hi def link vimMark Number
hi def link vimMarkNumber vimNumber
hi def link vimMenuMod vimMapMod
@@ -834,6 +825,7 @@ hi def link vimSyntax vimCommand
hi def link vimSynType vimSpecial
hi def link vimTodo Todo
hi def link vimUnmap vimMap
+hi def link nvimUnmap vimMap
hi def link vimUserAttrbCmpltFunc Special
hi def link vimUserAttrbCmplt vimSpecial
hi def link vimUserAttrbKey vimOption
diff --git a/runtime/syntax/zimbu.vim b/runtime/syntax/zimbu.vim
index c859a2f815..1a7a485e6f 100644
--- a/runtime/syntax/zimbu.vim
+++ b/runtime/syntax/zimbu.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Zimbu
" Maintainer: Bram Moolenaar
-" Last Change: 2012 Jun 01
+" Last Change: 2014 Nov 23
if exists("b:current_syntax")
finish
@@ -12,7 +12,10 @@ syn include @Ccode syntax/c.vim
syn keyword zimbuTodo TODO FIXME XXX contained
syn match zimbuNoBar "|" contained
syn match zimbuParam "|[^| ]\+|" contained contains=zimbuNoBar
-syn match zimbuComment "#.*$" contains=zimbuTodo,zimbuParam,@Spell
+syn match zimbuNoBacktick "`" contained
+syn match zimbuCode "`[^`]\+`" contained contains=zimbuNoBacktick
+syn match zimbuComment "#.*$" contains=zimbuTodo,zimbuParam,zimbuCode,@Spell
+syn match zimbuComment "/\*.\{-}\*/" contains=zimbuTodo,zimbuParam,zimbuCode,@Spell
syn match zimbuChar "'\\\=.'"
@@ -28,27 +31,32 @@ syn keyword zimbuBasicType fixed1 fixed2 fixed3 fixed4 fixed5 fixed6
syn keyword zimbuBasicType fixed7 fixed8 fixed9 fixed10 fixed11 fixed12
syn keyword zimbuBasicType fixed13 fixed14 fixed15
-syn keyword zimbuCompType string stringval cstring varstring
-syn keyword zimbuCompType bytes varbytes
-syn keyword zimbuCompType tuple array list dict multiDict set multiSet
+syn keyword zimbuCompType string varString
+syn keyword zimbuCompType byteString varByteString
+syn keyword zimbuCompType tuple array list dict dictList set callback
+syn keyword zimbuCompType sortedList multiDict multiDictList multiSet
syn keyword zimbuCompType complex complex32 complex64 complex80 complex128
syn keyword zimbuCompType proc func def thread evalThread lock cond pipe
-syn keyword zimbuType VAR ANY USE GET
+syn keyword zimbuType VAR dyn type USE GET
syn match zimbuType "IO.File"
syn match zimbuType "IO.Stat"
-syn keyword zimbuStatement IF ELSE ELSEIF WHILE REPEAT FOR IN TO STEP
+syn keyword zimbuStatement IF ELSE ELSEIF IFNIL WHILE REPEAT FOR IN TO STEP
syn keyword zimbuStatement DO UNTIL SWITCH WITH
syn keyword zimbuStatement TRY CATCH FINALLY
syn keyword zimbuStatement GENERATE_IF GENERATE_ELSE GENERATE_ELSEIF
+syn keyword zimbuStatement GENERATE_ERROR
+syn keyword zimbuStatement BUILD_IF BUILD_ELSE BUILD_ELSEIF
syn keyword zimbuStatement CASE DEFAULT FINAL ABSTRACT VIRTUAL DEFINE REPLACE
syn keyword zimbuStatement IMPLEMENTS EXTENDS PARENT LOCAL
-syn keyword zimbuStatement PART ALIAS CONNECT WRAP
+syn keyword zimbuStatement PART ALIAS TYPE CONNECT WRAP
syn keyword zimbuStatement BREAK CONTINUE PROCEED
-syn keyword zimbuStatement RETURN EXIT THROW
+syn keyword zimbuStatement RETURN EXIT THROW DEFER
syn keyword zimbuStatement IMPORT AS OPTIONS MAIN
-syn keyword zimbuStatement INTERFACE MODULE ENUM BITS SHARED
+syn keyword zimbuStatement INTERFACE PIECE INCLUDE MODULE ENUM BITS
+syn keyword zimbuStatement SHARED STATIC
+syn keyword zimbuStatement LAMBDA
syn match zimbuStatement "\<\(FUNC\|PROC\|DEF\)\>"
syn match zimbuStatement "\<CLASS\>"
syn match zimbuStatement "}"
@@ -61,10 +69,13 @@ syn match zimbuAttribute "@default\>"
syn match zimbuAttribute "@define\>"
syn match zimbuAttribute "@replace\>"
syn match zimbuAttribute "@final\>"
+syn match zimbuAttribute "@primitive\>"
+syn match zimbuAttribute "@notOnExit\>"
syn match zimbuAttribute "@private\>"
syn match zimbuAttribute "@protected\>"
syn match zimbuAttribute "@public\>"
+syn match zimbuAttribute "@local\>"
syn match zimbuAttribute "@file\>"
syn match zimbuAttribute "@directory\>"
syn match zimbuAttribute "@read=private\>"
@@ -78,15 +89,22 @@ syn match zimbuAttribute "@items=public\>"
syn match zimbuAttribute "@items=file\>"
syn match zimbuAttribute "@items=directory\>"
-syn keyword zimbuMethod NEW EQUAL COPY COMPARE SIZE GET SET
+syn keyword zimbuMethod NEW EQUAL COPY COMPARE SIZE GET SET INIT EARLYINIT
syn keyword zimbuOperator IS ISNOT ISA ISNOTA
-syn keyword zimbuModule ARG CHECK E IO PROTO SYS HTTP ZC ZWT TIME THREAD
+syn keyword zimbuModule ARG CHECK E GC IO LOG PROTO SYS HTTP ZC ZWT T TIME THREAD
-syn match zimbuString +"\([^"\\]\|\\.\)*\("\|$\)+
+syn match zimbuImport "\.\zsPROTO"
+syn match zimbuImport "\.\zsCHEADER"
+
+"syn match zimbuString +"\([^"\\]\|\\.\)*\("\|$\)+ contains=zimbuStringExpr
+syn region zimbuString start=+"+ skip=+[^"\\]\|\\.+ end=+"\|$+ contains=zimbuStringExpr
syn match zimbuString +R"\([^"]\|""\)*\("\|$\)+
-syn region zimbuString start=+'''+ end=+'''+
+syn region zimbuLongString start=+''"+ end=+"''+
+syn match zimbuStringExpr +\\([^)]*)+hs=s+2,he=e-1 contained contains=zimbuString,zimbuParenPairOuter
+syn region zimbuParenPairOuter start=+(+ms=s+1 end=+)+me=e-1 contained contains=zimbuString,zimbuParenPair
+syn region zimbuParenPair start=+(+ end=+)+ contained contains=zimbuString,zimbuParenPair
syn keyword zimbuFixed TRUE FALSE NIL THIS THISTYPE FAIL OK
syn keyword zimbuError NULL
@@ -97,12 +115,18 @@ syn match zimbuSpaceError display excludenl "\S\s\+$"ms=s+1
syn match zimbuSpaceError display " \+\t"
syn match zimbuSpaceError display "\t\+ "
-syn match zimbuUses contained "uses([a-zA-Z_ ,]*)"
+syn match zimbuUses contained "\<uses([a-zA-Z_ ,]*)"
+syn match zimbuBlockgc contained "blockgc"
syn match zimbuBlockComment contained " #.*"
-syn region zimbuCregion matchgroup=zimbuCblock start="^>>>" end="^<<<.*" contains=@Ccode,zimbuUses,zimbuBlockComment keepend
+syn region zimbuCregion matchgroup=zimbuCblock start="^>>>" end="^<<<.*" contains=@Ccode,zimbuUses,zimbuBlockgc,zimbuBlockComment keepend
+
+" Assume long strings and C regions don't take more than 200 lines.
+syn sync minlines=200
-syn sync minlines=2000
+" When we find the start of a long string, without a # or " before it, we are
+" sure to be inside a long string.
+syn sync match zimbuLongStringSync grouphere zimbuLongString +^[^"#]*''\"+
hi def link zimbuBasicType Type
hi def link zimbuCompType Type
@@ -111,17 +135,23 @@ hi def link zimbuStatement Statement
hi def link zimbuOperator Statement
hi def link zimbuMethod PreProc
hi def link zimbuModule PreProc
+hi def link zimbuImport PreProc
hi def link zimbuUses PreProc
+hi def link zimbuBlockgc PreProc
hi def link zimbuAttribute PreProc
hi def link zimbuString Constant
+hi def link zimbuLongString Special
hi def link zimbuChar Constant
hi def link zimbuFixed Constant
hi def link zimbuComment Comment
+hi def link zimbuCommentStart zimbuComment
hi def link zimbuBlockComment Comment
hi def link zimbuCblock Comment
hi def link zimbuTodo Todo
hi def link zimbuParam Constant
+hi def link zimbuCode Statement
hi def link zimbuNoBar Ignore
+hi def link zimbuNoBacktick Ignore
hi def link zimbuSpaceError Error
hi def link zimbuError Error
diff --git a/runtime/vimrc_example.vim b/runtime/vimrc_example.vim
index 1be1bcd3b6..97f646b91a 100644
--- a/runtime/vimrc_example.vim
+++ b/runtime/vimrc_example.vim
@@ -1,87 +1,52 @@
" An example for a vimrc file.
"
-" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last change: 2014 Nov 05
-"
" To use it, copy it to
" for Unix: ~/.vimrc
-" for MS-DOS and Win32: $VIM\_vimrc
-
-" allow backspacing over everything in insert mode
-set backspace=indent,eol,start
+" for Windows: $VIM\_vimrc
set backup " keep a backup file (restore to previous version)
set undofile " keep an undo file (undo changes after closing)
-set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
-set incsearch " do incremental searching
-
-" For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries
-" let &guioptions = substitute(&guioptions, "t", "", "g")
" Don't use Ex mode, use Q for formatting
-map Q gq
+noremap Q gq
" CTRL-U in insert mode deletes a lot. Use CTRL-G u to first break undo,
" so that you can undo CTRL-U after inserting a line break.
inoremap <C-U> <C-G>u<C-U>
-" In many terminal emulators the mouse works just fine, thus enable it.
-if has('mouse')
- set mouse=a
-endif
-
-" Switch syntax highlighting on, when the terminal has colors
-" Also switch on highlighting the last used search pattern.
-if &t_Co > 2 || has("gui_running")
- syntax on
- set hlsearch
-endif
+" Switch syntax highlighting on
+syntax on
-" Only do this part when compiled with support for autocommands.
-if has("autocmd")
+" Enable file type detection.
+" Use the default filetype settings, so that mail gets 'textwidth' set to 72,
+" 'cindent' is on in C files, etc.
+" Also load indent files, to automatically do language-dependent indenting.
+filetype plugin indent on
- " Enable file type detection.
- " Use the default filetype settings, so that mail gets 'tw' set to 72,
- " 'cindent' is on in C files, etc.
- " Also load indent files, to automatically do language-dependent indenting.
- filetype plugin indent on
-
- " Put these in an autocmd group, so that we can delete them easily.
- augroup vimrcEx
- au!
+" Put these in an autocmd group, so that we can delete them easily.
+augroup vimrcEx
+ autocmd!
" For all text files set 'textwidth' to 78 characters.
autocmd FileType text setlocal textwidth=78
" When editing a file, always jump to the last known cursor position.
" Don't do it when the position is invalid or when inside an event handler
- " (happens when dropping a file on gvim).
" Also don't do it when the mark is in the first line, that is the default
" position when opening a file.
autocmd BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") |
- \ exe "normal! g`\"" |
+ \ execute "normal! g`\"" |
\ endif
- augroup END
-
-else
-
- set autoindent " always set autoindenting on
-
-endif " has("autocmd")
+augroup END
" Convenient command to see the difference between the current buffer and the
" file it was loaded from, thus the changes you made.
" Only define it when not defined already.
if !exists(":DiffOrig")
- command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis
+ command DiffOrig vert new | set buftype=nofile | read ++edit # | 0d_ | diffthis
\ | wincmd p | diffthis
endif
-
-" Prevent that the langmap option applies to characters that result from a
-" mapping. If unset (default), this may break plugins (but it's backward
-" compatible).
-set langnoremap