From: DongHun Kwak Date: Mon, 11 Dec 2017 03:10:38 +0000 (+0900) Subject: Imported Upstream version 8.0.586 X-Git-Tag: upstream/8.0.586^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=48c91ef30fd9c539c9f2d50f2d5d38e3c28f36d0;p=platform%2Fupstream%2Fvim.git Imported Upstream version 8.0.586 Change-Id: I42cb89812f8dd54a007634018e8e18b746c06e6c Signed-off-by: DongHun Kwak --- diff --git a/.hgignore b/.hgignore index 901d8f7..53b6afb 100644 --- a/.hgignore +++ b/.hgignore @@ -7,6 +7,7 @@ src/xxd/xxd src/auto/if_perl.c src/auto/gui_gtk_gresources.c src/auto/gui_gtk_gresources.h +src/objects/.dirstamp src/tags # We do need src/auto/configure. @@ -79,4 +80,8 @@ src/testdir/test.log src/testdir/dostmp/* src/testdir/messages src/testdir/viminfo +src/testdir/opt_test.vim src/memfile_test +src/json_test +src/message_test +src/kword_test diff --git a/.travis.yml b/.travis.yml index af3eb1f..a0b8d21 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,19 +1,63 @@ language: c +os: + - osx + - linux + compiler: - clang - gcc env: - - COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src + - BUILD=yes TEST=scripttests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no "CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp'" - CHECK_AUTOCONF=yes - - COVERAGE=no FEATURES=normal CONFOPT= SHADOWOPT="-C src/shadow" SRCDIR=./src/shadow CHECK_AUTOCONF=no - - COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no - - COVERAGE=no FEATURES=tiny CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no + - BUILD=no TEST=unittests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes + - BUILD=yes TEST=test COVERAGE=no FEATURES=normal CONFOPT= SHADOWOPT="-C src/shadow" SRCDIR=./src/shadow CHECK_AUTOCONF=no + - BUILD=yes TEST=test COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no + - BUILD=yes TEST=test COVERAGE=no FEATURES=tiny CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no + # Mac OSX build + - BUILD=yes TEST=test COVERAGE=no FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no + "CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp'" + # ASAN build + - BUILD=yes TEST=test SANITIZER_CFLAGS="-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize=address -fno-omit-frame-pointer" + FEATURES=huge SRCDIR=./src CHECK_AUTOCONF=no ASAN_OPTIONS="print_stacktrace=1 log_path=asan" + "CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp'" sudo: false +# instead of a 2*2*8 matrix (2*os + 2*compiler + 8*env), +# exclude some builds on mac os x and linux +# linux: 2*compiler + 5*env + mac: 2*compiler + 2*env +matrix: + exclude: + - os: osx + env: BUILD=yes TEST=test COVERAGE=no FEATURES=normal CONFOPT= SHADOWOPT="-C src/shadow" SRCDIR=./src/shadow CHECK_AUTOCONF=no + - os: osx + env: BUILD=no TEST=unittests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes + - os: osx + env: BUILD=yes TEST=test COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no + - os: osx + env: BUILD=yes TEST=scripttests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no + "CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp'" + - os: osx + env: BUILD=yes TEST=test SANITIZER_CFLAGS="-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize=address -fno-omit-frame-pointer" + FEATURES=huge SRCDIR=./src CHECK_AUTOCONF=no ASAN_OPTIONS="print_stacktrace=1 log_path=asan" + "CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp'" + - os: linux + compiler: gcc + env: BUILD=yes TEST=test SANITIZER_CFLAGS="-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize=address -fno-omit-frame-pointer" + FEATURES=huge SRCDIR=./src CHECK_AUTOCONF=no ASAN_OPTIONS="print_stacktrace=1 log_path=asan" + "CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp'" + - os: linux + compiler: clang + env: BUILD=no TEST=unittests COVERAGE=yes CFLAGS=--coverage LDFLAGS=--coverage FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=yes + - os: linux + compiler: clang + env: BUILD=yes TEST=test COVERAGE=no FEATURES=small CONFOPT= SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no + - os: linux + env: BUILD=yes TEST=test COVERAGE=no FEATURES=huge SHADOWOPT= SRCDIR=./src CHECK_AUTOCONF=no + "CONFOPT='--enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-luainterp'" + branches: except: - /^v[0-9]/ @@ -28,18 +72,33 @@ addons: - python3-dev - liblua5.1-0-dev - lua5.1 + - cscope before_install: - - pip install --user cpp-coveralls + - if [ "$COVERAGE" = "yes" ]; then pip install --user cpp-coveralls; fi + # needed for https support for coveralls + # building cffi only works with gcc, not with clang + - if [ "$COVERAGE" = "yes" ]; then CC=gcc pip install --user pyopenssl ndg-httpsclient pyasn1; fi + # Lua is not installed on Travis OSX + - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install lua; export LUA_PREFIX=/usr/local; fi + +# Start virtual framebuffer to be able to test the GUI. Does not work on OS X. +before_script: + - if [ "$TRAVIS_OS_NAME" = "linux" ]; then export DISPLAY=:99.0 && sh -e /etc/init.d/xvfb start && sleep 3; fi script: - NPROC=$(getconf _NPROCESSORS_ONLN) - if [ "$CHECK_AUTOCONF" = "yes" -a "$CC" = "gcc" ]; then make -C src autoconf; fi - - if [ "x$SHADOWOPT" != x ]; then make -C src shadow; fi && (cd ${SRCDIR} && ./configure --with-features=$FEATURES $CONFOPT --enable-fail-if-missing && make -j$NPROC) - - ${SRCDIR}/vim --version - - make $SHADOWOPT test + - if [ "x$SHADOWOPT" != x ]; then make -C src shadow; fi + - (cd ${SRCDIR} && ./configure --with-features=$FEATURES $CONFOPT --enable-fail-if-missing && if [ "$BUILD" = "yes" ]; then make -j$NPROC; fi) + - if [ "$BUILD" = "yes" ]; then ${SRCDIR}/vim --version; fi + - if [ -n "$ASAN_OPTIONS" ]; then export PATH=/usr/lib/llvm-$(clang -v 2>&1 | sed -n 's/.*version \([1-9]\.[0-9][0-9]*\).*/\1/p')/bin:$PATH; fi + - make $SHADOWOPT $TEST + - if [ -n "$ASAN_OPTIONS" ]; then for log in $(find -type f -name 'asan.*' -size +0); do cat "$log"; err=1; done; fi + - if [ -n "$err" ]; then exit 1; fi after_success: - - if [ x"$COVERAGE" = "xyes" ]; then ~/.local/bin/coveralls -b $SRCDIR -x .xs -e ${SRCDIR}/xxd -e ${SRCDIR}/if_perl.c --encodings utf-8 latin-1 EUC-KR; fi + - if [ "$COVERAGE" = "yes" ]; then ~/.local/bin/coveralls -b $SRCDIR -x .xs -e ${SRCDIR}/xxd -e ${SRCDIR}/if_perl.c --encodings utf-8 latin-1 EUC-KR; fi + - if [ "$COVERAGE" = "yes" ]; then cd $SRCDIR && bash <(curl -s https://codecov.io/bash) ; fi # vim:set sts=2 sw=2 tw=0 et: diff --git a/Filelist b/Filelist index 7334e5e..6d8e2e8 100644 --- a/Filelist +++ b/Filelist @@ -24,6 +24,7 @@ SRC_ALL = \ src/edit.c \ src/eval.c \ src/evalfunc.c \ + src/ex_cmdidxs.h \ src/ex_cmds.c \ src/ex_cmds.h \ src/ex_cmds2.c \ @@ -45,6 +46,7 @@ SRC_ALL = \ src/hashtab.c \ src/json.c \ src/json_test.c \ + src/kword_test.c \ src/list.c \ src/keymap.h \ src/macros.h \ @@ -96,6 +98,7 @@ SRC_ALL = \ src/tee/tee.c \ src/xxd/xxd.c \ src/main.aap \ + src/testdir/gen_opt_test.vim \ src/testdir/main.aap \ src/testdir/README.txt \ src/testdir/Make_all.mak \ @@ -104,7 +107,11 @@ SRC_ALL = \ src/testdir/sautest/autoload/*.vim \ src/testdir/runtest.vim \ src/testdir/shared.vim \ + src/testdir/view_util.vim \ src/testdir/setup.vim \ + src/testdir/gui_init.vim \ + src/testdir/setup_gui.vim \ + src/testdir/gui_preinit.vim \ src/testdir/test[0-9]*.ok \ src/testdir/test[0-9]*a.ok \ src/testdir/test_[a-z]*.ok \ @@ -122,6 +129,7 @@ SRC_ALL = \ src/testdir/pythonx/topmodule/submodule/subsubmodule/subsubsubmodule.py \ src/testdir/python_after/*.py \ src/testdir/python_before/*.py \ + src/testdir/pyxfile/*.py \ src/testdir/bench*.in \ src/testdir/bench*.vim \ src/testdir/samples/*.txt \ @@ -207,7 +215,8 @@ SRC_UNIX = \ src/config.mk.dist \ src/config.mk.in \ src/configure \ - src/configure.in \ + src/configure.ac \ + src/create_cmdidxs.vim \ src/gui_at_fs.c \ src/gui_at_sb.c \ src/gui_at_sb.h \ @@ -231,7 +240,7 @@ SRC_UNIX = \ src/link.sh \ src/installman.sh \ src/installml.sh \ - src/mkinstalldirs \ + src/install-sh \ src/os_unix.c \ src/os_unix.h \ src/os_unixx.h \ @@ -717,7 +726,6 @@ EXTRA = \ farsi/README.txt \ farsi/fonts/*/far-* \ runtime/vimlogo.xpm \ - src/swis.s \ src/tee/Makefile \ src/tee/Make_mvc.mak \ src/tee/tee.c \ diff --git a/Makefile b/Makefile index 9f48a35..d198316 100644 --- a/Makefile +++ b/Makefile @@ -120,8 +120,9 @@ MINOR = 0 # # MS-Windows: # - Run make on Unix to update the ".mo" files. -# - Get libintl-8.dll and libiconv-2.dll. E.g. from +# - Get libintl-8.dll, libiconv-2.dll and libgcc_s_sjlj-1.dll. E.g. from # https://mlocati.github.io/gettext-iconv-windows/ . +# Use the "shared-32.zip file and extract the archive to get the files. # Put them in the top directory, "make dosrt" uses them. # - > make dossrc # > make dosrt @@ -468,6 +469,7 @@ dosrt_files: dist prepare no_title.vim done cp libintl-8.dll dist/vim/$(VIMRTDIR)/ cp libiconv-2.dll dist/vim/$(VIMRTDIR)/ + cp libgcc_s_sjlj-1.dll dist/vim/$(VIMRTDIR)/ # Used before uploading. Don't delete the AAPDIR/sign files! diff --git a/README.md b/README.md index 71bc498..53795a7 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ `README.md` for version 8.0 of Vim: Vi IMproved. [![Build Status](https://travis-ci.org/vim/vim.svg?branch=master)](https://travis-ci.org/vim/vim) +[![Coverage Status](https://codecov.io/gh/vim/vim/coverage.svg?branch=master)](https://codecov.io/gh/vim/vim?branch=master) [![Coverage Status](https://coveralls.io/repos/vim/vim/badge.svg?branch=master&service=github)](https://coveralls.io/github/vim/vim?branch=master) [![Appveyor Build status](https://ci.appveyor.com/api/projects/status/o2qht2kjm02sgghk?svg=true)](https://ci.appveyor.com/project/chrisbra/vim) [![Coverity Scan](https://scan.coverity.com/projects/241/badge.svg)](https://scan.coverity.com/projects/vim) diff --git a/nsis/gvim.nsi b/nsis/gvim.nsi index 26d7aab..74a5433 100644 --- a/nsis/gvim.nsi +++ b/nsis/gvim.nsi @@ -385,6 +385,7 @@ SectionEnd File ${VIMRT}\libintl-8.dll File ${VIMRT}\libiconv-2.dll File /nonfatal ${VIMRT}\libwinpthread-1.dll + File /nonfatal ${VIMRT}\libgcc_s_sjlj-1.dll SectionEnd !endif diff --git a/runtime/autoload/ada.vim b/runtime/autoload/ada.vim index 1f8234a..ce3a193 100644 --- a/runtime/autoload/ada.vim +++ b/runtime/autoload/ada.vim @@ -2,12 +2,13 @@ " Description: Perform Ada specific completion & tagging. " Language: Ada (2005) " $Id: ada.vim 887 2008-07-08 14:29:01Z krischik $ -" Maintainer: Martin Krischik +" Maintainer: Mathias Brousset +" Martin Krischik " Taylor Venable " Neil Bird " Ned Okie " $Author: krischik $ -" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $ +" $Date: 2017-01-31 20:20:05 +0200 (Mon, 01 Jan 2017) $ " Version: 4.6 " $Revision: 887 $ " $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/ada.vim $ @@ -23,6 +24,7 @@ " 09.05.2007 MK Session just won't work no matter how much " tweaking is done " 19.09.2007 NO still some mapleader problems +" 31.01.2017 MB fix more mapleader problems " Help Page: ft-ada-functions "------------------------------------------------------------------------------ @@ -447,7 +449,7 @@ function ada#Switch_Session (New_Session) if a:New_Session != v:this_session " - " We actualy got a new session - otherwise there + " We actually got a new session - otherwise there " is nothing to do. " if strlen (v:this_session) > 0 @@ -585,11 +587,11 @@ function ada#Map_Menu (Text, Keys, Command) \ " :" . a:Command . "" execute \ "nnoremap " . - \ escape(l:leader . "a" . a:Keys , '\') . + \ " a" . a:Keys . \" :" . a:Command execute \ "inoremap " . - \ escape(l:leader . "a" . a:Keys , '\') . + \ " a" . a:Keys . \" :" . a:Command endif return diff --git a/runtime/autoload/javascriptcomplete.vim b/runtime/autoload/javascriptcomplete.vim index 2abe41b..14bc3d7 100644 --- a/runtime/autoload/javascriptcomplete.vim +++ b/runtime/autoload/javascriptcomplete.vim @@ -1,7 +1,7 @@ " Vim completion script " Language: Java Script " Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl ) -" Last Change: 2006 Apr 30 +" Last Change: 2017 Mar 04 function! javascriptcomplete#CompleteJS(findstart, base) if a:findstart @@ -563,7 +563,7 @@ function! javascriptcomplete#CompleteJS(findstart, base) for i in arguments let g:ia = i let f_elements = matchlist(i, 'function\s\+\(\k\+\)\s*(\(.\{-}\))') - if len(f_elements) == 3 + if len(f_elements) >= 3 let b:js_menuinfo[f_elements[1].'('] = f_elements[2] endif endfor diff --git a/runtime/autoload/rust.vim b/runtime/autoload/rust.vim new file mode 100644 index 0000000..34a3b41 --- /dev/null +++ b/runtime/autoload/rust.vim @@ -0,0 +1,415 @@ +" Author: Kevin Ballard +" Description: Helper functions for Rust commands/mappings +" Last Modified: May 27, 2014 +" For bugs, patches and license go to https://github.com/rust-lang/rust.vim + +" Jump {{{1 + +function! rust#Jump(mode, function) range + let cnt = v:count1 + normal! m' + if a:mode ==# 'v' + norm! gv + endif + let foldenable = &foldenable + set nofoldenable + while cnt > 0 + execute "call Jump_" . a:function . "()" + let cnt = cnt - 1 + endwhile + let &foldenable = foldenable +endfunction + +function! s:Jump_Back() + call search('{', 'b') + keepjumps normal! w99[{ +endfunction + +function! s:Jump_Forward() + normal! j0 + call search('{', 'b') + keepjumps normal! w99[{% + call search('{') +endfunction + +" Run {{{1 + +function! rust#Run(bang, args) + let args = s:ShellTokenize(a:args) + if a:bang + let idx = index(l:args, '--') + if idx != -1 + let rustc_args = idx == 0 ? [] : l:args[:idx-1] + let args = l:args[idx+1:] + else + let rustc_args = l:args + let args = [] + endif + else + let rustc_args = [] + endif + + let b:rust_last_rustc_args = l:rustc_args + let b:rust_last_args = l:args + + call s:WithPath(function("s:Run"), rustc_args, args) +endfunction + +function! s:Run(dict, rustc_args, args) + let exepath = a:dict.tmpdir.'/'.fnamemodify(a:dict.path, ':t:r') + if has('win32') + let exepath .= '.exe' + endif + + let relpath = get(a:dict, 'tmpdir_relpath', a:dict.path) + let rustc_args = [relpath, '-o', exepath] + a:rustc_args + + let rustc = exists("g:rustc_path") ? g:rustc_path : "rustc" + + let pwd = a:dict.istemp ? a:dict.tmpdir : '' + let output = s:system(pwd, shellescape(rustc) . " " . join(map(rustc_args, 'shellescape(v:val)'))) + if output != '' + echohl WarningMsg + echo output + echohl None + endif + if !v:shell_error + exe '!' . shellescape(exepath) . " " . join(map(a:args, 'shellescape(v:val)')) + endif +endfunction + +" Expand {{{1 + +function! rust#Expand(bang, args) + let args = s:ShellTokenize(a:args) + if a:bang && !empty(l:args) + let pretty = remove(l:args, 0) + else + let pretty = "expanded" + endif + call s:WithPath(function("s:Expand"), pretty, args) +endfunction + +function! s:Expand(dict, pretty, args) + try + let rustc = exists("g:rustc_path") ? g:rustc_path : "rustc" + + if a:pretty =~? '^\%(everybody_loops$\|flowgraph=\)' + let flag = '--xpretty' + else + let flag = '--pretty' + endif + let relpath = get(a:dict, 'tmpdir_relpath', a:dict.path) + let args = [relpath, '-Z', 'unstable-options', l:flag, a:pretty] + a:args + let pwd = a:dict.istemp ? a:dict.tmpdir : '' + let output = s:system(pwd, shellescape(rustc) . " " . join(map(args, 'shellescape(v:val)'))) + if v:shell_error + echohl WarningMsg + echo output + echohl None + else + new + silent put =output + 1 + d + setl filetype=rust + setl buftype=nofile + setl bufhidden=hide + setl noswapfile + " give the buffer a nice name + let suffix = 1 + let basename = fnamemodify(a:dict.path, ':t:r') + while 1 + let bufname = basename + if suffix > 1 | let bufname .= ' ('.suffix.')' | endif + let bufname .= '.pretty.rs' + if bufexists(bufname) + let suffix += 1 + continue + endif + exe 'silent noautocmd keepalt file' fnameescape(bufname) + break + endwhile + endif + endtry +endfunction + +function! rust#CompleteExpand(lead, line, pos) + if a:line[: a:pos-1] =~ '^RustExpand!\s*\S*$' + " first argument and it has a ! + let list = ["normal", "expanded", "typed", "expanded,identified", "flowgraph=", "everybody_loops"] + if !empty(a:lead) + call filter(list, "v:val[:len(a:lead)-1] == a:lead") + endif + return list + endif + + return glob(escape(a:lead, "*?[") . '*', 0, 1) +endfunction + +" Emit {{{1 + +function! rust#Emit(type, args) + let args = s:ShellTokenize(a:args) + call s:WithPath(function("s:Emit"), a:type, args) +endfunction + +function! s:Emit(dict, type, args) + try + let output_path = a:dict.tmpdir.'/output' + + let rustc = exists("g:rustc_path") ? g:rustc_path : "rustc" + + let relpath = get(a:dict, 'tmpdir_relpath', a:dict.path) + let args = [relpath, '--emit', a:type, '-o', output_path] + a:args + let pwd = a:dict.istemp ? a:dict.tmpdir : '' + let output = s:system(pwd, shellescape(rustc) . " " . join(map(args, 'shellescape(v:val)'))) + if output != '' + echohl WarningMsg + echo output + echohl None + endif + if !v:shell_error + new + exe 'silent keepalt read' fnameescape(output_path) + 1 + d + if a:type == "llvm-ir" + setl filetype=llvm + let extension = 'll' + elseif a:type == "asm" + setl filetype=asm + let extension = 's' + endif + setl buftype=nofile + setl bufhidden=hide + setl noswapfile + if exists('l:extension') + " give the buffer a nice name + let suffix = 1 + let basename = fnamemodify(a:dict.path, ':t:r') + while 1 + let bufname = basename + if suffix > 1 | let bufname .= ' ('.suffix.')' | endif + let bufname .= '.'.extension + if bufexists(bufname) + let suffix += 1 + continue + endif + exe 'silent noautocmd keepalt file' fnameescape(bufname) + break + endwhile + endif + endif + endtry +endfunction + +" Utility functions {{{1 + +" Invokes func(dict, ...) +" Where {dict} is a dictionary with the following keys: +" 'path' - The path to the file +" 'tmpdir' - The path to a temporary directory that will be deleted when the +" function returns. +" 'istemp' - 1 if the path is a file inside of {dict.tmpdir} or 0 otherwise. +" If {istemp} is 1 then an additional key is provided: +" 'tmpdir_relpath' - The {path} relative to the {tmpdir}. +" +" {dict.path} may be a path to a file inside of {dict.tmpdir} or it may be the +" existing path of the current buffer. If the path is inside of {dict.tmpdir} +" then it is guaranteed to have a '.rs' extension. +function! s:WithPath(func, ...) + let buf = bufnr('') + let saved = {} + let dict = {} + try + let saved.write = &write + set write + let dict.path = expand('%') + let pathisempty = empty(dict.path) + + " Always create a tmpdir in case the wrapped command wants it + let dict.tmpdir = tempname() + call mkdir(dict.tmpdir) + + if pathisempty || !saved.write + let dict.istemp = 1 + " if we're doing this because of nowrite, preserve the filename + if !pathisempty + let filename = expand('%:t:r').".rs" + else + let filename = 'unnamed.rs' + endif + let dict.tmpdir_relpath = filename + let dict.path = dict.tmpdir.'/'.filename + + let saved.mod = &mod + set nomod + + silent exe 'keepalt write! ' . fnameescape(dict.path) + if pathisempty + silent keepalt 0file + endif + else + let dict.istemp = 0 + update + endif + + call call(a:func, [dict] + a:000) + finally + if bufexists(buf) + for [opt, value] in items(saved) + silent call setbufvar(buf, '&'.opt, value) + unlet value " avoid variable type mismatches + endfor + endif + if has_key(dict, 'tmpdir') | silent call s:RmDir(dict.tmpdir) | endif + endtry +endfunction + +function! rust#AppendCmdLine(text) + call setcmdpos(getcmdpos()) + let cmd = getcmdline() . a:text + return cmd +endfunction + +" Tokenize the string according to sh parsing rules +function! s:ShellTokenize(text) + " states: + " 0: start of word + " 1: unquoted + " 2: unquoted backslash + " 3: double-quote + " 4: double-quoted backslash + " 5: single-quote + let l:state = 0 + let l:current = '' + let l:args = [] + for c in split(a:text, '\zs') + if l:state == 0 || l:state == 1 " unquoted + if l:c ==# ' ' + if l:state == 0 | continue | endif + call add(l:args, l:current) + let l:current = '' + let l:state = 0 + elseif l:c ==# '\' + let l:state = 2 + elseif l:c ==# '"' + let l:state = 3 + elseif l:c ==# "'" + let l:state = 5 + else + let l:current .= l:c + let l:state = 1 + endif + elseif l:state == 2 " unquoted backslash + if l:c !=# "\n" " can it even be \n? + let l:current .= l:c + endif + let l:state = 1 + elseif l:state == 3 " double-quote + if l:c ==# '\' + let l:state = 4 + elseif l:c ==# '"' + let l:state = 1 + else + let l:current .= l:c + endif + elseif l:state == 4 " double-quoted backslash + if stridx('$`"\', l:c) >= 0 + let l:current .= l:c + elseif l:c ==# "\n" " is this even possible? + " skip it + else + let l:current .= '\'.l:c + endif + let l:state = 3 + elseif l:state == 5 " single-quoted + if l:c == "'" + let l:state = 1 + else + let l:current .= l:c + endif + endif + endfor + if l:state != 0 + call add(l:args, l:current) + endif + return l:args +endfunction + +function! s:RmDir(path) + " sanity check; make sure it's not empty, /, or $HOME + if empty(a:path) + echoerr 'Attempted to delete empty path' + return 0 + elseif a:path == '/' || a:path == $HOME + echoerr 'Attempted to delete protected path: ' . a:path + return 0 + endif + return system("rm -rf " . shellescape(a:path)) +endfunction + +" Executes {cmd} with the cwd set to {pwd}, without changing Vim's cwd. +" If {pwd} is the empty string then it doesn't change the cwd. +function! s:system(pwd, cmd) + let cmd = a:cmd + if !empty(a:pwd) + let cmd = 'cd ' . shellescape(a:pwd) . ' && ' . cmd + endif + return system(cmd) +endfunction + +" Playpen Support {{{1 +" Parts of gist.vim by Yasuhiro Matsumoto reused +" gist.vim available under the BSD license, available at +" http://github.com/mattn/gist-vim +function! s:has_webapi() + if !exists("*webapi#http#post") + try + call webapi#http#post() + catch + endtry + endif + return exists("*webapi#http#post") +endfunction + +function! rust#Play(count, line1, line2, ...) abort + redraw + + let l:rust_playpen_url = get(g:, 'rust_playpen_url', 'https://play.rust-lang.org/') + let l:rust_shortener_url = get(g:, 'rust_shortener_url', 'https://is.gd/') + + if !s:has_webapi() + echohl ErrorMsg | echomsg ':RustPlay depends on webapi.vim (https://github.com/mattn/webapi-vim)' | echohl None + return + endif + + let bufname = bufname('%') + if a:count < 1 + let content = join(getline(a:line1, a:line2), "\n") + else + let save_regcont = @" + let save_regtype = getregtype('"') + silent! normal! gvy + let content = @" + call setreg('"', save_regcont, save_regtype) + endif + + let body = l:rust_playpen_url."?code=".webapi#http#encodeURI(content) + + if strlen(body) > 5000 + echohl ErrorMsg | echomsg 'Buffer too large, max 5000 encoded characters ('.strlen(body).')' | echohl None + return + endif + + let payload = "format=simple&url=".webapi#http#encodeURI(body) + let res = webapi#http#post(l:rust_shortener_url.'create.php', payload, {}) + let url = res.content + + redraw | echomsg 'Done: '.url +endfunction + +" }}}1 + +" vim: set noet sw=8 ts=8: diff --git a/runtime/autoload/rustfmt.vim b/runtime/autoload/rustfmt.vim new file mode 100644 index 0000000..a689b5e --- /dev/null +++ b/runtime/autoload/rustfmt.vim @@ -0,0 +1,107 @@ +" Author: Stephen Sugden +" +" Adapted from https://github.com/fatih/vim-go +" For bugs, patches and license go to https://github.com/rust-lang/rust.vim + +if !exists("g:rustfmt_autosave") + let g:rustfmt_autosave = 0 +endif + +if !exists("g:rustfmt_command") + let g:rustfmt_command = "rustfmt" +endif + +if !exists("g:rustfmt_options") + let g:rustfmt_options = "" +endif + +if !exists("g:rustfmt_fail_silently") + let g:rustfmt_fail_silently = 0 +endif + +let s:got_fmt_error = 0 + +function! s:RustfmtCommandRange(filename, line1, line2) + let l:arg = {"file": shellescape(a:filename), "range": [a:line1, a:line2]} + return printf("%s %s --write-mode=overwrite --file-lines '[%s]'", g:rustfmt_command, g:rustfmt_options, json_encode(l:arg)) +endfunction + +function! s:RustfmtCommand(filename) + return g:rustfmt_command . " --write-mode=overwrite " . g:rustfmt_options . " " . shellescape(a:filename) +endfunction + +function! s:RunRustfmt(command, curw, tmpname) + if exists("*systemlist") + let out = systemlist(a:command) + else + let out = split(system(a:command), '\r\?\n') + endif + + if v:shell_error == 0 || v:shell_error == 3 + " remove undo point caused via BufWritePre + try | silent undojoin | catch | endtry + + " Replace current file with temp file, then reload buffer + call rename(a:tmpname, expand('%')) + silent edit! + let &syntax = &syntax + + " only clear location list if it was previously filled to prevent + " clobbering other additions + if s:got_fmt_error + let s:got_fmt_error = 0 + call setloclist(0, []) + lwindow + endif + elseif g:rustfmt_fail_silently == 0 + " otherwise get the errors and put them in the location list + let errors = [] + + for line in out + " src/lib.rs:13:5: 13:10 error: expected `,`, or `}`, found `value` + let tokens = matchlist(line, '^\(.\{-}\):\(\d\+\):\(\d\+\):\s*\(\d\+:\d\+\s*\)\?\s*error: \(.*\)') + if !empty(tokens) + call add(errors, {"filename": @%, + \"lnum": tokens[2], + \"col": tokens[3], + \"text": tokens[5]}) + endif + endfor + + if empty(errors) + % | " Couldn't detect rustfmt error format, output errors + endif + + if !empty(errors) + call setloclist(0, errors, 'r') + echohl Error | echomsg "rustfmt returned error" | echohl None + endif + + let s:got_fmt_error = 1 + lwindow + " We didn't use the temp file, so clean up + call delete(a:tmpname) + endif + + call winrestview(a:curw) +endfunction + +function! rustfmt#FormatRange(line1, line2) + let l:curw = winsaveview() + let l:tmpname = expand("%:p:h") . "/." . expand("%:p:t") . ".rustfmt" + call writefile(getline(1, '$'), l:tmpname) + + let command = s:RustfmtCommandRange(l:tmpname, a:line1, a:line2) + + call s:RunRustfmt(command, l:curw, l:tmpname) +endfunction + +function! rustfmt#Format() + let l:curw = winsaveview() + let l:tmpname = expand("%:p:h") . "/." . expand("%:p:t") . ".rustfmt" + call writefile(getline(1, '$'), l:tmpname) + + let command = s:RustfmtCommand(l:tmpname) + + call s:RunRustfmt(command, l:curw, l:tmpname) +endfunction diff --git a/runtime/compiler/bdf.vim b/runtime/compiler/bdf.vim index ca33776..b062e84 100644 --- a/runtime/compiler/bdf.vim +++ b/runtime/compiler/bdf.vim @@ -1,7 +1,7 @@ " Vim compiler file -" Compiler: BDF to PCF Conversion -" Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Compiler: BDF to PCF Conversion +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2006-04-19 if exists("current_compiler") finish diff --git a/runtime/compiler/cargo.vim b/runtime/compiler/cargo.vim new file mode 100644 index 0000000..bd48666 --- /dev/null +++ b/runtime/compiler/cargo.vim @@ -0,0 +1,35 @@ +" Vim compiler file +" Compiler: Cargo Compiler +" Maintainer: Damien Radtke +" Latest Revision: 2014 Sep 24 +" For bugs, patches and license go to https://github.com/rust-lang/rust.vim + +if exists('current_compiler') + finish +endif +runtime compiler/rustc.vim +let current_compiler = "cargo" + +let s:save_cpo = &cpo +set cpo&vim + +if exists(':CompilerSet') != 2 + command -nargs=* CompilerSet setlocal +endif + +if exists('g:cargo_makeprg_params') + execute 'CompilerSet makeprg=cargo\ '.escape(g:cargo_makeprg_params, ' \|"').'\ $*' +else + CompilerSet makeprg=cargo\ $* +endif + +" Ignore general cargo progress messages +CompilerSet errorformat+= + \%-G%\\s%#Downloading%.%#, + \%-G%\\s%#Compiling%.%#, + \%-G%\\s%#Finished%.%#, + \%-G%\\s%#error:\ Could\ not\ compile\ %.%#, + \%-G%\\s%#To\ learn\ more\\,%.%# + +let &cpo = s:save_cpo +unlet s:save_cpo diff --git a/runtime/compiler/csslint.vim b/runtime/compiler/csslint.vim new file mode 100644 index 0000000..14c4289 --- /dev/null +++ b/runtime/compiler/csslint.vim @@ -0,0 +1,16 @@ +" Vim compiler file +" Compiler: csslint for CSS +" Maintainer: Daniel Moch +" Last Change: 2016 May 21 + +if exists("current_compiler") + finish +endif +let current_compiler = "csslint" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal +endif + +CompilerSet makeprg=csslint\ --format=compact +CompilerSet errorformat=%-G,%-G%f:\ lint\ free!,%f:\ line\ %l\\,\ col\ %c\\,\ %trror\ -\ %m,%f:\ line\ %l\\,\ col\ %c\\,\ %tarning\ -\ %m,%f:\ line\ %l\\,\ col\ %c\\,\ %m diff --git a/runtime/compiler/gcc.vim b/runtime/compiler/gcc.vim index 19ea2ed..1af568d 100644 --- a/runtime/compiler/gcc.vim +++ b/runtime/compiler/gcc.vim @@ -1,7 +1,7 @@ " Vim compiler file -" Compiler: GNU C Compiler -" Maintainer: Nikolai Weibull -" Latest Revision: 2010-10-14 +" Compiler: GNU C Compiler +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2010-10-14 " added line suggested by Anton Lindqvist 2016 Mar 31 if exists("current_compiler") diff --git a/runtime/compiler/ghc.vim b/runtime/compiler/ghc.vim new file mode 100644 index 0000000..c98ae30 --- /dev/null +++ b/runtime/compiler/ghc.vim @@ -0,0 +1,26 @@ +" Vim compiler file +" Compiler: GHC Haskell Compiler +" Maintainer: Daniel Campoverde +" Latest Revision: 2016-11-29 + +if exists("current_compiler") + finish +endif +let current_compiler = "ghc" + +let s:cpo_save = &cpo +set cpo&vim + +CompilerSet errorformat= + \%-G%.%#:\ build, + \%-G%.%#preprocessing\ library\ %.%#, + \%-G[%.%#]%.%#, + \%E%f:%l:%c:\ %m, + \%-G--%.%# + +if exists('g:compiler_ghc_ignore_unmatched_lines') + CompilerSet errorformat+=%-G%.%# +endif + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/compiler/pylint.vim b/runtime/compiler/pylint.vim new file mode 100644 index 0000000..93079ce --- /dev/null +++ b/runtime/compiler/pylint.vim @@ -0,0 +1,16 @@ +" Vim compiler file +" Compiler: Pylint for Python +" Maintainer: Daniel Moch +" Last Change: 2016 May 20 + +if exists("current_compiler") + finish +endif +let current_compiler = "pylint" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal +endif + +CompilerSet makeprg=pylint\ --output-format=text\ --msg-template=\"{path}:{line}:{column}:{C}:\ [{symbol}]\ {msg}\"\ --reports=no +CompilerSet errorformat=%A%f:%l:%c:%t:\ %m,%A%f:%l:\ %m,%A%f:(%l):\ %m,%-Z%p^%.%#,%-G%.%# diff --git a/runtime/compiler/rst.vim b/runtime/compiler/rst.vim index 15d2d79..392bea6 100644 --- a/runtime/compiler/rst.vim +++ b/runtime/compiler/rst.vim @@ -1,7 +1,8 @@ " Vim compiler file -" Compiler: reStructuredText Documentation Format -" Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Compiler: sphinx >= 1.0.8, http://www.sphinx-doc.org +" Description: reStructuredText Documentation Format +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2017-03-31 if exists("current_compiler") finish @@ -11,12 +12,18 @@ let current_compiler = "rst" let s:cpo_save = &cpo set cpo&vim -setlocal errorformat= - \%f:%l:\ (%tEBUG/0)\ %m, - \%f:%l:\ (%tNFO/1)\ %m, - \%f:%l:\ (%tARNING/2)\ %m, - \%f:%l:\ (%tRROR/3)\ %m, - \%f:%l:\ (%tEVERE/3)\ %m, +if exists(":CompilerSet") != 2 + command -nargs=* CompilerSet setlocal +endif + +CompilerSet errorformat= + \%f\\:%l:\ %tEBUG:\ %m, + \%f\\:%l:\ %tNFO:\ %m, + \%f\\:%l:\ %tARNING:\ %m, + \%f\\:%l:\ %tRROR:\ %m, + \%f\\:%l:\ %tEVERE:\ %m, + \%f\\:%s:\ %tARNING:\ %m, + \%f\\:%s:\ %tRROR:\ %m, \%D%*\\a[%*\\d]:\ Entering\ directory\ `%f', \%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f', \%DMaking\ %*\\a\ in\ %f diff --git a/runtime/compiler/rustc.vim b/runtime/compiler/rustc.vim new file mode 100644 index 0000000..c27bdc9 --- /dev/null +++ b/runtime/compiler/rustc.vim @@ -0,0 +1,46 @@ +" Vim compiler file +" Compiler: Rust Compiler +" Maintainer: Chris Morgan +" Latest Revision: 2013 Jul 12 +" For bugs, patches and license go to https://github.com/rust-lang/rust.vim + +if exists("current_compiler") + finish +endif +let current_compiler = "rustc" + +let s:cpo_save = &cpo +set cpo&vim + +if exists(":CompilerSet") != 2 + command -nargs=* CompilerSet setlocal +endif + +if exists("g:rustc_makeprg_no_percent") && g:rustc_makeprg_no_percent != 0 + CompilerSet makeprg=rustc +else + CompilerSet makeprg=rustc\ \% +endif + +" Old errorformat (before nightly 2016/08/10) +CompilerSet errorformat= + \%f:%l:%c:\ %t%*[^:]:\ %m, + \%f:%l:%c:\ %*\\d:%*\\d\ %t%*[^:]:\ %m, + \%-G%f:%l\ %s, + \%-G%*[\ ]^, + \%-G%*[\ ]^%*[~], + \%-G%*[\ ]... + +" New errorformat (after nightly 2016/08/10) +CompilerSet errorformat+= + \%-G, + \%-Gerror:\ aborting\ %.%#, + \%-Gerror:\ Could\ not\ compile\ %.%#, + \%Eerror:\ %m, + \%Eerror[E%n]:\ %m, + \%Wwarning:\ %m, + \%Inote:\ %m, + \%C\ %#-->\ %f:%l:%c + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/defaults.vim b/runtime/defaults.vim index 43ff1e0..6fd43db 100644 --- a/runtime/defaults.vim +++ b/runtime/defaults.vim @@ -1,7 +1,7 @@ " The default vimrc file. " " Maintainer: Bram Moolenaar -" Last change: 2016 Sep 02 +" Last change: 2017 Apr 12 " " This is loaded if no vimrc file was found. " Except when Vim is run with "-u NONE" or "-C". @@ -21,7 +21,16 @@ endif " Use Vim settings, rather than Vi settings (much better!). " This must be first, because it changes other options as a side effect. -set nocompatible +" Avoid side effects when it was already reset. +if &compatible + set nocompatible +endif + +" When the +eval feature is missing, the set command above will be skipped. +" Use a trick to reset compatible only when the +eval feature is missing. +silent! while 0 + set nocompatible +silent! endwhile " Allow backspacing over everything in insert mode. set backspace=indent,eol,start diff --git a/runtime/doc/Makefile b/runtime/doc/Makefile index 33a09be..1a0e841 100644 --- a/runtime/doc/Makefile +++ b/runtime/doc/Makefile @@ -30,6 +30,7 @@ DOCS = \ filetype.txt \ fold.txt \ ft_ada.txt \ + ft_rust.txt \ ft_sql.txt \ gui.txt \ gui_w32.txt \ @@ -165,6 +166,7 @@ HTMLS = \ filetype.html \ fold.html \ ft_ada.html \ + ft_rust.html \ ft_sql.html \ gui.html \ gui_w32.html \ diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index b901f21..575e852 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim version 8.0. Last change: 2016 Sep 27 +*autocmd.txt* For Vim version 8.0. Last change: 2017 Apr 07 VIM REFERENCE MANUAL by Bram Moolenaar @@ -33,7 +33,7 @@ files matching *.c. You can also use autocommands to implement advanced features, such as editing compressed files (see |gzip-example|). The usual place to put autocommands is in your .vimrc or .exrc file. - *E203* *E204* *E143* *E855* + *E203* *E204* *E143* *E855* *E937* WARNING: Using autocommands is very powerful, and may lead to unexpected side effects. Be careful not to destroy your text. - It's a good idea to do some testing on an expendable copy of a file first. @@ -621,7 +621,7 @@ FileChangedShell When Vim notices that the modification time of to tell Vim what to do next. NOTE: When this autocommand is executed, the current buffer "%" may be different from the - buffer that was changed "". + buffer that was changed, which is in "". NOTE: The commands must not change the current buffer, jump to another buffer or delete a buffer. *E246* *E811* diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index 6dced7b..8cca763 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -1,4 +1,4 @@ -*change.txt* For Vim version 8.0. Last change: 2016 Oct 02 +*change.txt* For Vim version 8.0. Last change: 2017 Feb 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -635,12 +635,14 @@ For other systems the tmpnam() library function is used. For the {pattern} see |pattern|. {string} can be a literal string, or something special; see |sub-replace-special|. + *E939* When [range] and [count] are omitted, replace in the - current line only. - When [count] is given, replace in [count] lines, - starting with the last line in [range]. When [range] - is omitted start in the current line. - Also see |cmdline-ranges|. + current line only. When [count] is given, replace in + [count] lines, starting with the last line in [range]. + When [range] is omitted start in the current line. + [count] must be a positive number. Also see + |cmdline-ranges|. + See |:s_flags| for [flags]. :[range]s[ubstitute] [flags] [count] @@ -684,6 +686,7 @@ g& Synonym for `:%s//~/&` (repeat last substitute with *:s_flags* The flags that you can use for the substitute commands: + *:&&* [&] Must be the first one: Keep the flags from the previous substitute command. Examples: > :&& diff --git a/runtime/doc/channel.txt b/runtime/doc/channel.txt index bfd7246..3078d31 100644 --- a/runtime/doc/channel.txt +++ b/runtime/doc/channel.txt @@ -1,4 +1,4 @@ -*channel.txt* For Vim version 8.0. Last change: 2016 Oct 27 +*channel.txt* For Vim version 8.0. Last change: 2016 Dec 02 VIM REFERENCE MANUAL by Bram Moolenaar @@ -155,7 +155,13 @@ Use |ch_status()| to see if the channel could be opened. func MyCloseHandler(channel) < Vim will invoke callbacks that handle data before invoking close_cb, thus when this function is called no more data will - be received. + be passed to the callbacks. + *channel-drop* +"drop" Specifies when to drop messages: + "auto" When there is no callback to handle a message. + The "close_cb" is also considered for this. + "never" All messages will be kept. + *waittime* "waittime" The time to wait for the connection to be made in milliseconds. A negative number waits forever. @@ -369,7 +375,7 @@ Leave out the fourth argument if no response is to be sent: ============================================================================== 6. Using a RAW or NL channel *channel-raw* -If mode is RAW or NL then a message can be send like this: > +If mode is RAW or NL then a message can be sent like this: > let response = ch_evalraw(channel, {string}) The {string} is sent as-is. The response will be what can be read from the @@ -418,7 +424,11 @@ This uses the channel timeout. To read without a timeout, just get any message that is available: > let output = ch_read(channel, {'timeout': 0}) When no message was available then the result is v:none for a JSON or JS mode -channels, an empty string for a RAW or NL channel. +channels, an empty string for a RAW or NL channel. You can use |ch_canread()| +to check if there is something to read. + +Note that when there is no callback message are dropped. To avoid that add a +close callback to the channel. To read all output from a RAW channel that is available: > let output = ch_readraw(channel) @@ -534,7 +544,7 @@ You will want to do something more useful than "echomsg". To start another process without creating a channel: > let job = job_start(command, - \ {"in_io": "null", "out_io": "null", "err_io": "null"}) + \ {"in_io": "null", "out_io": "null", "err_io": "null"}) This starts {command} in the background, Vim does not wait for it to finish. @@ -595,6 +605,10 @@ See |job_setoptions()| and |ch_setoptions()|. *job-close_cb* "close_cb": handler Callback for when the channel is closed. Same as "close_cb" on |ch_open()|, see |close_cb|. + *job-drop* +"drop" Specifies when to drop messages. Same as "drop" on + |ch_open()|, see |channel-drop|. For "auto" the + exit_cb is not considered. *job-exit_cb* "exit_cb": handler Callback for when the job ends. The arguments are the job and the exit status. @@ -629,7 +643,7 @@ See |job_setoptions()| and |ch_setoptions()|. "channel": {channel} Use an existing channel instead of creating a new one. The parts of the channel that get used for the new job will be disconnected from what they were used before. - If the channel was still use by another job this may + If the channel was still used by another job this may cause I/O errors. Existing callbacks and other settings remain. @@ -647,7 +661,7 @@ See |job_setoptions()| and |ch_setoptions()|. "out_io": "null" disconnect stdout (goes to /dev/null) "out_io": "pipe" stdout is connected to the channel (default) "out_io": "file" stdout writes to a file -"out_io": "buffer" stdout appends to a buffer (see below) +"out_io": "buffer" stdout appends to a buffer (see below) "out_name": "/path/file" the name of the file or buffer to write to "out_buf": number the number of the buffer to write to "out_modifiable": 0 when writing to a buffer, 'modifiable' will be off @@ -660,7 +674,7 @@ See |job_setoptions()| and |ch_setoptions()|. "err_io": "null" disconnect stderr (goes to /dev/null) "err_io": "pipe" stderr is connected to the channel (default) "err_io": "file" stderr writes to a file -"err_io": "buffer" stderr appends to a buffer (see below) +"err_io": "buffer" stderr appends to a buffer (see below) "err_name": "/path/file" the name of the file or buffer to write to "err_buf": number the number of the buffer to write to "err_modifiable": 0 when writing to a buffer, 'modifiable' will be off diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt index 8eb3a93..aab2a3e 100644 --- a/runtime/doc/cmdline.txt +++ b/runtime/doc/cmdline.txt @@ -359,8 +359,11 @@ terminals) List entries 6 to 12 from the search history: > :history / 6,12 < - List the recent five entries from all histories: > - :history all -5, + List the penultimate entry from all histories: > + :history all -2 +< + List the most recent two entries from all histories: > + :history all -2, :keepp[atterns] {command} *:keepp* *:keeppatterns* Execute {command}, without adding anything to the search @@ -1057,10 +1060,10 @@ There are several ways to leave the command-line window: Insert and in Normal mode. CTRL-C Continue in Command-line mode. The command-line under the cursor is used as the command-line. Works both in Insert and - in Normal mode. ":close" also works. There is no redraw, - thus the window will remain visible. + in Normal mode. There is no redraw, thus the window will + remain visible. :quit Discard the command line and go back to Normal mode. - ":exit", ":xit" and CTRL-\ CTRL-N also work. + ":close", ":exit", ":xit" and CTRL-\ CTRL-N also work. :qall Quit Vim, unless there are changes in some buffer. :qall! Quit Vim, discarding changes to any buffer. diff --git a/runtime/doc/develop.txt b/runtime/doc/develop.txt index a2477f0..dc49c09 100644 --- a/runtime/doc/develop.txt +++ b/runtime/doc/develop.txt @@ -1,4 +1,4 @@ -*develop.txt* For Vim version 8.0. Last change: 2016 Jan 31 +*develop.txt* For Vim version 8.0. Last change: 2017 Jan 05 VIM REFERENCE MANUAL by Bram Moolenaar @@ -177,7 +177,7 @@ The basic steps to make changes to the code: 5. Make a patch with "git diff". You can also create a pull request on github, but it's the diff that matters. 6. Make a note about what changed, preferably mentioning the problem and the - solution. Send an email to the vim-dev maillist with an explanation and + solution. Send an email to the |vim-dev| maillist with an explanation and include the diff. Or create a pull request on github. diff --git a/runtime/doc/diff.txt b/runtime/doc/diff.txt index 378874f..7361d42 100644 --- a/runtime/doc/diff.txt +++ b/runtime/doc/diff.txt @@ -1,4 +1,4 @@ -*diff.txt* For Vim version 8.0. Last change: 2016 Aug 24 +*diff.txt* For Vim version 8.0. Last change: 2017 Feb 03 VIM REFERENCE MANUAL by Bram Moolenaar @@ -131,6 +131,8 @@ file for a moment and come back to the same file and be in diff mode again. related options only happens in a window that has 'diff' set, if the current window does not have 'diff' set then no options in it are changed. + Hidden buffers are also removed from the list of diff'ed + buffers. The `:diffoff` command resets the relevant options to the values they had when using `:diffsplit`, `:diffpatch` , `:diffthis`. or starting Vim in diff mode. @@ -164,7 +166,8 @@ The alignment of text will go wrong when: All the buffers edited in a window where the 'diff' option is set will join in the diff. This is also possible for hidden buffers. They must have been -edited in a window first for this to be possible. +edited in a window first for this to be possible. To get rid of the hidden +buffers use `:diffoff!`. *:DiffOrig* *diff-original-file* Since 'diff' is a window-local option, it's possible to view the same buffer diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt index 1260194..25cbe9c 100644 --- a/runtime/doc/editing.txt +++ b/runtime/doc/editing.txt @@ -1,4 +1,4 @@ -*editing.txt* For Vim version 8.0. Last change: 2016 Sep 27 +*editing.txt* For Vim version 8.0. Last change: 2017 Apr 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -276,7 +276,7 @@ If you want to keep the changed buffer without saving it, switch on the *:vie* *:view* :vie[w][!] [++opt] [+cmd] file - When used in Ex mode: Leave |Ex mode|, go back to + When used in Ex mode: Leave |Ex-mode|, go back to Normal mode. Otherwise same as |:edit|, but set 'readonly' option for this buffer. {not in Vi} @@ -977,12 +977,12 @@ WRITING WITH MULTIPLE BUFFERS *buffer-write* *:wa* *:wall* :wa[ll] Write all changed buffers. Buffers without a file - name or which are readonly are not written. {not in - Vi} + name cause an error message. Buffers which are + readonly are not written. {not in Vi} :wa[ll]! Write all changed buffers, even the ones that are readonly. Buffers without a file name are not - written. {not in Vi} + written and cause an error message. {not in Vi} Vim will warn you if you try to overwrite a file that has been changed @@ -1558,6 +1558,13 @@ If you want to automatically reload a file when it has been changed outside of Vim, set the 'autoread' option. This doesn't work at the moment you write the file though, only when the file wasn't changed inside of Vim. +If you do not want to be asked or automatically reload the file, you can use +this: > + set buftype=nofile + +Or, when starting gvim from a shell: > + gvim file.log -c "set buftype=nofile" + Note that if a FileChangedShell autocommand is defined you will not get a warning message or prompt. The autocommand is expected to handle this. diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index b34bf48..c8351eb 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 8.0. Last change: 2016 Nov 04 +*eval.txt* For Vim version 8.0. Last change: 2017 Apr 22 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1329,7 +1329,8 @@ b:changedtick The total number of changes to the current buffer. It is : let my_changedtick = b:changedtick : call My_Update() :endif -< +< You cannot change or delete the b:changedtick variable. + *window-variable* *w:var* *w:* A variable name that is preceded with "w:" is local to the current window. It is deleted when the window is closed. @@ -1788,8 +1789,11 @@ v:progpath Contains the command with which Vim was invoked, including the |--remote-expr|. To get the full path use: > echo exepath(v:progpath) -< NOTE: This does not work when the command is a relative path - and the current directory has changed. +< If the path is relative it will be expanded to the full path, + so that it still works after `:cd`. Thus starting "./vim" + results in "/home/user/path/to/vim/src/vim". + On MS-Windows the executable may be called "vim.exe", but the + ".exe" is not added to v:progpath. Read-only. *v:register* *register-variable* @@ -1900,6 +1904,8 @@ v:termresponse The escape sequence returned by the terminal for the |t_RV| *v:testing* *testing-variable* v:testing Must be set before using `test_garbagecollect_now()`. + Also, when set certain error messages won't be shown for 2 + seconds. (e.g. "'dictionary' option is empty") *v:this_session* *this_session-variable* v:this_session Full filename of the last loaded or saved session file. See @@ -1980,19 +1986,27 @@ argidx() Number current index in the argument list arglistid([{winnr} [, {tabnr}]]) Number argument list id argv({nr}) String {nr} entry of the argument list argv() List the argument list -assert_equal({exp}, {act} [, {msg}]) none assert {exp} is equal to {act} -assert_exception({error} [, {msg}]) none assert {error} is in v:exception -assert_fails({cmd} [, {error}]) none assert {cmd} fails -assert_false({actual} [, {msg}]) none assert {actual} is false +assert_equal({exp}, {act} [, {msg}]) + none assert {exp} is equal to {act} +assert_exception({error} [, {msg}]) + none assert {error} is in v:exception +assert_fails({cmd} [, {error}]) none assert {cmd} fails +assert_false({actual} [, {msg}]) + none assert {actual} is false assert_inrange({lower}, {upper}, {actual} [, {msg}]) none assert {actual} is inside the range -assert_match({pat}, {text} [, {msg}]) none assert {pat} matches {text} -assert_notequal({exp}, {act} [, {msg}]) none assert {exp} is not equal {act} -assert_notmatch({pat}, {text} [, {msg}]) none assert {pat} not matches {text} -assert_true({actual} [, {msg}]) none assert {actual} is true +assert_match({pat}, {text} [, {msg}]) + none assert {pat} matches {text} +assert_notequal({exp}, {act} [, {msg}]) + none assert {exp} is not equal {act} +assert_notmatch({pat}, {text} [, {msg}]) + none assert {pat} not matches {text} +assert_report({msg}) none report a test failure +assert_true({actual} [, {msg}]) none assert {actual} is true asin({expr}) Float arc sine of {expr} atan({expr}) Float arc tangent of {expr} atan2({expr1}, {expr2}) Float arc tangent of {expr1} / {expr2} +balloon_show({msg}) none show {msg} inside the balloon browse({save}, {title}, {initdir}, {default}) String put up a file requester browsedir({title}, {initdir}) String put up a directory requester @@ -2009,6 +2023,7 @@ byteidxcomp({expr}, {nr}) Number byte index of {nr}'th char in {expr} call({func}, {arglist} [, {dict}]) any call {func} with arguments {arglist} ceil({expr}) Float round {expr} up +ch_canread({handle}) Number check if there is something to read ch_close({handle}) none close {handle} ch_close_in({handle}) none close in part of {handle} ch_evalexpr({handle}, {expr} [, {options}]) @@ -2221,8 +2236,8 @@ matchstr({expr}, {pat}[, {start}[, {count}]]) String {count}'th match of {pat} in {expr} matchstrpos({expr}, {pat}[, {start}[, {count}]]) List {count}'th match of {pat} in {expr} -max({list}) Number maximum value of items in {list} -min({list}) Number minimum value of items in {list} +max({expr}) Number maximum value of items in {expr} +min({expr}) Number minimum value of items in {expr} mkdir({name} [, {path} [, {prot}]]) Number create directory {name} mode([expr]) String current editing mode @@ -2238,6 +2253,7 @@ printf({fmt}, {expr1}...) String format text pumvisible() Number whether popup menu is visible pyeval({expr}) any evaluate |Python| expression py3eval({expr}) any evaluate |python3| expression +pyxeval({expr}) any evaluate |python_x| expression range({expr} [, {max} [, {stride}]]) List items from {expr} to {max} readfile({fname} [, {binary} [, {max}]]) @@ -2245,14 +2261,17 @@ readfile({fname} [, {binary} [, {max}]]) reltime([{start} [, {end}]]) List get time value reltimefloat({time}) Float turn the time value into a Float reltimestr({time}) String turn time value into a String -remote_expr({server}, {string} [, {idvar}]) +remote_expr({server}, {string} [, {idvar} [, {timeout}]]) String send expression remote_foreground({server}) Number bring Vim server to the foreground remote_peek({serverid} [, {retvar}]) Number check for reply string -remote_read({serverid}) String read reply string +remote_read({serverid} [, {timeout}]) + String read reply string remote_send({server}, {string} [, {idvar}]) String send key sequence +remote_startserver({name}) none become server {name} + String send key sequence remove({list}, {idx} [, {end}]) any remove items {idx}-{end} from {list} remove({dict}, {key}) any remove entry {key} from {dict} rename({from}, {to}) Number rename (move) file from {from} to {to} @@ -2345,7 +2364,7 @@ systemlist({expr} [, {input}]) List output of shell command/filter {expr} tabpagebuflist([{arg}]) List list of buffer numbers in tab page tabpagenr([{arg}]) Number number of current or last tab page tabpagewinnr({tabarg}[, {arg}]) Number number of current window in tab page -taglist({expr}) List list of tags matching {expr} +taglist({expr}[, {filename}]) List list of tags matching {expr} tagfiles() List tags files used tan({expr}) Float tangent of {expr} tanh({expr}) Float hyperbolic tangent of {expr} @@ -2353,14 +2372,15 @@ tempname() String name for a temporary file test_alloc_fail({id}, {countdown}, {repeat}) none make memory allocation fail test_autochdir() none enable 'autochdir' during startup -test_disable_char_avail({expr}) none test without typeahead test_garbagecollect_now() none free memory right now for testing +test_ignore_error({expr}) none ignore a specific error test_null_channel() Channel null value for testing test_null_dict() Dict null value for testing test_null_job() Job null value for testing test_null_list() List null value for testing test_null_partial() Funcref null value for testing test_null_string() String null value for testing +test_override({expr}, {val}) none test with Vim internal overrides test_settime({expr}) none set current time for testing timer_info([{id}]) List information about timers timer_pause({id}, {pause}) none pause or unpause a timer @@ -2571,7 +2591,10 @@ assert_notmatch({pattern}, {actual} [, {msg}]) The opposite of `assert_match()`: add an error message to |v:errors| when {pattern} matches {actual}. -assert_true({actual} [, {msg}]) *assert_true()* +assert_report({msg}) *assert_report()* + Report a test failure directly, using {msg}. + +assert_true({actual} [, {msg}]) *assert_true()* When {actual} is not true an error message is added to |v:errors|, like with |assert_equal()|. A value is TRUE when it is a non-zero number. When {actual} @@ -2615,6 +2638,28 @@ atan2({expr1}, {expr2}) *atan2()* < 2.356194 {only available when compiled with the |+float| feature} +balloon_show({msg}) *balloon_show()* + Show {msg} inside the balloon. + Example: > + func GetBalloonContent() + " initiate getting the content + return '' + endfunc + set balloonexpr=GetBalloonContent() + + func BalloonCallback(result) + call balloon_show(a:result) + endfunc +< + The intended use is that fetching the content of the balloon + is initiated from 'balloonexpr'. It will invoke an + asynchronous method, in which a callback invokes + balloon_show(). The 'balloonexpr' itself can return an + empty string or a placeholder. + + When showing a balloon is not possible nothing happens, no + error message. + {only available when compiled with the +balloon_eval feature} *browse()* browse({save}, {title}, {initdir}, {default}) @@ -2810,186 +2855,28 @@ ceil({expr}) *ceil()* < 4.0 {only available when compiled with the |+float| feature} -changenr() *changenr()* - Return the number of the most recent change. This is the same - number as what is displayed with |:undolist| and can be used - with the |:undo| command. - When a change was made it is the number of that change. After - redo it is the number of the redone change. After undo it is - one less than the number of the undone change. - -char2nr({expr}[, {utf8}]) *char2nr()* - Return number value of the first char in {expr}. Examples: > - char2nr(" ") returns 32 - char2nr("ABC") returns 65 -< When {utf8} is omitted or zero, the current 'encoding' is used. - Example for "utf-8": > - char2nr("á") returns 225 - char2nr("á"[0]) returns 195 -< With {utf8} set to 1, always treat as utf-8 characters. - A combining character is a separate character. - |nr2char()| does the opposite. - -cindent({lnum}) *cindent()* - Get the amount of indent for line {lnum} according the C - indenting rules, as with 'cindent'. - The indent is counted in spaces, the value of 'tabstop' is - relevant. {lnum} is used just like in |getline()|. - When {lnum} is invalid or Vim was not compiled the |+cindent| - feature, -1 is returned. - See |C-indenting|. - -clearmatches() *clearmatches()* - Clears all matches previously defined by |matchadd()| and the - |:match| commands. - - *col()* -col({expr}) The result is a Number, which is the byte index of the column - position given with {expr}. The accepted positions are: - . the cursor position - $ the end of the cursor line (the result is the - number of bytes in the cursor line plus one) - 'x position of mark x (if the mark is not set, 0 is - returned) - v In Visual mode: the start of the Visual area (the - cursor is the end). When not in Visual mode - returns the cursor position. Differs from |'<| in - that it's updated right away. - Additionally {expr} can be [lnum, col]: a |List| with the line - and column number. Most useful when the column is "$", to get - the last column of a specific line. When "lnum" or "col" is - out of range then col() returns zero. - To get the line number use |line()|. To get both use - |getpos()|. - For the screen column position use |virtcol()|. - Note that only marks in the current file can be used. - Examples: > - col(".") column of cursor - col("$") length of cursor line plus one - col("'t") column of mark t - col("'" . markname) column of mark markname -< The first column is 1. 0 is returned for an error. - For an uppercase mark the column may actually be in another - buffer. - For the cursor position, when 'virtualedit' is active, the - column is one higher if the cursor is after the end of the - line. This can be used to obtain the column in Insert mode: > - :imap :let save_ve = &ve - \:set ve=all - \:echo col(".") . "\n" - \let &ve = save_ve -< - -complete({startcol}, {matches}) *complete()* *E785* - Set the matches for Insert mode completion. - Can only be used in Insert mode. You need to use a mapping - with CTRL-R = (see |i_CTRL-R|). It does not work after CTRL-O - or with an expression mapping. - {startcol} is the byte offset in the line where the completed - text start. The text up to the cursor is the original text - that will be replaced by the matches. Use col('.') for an - empty string. "col('.') - 1" will replace one character by a - match. - {matches} must be a |List|. Each |List| item is one match. - See |complete-items| for the kind of items that are possible. - Note that the after calling this function you need to avoid - inserting anything that would cause completion to stop. - The match can be selected with CTRL-N and CTRL-P as usual with - Insert mode completion. The popup menu will appear if - specified, see |ins-completion-menu|. - Example: > - inoremap =ListMonths() - - func! ListMonths() - call complete(col('.'), ['January', 'February', 'March', - \ 'April', 'May', 'June', 'July', 'August', 'September', - \ 'October', 'November', 'December']) - return '' - endfunc -< This isn't very useful, but it shows how it works. Note that - an empty string is returned to avoid a zero being inserted. +ch_canread({handle}) *ch_canread()* + Return non-zero when there is something to read from {handle}. + {handle} can be a Channel or a Job that has a Channel. -complete_add({expr}) *complete_add()* - Add {expr} to the list of matches. Only to be used by the - function specified with the 'completefunc' option. - Returns 0 for failure (empty string or out of memory), - 1 when the match was added, 2 when the match was already in - the list. - See |complete-functions| for an explanation of {expr}. It is - the same as one item in the list that 'omnifunc' would return. + This is useful to read from a channel at a convenient time, + e.g. from a timer. -complete_check() *complete_check()* - Check for a key typed while looking for completion matches. - This is to be used when looking for matches takes some time. - Returns |TRUE| when searching for matches is to be aborted, - zero otherwise. - Only to be used by the function specified with the - 'completefunc' option. + Note that messages are dropped when the channel does not have + a callback. Add a close callback to avoid that. - *confirm()* -confirm({msg} [, {choices} [, {default} [, {type}]]]) - Confirm() offers the user a dialog, from which a choice can be - made. It returns the number of the choice. For the first - choice this is 1. - Note: confirm() is only supported when compiled with dialog - support, see |+dialog_con| and |+dialog_gui|. - - {msg} is displayed in a |dialog| with {choices} as the - alternatives. When {choices} is missing or empty, "&OK" is - used (and translated). - {msg} is a String, use '\n' to include a newline. Only on - some systems the string is wrapped when it doesn't fit. - - {choices} is a String, with the individual choices separated - by '\n', e.g. > - confirm("Save changes?", "&Yes\n&No\n&Cancel") -< The letter after the '&' is the shortcut key for that choice. - Thus you can type 'c' to select "Cancel". The shortcut does - not need to be the first letter: > - confirm("file has been modified", "&Save\nSave &All") -< For the console, the first letter of each choice is used as - the default shortcut key. - - The optional {default} argument is the number of the choice - that is made if the user hits . Use 1 to make the first - choice the default one. Use 0 to not set a default. If - {default} is omitted, 1 is used. - - The optional {type} argument gives the type of dialog. This - is only used for the icon of the GTK, Mac, Motif and Win32 - GUI. It can be one of these values: "Error", "Question", - "Info", "Warning" or "Generic". Only the first character is - relevant. When {type} is omitted, "Generic" is used. - - If the user aborts the dialog by pressing , CTRL-C, - or another valid interrupt key, confirm() returns 0. - - An example: > - :let choice = confirm("What do you want?", "&Apples\n&Oranges\n&Bananas", 2) - :if choice == 0 - : echo "make up your mind!" - :elseif choice == 3 - : echo "tasteful" - :else - : echo "I prefer bananas myself." - :endif -< In a GUI dialog, buttons are used. The layout of the buttons - depends on the 'v' flag in 'guioptions'. If it is included, - the buttons are always put vertically. Otherwise, confirm() - tries to put the buttons in one horizontal line. If they - don't fit, a vertical layout is used anyway. For some systems - the horizontal layout is always used. + {only available when compiled with the |+channel| feature} ch_close({handle}) *ch_close()* Close {handle}. See |channel-close|. - {handle} can be Channel or a Job that has a Channel. + {handle} can be a Channel or a Job that has a Channel. A close callback is not invoked. {only available when compiled with the |+channel| feature} ch_close_in({handle}) *ch_close_in()* Close the "in" part of {handle}. See |channel-close-in|. - {handle} can be Channel or a Job that has a Channel. + {handle} can be a Channel or a Job that has a Channel. A close callback is not invoked. {only available when compiled with the |+channel| feature} @@ -2998,7 +2885,7 @@ ch_evalexpr({handle}, {expr} [, {options}]) *ch_evalexpr()* Send {expr} over {handle}. The {expr} is encoded according to the type of channel. The function cannot be used with a raw channel. See |channel-use|. - {handle} can be Channel or a Job that has a Channel. + {handle} can be a Channel or a Job that has a Channel. *E917* {options} must be a Dictionary. It must not have a "callback" entry. It can have a "timeout" entry to specify the timeout @@ -3012,7 +2899,7 @@ ch_evalexpr({handle}, {expr} [, {options}]) *ch_evalexpr()* ch_evalraw({handle}, {string} [, {options}]) *ch_evalraw()* Send {string} over {handle}. - {handle} can be Channel or a Job that has a Channel. + {handle} can be a Channel or a Job that has a Channel. Works like |ch_evalexpr()|, but does not encode the request or decode the response. The caller is responsible for the @@ -3025,7 +2912,7 @@ ch_evalraw({handle}, {string} [, {options}]) *ch_evalraw()* ch_getbufnr({handle}, {what}) *ch_getbufnr()* Get the buffer number that {handle} is using for {what}. - {handle} can be Channel or a Job that has a Channel. + {handle} can be a Channel or a Job that has a Channel. {what} can be "err" for stderr, "out" for stdout or empty for socket output. Returns -1 when there is no buffer. @@ -3071,7 +2958,7 @@ ch_log({msg} [, {handle}]) *ch_log()* |ch_logfile()|. When {handle} is passed the channel number is used for the message. - {handle} can be Channel or a Job that has a Channel. The + {handle} can be a Channel or a Job that has a Channel. The Channel must be open for the channel number to be used. ch_logfile({fname} [, {mode}]) *ch_logfile()* @@ -3099,7 +2986,7 @@ ch_open({address} [, {options}]) *ch_open()* ch_read({handle} [, {options}]) *ch_read()* Read from {handle} and return the received message. - {handle} can be Channel or a Job that has a Channel. + {handle} can be a Channel or a Job that has a Channel. See |channel-more|. {only available when compiled with the |+channel| feature} @@ -3113,7 +3000,7 @@ ch_sendexpr({handle}, {expr} [, {options}]) *ch_sendexpr()* according to the type of channel. The function cannot be used with a raw channel. See |channel-use|. *E912* - {handle} can be Channel or a Job that has a Channel. + {handle} can be a Channel or a Job that has a Channel. {only available when compiled with the |+channel| feature} @@ -3134,7 +3021,7 @@ ch_setoptions({handle}, {options}) *ch_setoptions()* "timeout" default read timeout in msec "mode" mode for the whole channel See |ch_open()| for more explanation. - {handle} can be Channel or a Job that has a Channel. + {handle} can be a Channel or a Job that has a Channel. Note that changing the mode may cause queued messages to be lost. @@ -3148,7 +3035,7 @@ ch_status({handle} [, {options}]) *ch_status()* "open" channel can be used "buffered" channel can be read, not written to "closed" channel can not be used - {handle} can be Channel or a Job that has a Channel. + {handle} can be a Channel or a Job that has a Channel. "buffered" is used when the channel was closed but there is still data that can be obtained with |ch_read()|. @@ -3157,6 +3044,176 @@ ch_status({handle} [, {options}]) *ch_status()* "err". For example, to get the error status: > ch_status(job, {"part": "err"}) < +changenr() *changenr()* + Return the number of the most recent change. This is the same + number as what is displayed with |:undolist| and can be used + with the |:undo| command. + When a change was made it is the number of that change. After + redo it is the number of the redone change. After undo it is + one less than the number of the undone change. + +char2nr({expr}[, {utf8}]) *char2nr()* + Return number value of the first char in {expr}. Examples: > + char2nr(" ") returns 32 + char2nr("ABC") returns 65 +< When {utf8} is omitted or zero, the current 'encoding' is used. + Example for "utf-8": > + char2nr("á") returns 225 + char2nr("á"[0]) returns 195 +< With {utf8} set to 1, always treat as utf-8 characters. + A combining character is a separate character. + |nr2char()| does the opposite. + +cindent({lnum}) *cindent()* + Get the amount of indent for line {lnum} according the C + indenting rules, as with 'cindent'. + The indent is counted in spaces, the value of 'tabstop' is + relevant. {lnum} is used just like in |getline()|. + When {lnum} is invalid or Vim was not compiled the |+cindent| + feature, -1 is returned. + See |C-indenting|. + +clearmatches() *clearmatches()* + Clears all matches previously defined by |matchadd()| and the + |:match| commands. + + *col()* +col({expr}) The result is a Number, which is the byte index of the column + position given with {expr}. The accepted positions are: + . the cursor position + $ the end of the cursor line (the result is the + number of bytes in the cursor line plus one) + 'x position of mark x (if the mark is not set, 0 is + returned) + v In Visual mode: the start of the Visual area (the + cursor is the end). When not in Visual mode + returns the cursor position. Differs from |'<| in + that it's updated right away. + Additionally {expr} can be [lnum, col]: a |List| with the line + and column number. Most useful when the column is "$", to get + the last column of a specific line. When "lnum" or "col" is + out of range then col() returns zero. + To get the line number use |line()|. To get both use + |getpos()|. + For the screen column position use |virtcol()|. + Note that only marks in the current file can be used. + Examples: > + col(".") column of cursor + col("$") length of cursor line plus one + col("'t") column of mark t + col("'" . markname) column of mark markname +< The first column is 1. 0 is returned for an error. + For an uppercase mark the column may actually be in another + buffer. + For the cursor position, when 'virtualedit' is active, the + column is one higher if the cursor is after the end of the + line. This can be used to obtain the column in Insert mode: > + :imap :let save_ve = &ve + \:set ve=all + \:echo col(".") . "\n" + \let &ve = save_ve +< + +complete({startcol}, {matches}) *complete()* *E785* + Set the matches for Insert mode completion. + Can only be used in Insert mode. You need to use a mapping + with CTRL-R = (see |i_CTRL-R|). It does not work after CTRL-O + or with an expression mapping. + {startcol} is the byte offset in the line where the completed + text start. The text up to the cursor is the original text + that will be replaced by the matches. Use col('.') for an + empty string. "col('.') - 1" will replace one character by a + match. + {matches} must be a |List|. Each |List| item is one match. + See |complete-items| for the kind of items that are possible. + Note that the after calling this function you need to avoid + inserting anything that would cause completion to stop. + The match can be selected with CTRL-N and CTRL-P as usual with + Insert mode completion. The popup menu will appear if + specified, see |ins-completion-menu|. + Example: > + inoremap =ListMonths() + + func! ListMonths() + call complete(col('.'), ['January', 'February', 'March', + \ 'April', 'May', 'June', 'July', 'August', 'September', + \ 'October', 'November', 'December']) + return '' + endfunc +< This isn't very useful, but it shows how it works. Note that + an empty string is returned to avoid a zero being inserted. + +complete_add({expr}) *complete_add()* + Add {expr} to the list of matches. Only to be used by the + function specified with the 'completefunc' option. + Returns 0 for failure (empty string or out of memory), + 1 when the match was added, 2 when the match was already in + the list. + See |complete-functions| for an explanation of {expr}. It is + the same as one item in the list that 'omnifunc' would return. + +complete_check() *complete_check()* + Check for a key typed while looking for completion matches. + This is to be used when looking for matches takes some time. + Returns |TRUE| when searching for matches is to be aborted, + zero otherwise. + Only to be used by the function specified with the + 'completefunc' option. + + *confirm()* +confirm({msg} [, {choices} [, {default} [, {type}]]]) + Confirm() offers the user a dialog, from which a choice can be + made. It returns the number of the choice. For the first + choice this is 1. + Note: confirm() is only supported when compiled with dialog + support, see |+dialog_con| and |+dialog_gui|. + + {msg} is displayed in a |dialog| with {choices} as the + alternatives. When {choices} is missing or empty, "&OK" is + used (and translated). + {msg} is a String, use '\n' to include a newline. Only on + some systems the string is wrapped when it doesn't fit. + + {choices} is a String, with the individual choices separated + by '\n', e.g. > + confirm("Save changes?", "&Yes\n&No\n&Cancel") +< The letter after the '&' is the shortcut key for that choice. + Thus you can type 'c' to select "Cancel". The shortcut does + not need to be the first letter: > + confirm("file has been modified", "&Save\nSave &All") +< For the console, the first letter of each choice is used as + the default shortcut key. + + The optional {default} argument is the number of the choice + that is made if the user hits . Use 1 to make the first + choice the default one. Use 0 to not set a default. If + {default} is omitted, 1 is used. + + The optional {type} argument gives the type of dialog. This + is only used for the icon of the GTK, Mac, Motif and Win32 + GUI. It can be one of these values: "Error", "Question", + "Info", "Warning" or "Generic". Only the first character is + relevant. When {type} is omitted, "Generic" is used. + + If the user aborts the dialog by pressing , CTRL-C, + or another valid interrupt key, confirm() returns 0. + + An example: > + :let choice = confirm("What do you want?", "&Apples\n&Oranges\n&Bananas", 2) + :if choice == 0 + : echo "make up your mind!" + :elseif choice == 3 + : echo "tasteful" + :else + : echo "I prefer bananas myself." + :endif +< In a GUI dialog, buttons are used. The layout of the buttons + depends on the 'v' flag in 'guioptions'. If it is included, + the buttons are always put vertically. Otherwise, confirm() + tries to put the buttons in one horizontal line. If they + don't fit, a vertical layout is used anyway. For some systems + the horizontal layout is always used. + *copy()* copy({expr}) Make a copy of {expr}. For Numbers and Strings this isn't different from using {expr} directly. @@ -3413,7 +3470,7 @@ execute({command} [, {silent}]) *execute()* "" no `:silent` used "silent" `:silent` used "silent!" `:silent!` used - The default is 'silent'. Note that with "silent!", unlike + The default is "silent". Note that with "silent!", unlike `:redir`, error messages are dropped. When using an external command the screen may be messed up, use `system()` instead. *E930* @@ -3879,11 +3936,14 @@ foldtext() Returns a String, to be displayed for a closed fold. This is |v:foldstart|, |v:foldend| and |v:folddashes| variables. The returned string looks like this: > +-- 45 lines: abcdef -< The number of dashes depends on the foldlevel. The "45" is - the number of lines in the fold. "abcdef" is the text in the - first non-blank line of the fold. Leading white space, "//" - or "/*" and the text from the 'foldmarker' and 'commentstring' - options is removed. +< The number of leading dashes depends on the foldlevel. The + "45" is the number of lines in the fold. "abcdef" is the text + in the first non-blank line of the fold. Leading white space, + "//" or "/*" and the text from the 'foldmarker' and + 'commentstring' options is removed. + When used to draw the actual foldtext, the rest of the line + will be filled with the fold char from the 'fillchars' + setting. {not available when compiled without the |+folding| feature} foldtextresult({lnum}) *foldtextresult()* @@ -4015,10 +4075,10 @@ get({dict}, {key} [, {default}]) get({func}, {what}) Get an item with from Funcref {func}. Possible values for {what} are: - 'name' The function name - 'func' The function - 'dict' The dictionary - 'args' The list with arguments + "name" The function name + "func" The function + "dict" The dictionary + "args" The list with arguments *getbufinfo()* getbufinfo([{expr}]) @@ -4158,6 +4218,10 @@ getchar([expr]) *getchar()* exe "normal " . v:mouse_col . "|" endif < + When using bracketed paste only the first character is + returned, the rest of the pasted text is dropped. + |xterm-bracketed-paste|. + There is no prompt, you will somehow have to make clear to the user that a character has to be typed. There is no mapping for the character. @@ -4315,12 +4379,14 @@ getcurpos() Get the position of the cursor. This is like getpos('.'), but includes an extra item in the list: [bufnum, lnum, col, off, curswant] ~ The "curswant" number is the preferred column when moving the - cursor vertically. + cursor vertically. Also see |getpos()|. + This can be used to save and restore the cursor position: > let save_cursor = getcurpos() MoveTheCursorAround call setpos('.', save_cursor) -< +< Note that this only works within the window. See + |winrestview()| for restoring more state. *getcwd()* getcwd([{winnr} [, {tabnr}]]) The result is a String, which is the name of the current @@ -4353,8 +4419,8 @@ getfontname([{name}]) *getfontname()* Only works when the GUI is running, thus not in your vimrc or gvimrc file. Use the |GUIEnter| autocommand to use this function just after the GUI has started. - Note that the GTK 2 GUI accepts any font name, thus checking - for a valid name does not work. + Note that the GTK GUI accepts any font name, thus checking for + a valid name does not work. getfperm({fname}) *getfperm()* The result is a String, which is the read, write, and execute @@ -4618,13 +4684,16 @@ gettabwinvar({tabnr}, {winnr}, {varname} [, {def}]) *gettabwinvar()* < *getwinposx()* getwinposx() The result is a Number, which is the X coordinate in pixels of - the left hand side of the GUI Vim window. The result will be - -1 if the information is not available. + the left hand side of the GUI Vim window. Also works for an + xterm. + The result will be -1 if the information is not available. + The value can be used with `:winpos`. *getwinposy()* getwinposy() The result is a Number, which is the Y coordinate in pixels of - the top of the GUI Vim window. The result will be -1 if the - information is not available. + the top of the GUI Vim window. Also works for an xterm. + The result will be -1 if the information is not available. + The value can be used with `:winpos`. getwininfo([{winid}]) *getwininfo()* Returns information about windows as a List with Dictionaries. @@ -5216,6 +5285,7 @@ join({list} [, {sep}]) *join()* js_decode({string}) *js_decode()* This is similar to |json_decode()| with these differences: - Object key names do not have to be in quotes. + - Strings can be in single quotes. - Empty items in an array (between two commas) are allowed and result in v:none items. @@ -5239,12 +5309,29 @@ json_decode({string}) *json_decode()* in Vim values. See |json_encode()| for the relation between JSON and Vim values. The decoding is permissive: - - A trailing comma in an array and object is ignored. + - A trailing comma in an array and object is ignored, e.g. + "[1, 2, ]" is the same as "[1, 2]". - More floating point numbers are recognized, e.g. "1." for - "1.0". - The result must be a valid Vim type: - - An empty object member name is not allowed. - - Duplicate object member names are not allowed. + "1.0", or "001.2" for "1.2". Special floating point values + "Infinity" and "NaN" (capitalization ignored) are accepted. + - Leading zeroes in integer numbers are ignored, e.g. "012" + for "12" or "-012" for "-12". + - Capitalization is ignored in literal names null, true or + false, e.g. "NULL" for "null", "True" for "true". + - Control characters U+0000 through U+001F which are not + escaped in strings are accepted, e.g. " " (tab + character in string) for "\t". + - Backslash in an invalid 2-character sequence escape is + ignored, e.g. "\a" is decoded as "a". + - A correct surrogate pair in JSON strings should normally be + a 12 character sequence such as "\uD834\uDD1E", but + json_decode() silently accepts truncated surrogate pairs + such as "\uD834" or "\uD834\u" + *E938* + A duplicate key in an object, valid in rfc7159, is not + accepted by json_decode() as the result must be a valid Vim + type, e.g. this fails: {"a":"b", "a":"c"} + json_encode({expr}) *json_encode()* Encode {expr} as JSON and return this as a string. @@ -5347,8 +5434,10 @@ line({expr}) The result is a Number, which is the line number of the file $ the last line in the current buffer 'x position of mark x (if the mark is not set, 0 is returned) - w0 first line visible in current window - w$ last line visible in current window + w0 first line visible in current window (one if the + display isn't updated, e.g. in silent Ex mode) + w$ last line visible in current window (this is one + less than "w0" if no lines are visible) v In Visual mode: the start of the Visual area (the cursor is the end). When not in Visual mode returns the cursor position. Differs from |'<| in @@ -5781,16 +5870,20 @@ matchstrpos({expr}, {pat}[, {start}[, {count}]]) *matchstrpos()* The type isn't changed, it's not necessarily a String. *max()* -max({list}) Return the maximum value of all items in {list}. - If {list} is not a list or one of the items in {list} cannot - be used as a Number this results in an error. - An empty |List| results in zero. +max({expr}) Return the maximum value of all items in {expr}. + {expr} can be a list or a dictionary. For a dictionary, + it returns the maximum of all values in the dictionary. + If {expr} is neither a list nor a dictionary, or one of the + items in {expr} cannot be used as a Number this results in + an error. An empty |List| or |Dictionary| results in zero. *min()* -min({list}) Return the minimum value of all items in {list}. - If {list} is not a list or one of the items in {list} cannot - be used as a Number this results in an error. - An empty |List| results in zero. +min({expr}) Return the minimum value of all items in {expr}. + {expr} can be a list or a dictionary. For a dictionary, + it returns the minimum of all values in the dictionary. + If {expr} is neither a list nor a dictionary, or one of the + items in {expr} cannot be used as a Number this results in + an error. An empty |List| or |Dictionary| results in zero. *mkdir()* *E739* mkdir({name} [, {path} [, {prot}]]) @@ -5824,9 +5917,13 @@ mode([expr]) Return a string that indicates the current mode. S Select by line CTRL-S Select blockwise i Insert + ic Insert mode completion |compl-generic| + ix Insert mode |i_CTRL-X| completion R Replace |R| + Rc Replace mode completion |compl-generic| Rv Virtual Replace |gR| - c Command-line + Rx Replace mode |i_CTRL-X| completion + c Command-line editing cv Vim Ex mode |gQ| ce Normal Ex mode |Q| r Hit-enter prompt @@ -5950,7 +6047,7 @@ printf({fmt}, {expr1} ...) *printf()* %e floating point number as 1.23e3, inf, -inf or nan %E floating point number as 1.23E3, INF, -INF or NAN %g floating point number, as %f or %e depending on value - %G floating point number, as %f or %E depending on value + %G floating point number, as %F or %E depending on value %% the % character itself Conversion specifications start with '%' and end with the @@ -6148,6 +6245,14 @@ pyeval({expr}) *pyeval()* non-string keys result in error. {only available when compiled with the |+python| feature} +pyxeval({expr}) *pyxeval()* + Evaluate Python expression {expr} and return its result + converted to Vim data structures. + Uses Python 2 or 3, see |python_x| and 'pyxversion'. + See also: |pyeval()|, |py3eval()| + {only available when compiled with the |+python| or the + |+python3| feature} + *E726* *E727* range({expr} [, {max} [, {stride}]]) *range()* Returns a |List| with Numbers: @@ -6239,15 +6344,17 @@ reltimestr({time}) *reltimestr()* {only available when compiled with the |+reltime| feature} *remote_expr()* *E449* -remote_expr({server}, {string} [, {idvar}]) +remote_expr({server}, {string} [, {idvar} [, {timeout}]]) Send the {string} to {server}. The string is sent as an expression and the result is returned after evaluation. The result must be a String or a |List|. A |List| is turned into a String by joining the items with a line break in between (not at the end), like with join(expr, "\n"). - If {idvar} is present, it is taken as the name of a - variable and a {serverid} for later use with + If {idvar} is present and not empty, it is taken as the name + of a variable and a {serverid} for later use with remote_read() is stored there. + If {timeout} is given the read times out after this many + seconds. Otherwise a timeout of 600 seconds is used. See also |clientserver| |RemoteReply|. This function is not available in the |sandbox|. {only available when compiled with the |+clientserver| feature} @@ -6286,9 +6393,10 @@ remote_peek({serverid} [, {retvar}]) *remote_peek()* :let repl = "" :echo "PEEK: ".remote_peek(id, "repl").": ".repl -remote_read({serverid}) *remote_read()* +remote_read({serverid}, [{timeout}]) *remote_read()* Return the oldest available reply from {serverid} and consume - it. It blocks until a reply is available. + it. Unless a {timeout} in seconds is given, it blocks until a + reply is available. See also |clientserver|. This function is not available in the |sandbox|. {only available when compiled with the |+clientserver| feature} @@ -6306,6 +6414,7 @@ remote_send({server}, {string} [, {idvar}]) See also |clientserver| |RemoteReply|. This function is not available in the |sandbox|. {only available when compiled with the |+clientserver| feature} + Note: Any errors will be reported in the server and may mess up the display. Examples: > @@ -6317,6 +6426,12 @@ remote_send({server}, {string} [, {idvar}]) :echo remote_send("gvim", ":sleep 10 | echo ". \ 'server2client(expand(""), "HELLO")') < + *remote_startserver()* *E941* *E942* +remote_startserver({name}) + Become the server {name}. This fails if already running as a + server, when |v:servername| is not empty. + {only available when compiled with the |+clientserver| feature} + remove({list}, {idx} [, {end}]) *remove()* Without {end}: Remove the item at {idx} from |List| {list} and return the item. @@ -6774,10 +6889,12 @@ setpos({expr}, {list}) [bufnum, lnum, col, off, curswant] "bufnum" is the buffer number. Zero can be used for the - current buffer. Setting the cursor is only possible for - the current buffer. To set a mark in another buffer you can - use the |bufnr()| function to turn a file name into a buffer - number. + current buffer. When setting an uppercase mark "bufnum" is + used for the mark position. For other marks it specifies the + buffer to set the mark in. You can use the |bufnr()| function + to turn a file name into a buffer number. + For setting the cursor and the ' mark "bufnum" is ignored, + since these are associated with a window, not a buffer. Does not change the jumplist. "lnum" and "col" are the position in the buffer. The first @@ -6828,6 +6945,7 @@ setqflist({list} [, {action}[, {what}]]) *setqflist()* nr error number text description of the error type single-character error type, 'E', 'W', etc. + valid recognized error message The "col", "vcol", "nr", "type" and "text" entries are optional. Either "lnum" or "pattern" entry can be used to @@ -6837,21 +6955,26 @@ setqflist({list} [, {action}[, {what}]]) *setqflist()* item will not be handled as an error line. If both "pattern" and "lnum" are present then "pattern" will be used. + If the "valid" entry is not supplied, then the valid flag is + set when "bufnr" is a valid buffer or "filename" exists. If you supply an empty {list}, the quickfix list will be cleared. Note that the list is not exactly the same as what |getqflist()| returns. - *E927* - If {action} is set to 'a', then the items from {list} are - added to the existing quickfix list. If there is no existing - list, then a new list is created. + {action} values: *E927* + 'a' The items from {list} are added to the existing + quickfix list. If there is no existing list, then a + new list is created. - If {action} is set to 'r', then the items from the current - quickfix list are replaced with the items from {list}. This - can also be used to clear the list: > - :call setqflist([], 'r') + 'r' The items from the current quickfix list are replaced + with the items from {list}. This can also be used to + clear the list: > + :call setqflist([], 'r') < + 'f' All the quickfix lists in the quickfix stack are + freed. + If {action} is not present or is set to ' ', then a new list is created. @@ -6873,7 +6996,7 @@ setqflist({list} [, {action}[, {what}]]) *setqflist()* This function can be used to create a quickfix list independent of the 'errorformat' setting. Use a command like - ":cc 1" to jump to the first position. + `:cc 1` to jump to the first position. *setreg()* @@ -7235,7 +7358,7 @@ strcharpart({src}, {start}[, {len}]) *strcharpart()* Like |strpart()| but using character index and length instead of byte index and length. When a character index is used where a character does not - exist it is assumed to be one byte. For example: > + exist it is assumed to be one character. For example: > strcharpart('abc', -1, 2) < results in 'a'. @@ -7548,7 +7671,11 @@ system({expr} [, {input}]) *system()* *E677* If {input} is given and is a |List| it is written to the file in a way |writefile()| does with {binary} set to "b" (i.e. with a newline between each list item with newlines inside - list items converted to NULs). + list items converted to NULs). + When {input} is given and is a number that is a valid id for + an existing buffer then the content of the buffer is written + to the file line by line, each line terminated by a NL and + NULs characters where the text has a NL. Pipes are not used, the 'shelltemp' option is not used. @@ -7598,7 +7725,8 @@ systemlist({expr} [, {input}]) *systemlist()* Same as |system()|, but returns a |List| with lines (parts of output separated by NL) with NULs transformed into NLs. Output is the same as |readfile()| will output with {binary} argument - set to "b". + set to "b". Note that on MS-Windows you may get trailing CR + characters. Returns an empty string on error. @@ -7643,8 +7771,13 @@ tagfiles() Returns a |List| with the file names used to search for tags for the current buffer. This is the 'tags' option expanded. -taglist({expr}) *taglist()* +taglist({expr}[, {filename}]) *taglist()* Returns a list of tags matching the regular expression {expr}. + + If {filename} is passed it is used to prioritize the results + in the same way that |:tselect| does. See |tag-priority|. + {filename} should be the full path of the file. + Each list item is a dictionary with at least the following entries: name Name of the tag. @@ -7667,7 +7800,7 @@ taglist({expr}) *taglist()* may appear, they give the name of the entity the tag is contained in. - The ex-command 'cmd' can be either an ex search pattern, a + The ex-command "cmd" can be either an ex search pattern, a line number or a line number followed by a byte number. If there are no matching tags, then an empty list is returned. @@ -7726,20 +7859,21 @@ test_autochdir() *test_autochdir()* Set a flag to enable the effect of 'autochdir' before Vim startup has finished. - *test_disable_char_avail()* -test_disable_char_avail({expr}) - When {expr} is 1 the internal char_avail() function will - return |FALSE|. When {expr} is 0 the char_avail() function will - function normally. - Only use this for a test where typeahead causes the test not - to work. E.g., to trigger the CursorMovedI autocommand event. - test_garbagecollect_now() *test_garbagecollect_now()* Like garbagecollect(), but executed right away. This must only be called directly to avoid any structure to exist internally, and |v:testing| must have been set before calling any function. +test_ignore_error({expr}) *test_ignore_error()* + Ignore any error containing {expr}. A normal message is given + instead. + This is only meant to be used in tests, where catching the + error with try/catch cannot be used (because it skips over + following code). + {expr} is used literally, not as a pattern. + There is currently no way to revert this. + test_null_channel() *test_null_channel()* Return a Channel that is null. Only useful for testing. {only available when compiled with the +channel feature} @@ -7760,10 +7894,24 @@ test_null_partial() *test_null_partial()* test_null_string() *test_null_string()* Return a String that is null. Only useful for testing. +test_override({name}, {val}) *test_override()* + Overrides certain parts of Vims internal processing to be able + to run tests. Only to be used for testing Vim! + The override is enabled when {val} is non-zero and removed + when {val} is zero. + Current supported values for name are: + + name effect when {val} is non-zero ~ + redraw disable the redrawing() function + char_avail disable the char_avail() function + ALL clear all overrides ({val} is not used) + test_settime({expr}) *test_settime()* Set the time Vim uses internally. Currently only used for timestamps in the history, as they are used in viminfo, and for undo. + Using a value of 1 makes Vim not sleep after a warning or + error message. {expr} must evaluate to a number. When the value is zero the normal behavior is restored. @@ -8115,7 +8263,7 @@ winnr([{arg}]) The result is a Number, which is the number of the current is returned. The number can be used with |CTRL-W_w| and ":wincmd w" |:wincmd|. - Also see |tabpagewinnr()|. + Also see |tabpagewinnr()| and |win_getid()|. *winrestcmd()* winrestcmd() Returns a sequence of |:resize| commands that should restore @@ -8348,7 +8496,7 @@ listcmds Compiled with commands for the buffer list |:files| and the argument list |arglist|. localmap Compiled with local mappings and abbr. |:map-local| lua Compiled with Lua interface |Lua|. -mac Any Macintosh version of Vim. +mac Any Macintosh version of Vim, but not all OS X. macunix Compiled for OS X, with darwin osx Compiled for OS X, with or without darwin menu Compiled with support for |:menu|. @@ -8382,6 +8530,7 @@ printer Compiled with |:hardcopy| support. profile Compiled with |:profile| support. python Compiled with Python 2.x interface. |has-python| python3 Compiled with Python 3.x interface. |has-python| +pythonx Compiled with |python_x| interface. |has-pythonx| qnx QNX version of Vim. quickfix Compiled with |quickfix| support. reltime Compiled with |reltime()| support. @@ -8416,7 +8565,10 @@ tgetent Compiled with tgetent support, able to use a termcap timers Compiled with |timer_start()| support. title Compiled with window title support |'title'|. toolbar Compiled with support for |gui-toolbar|. +ttyin input is a terminal (tty) +ttyout output is a terminal (tty) unix Unix version of Vim. +unnamedplus Compiled with support for "unnamedplus" in 'clipboard' user_commands User-defined commands. vertsplit Compiled with vertically split windows |:vsplit|. vim_starting True while initial source'ing takes place. |startup| @@ -8920,6 +9072,11 @@ This does NOT work: > value and the global value are changed. Example: > :let &path = &path . ',/usr/local/include' +< This also works for terminal codes in the form t_xx. + But only for alphanumerical names. Example: > + :let &t_k1 = "\[234;" +< When the code does not exist yet it will be created as + a terminal key code, there is no error. :let &{option-name} .= {expr1} For a string option: Append {expr1} to the value. @@ -9027,9 +9184,12 @@ This does NOT work: > :lockvar v :let v = 'asdf' " fails! :unlet v -< *E741* +< *E741* *E940* If you try to change a locked variable you get an - error message: "E741: Value is locked: {name}" + error message: "E741: Value is locked: {name}". + If you try to lock or unlock a built-in variable you + get an error message: "E940: Cannot lock or unlock + variable {name}". [depth] is relevant when locking a |List| or |Dictionary|. It specifies how deep the locking goes: @@ -10513,6 +10673,22 @@ missing: > : echo "You will _never_ see this message" :endif +To execute a command only when the |+eval| feature is disabled requires a trick, +as this example shows: > + if 1 + nnoremap : :" + endif + normal :set history=111 + if 1 + nunmap : + endif + +The "" here is a real CR character, type CTRL-V Enter to get it. + +When the |+eval| feature is available the ":" is remapped to add a double +quote, which has the effect of commenting-out the command. without the +|+eval| feature the nnoremap command is skipped and the command is executed. + ============================================================================== 11. The sandbox *eval-sandbox* *sandbox* *E48* diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt index 4c9b2b0..795b259 100644 --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -1,4 +1,4 @@ -*filetype.txt* For Vim version 8.0. Last change: 2016 Sep 09 +*filetype.txt* For Vim version 8.0. Last change: 2017 Mar 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -353,12 +353,12 @@ define yourself. There are a few ways to avoid this: You need to define your own mapping before the plugin is loaded (before editing a file of that type). The plugin will then skip installing the default mapping. - + *no_mail_maps* 3. Disable defining mappings for a specific filetype by setting a variable, which contains the name of the filetype. For the "mail" filetype this would be: > :let no_mail_maps = 1 - +< *no_plugin_maps* 4. Disable defining mappings for all filetypes by setting a variable: > :let no_plugin_maps = 1 < @@ -573,6 +573,8 @@ Man {number} {name} Global mapping: K Displays the manual page for the word under the cursor. +ManPreGetPage idem, allows for using a mapping: > + nmap ManPreGetPage Local mappings: CTRL-] Jump to the manual page for the word under the cursor. @@ -661,6 +663,12 @@ Since the text for this plugin is rather long it has been put in a separate file: |pi_spec.txt|. +RUST *ft-rust* + +Since the text for this plugin is rather long it has been put in a separate +file: |ft_rust.txt|. + + SQL *ft-sql* Since the text for this plugin is rather long it has been put in a separate diff --git a/runtime/doc/fold.txt b/runtime/doc/fold.txt index 6a99488..bdf4a48 100644 --- a/runtime/doc/fold.txt +++ b/runtime/doc/fold.txt @@ -1,4 +1,4 @@ -*fold.txt* For Vim version 8.0. Last change: 2016 Jan 02 +*fold.txt* For Vim version 8.0. Last change: 2017 Mar 18 VIM REFERENCE MANUAL by Bram Moolenaar @@ -64,7 +64,7 @@ whichever is lower. These are empty or white lines and lines starting with a character in 'foldignore'. White space is skipped before checking for characters in 'foldignore'. For C use "#" to ignore preprocessor lines. -When you want to ignore lines in another way, use the 'expr' method. The +When you want to ignore lines in another way, use the "expr" method. The |indent()| function can be used in 'foldexpr' to get the indent of a line. @@ -79,7 +79,7 @@ This will call a function to compute the fold level: > :set foldexpr=MyFoldLevel(v:lnum) This will make a fold out of paragraphs separated by blank lines: > :set foldexpr=getline(v:lnum)=~'^\\s*$'&&getline(v:lnum+1)=~'\\S'?'<1':1 -this does the same: > +This does the same: > :set foldexpr=getline(v:lnum-1)=~'^\\s*$'&&getline(v:lnum)=~'\\S'?'>1':1 Note that backslashes must be used to escape characters that ":set" handles @@ -139,7 +139,7 @@ fold level. But note that foldlevel() may return -1 if the level is not known yet. And it returns the level at the start of the line, while a fold might end in that line. -It may happened that folds are not updated properly. You can use |zx| or |zX| +It may happen that folds are not updated properly. You can use |zx| or |zX| to force updating folds. @@ -203,7 +203,7 @@ and the level given by the marker: 1. If a marker with the same fold level is encountered, the previous fold ends and another fold with the same level starts. 2. If a marker with a higher fold level is found, a nested fold is started. -3. if a marker with a lower fold level is found, all folds up to and including +3. If a marker with a lower fold level is found, all folds up to and including this level end and a fold with the specified level starts. The number indicates the fold level. A zero cannot be used (a marker with diff --git a/runtime/doc/ft_rust.txt b/runtime/doc/ft_rust.txt new file mode 100644 index 0000000..c2e21e4 --- /dev/null +++ b/runtime/doc/ft_rust.txt @@ -0,0 +1,237 @@ +*ft_rust.txt* Filetype plugin for Rust + +============================================================================== +CONTENTS *rust* + +1. Introduction |rust-intro| +2. Settings |rust-settings| +3. Commands |rust-commands| +4. Mappings |rust-mappings| + +============================================================================== +INTRODUCTION *rust-intro* + +This plugin provides syntax and supporting functionality for the Rust +filetype. + +============================================================================== +SETTINGS *rust-settings* + +This plugin has a few variables you can define in your vimrc that change the +behavior of the plugin. + + *g:rustc_path* +g:rustc_path~ + Set this option to the path to rustc for use in the |:RustRun| and + |:RustExpand| commands. If unset, "rustc" will be located in $PATH: > + let g:rustc_path = $HOME."/bin/rustc" +< + + *g:rustc_makeprg_no_percent* +g:rustc_makeprg_no_percent~ + Set this option to 1 to have 'makeprg' default to "rustc" instead of + "rustc %": > + let g:rustc_makeprg_no_percent = 1 +< + + *g:rust_conceal* +g:rust_conceal~ + Set this option to turn on the basic |conceal| support: > + let g:rust_conceal = 1 +< + + *g:rust_conceal_mod_path* +g:rust_conceal_mod_path~ + Set this option to turn on |conceal| for the path connecting token + "::": > + let g:rust_conceal_mod_path = 1 +< + + *g:rust_conceal_pub* +g:rust_conceal_pub~ + Set this option to turn on |conceal| for the "pub" token: > + let g:rust_conceal_pub = 1 +< + + *g:rust_recommended_style* +g:rust_recommended_style~ + Set this option to enable vim indentation and textwidth settings to + conform to style conventions of the rust standard library (i.e. use 4 + spaces for indents and sets 'textwidth' to 99). This option is enabled + by default. To disable it: > + let g:rust_recommended_style = 0 +< + + *g:rust_fold* +g:rust_fold~ + Set this option to turn on |folding|: > + let g:rust_fold = 1 +< + Value Effect ~ + 0 No folding + 1 Braced blocks are folded. All folds are open by + default. + 2 Braced blocks are folded. 'foldlevel' is left at the + global value (all folds are closed by default). + + *g:rust_bang_comment_leader* +g:rust_bang_comment_leader~ + Set this option to 1 to preserve the leader on multi-line doc comments + using the /*! syntax: > + let g:rust_bang_comment_leader = 1 +< + + *g:ftplugin_rust_source_path* +g:ftplugin_rust_source_path~ + Set this option to a path that should be prepended to 'path' for Rust + source files: > + let g:ftplugin_rust_source_path = $HOME.'/dev/rust' +< + + *g:rustfmt_command* +g:rustfmt_command~ + Set this option to the name of the 'rustfmt' executable in your $PATH. If + not specified it defaults to 'rustfmt' : > + let g:rustfmt_command = 'rustfmt' +< + *g:rustfmt_autosave* +g:rustfmt_autosave~ + Set this option to 1 to run |:RustFmt| automatically when saving a + buffer. If not specified it defaults to 0 : > + let g:rustfmt_autosave = 0 +< + *g:rustfmt_fail_silently* +g:rustfmt_fail_silently~ + Set this option to 1 to prevent 'rustfmt' from populating the + |location-list| with errors. If not specified it defaults to 0: > + let g:rustfmt_fail_silently = 0 +< + *g:rustfmt_options* +g:rustfmt_options~ + Set this option to a string of options to pass to 'rustfmt'. The + write-mode is already set to 'overwrite'. If not specified it + defaults to '' : > + let g:rustfmt_options = '' +< + + *g:rust_playpen_url* +g:rust_playpen_url~ + Set this option to override the url for the playpen to use: > + let g:rust_playpen_url = 'https://play.rust-lang.org/' +< + + *g:rust_shortener_url* +g:rust_shortener_url~ + Set this option to override the url for the url shortener: > + let g:rust_shortener_url = 'https://is.gd/' +< + + +============================================================================== +COMMANDS *rust-commands* + +:RustRun [args] *:RustRun* +:RustRun! [rustc-args] [--] [args] + Compiles and runs the current file. If it has unsaved changes, + it will be saved first using |:update|. If the current file is + an unnamed buffer, it will be written to a temporary file + first. The compiled binary is always placed in a temporary + directory, but is run from the current directory. + + The arguments given to |:RustRun| will be passed to the + compiled binary. + + If ! is specified, the arguments are passed to rustc instead. + A "--" argument will separate the rustc arguments from the + arguments passed to the binary. + + If |g:rustc_path| is defined, it is used as the path to rustc. + Otherwise it is assumed rustc can be found in $PATH. + +:RustExpand [args] *:RustExpand* +:RustExpand! [TYPE] [args] + Expands the current file using --pretty and displays the + results in a new split. If the current file has unsaved + changes, it will be saved first using |:update|. If the + current file is an unnamed buffer, it will be written to a + temporary file first. + + The arguments given to |:RustExpand| will be passed to rustc. + This is largely intended for specifying various --cfg + configurations. + + If ! is specified, the first argument is the expansion type to + pass to rustc --pretty. Otherwise it will default to + "expanded". + + If |g:rustc_path| is defined, it is used as the path to rustc. + Otherwise it is assumed rustc can be found in $PATH. + +:RustEmitIr [args] *:RustEmitIr* + Compiles the current file to LLVM IR and displays the results + in a new split. If the current file has unsaved changes, it + will be saved first using |:update|. If the current file is an + unnamed buffer, it will be written to a temporary file first. + + The arguments given to |:RustEmitIr| will be passed to rustc. + + If |g:rustc_path| is defined, it is used as the path to rustc. + Otherwise it is assumed rustc can be found in $PATH. + +:RustEmitAsm [args] *:RustEmitAsm* + Compiles the current file to assembly and displays the results + in a new split. If the current file has unsaved changes, it + will be saved first using |:update|. If the current file is an + unnamed buffer, it will be written to a temporary file first. + + The arguments given to |:RustEmitAsm| will be passed to rustc. + + If |g:rustc_path| is defined, it is used as the path to rustc. + Otherwise it is assumed rustc can be found in $PATH. + +:RustPlay *:RustPlay* + This command will only work if you have web-api.vim installed + (available at https://github.com/mattn/webapi-vim). It sends the + current selection, or if nothing is selected, the entirety of the + current buffer to the Rust playpen, and emits a message with the + shortened URL to the playpen. + + |g:rust_playpen_url| is the base URL to the playpen, by default + "https://play.rust-lang.org/". + + |g:rust_shortener_url| is the base url for the shorterner, by + default "https://is.gd/" + +:RustFmt *:RustFmt* + Runs |g:rustfmt_command| on the current buffer. If + |g:rustfmt_options| is set then those will be passed to the + executable. + + If |g:rustfmt_fail_silently| is 0 (the default) then it + will populate the |location-list| with the errors from + |g:rustfmt_command|. If |g:rustfmt_fail_silently| is set to 1 + then it will not populate the |location-list|. + +:RustFmtRange *:RustFmtRange* + Runs |g:rustfmt_command| with selected range. See + |:RustFmt| for any other information. + +============================================================================== +MAPPINGS *rust-mappings* + +This plugin defines mappings for |[[| and |]]| to support hanging indents. + +It also has a few other mappings: + + *rust_* + Executes |:RustRun| with no arguments. + Note: This binding is only available in MacVim. + + *rust_* + Populates the command line with |:RustRun|! using the + arguments given to the last invocation, but does not + execute it. + Note: This binding is only available in MacVim. + +============================================================================== + vim:tw=78:sw=4:noet:ts=8:ft=help:norl: diff --git a/runtime/doc/hangulin.txt b/runtime/doc/hangulin.txt index 40901a6..0092501 100644 --- a/runtime/doc/hangulin.txt +++ b/runtime/doc/hangulin.txt @@ -81,8 +81,8 @@ And there should be no ':set guifont'. If it exists, then Gvim ignores ':set guifontset'. It means VIM runs without fontset supporting. So, you can see only English. Hangul does not be correctly displayed. -After 'fontset' feature is enabled, VIM does not allow using english -font only in 'font' setting for syntax. +After "fontset" feature is enabled, VIM does not allow using english +font only in "font" setting for syntax. For example, if you use > :set guifontset=eng_font,your_font in your .gvimrc, then you should do for syntax > diff --git a/runtime/doc/helphelp.txt b/runtime/doc/helphelp.txt index b51fe78..80fc70c 100644 --- a/runtime/doc/helphelp.txt +++ b/runtime/doc/helphelp.txt @@ -1,4 +1,4 @@ -*helphelp.txt* For Vim version 8.0. Last change: 2016 Apr 01 +*helphelp.txt* For Vim version 8.0. Last change: 2017 Mar 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -28,10 +28,16 @@ Help on help files *helphelp* *{subject}* *E149* *E661* :h[elp] {subject} Like ":help", additionally jump to the tag {subject}. - {subject} can include wildcards like "*", "?" and + For example: > + :help options + +< {subject} can include wildcards such as "*", "?" and "[a-z]": :help z? jump to help for any "z" command :help z. jump to the help for "z." + But when a tag exists it is taken literally: + :help :? jump to help for ":?" + If there is no full match for the pattern, or there are several matches, the "best" match will be used. A sophisticated algorithm is used to decide which @@ -68,18 +74,19 @@ Help on help files *helphelp* example to find help for CTRL-V in Insert mode: > :help i^V < - To use a regexp |pattern|, first do ":help" and then + It is also possible to first do ":help" and then use ":tag {pattern}" in the help window. The ":tnext" command can then be used to jump to other matches, "tselect" to list matches and choose one. > - :help index| :tse z. + :help index + :tselect /.*mode < When there is no argument you will see matches for "help", to avoid listing all possible matches (that would be very slow). The number of matches displayed is limited to 300. - This command can be followed by '|' and another + The `:help` command can be followed by '|' and another command, but you don't need to escape the '|' inside a help command. So these both work: > :help | @@ -135,7 +142,8 @@ Help on help files *helphelp* already opened, then the location list for that window is used. Otherwise, a new help window is opened and the location list for that window is set. The - location list for the current window is not changed. + location list for the current window is not changed + then. *:exu* *:exusage* :exu[sage] Show help on Ex commands. Added to simulate the Nvi @@ -307,7 +315,7 @@ the applicable Vim version. The last field specifies the last modification date of the file. Each field is separated by a tab. At the bottom of the help file, place a Vim modeline to set the 'textwidth' -and 'tabstop' options and the 'filetype' to 'help'. Never set a global option +and 'tabstop' options and the 'filetype' to "help". Never set a global option in such a modeline, that can have consequences undesired by whoever reads that help. diff --git a/runtime/doc/if_mzsch.txt b/runtime/doc/if_mzsch.txt index 9ef6c3d..7e206f5 100644 --- a/runtime/doc/if_mzsch.txt +++ b/runtime/doc/if_mzsch.txt @@ -249,7 +249,7 @@ Windows *mzscheme-window* 5. mzeval() Vim function *mzscheme-mzeval* To facilitate bi-directional interface, you can use |mzeval()| function to -evaluate MzScheme expressions and pass their values to VimL. +evaluate MzScheme expressions and pass their values to Vim script. ============================================================================== 6. Using Function references *mzscheme-funcref* diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt index 5929bcf..6f1c202 100644 --- a/runtime/doc/if_pyth.txt +++ b/runtime/doc/if_pyth.txt @@ -1,4 +1,4 @@ -*if_pyth.txt* For Vim version 8.0. Last change: 2016 Sep 17 +*if_pyth.txt* For Vim version 8.0. Last change: 2017 Mar 09 VIM REFERENCE MANUAL by Paul Moore @@ -16,6 +16,8 @@ The Python Interface to Vim *python* *Python* 8. pyeval(), py3eval() Vim functions |python-pyeval| 9. Dynamic loading |python-dynamic| 10. Python 3 |python3| +11. Python X |python_x| +12. Building with Python support |python-building| {Vi does not have any of these commands} @@ -173,8 +175,8 @@ vim.eval(str) *python-eval* :py tagList = vim.eval('taglist("eval_expr")') < The latter will return a python list of python dicts, for instance: - [{'cmd': '/^eval_expr(arg, nextcmd)$/', 'static': 0, 'name': - 'eval_expr', 'kind': 'f', 'filename': './src/eval.c'}] + [{'cmd': '/^eval_expr(arg, nextcmd)$/', 'static': 0, 'name': ~ + 'eval_expr', 'kind': 'f', 'filename': './src/eval.c'}] ~ vim.bindeval(str) *python-bindeval* Like |python-eval|, but returns special objects described in @@ -675,11 +677,11 @@ vim.Function object *python-Function* dictionary. Note that explicit `self` keyword used when calling resulting object overrides this attribute. auto_rebind Boolean. True if partial created from this Python object - and stored in the VimL dictionary should be automatically - rebound to the dictionary it is stored in when this - dictionary is indexed. Exposes Vim internal difference - between `dict.func` (auto_rebind=True) and - `function(dict.func,dict)` (auto_rebind=False). This + and stored in the Vim script dictionary should be + automatically rebound to the dictionary it is stored in + when this dictionary is indexed. Exposes Vim internal + difference between `dict.func` (auto_rebind=True) and + `function(dict.func,dict)` (auto_rebind=False). This attribute makes no sense if `self` attribute is `None`. Constructor additionally accepts `args`, `self` and `auto_rebind` @@ -710,7 +712,8 @@ vim.Function object *python-Function* 8. pyeval() and py3eval() Vim functions *python-pyeval* To facilitate bi-directional interface, you can use |pyeval()| and |py3eval()| -functions to evaluate Python expressions and pass their values to VimL. +functions to evaluate Python expressions and pass their values to Vim script. +|pyxeval()| is also available. ============================================================================== 9. Dynamic loading *python-dynamic* @@ -729,9 +732,11 @@ To use the Python interface the Python DLL must be in your search path. In a console window type "path" to see what directories are used. The 'pythondll' or 'pythonthreedll' option can be also used to specify the Python DLL. -The name of the DLL must match the Python version Vim was compiled with. -Currently the name is "python24.dll". That is for Python 2.4. To know for -sure edit "gvim.exe" and search for "python\d*.dll\c". +The name of the DLL should match the Python version Vim was compiled with. +Currently the name for Python 2 is "python27.dll", that is for Python 2.7. +That is the default value for 'pythondll'. For Python 3 it is python35.dll +(Python 3.5). To know for sure edit "gvim.exe" and search for +"python\d*.dll\c". Unix ~ @@ -812,4 +817,90 @@ loaded at a time, just checking if Python 2 or 3 are available will prevent the other one from being available. ============================================================================== +11. Python X *python_x* *pythonx* + +Because most python code can be written so that it works with python 2.6+ and +python 3 the pyx* functions and commands have been written. They work exactly +the same as the Python 2 and 3 variants, but select the Python version using +the 'pyxversion' setting. + +You should set 'pyxversion' in your |.vimrc| to prefer Python 2 or Python 3 +for Python commands. If you change this setting at runtime you may risk that +state of plugins (such as initialization) may be lost. + +If you want to use a module, you can put it in the {rtp}/pythonx directory. +See |pythonx-directory|. + + *:pyx* *:pythonx* +The `:pyx` and `:pythonx` commands work similar to `:python`. A simple check +if the `:pyx` command is working: > + :pyx print("Hello") + +To see what version of Python is being used: > + :pyx import sys + :pyx print(sys.version) +< + *:pyxfile* *python_x-special-comments* +The `:pyxfile` command works similar to `:pyfile`. However you can add one of +these comments to force Vim using `:pyfile` or `:py3file`: > + #!/any string/python2 " Shebang. Must be the first line of the file. + #!/any string/python3 " Shebang. Must be the first line of the file. + # requires python 2.x " Maximum lines depend on 'modelines'. + # requires python 3.x " Maximum lines depend on 'modelines'. +Unlike normal modelines, the bottom of the file is not checked. +If none of them are found, the 'pyxversion' setting is used. + *W20* *W21* +If Vim does not support the selected Python version a silent message will be +printed. Use `:messages` to read them. + + *:pyxdo* +The `:pyxdo` command works similar to `:pydo`. + + *has-pythonx* +You can test if pyx* commands are available with: > + if has('pythonx') + echo 'pyx* commands are available. (Python ' . &pyx . ')' + endif + +When compiled with only one of |+python| or |+python3|, the has() returns 1. +When compiled with both |+python| and |+python3|, the test depends on the +'pyxversion' setting. If 'pyxversion' is 0, it tests Python 3 first, and if +it is not available then Python 2. If 'pyxversion' is 2 or 3, it tests only +Python 2 or 3 respectively. + +Note that for `has('pythonx')` to work it may try to dynamically load Python 3 +or 2. This may have side effects, especially when Vim can only load one of +the two. + +If a user prefers Python 2 and want to fallback to Python 3, he needs to set +'pyxversion' explicitly in his |.vimrc|. E.g.: > + if has('python') + set pyx=2 + elseif has('python3') + set pyx=3 + endif + +============================================================================== +12. Building with Python support *python-building* + +A few hints for building with Python 2 or 3 support. + +UNIX + +See src/Makefile for how to enable including the Python interface. + +On Ubuntu you will want to install these packages for Python 2: + python + python-dev +For Python 3: + python3 + pytyon3-dev +For Python 3.6: + python3.6 + pytyon3.6-dev + +If you have more than one version of Python 3, you need to link python3 to the +one you prefer, before running configure. + +============================================================================== vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/if_ruby.txt b/runtime/doc/if_ruby.txt index b00dd45..f79ecc1 100644 --- a/runtime/doc/if_ruby.txt +++ b/runtime/doc/if_ruby.txt @@ -72,7 +72,7 @@ To see what version of Ruby you have: > *:rubyfile* *:rubyf* :rubyf[ile] {file} Execute the Ruby script in {file}. This is the same as - ":ruby load 'file'", but allows file name completion. + `:ruby load 'file'`, but allows file name completion. Executing Ruby commands is not possible in the |sandbox|. diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt index fdb7c67..efb0a7d 100644 --- a/runtime/doc/indent.txt +++ b/runtime/doc/indent.txt @@ -325,6 +325,21 @@ The examples below assume a 'shiftwidth' of 4. void function(); void function(); } } < + *cino-E* + EN Indent inside C++ linkage specifications (extern "C" or + extern "C++") N characters extra compared to a normal block. + (default 0). + + cino= cino=E-s > + extern "C" { extern "C" { + void function(); void function(); + } } + + extern "C" extern "C" + { { + void function(); void function(); + } } +< *cino-p* pN Parameter declarations for K&R-style function declarations will be indented N characters from the margin. (default @@ -554,7 +569,7 @@ The examples below assume a 'shiftwidth' of 4. The defaults, spelled out in full, are: - cinoptions=>s,e0,n0,f0,{0,}0,^0,L-1,:s,=s,l0,b0,gs,hs,N0,ps,ts,is,+s, + cinoptions=>s,e0,n0,f0,{0,}0,^0,L-1,:s,=s,l0,b0,gs,hs,N0,E0,ps,ts,is,+s, c3,C0,/0,(2s,us,U0,w0,W0,k0,m0,j0,J0,)20,*70,#0 Vim puts a line in column 1 if: diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index 4ebf999..ed10b46 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -1,4 +1,4 @@ -*index.txt* For Vim version 8.0. Last change: 2016 Sep 27 +*index.txt* For Vim version 8.0. Last change: 2017 Apr 22 VIM REFERENCE MANUAL by Bram Moolenaar @@ -309,10 +309,10 @@ tag char note action in Normal mode ~ |B| B 1 cursor N WORDS backward |C| ["x]C 2 change from the cursor position to the end of the line, and N-1 more lines [into - buffer x]; synonym for "c$" + register x]; synonym for "c$" |D| ["x]D 2 delete the characters under the cursor until the end of the line and N-1 more - lines [into buffer x]; synonym for "d$" + lines [into register x]; synonym for "d$" |E| E 1 cursor forward to the end of WORD N |F| F{char} 1 cursor to the Nth occurrence of {char} to the left @@ -329,13 +329,13 @@ tag char note action in Normal mode ~ opposite direction |O| O 2 begin a new line above the cursor and insert text, repeat N times -|P| ["x]P 2 put the text [from buffer x] before the +|P| ["x]P 2 put the text [from register x] before the cursor N times |Q| Q switch to "Ex" mode |R| R 2 enter replace mode: overtype existing characters, repeat the entered text N-1 times -|S| ["x]S 2 delete N lines [into buffer x] and start +|S| ["x]S 2 delete N lines [into register x] and start insert; synonym for "cc". |T| T{char} 1 cursor till after Nth occurrence of {char} to the left @@ -343,8 +343,8 @@ tag char note action in Normal mode ~ |V| V start linewise Visual mode |W| W 1 cursor N WORDS forward |X| ["x]X 2 delete N characters before the cursor [into - buffer x] -|Y| ["x]Y yank N lines [into buffer x]; synonym for + register x] +|Y| ["x]Y yank N lines [into register x]; synonym for "yy" |ZZ| ZZ store current file if modified, and exit |ZQ| ZQ exit current file always @@ -367,12 +367,12 @@ tag char note action in Normal mode ~ |`}| `} 1 cursor to the end of the current paragraph |a| a 2 append text after the cursor N times |b| b 1 cursor N words backward -|c| ["x]c{motion} 2 delete Nmove text [into buffer x] and start +|c| ["x]c{motion} 2 delete Nmove text [into register x] and + start insert +|cc| ["x]cc 2 delete N lines [into register x] and start insert -|cc| ["x]cc 2 delete N lines [into buffer x] and start - insert -|d| ["x]d{motion} 2 delete Nmove text [into buffer x] -|dd| ["x]dd 2 delete N lines [into buffer x] +|d| ["x]d{motion} 2 delete Nmove text [into register x] +|dd| ["x]dd 2 delete N lines [into register x] |do| do 2 same as ":diffget" |dp| dp 2 same as ":diffput" |e| e 1 cursor forward to the end of word N @@ -398,16 +398,16 @@ tag char note action in Normal mode ~ |q?| q? edit ? command-line in command-line window |r| r{char} 2 replace N chars with {char} |s| ["x]s 2 (substitute) delete N characters [into - buffer x] and start insert + register x] and start insert |t| t{char} 1 cursor till before Nth occurrence of {char} to the right |u| u 2 undo changes |v| v start characterwise Visual mode |w| w 1 cursor N words forward |x| ["x]x 2 delete N characters under and after the - cursor [into buffer x] -|y| ["x]y{motion} yank Nmove text [into buffer x] -|yy| ["x]yy yank N lines [into buffer x] + cursor [into register x] +|y| ["x]y{motion} yank Nmove text [into register x] +|yy| ["x]yy yank N lines [into register x] |z| z{char} commands starting with 'z', see |z| below |{| { 1 cursor N paragraphs backward |bar| | 1 cursor to column N @@ -1004,10 +1004,12 @@ tag command action in Command-line editing mode ~ |c_| execute entered command |c_CTRL-M| CTRL-M same as |c_CTRL-N| CTRL-N after using 'wildchar' with multiple matches: - go to next match, otherwise: same as + go to next match, otherwise: recall older + command-line from history. CTRL-O not used |c_CTRL-P| CTRL-P after using 'wildchar' with multiple matches: - go to previous match, otherwise: same as + go to previous match, otherwise: recall older + command-line from history. |c_CTRL-Q| CTRL-Q same as CTRL-V, unless it's used for terminal control flow |c_CTRL-R| CTRL-R {0-9a-z"%#*:= CTRL-F CTRL-P CTRL-W CTRL-A} @@ -1440,6 +1442,10 @@ tag command action ~ |:python| :py[thon] execute Python command |:pydo| :pyd[o] execute Python command for each line |:pyfile| :pyf[ile] execute Python script file +|:pyx| :pyx execute |python_x| command +|:pythonx| :pythonx same as :pyx +|:pyxdo| :pyxd[o] execute |python_x| command for each line +|:pyxfile| :pyxf[ile] execute |python_x| script file |:quit| :q[uit] quit current window (when one window quit Vim) |:quitall| :quita[ll] quit Vim |:qall| :qa[ll] quit Vim diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt index d2959df..2c6900e 100644 --- a/runtime/doc/insert.txt +++ b/runtime/doc/insert.txt @@ -1,4 +1,4 @@ -*insert.txt* For Vim version 8.0. Last change: 2016 Jan 31 +*insert.txt* For Vim version 8.0. Last change: 2017 Apr 07 VIM REFERENCE MANUAL by Bram Moolenaar @@ -159,7 +159,8 @@ CTRL-R CTRL-R {0-9a-z"%#*+/:.-=} *i_CTRL-R_CTRL-R* CTRL-R CTRL-O {0-9a-z"%#*+/:.-=} *i_CTRL-R_CTRL-O* Insert the contents of a register literally and don't auto-indent. Does the same as pasting with the mouse - ||. + ||. When the register is linewise this will + insert the text above the current line, like with `P`. Does not replace characters! The '.' register (last inserted text) is still inserted as typed. {not in Vi} @@ -1103,7 +1104,7 @@ items: empty when non-zero this match will be added even when it is an empty string -All of these except 'icase', 'dup' and 'empty' must be a string. If an item +All of these except "icase", "dup" and "empty" must be a string. If an item does not meet these requirements then an error message is given and further items in the list are not used. You can mix string and Dictionary items in the returned list. diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt index 5845905..d6664ff 100644 --- a/runtime/doc/intro.txt +++ b/runtime/doc/intro.txt @@ -96,21 +96,18 @@ mention that. *mail-list* *maillist* There are several mailing lists for Vim: - + *vim-use* *vim_use* For discussions about using existing versions of Vim: Useful mappings, questions, answers, where to get a specific version, etc. There are quite a few people watching this list and answering questions, also for beginners. Don't hesitate to ask your question here. - *vim-dev* *vimdev* + *vim-dev* *vim_dev* *vimdev* For discussions about changing Vim: New features, porting, patches, beta-test versions, etc. - *vim-announce* + *vim-announce* *vim_announce* Announcements about new versions of Vim; also for beta-test versions and ports to different systems. This is a read-only list. - *vim-multibyte* - For discussions about using and improving the multi-byte aspects of - Vim. - *vim-mac* + *vim-mac* *vim_mac* For discussions about using and improving the Macintosh version of Vim. diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index e644f83..7d723ce 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1,4 +1,4 @@ -*map.txt* For Vim version 8.0. Last change: 2016 Oct 15 +*map.txt* For Vim version 8.0. Last change: 2017 Mar 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -584,7 +584,8 @@ Upper and lowercase differences are ignored. *map-comments* It is not possible to put a comment after these commands, because the '"' -character is considered to be part of the {lhs} or {rhs}. +character is considered to be part of the {lhs} or {rhs}. However, one can +use |", since this starts a new, empty command with a comment. *map_bar* *map-bar* Since the '|' character is used to separate a map command from the next diff --git a/runtime/doc/message.txt b/runtime/doc/message.txt index 83e2198..5eeba0c 100644 --- a/runtime/doc/message.txt +++ b/runtime/doc/message.txt @@ -1,4 +1,4 @@ -*message.txt* For Vim version 8.0. Last change: 2016 Sep 01 +*message.txt* For Vim version 8.0. Last change: 2017 Mar 25 VIM REFERENCE MANUAL by Bram Moolenaar @@ -129,8 +129,9 @@ closed properly. Mostly harmless. Command too recursive This happens when an Ex command executes an Ex command that executes an Ex -command, etc. This is only allowed 200 times. When it's more there probably -is an endless loop. Probably a |:execute| or |:source| command is involved. +command, etc. The limit is 200 or the value of 'maxfuncdepth', whatever is +larger. When it's more there probably is an endless loop. Probably a +|:execute| or |:source| command is involved. *E254* > Cannot allocate color {name} @@ -767,6 +768,13 @@ Example: > You tried to execute a command that is neither an Ex command nor a user-defined command. + *E943* > + Command table needs to be updated, run 'make cmdidxs' + +This can only happen when changing the source code, when adding a command in +src/ex_cmds.h. The lookup table then needs to be updated, by running: > + make cmdidxs + ============================================================================== 3. Messages *messages* diff --git a/runtime/doc/mlang.txt b/runtime/doc/mlang.txt index aa9a94c..2d27912 100644 --- a/runtime/doc/mlang.txt +++ b/runtime/doc/mlang.txt @@ -1,4 +1,4 @@ -*mlang.txt* For Vim version 8.0. Last change: 2016 Jan 16 +*mlang.txt* For Vim version 8.0. Last change: 2017 Mar 04 VIM REFERENCE MANUAL by Bram Moolenaar @@ -179,6 +179,7 @@ Send an e-mail to the Vim maintainer . special characters like "&" and "" need to be included. Spaces and dots need to be escaped with a backslash, just like in other |:menu| commands. + Case in {english} is ignored. See the $VIMRUNTIME/lang directory for examples. diff --git a/runtime/doc/motion.txt b/runtime/doc/motion.txt index 269f092..673d1c5 100644 --- a/runtime/doc/motion.txt +++ b/runtime/doc/motion.txt @@ -1,4 +1,4 @@ -*motion.txt* For Vim version 8.0. Last change: 2016 Jul 12 +*motion.txt* For Vim version 8.0. Last change: 2017 Mar 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -193,7 +193,7 @@ l or *l* *$* ** ** $ or To the end of the line. When a count is given also go - [count - 1] lines downward |inclusive|. + [count - 1] lines downward. |inclusive| motion. In Visual mode the cursor goes to just after the last character in the line. When 'virtualedit' is active, "$" may move the cursor @@ -915,6 +915,7 @@ was made yet in the current file. then the position can be near the end of what the command changed. For example when inserting a word, the position will be on the last character. + To jump to older changes use |g;|. {not in Vi} *'(* *`(* diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 390fab0..927931c 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 8.0. Last change: 2016 Oct 12 +*options.txt* For Vim version 8.0. Last change: 2017 Mar 22 VIM REFERENCE MANUAL by Bram Moolenaar @@ -242,7 +242,7 @@ opt+=val" the expansion is done before the adding or removing. Handling of local options *local-options* Some of the options only apply to a window or buffer. Each window or buffer -has its own copy of this option, thus can each have their own value. This +has its own copy of this option, thus each can have its own value. This allows you to set 'list' in one window but not in another. And set 'shiftwidth' to 3 in one buffer and 4 in another. @@ -727,6 +727,7 @@ A jump table for the options with a short description can be found at |Q_op|. which can be easier to read at certain sizes on certain displays. Setting this option can sometimes cause problems if 'guifont' is set to its default (empty string). + NOTE: This option is reset when 'compatible' is set. *'autochdir'* *'acd'* *'noautochdir'* *'noacd'* 'autochdir' 'acd' boolean (default off) @@ -760,6 +761,7 @@ A jump table for the options with a short description can be found at |Q_op|. - Disable the use of 'keymap' (without changing its value). Note that 'arabicshape' and 'delcombine' are not reset (it is a global option). + NOTE: This option is reset when 'compatible' is set. Also see |arabic.txt|. *'arabicshape'* *'arshape'* @@ -781,6 +783,7 @@ A jump table for the options with a short description can be found at |Q_op|. form. Arabic is a complex language which requires other settings, for further details see |arabic.txt|. + NOTE: This option is set when 'compatible' is set. *'autoindent'* *'ai'* *'noautoindent'* *'noai'* 'autoindent' 'ai' boolean (default off) @@ -993,6 +996,9 @@ A jump table for the options with a short description can be found at |Q_op|. the system may refuse to do this. In that case the "auto" value will again not rename the file. + NOTE: This option is set to the Vi default value when 'compatible' is + set and to the Vim default value when 'compatible' is reset. + *'backupdir'* *'bdir'* 'backupdir' 'bdir' string (default for Amiga: ".,t:", for MS-DOS and Win32: ".,$TEMP,c:/tmp,c:/temp" @@ -1120,6 +1126,9 @@ A jump table for the options with a short description can be found at |Q_op|. set bexpr=MyBalloonExpr() set ballooneval < + Also see |balloon_show()|, can be used if the content of the balloon + is to be fetched asynchronously. + NOTE: The balloon is displayed only if the cursor is on a text character. If the result of evaluating 'balloonexpr' is not empty, Vim does not try to send a message to an external debugger (Netbeans @@ -1136,6 +1145,7 @@ A jump table for the options with a short description can be found at |Q_op|. < When they are supported "\n" characters will start a new line. If the expression evaluates to a |List| this is equal to using each List item as a string and putting "\n" in between them. + NOTE: This option is set to "" when 'compatible' is set. *'belloff'* *'bo'* 'belloff' 'bo' string (default "") @@ -1173,8 +1183,8 @@ A jump table for the options with a short description can be found at |Q_op|. wildmode More matches in |cmdline-completion| available (depends on the 'wildmode' setting). - This is most useful, to fine tune when in insert mode the bell should - be rung. For normal mode and ex commands, the bell is often rung to + This is most useful to fine tune when in Insert mode the bell should + be rung. For Normal mode and Ex commands, the bell is often rung to indicate that an error occurred. It can be silenced by adding the "error" keyword. @@ -1256,6 +1266,7 @@ A jump table for the options with a short description can be found at |Q_op|. Every wrapped line will continue visually indented (same amount of space as the beginning of that line), thus preserving horizontal blocks of text. + NOTE: This option is reset when 'compatible' is set. *'breakindentopt'* *'briopt'* 'breakindentopt' 'briopt' string (default empty) @@ -1432,6 +1443,8 @@ A jump table for the options with a short description can be found at |Q_op|. :exe "set cedit=\" < |Nvi| also has this option, but it only uses the first character. See |cmdwin|. + NOTE: This option is set to the Vim default value when 'compatible' + is reset. *'charconvert'* *'ccv'* *E202* *E214* *E513* 'charconvert' 'ccv' string (default "") @@ -1702,12 +1715,14 @@ A jump table for the options with a short description can be found at |Q_op|. {not in Vi} This option has the effect of making Vim either more Vi-compatible, or make Vim behave in a more useful way. + This is a special kind of option, because when it's set or reset, - other options are also changed as a side effect. CAREFUL: Setting or - resetting this option can have a lot of unexpected effects: Mappings - are interpreted in another way, undo behaves differently, etc. If you - set this option in your vimrc file, you should probably put it at the - very start. + other options are also changed as a side effect. + NOTE: Setting or resetting this option can have a lot of unexpected + effects: Mappings are interpreted in another way, undo behaves + differently, etc. If you set this option in your vimrc file, you + should probably put it at the very start. + By default this option is on and the Vi defaults are used for the options. This default was chosen for those people who want to use Vim just like Vi, and don't even (want to) know about the 'compatible' @@ -1722,70 +1737,98 @@ A jump table for the options with a short description can be found at |Q_op|. |posix-compliance|. You can also set this option with the "-C" argument, and reset it with "-N". See |-C| and |-N|. - Switching this option off makes the Vim defaults be used for options - that have a different Vi and Vim default value. See the options - marked with a '+' below. Other options are not modified. - At the moment this option is set, several other options will be set - or reset to make Vim as Vi-compatible as possible. See the table - below. This can be used if you want to revert to Vi compatible - editing. - See also 'cpoptions'. - - option + set value effect ~ - - 'allowrevins' off no CTRL-_ command - 'backspace' "" normal backspace - 'backupcopy' Unix: "yes" backup file is a copy - else: "auto" copy or rename backup file - 'backup' off no backup file - 'cedit' + "" no key to open the |cmdwin| - 'cindent' off no C code indentation - 'cpoptions' + (all flags) Vi-compatible flags - 'cscopetag' off don't use cscope for ":tag" - 'cscopetagorder' 0 see |cscopetagorder| - 'cscopeverbose' off see |cscopeverbose| - 'digraph' off no digraphs - 'esckeys' + off no -keys in Insert mode - 'expandtab' off tabs not expanded to spaces - 'fileformats' + "" no automatic file format detection, + See 'cpoptions' for more fine tuning of Vi compatibility. + + When this option is set, numerous other options are set to make Vim as + Vi-compatible as possible. When this option is unset, various options + are set to make Vim more useful. The table below lists all the + options affected. + The {?} column indicates when the options are affected: + + Means that the option is set to the value given in {set value} when + 'compatible' is set. + & Means that the option is set to the value given in {set value} when + 'compatible' is set AND is set to its Vim default value when + 'compatible' is unset. + - Means the option is NOT changed when setting 'compatible' but IS + set to its Vim default when 'compatible' is unset. + The {effect} column summarises the change when 'compatible' is set. + + option ? set value effect ~ + + 'allowrevins' + off no CTRL-_ command + 'antialias' + off don't use antialiased fonts + 'arabic' + off reset arabic-related options + 'arabicshape' + on correct character shapes + 'backspace' + "" normal backspace + 'backup' + off no backup file + 'backupcopy' & Unix: "yes" backup file is a copy + else: "auto" copy or rename backup file + 'balloonexpr' + "" text to show in evaluation balloon + 'breakindent' + off don't indent when wrapping lines + 'cedit' - {unchanged} {set vim default only on resetting 'cp'} + 'cindent' + off no C code indentation + 'compatible' - {unchanged} {set vim default only on resetting 'cp'} + 'copyindent' + off don't copy indent structure + 'cpoptions' & (all flags) Vi-compatible flags + 'cscopepathcomp'+ 0 don't show directories in tags list + 'cscoperelative'+ off + 'cscopetag' + off don't use cscope for ":tag" + 'cscopetagorder'+ 0 see |cscopetagorder| + 'cscopeverbose' + off see |cscopeverbose| + 'delcombine' + off unicode: delete whole char combination + 'digraph' + off no digraphs + 'esckeys' & off no -keys in Insert mode + 'expandtab' + off tabs not expanded to spaces + 'fileformats' & "" no automatic file format detection, "dos,unix" except for DOS, Windows and OS/2 - 'formatoptions' + "vt" Vi compatible formatting - 'gdefault' off no default 'g' flag for ":s" - 'history' + 0 no commandline history - 'hkmap' off no Hebrew keyboard mapping - 'hkmapp' off no phonetic Hebrew keyboard mapping - 'hlsearch' off no highlighting of search matches - 'incsearch' off no incremental searching - 'indentexpr' "" no indenting by expression - 'insertmode' off do not start in Insert mode - 'iskeyword' + "@,48-57,_" keywords contain alphanumeric + 'formatexpr' + "" use 'formatprg' for auto-formatting + 'formatoptions' & "vt" Vi compatible formatting + 'gdefault' + off no default 'g' flag for ":s" + 'history' & 0 no commandline history + 'hkmap' + off no Hebrew keyboard mapping + 'hkmapp' + off no phonetic Hebrew keyboard mapping + 'hlsearch' + off no highlighting of search matches + 'incsearch' + off no incremental searching + 'indentexpr' + "" no indenting by expression + 'insertmode' + off do not start in Insert mode + 'iskeyword' & "@,48-57,_" keywords contain alphanumeric characters and '_' - 'joinspaces' on insert 2 spaces after period - 'modeline' + off no modelines - 'more' + off no pauses in listings - 'revins' off no reverse insert - 'ruler' off no ruler - 'scrolljump' 1 no jump scroll - 'scrolloff' 0 no scroll offset - 'shiftround' off indent not rounded to shiftwidth - 'shortmess' + "" no shortening of messages - 'showcmd' + off command characters not shown - 'showmode' + off current mode not shown - 'smartcase' off no automatic ignore case switch - 'smartindent' off no smart indentation - 'smarttab' off no smart tab size - 'softtabstop' 0 tabs are always 'tabstop' positions - 'startofline' on goto startofline with some commands - 'tagrelative' + off tag file names are not relative - 'textauto' + off no automatic textmode detection - 'textwidth' 0 no automatic line wrap - 'tildeop' off tilde is not an operator - 'ttimeout' off no terminal timeout - 'viminfo' + {unchanged} no viminfo file - 'whichwrap' + "" left-right movements don't wrap - 'wildchar' + CTRL-E only when the current value is + 'joinspaces' + on insert 2 spaces after period + 'modeline' & off no modelines + 'more' & off no pauses in listings + 'mzquantum' - {unchanged} {set vim default only on resetting 'cp'} + 'numberwidth' & 8 min number of columns for line number + 'preserveindent'+ off don't preserve current indent structure + when changing it + 'revins' + off no reverse insert + 'ruler' + off no ruler + 'scrolljump' + 1 no jump scroll + 'scrolloff' + 0 no scroll offset + 'shelltemp' - {unchanged} {set vim default only on resetting 'cp'} + 'shiftround' + off indent not rounded to shiftwidth + 'shortmess' & "" no shortening of messages + 'showcmd' & off command characters not shown + 'showmode' & off current mode not shown + 'sidescrolloff' + 0 cursor moves to edge of screen in scroll + 'smartcase' + off no automatic ignore case switch + 'smartindent' + off no smart indentation + 'smarttab' + off no smart tab size + 'softtabstop' + 0 tabs are always 'tabstop' positions + 'startofline' + on goto startofline with some commands + 'tagcase' & "followic" 'ignorecase' when searching tags file + 'tagrelative' & off tag file names are not relative + 'termguicolors' + off don't use highlight-(guifg|guibg) + 'textauto' & off no automatic textmode detection + 'textwidth' + 0 no automatic line wrap + 'tildeop' + off tilde is not an operator + 'ttimeout' + off no terminal timeout + 'undofile' + off don't use an undo file + 'viminfo' - {unchanged} {set Vim default only on resetting 'cp'} + 'virtualedit' + "" cursor can only be placed on characters + 'whichwrap' & "" left-right movements don't wrap + 'wildchar' & CTRL-E only when the current value is use CTRL-E for cmdline completion - 'writebackup' on or off depends on the |+writebackup| feature + 'writebackup' + on or off depends on the |+writebackup| feature *'complete'* *'cpt'* *E535* 'complete' 'cpt' string (default: ".,w,b,u,t,i") @@ -1960,7 +2003,7 @@ A jump table for the options with a short description can be found at |Q_op|. existing line. 'expandtab' has no effect on these characters, a Tab remains a Tab. If the new indent is greater than on the existing line, the remaining space is filled in the normal manner. - NOTE: 'copyindent' is reset when 'compatible' is set. + NOTE: This option is reset when 'compatible' is set. Also see 'preserveindent'. *'cpoptions'* *'cpo'* *cpo* @@ -2321,6 +2364,7 @@ A jump table for the options with a short description can be found at |Q_op|. {not in Vi} Determines how many components of the path to show in a list of tags. See |cscopepathcomp|. + NOTE: This option is set to 0 when 'compatible' is set. *'cscopeprg'* *'csprg'* 'cscopeprg' 'csprg' string (default "cscope") @@ -2350,6 +2394,7 @@ A jump table for the options with a short description can be found at |Q_op|. In the absence of a prefix (-P) for cscope. setting this option enables to use the basename of cscope.out path as the prefix. See |cscoperelative|. + NOTE: This option is reset when 'compatible' is set. *'cscopetag'* *'cst'* *'nocscopetag'* *'nocst'* 'cscopetag' 'cst' boolean (default off) @@ -2469,6 +2514,7 @@ A jump table for the options with a short description can be found at |Q_op|. This is useful for Arabic, Hebrew and many other languages where one may have combining characters overtop of base characters, and want to remove only the combining ones. + NOTE: This option is reset when 'compatible' is set. *'dictionary'* *'dict'* 'dictionary' 'dict' string (default "") @@ -2684,8 +2730,8 @@ A jump table for the options with a short description can be found at |Q_op|. This option cannot be set from a |modeline|. It would most likely corrupt the text. - NOTE: For GTK+ 2 it is highly recommended to set 'encoding' to - "utf-8". Although care has been taken to allow different values of + NOTE: For GTK+ 2 or later, it is highly recommended to set 'encoding' + to "utf-8". Although care has been taken to allow different values of 'encoding', "utf-8" is the natural choice for the environment and avoids unnecessary conversion overhead. "utf-8" has not been made the default to prevent different behavior of the GUI and terminal @@ -2883,6 +2929,8 @@ A jump table for the options with a short description can be found at |Q_op|. done when writing the file. For reading see below. When 'fileencoding' is empty, the same value as 'encoding' will be used (no conversion when reading or writing a file). + No error will be given when the value is set, only when it is used, + only when writing a file. Conversion will also be done when 'encoding' and 'fileencoding' are both a Unicode encoding and 'fileencoding' is not utf-8. That's because internally Unicode is always stored as utf-8. @@ -3387,6 +3435,7 @@ A jump table for the options with a short description can be found at |Q_op|. The expression will be evaluated in the |sandbox| when set from a modeline, see |sandbox-option|. That stops the option from working, since changing the buffer text is not allowed. + NOTE: This option is set to "" when 'compatible' is set. *'formatoptions'* *'fo'* 'formatoptions' 'fo' string (Vim default: "tcq", Vi default: "vt") @@ -3417,7 +3466,7 @@ A jump table for the options with a short description can be found at |Q_op|. *'formatprg'* *'fp'* 'formatprg' 'fp' string (default "") - global + global or local to buffer |global-local| {not in Vi} The name of an external program that will be used to format the lines selected with the |gq| operator. The program must take the input on @@ -3596,6 +3645,14 @@ A jump table for the options with a short description can be found at |Q_op|. On systems where 'guifontset' is supported (X11) and 'guifontset' is not empty, then 'guifont' is not used. + Note: As to the GTK GUIs, no error is given against any invalid names, + and the first element of the list is always picked up and made use of. + This is because, instead of identifying a given name with a font, the + GTK GUIs use it to construct a pattern and try to look up a font which + best matches the pattern among available fonts, and this way, the + matching never fails. An invalid name doesn't matter because a number + of font properties other than name will do to get the matching done. + Spaces after a comma are ignored. To include a comma in a font name precede it with a backslash. Setting an option requires an extra backslash before a space and a backslash. See also @@ -3618,7 +3675,7 @@ A jump table for the options with a short description can be found at |Q_op|. The font name depends on the GUI used. See |setting-guifont| for a way to set 'guifont' for various systems. - For the GTK+ 2 GUI the font name looks like this: > + For the GTK+ 2 and 3 GUIs, the font name looks like this: > :set guifont=Andale\ Mono\ 11 < That's all. XLFDs are not used. For Chinese this is reported to work well: > @@ -3627,13 +3684,15 @@ A jump table for the options with a short description can be found at |Q_op|. set guifontwide=Microsoft\ Yahei\ 12,WenQuanYi\ Zen\ Hei\ 12 endif < + (Replace gui_gtk2 with gui_gtk3 for the GTK+ 3 GUI) + For Mac OSX you can use something like this: > :set guifont=Monaco:h10 < Also see 'macatsui', it can help fix display problems. *E236* Note that the fonts must be mono-spaced (all characters have the same - width). An exception is GTK 2: all fonts are accepted, but - mono-spaced fonts look best. + width). An exception is GTK: all fonts are accepted, but mono-spaced + fonts look best. To preview a font on X11, you might be able to use the "xfontsel" program. The "xlsfonts" program gives a list of all available fonts. @@ -3671,7 +3730,7 @@ A jump table for the options with a short description can be found at |Q_op|. {not in Vi} {only available when compiled with GUI enabled and with the |+xfontset| feature} - {not available in the GTK+ 2 GUI} + {not available in the GTK+ GUI} When not empty, specifies two (or more) fonts to be used. The first one for normal English, the second one for your special language. See |xfontset|. @@ -3700,7 +3759,7 @@ A jump table for the options with a short description can be found at |Q_op|. Note: The size of these fonts must be exactly twice as wide as the one specified with 'guifont' and the same height. - All GUI versions but GTK+ 2: + All GUI versions but GTK+: 'guifontwide' is only used when 'encoding' is set to "utf-8" and 'guifontset' is empty or invalid. @@ -3708,7 +3767,7 @@ A jump table for the options with a short description can be found at |Q_op|. 'guifontwide' is empty Vim will attempt to find a matching double-width font and set 'guifontwide' to it. - GTK+ 2 GUI only: *guifontwide_gtk2* + GTK+ GUI only: *guifontwide_gtk* If set and valid, 'guifontwide' is always used for double width characters, even if 'encoding' is not set to "utf-8". @@ -3871,6 +3930,8 @@ A jump table for the options with a short description can be found at |Q_op|. The format of this option is like that of 'statusline'. 'guitabtooltip' is used for the tooltip, see below. + The expression will be evaluated in the |sandbox| when set from a + modeline, see |sandbox-option|. Only used when the GUI tab pages line is displayed. 'e' must be present in 'guioptions'. For the non-GUI tab pages line 'tabline' is @@ -4034,31 +4095,6 @@ A jump table for the options with a short description can be found at |Q_op|. define one. The default uses a different group for each occasion. See |highlight-default| for the default highlight groups. - *'hlsearch'* *'hls'* *'nohlsearch'* *'nohls'* -'hlsearch' 'hls' boolean (default off) - global - {not in Vi} - {not available when compiled without the - |+extra_search| feature} - When there is a previous search pattern, highlight all its matches. - The type of highlighting used can be set with the 'l' occasion in the - 'highlight' option. This uses the "Search" highlight group by - default. Note that only the matching text is highlighted, any offsets - are not applied. - See also: 'incsearch' and |:match|. - When you get bored looking at the highlighted matches, you can turn it - off with |:nohlsearch|. This does not change the option value, as - soon as you use a search command, the highlighting comes back. - 'redrawtime' specifies the maximum time spent on finding matches. - When the search pattern can match an end-of-line, Vim will try to - highlight all of the matched text. However, this depends on where the - search starts. This will be the first line in the window or the first - line below a closed fold. A match in a previous line which is not - drawn may not continue in a newly drawn line. - You can specify whether the highlight status is restored on startup - with the 'h' flag in 'viminfo' |viminfo-h|. - NOTE: This option is reset when 'compatible' is set. - *'history'* *'hi'* 'history' 'hi' number (Vim default: 50, Vi default: 0, set to 200 in |defaults.vim|) @@ -4093,6 +4129,31 @@ A jump table for the options with a short description can be found at |Q_op|. See |rileft.txt|. NOTE: This option is reset when 'compatible' is set. + *'hlsearch'* *'hls'* *'nohlsearch'* *'nohls'* +'hlsearch' 'hls' boolean (default off) + global + {not in Vi} + {not available when compiled without the + |+extra_search| feature} + When there is a previous search pattern, highlight all its matches. + The type of highlighting used can be set with the 'l' occasion in the + 'highlight' option. This uses the "Search" highlight group by + default. Note that only the matching text is highlighted, any offsets + are not applied. + See also: 'incsearch' and |:match|. + When you get bored looking at the highlighted matches, you can turn it + off with |:nohlsearch|. This does not change the option value, as + soon as you use a search command, the highlighting comes back. + 'redrawtime' specifies the maximum time spent on finding matches. + When the search pattern can match an end-of-line, Vim will try to + highlight all of the matched text. However, this depends on where the + search starts. This will be the first line in the window or the first + line below a closed fold. A match in a previous line which is not + drawn may not continue in a newly drawn line. + You can specify whether the highlight status is restored on startup + with the 'h' flag in 'viminfo' |viminfo-h|. + NOTE: This option is reset when 'compatible' is set. + *'icon'* *'noicon'* 'icon' boolean (default off, on when title can be restored) global @@ -4372,7 +4433,7 @@ A jump table for the options with a short description can be found at |Q_op|. < Error messages will be suppressed, unless the 'debug' option contains "msg". See |indent-expression|. - NOTE: This option is made empty when 'compatible' is set. + NOTE: This option is set to "" when 'compatible' is set. The expression will be evaluated in the |sandbox| when set from a modeline, see |sandbox-option|. @@ -4947,6 +5008,25 @@ A jump table for the options with a short description can be found at |Q_op|. This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. + *'makeencoding'* *'menc'* +'makeencoding' 'menc' string (default "") + global or local to buffer |global-local| + {only available when compiled with the |+multi_byte| + feature} + {not in Vi} + Encoding used for reading the output of external commands. When empty, + encoding is not converted. + This is used for `:make`, `:lmake`, `:grep`, `:lgrep`, `:grepadd`, + `:lgrepadd`, `:cfile`, `:cgetfile`, `:caddfile`, `:lfile`, `:lgetfile`, + and `:laddfile`. + + This would be mostly useful when you use MS-Windows and set 'encoding' + to "utf-8". If |+iconv| is enabled and GNU libiconv is used, setting + 'makeencoding' to "char" has the same effect as setting to the system + locale encoding. Example: > + :set encoding=utf-8 + :set makeencoding=char " system locale is used +< *'makeprg'* *'mp'* 'makeprg' 'mp' string (default "make", VMS: "MMS") global or local to buffer |global-local| @@ -5019,6 +5099,8 @@ A jump table for the options with a short description can be found at |Q_op|. catches endless recursion. When using a recursive function with more depth, set 'maxfuncdepth' to a bigger number. But this will use more memory, there is the danger of failing when memory is exhausted. + Increasing this limit above 200 also changes the maximum for Ex + command resursion, see |E169|. See also |:function|. *'maxmapdepth'* *'mmd'* *E223* @@ -5140,7 +5222,7 @@ A jump table for the options with a short description can be found at |Q_op|. {not in Vi} *E21* When off the buffer contents cannot be changed. The 'fileformat' and 'fileencoding' options also can't be changed. - Can be reset with the |-M| command line argument. + Can be reset on startup with the |-M| command line argument. *'modified'* *'mod'* *'nomodified'* *'nomod'* 'modified' 'mod' boolean (default off) @@ -5342,6 +5424,8 @@ A jump table for the options with a short description can be found at |Q_op|. feature} The number of milliseconds between polls for MzScheme threads. Negative or zero value means no thread scheduling. + NOTE: This option is set to the Vim default value when 'compatible' + is reset. *'nrformats'* *'nf'* 'nrformats' 'nf' string (default "bin,octal,hex", @@ -5407,7 +5491,8 @@ A jump table for the options with a short description can be found at |Q_op|. is set. Thus with the Vim default of 4 there is room for a line number up to 999. When the buffer has 1000 lines five columns will be used. The minimum value is 1, the maximum value is 10. - NOTE: 'numberwidth' is reset to 8 when 'compatible' is set. + NOTE: This option is set to the Vi default value when 'compatible' is + set and to the Vim default value when 'compatible' is reset. *'omnifunc'* *'ofu'* 'omnifunc' 'ofu' string (default: empty) @@ -5647,7 +5732,7 @@ A jump table for the options with a short description can be found at |Q_op|. a Tab. NOTE: When using ">>" multiple times the resulting indent is a mix of tabs and spaces. You might not like this. - NOTE: 'preserveindent' is reset when 'compatible' is set. + NOTE: This option is reset when 'compatible' is set. Also see 'copyindent'. Use |:retab| to clean up white space. @@ -5699,6 +5784,8 @@ A jump table for the options with a short description can be found at |Q_op|. and |+postscript| features} Expression used to print the PostScript produced with |:hardcopy|. See |pexpr-option|. + This option cannot be set from a |modeline| or in the |sandbox|, for + security reasons. *'printfont'* *'pfn'* 'printfont' 'pfn' string (default "courier") @@ -5783,6 +5870,34 @@ A jump table for the options with a short description can be found at |Q_op|. This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. + *'pyxversion'* *'pyx'* +'pyxversion' 'pyx' number (default depends on the build) + global + {not in Vi} + {only available when compiled with the |+python| or + the |+python3| feature} + Specifies the python version used for pyx* functions and commands + |python_x|. The default value is as follows: + + Compiled with Default ~ + |+python| and |+python3| 0 + only |+python| 2 + only |+python3| 3 + + Available values are 0, 2 and 3. + If 'pyxversion' is 0, it is set to 2 or 3 after the first execution of + any python2/3 commands or functions. E.g. `:py` sets to 2, and `:py3` + sets to 3. `:pyx` sets it to 3 if Python 3 is available, otherwise sets + to 2 if Python 2 is available. + See also: |has-pythonx| + + If Vim is compiled with only |+python| or |+python3| setting + 'pyxversion' has no effect. The pyx* functions and commands are + always the same as the compiled version. + + This option cannot be set from a |modeline| or in the |sandbox|, for + security reasons. + *'quoteescape'* *'qe'* 'quoteescape' 'qe' string (default "\") local to buffer @@ -5803,6 +5918,7 @@ A jump table for the options with a short description can be found at |Q_op|. buffer, unless the 'Z' flag is in 'cpoptions'. {not in Vi:} When using the ":view" command the 'readonly' option is set for the newly edited buffer. + See 'modifiable' for disallowing changes to the buffer. *'redrawtime'* *'rdt'* 'redrawtime' 'rdt' number (default 2000) @@ -6354,9 +6470,6 @@ 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., @@ -6376,8 +6489,7 @@ A jump table for the options with a short description can be found at |Q_op|. Flag passed to the shell to execute "!" and ":!" commands; e.g., "bash.exe -c ls" or "command.com /c dir". For the MS-DOS-like systems, the default is set according to the value of 'shell', to - reduce the need to set this option by the user. It's not used for - OS/2 (EMX figures this out itself). + reduce the need to set this option by the user. On Unix it can have more than one flag. Each white space separated part is passed as an argument to the shell command. See |option-backslash| about including spaces and backslashes. @@ -6496,6 +6608,8 @@ A jump table for the options with a short description can be found at |Q_op|. 'shelltemp' is off. The `system()` function does not respect this option and always uses temp files. + NOTE: This option is set to the Vim default value when 'compatible' + is reset. *'shelltype'* *'st'* 'shelltype' 'st' number (default 0) @@ -6812,7 +6926,7 @@ A jump table for the options with a short description can be found at |Q_op|. mapping: ":inoremap # X^H#", where ^H is entered with CTRL-V CTRL-H. When using the ">>" command, lines starting with '#' are not shifted right. - NOTE: 'smartindent' is reset when 'compatible' is set. + NOTE: This option is reset when 'compatible' is set. This option is reset when 'paste' is set and restored when 'paste' is reset. @@ -7000,7 +7114,7 @@ A jump table for the options with a short description can be found at |Q_op|. word. The expression must evaluate to a List of Lists, each with a suggestion and a score. Example: - [['the', 33], ['that', 44]] + [['the', 33], ['that', 44]] ~ Set 'verbose' and use |z=| to see the scores that the internal methods use. A lower score is better. This may invoke |spellsuggest()| if you temporarily @@ -7467,6 +7581,8 @@ A jump table for the options with a short description can be found at |Q_op|. ignore Ignore case match Match case smart Ignore case unless an upper case letter is used + NOTE: This option is set to the Vi default value when 'compatible' is + set and to the Vim default value when 'compatible' is reset. *'taglength'* *'tl'* 'taglength' 'tl' number (default 0) @@ -7571,7 +7687,7 @@ A jump table for the options with a short description can be found at |Q_op|. For further details see |arabic.txt|. *'termencoding'* *'tenc'* -'termencoding' 'tenc' string (default ""; with GTK+ 2 GUI: "utf-8"; with +'termencoding' 'tenc' string (default ""; with GTK+ GUI: "utf-8"; with Macintosh GUI: "macroman") global {only available when compiled with the |+multi_byte| @@ -7583,7 +7699,7 @@ A jump table for the options with a short description can be found at |Q_op|. display). Except for the Mac when 'macatsui' is off, then 'termencoding' should be "macroman". *E617* - Note: This does not apply to the GTK+ 2 GUI. After the GUI has been + Note: This does not apply to the GTK+ GUI. After the GUI has been successfully initialized, 'termencoding' is forcibly set to "utf-8". Any attempts to set a different value will be rejected, and an error message is shown. @@ -7613,6 +7729,7 @@ A jump table for the options with a short description can be found at |Q_op|. compatible terminal. If setting this option does not work (produces a colorless UI) reading |xterm-true-color| might help. + NOTE: This option is reset when 'compatible' is set. *'terse'* *'noterse'* 'terse' boolean (default off) @@ -7688,7 +7805,7 @@ A jump table for the options with a short description can be found at |Q_op|. 'timeout' 'to' boolean (default on) global *'ttimeout'* *'nottimeout'* -'ttimeout' boolean (default off, set in |defaults.vim|)) +'ttimeout' boolean (default off, set in |defaults.vim|) global {not in Vi} These two options together determine the behavior when part of a @@ -7723,7 +7840,7 @@ A jump table for the options with a short description can be found at |Q_op|. global {not in all versions of Vi} *'ttimeoutlen'* *'ttm'* -'ttimeoutlen' 'ttm' number (default -1, set to 100 in |defaults.vim|)) +'ttimeoutlen' 'ttm' number (default -1, set to 100 in |defaults.vim|) global {not in Vi} The time in milliseconds that is waited for a key code or mapped key @@ -7818,7 +7935,7 @@ A jump table for the options with a short description can be found at |Q_op|. Amiga console, Win32 console, all GUI versions and terminals with a non-empty 't_ts' option). When Vim was compiled with HAVE_X11 defined, the original title will - be restored if possible |X11|. + be restored if possible, see |X11|. When this option contains printf-style '%' items, they will be expanded according to the rules used for 'statusline'. Example: > @@ -7866,7 +7983,7 @@ A jump table for the options with a short description can be found at |Q_op|. 'toolbariconsize' 'tbis' string (default "small") global {not in Vi} - {only in the GTK+ 2 GUI} + {only in the GTK+ GUI} Controls the size of toolbar icons. The possible values are: tiny Use tiny icons. small Use small icons (default). @@ -8023,6 +8140,7 @@ A jump table for the options with a short description can be found at |Q_op|. The undo file is not read when 'undoreload' causes the buffer from before a reload to be saved for undo. When 'undofile' is turned off the undo file is NOT deleted. + NOTE: This option is reset when 'compatible' is set. *'undolevels'* *'ul'* 'undolevels' 'ul' number (default 100, 1000 for Unix, VMS, @@ -8278,6 +8396,8 @@ A jump table for the options with a short description can be found at |Q_op|. This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. + NOTE: This option is set to the Vim default value when 'compatible' + is reset. *'virtualedit'* *'ve'* 'virtualedit' 've' string (default "") @@ -8306,6 +8426,7 @@ A jump table for the options with a short description can be found at |Q_op|. The `g$` command will move to the end of the screen line. It doesn't make sense to combine "all" with "onemore", but you will not get a warning for it. + NOTE: This option is set to "" when 'compatible' is set. *'visualbell'* *'vb'* *'novisualbell'* *'novb'* *beep* 'visualbell' 'vb' boolean (default off) diff --git a/runtime/doc/os_mac.txt b/runtime/doc/os_mac.txt index 82e4d75..53010b1 100644 --- a/runtime/doc/os_mac.txt +++ b/runtime/doc/os_mac.txt @@ -12,11 +12,12 @@ NOTE: This file is a bit outdated. You might find more useful info here: http://macvim.org/ 1. Filename Convention |mac-filename| -2. .vimrc an .vim files |mac-vimfile| -3. FAQ |mac-faq| -4. Known Lack |mac-lack| -5. Mac Bug Report |mac-bug| -6. Compiling Vim |mac-compile| +2. .vimrc and .vim files |mac-vimfile| +3. Standard mappings |mac-standard-mappings| +4. FAQ |mac-faq| +5. Known Lack |mac-lack| +6. Mac Bug Report |mac-bug| +7. Compiling Vim |mac-compile| There was a Mac port for version 3.0 of Vim. Here are the first few lines from the old file: @@ -72,7 +73,18 @@ the |'nocompatible'| option is set, otherwise it will only handle mac format files. ============================================================================== -3. Mac FAQ *mac-faq* +3. Standard mappings *mac-standard-mappings* + +The following mappings are available for cut/copy/paste from/to clipboard. + +key Normal Visual Insert Description ~ +Command-v "*P "-d"*P * paste text ** +Command-c "*y copy Visual text ** +Command-x "*d cut Visual text ** +Backspace "*d cut Visual text + +============================================================================== +4. Mac FAQ *mac-faq* On the internet: http://macvim.org/OSX/index.php#FAQ @@ -95,13 +107,13 @@ A: The following trick works with most shells. Put it in your vimrc file. let $PATH = matchstr(s:path, 'VIMPATH\zs.\{-}\ze\n') ============================================================================== -4. Mac Lack *mac-lack* +5. Mac Lack *mac-lack* In a terminal CTRL-^ needs to be entered as Shift-Control-6. CTRL-@ as Shift-Control-2. ============================================================================== -5. Mac Bug Report *mac-bug* +6. Mac Bug Report *mac-bug* When reporting any Mac specific bug or feature change, please use the vim-mac maillist |vim-mac|. However, you need to be subscribed. An alternative is to @@ -110,7 +122,7 @@ send a message to the current MacVim maintainers: mac@vim.org ============================================================================== -6. Compiling Vim *mac-compile* +7. Compiling Vim *mac-compile* See the file "src/INSTALLmac.txt" that comes with the source files. diff --git a/runtime/doc/os_win32.txt b/runtime/doc/os_win32.txt index 7357542..98b37d0 100644 --- a/runtime/doc/os_win32.txt +++ b/runtime/doc/os_win32.txt @@ -1,4 +1,4 @@ -*os_win32.txt* For Vim version 8.0. Last change: 2016 Oct 12 +*os_win32.txt* For Vim version 8.0. Last change: 2017 Mar 21 VIM REFERENCE MANUAL by George Reilly @@ -212,10 +212,19 @@ A. You can't! This is a limitation of the NT console. NT 5.0 is reported to be able to set the blink rate for all console windows at the same time. *:!start* -Q. How can I run an external command or program asynchronously? -A. When using :! to run an external command, you can run it with "start": > - :!start winfile.exe -< Using "start" stops Vim switching to another screen, opening a new console, +Q. How can I asynchronously run an external command or program, or open a + document or URL with its default program? +A. When using :! to run an external command, you can run it with "start". For + example, to run notepad: > + :!start notepad +< To open "image.jpg" with the default image viewer: > + :!start image.jpg +< To open the folder of the current file in Windows Explorer: > + :!start %:h +< To open the Vim home page with the default browser: > + :!start http://www.vim.org/ +< + Using "start" stops Vim switching to another screen, opening a new console, or waiting for the program to complete; it indicates that you are running a program that does not affect the files you are editing. Programs begun with :!start do not get passed Vim's open file handles, which means they do diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt index 7c834b3..d676409 100644 --- a/runtime/doc/pattern.txt +++ b/runtime/doc/pattern.txt @@ -1,4 +1,4 @@ -*pattern.txt* For Vim version 8.0. Last change: 2016 Sep 11 +*pattern.txt* For Vim version 8.0. Last change: 2017 Mar 29 VIM REFERENCE MANUAL by Bram Moolenaar @@ -869,10 +869,13 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on): \%V Match inside the Visual area. When Visual mode has already been stopped match in the area that |gv| would reselect. This is a |/zero-width| match. To make sure the whole pattern is - inside the Visual area put it at the start and end of the pattern, - e.g.: > + inside the Visual area put it at the start and just before the end of + the pattern, e.g.: > + /\%Vfoo.*ba\%Vr +< This also works if only "foo bar" was Visually selected. This: > /\%Vfoo.*bar\%V -< Only works for the current buffer. +< would match "foo bar" if the Visual selection continues after the "r". + Only works for the current buffer. */\%#* *cursor-position* \%# Matches with the cursor position. Only works when matching in a @@ -1082,25 +1085,27 @@ x A single character, with no special meaning, matches itself - A character class expression is evaluated to the set of characters belonging to that character class. The following character classes are supported: - Name Contents ~ -*[:alnum:]* [:alnum:] ASCII letters and digits -*[:alpha:]* [:alpha:] ASCII letters -*[:blank:]* [:blank:] space and tab characters -*[:cntrl:]* [:cntrl:] control characters -*[:digit:]* [:digit:] decimal digits -*[:graph:]* [:graph:] printable characters excluding space -*[:lower:]* [:lower:] lowercase letters (all letters when + Name Func Contents ~ +*[:alnum:]* [:alnum:] isalnum ASCII letters and digits +*[:alpha:]* [:alpha:] isalpha ASCII letters +*[:blank:]* [:blank:] space and tab +*[:cntrl:]* [:cntrl:] iscntrl ASCII control characters +*[:digit:]* [:digit:] decimal digits '0' to '9' +*[:graph:]* [:graph:] isgraph ASCII printable characters excluding + space +*[:lower:]* [:lower:] (1) lowercase letters (all letters when 'ignorecase' is used) -*[:print:]* [:print:] printable characters including space -*[:punct:]* [:punct:] ASCII punctuation characters -*[:space:]* [:space:] whitespace characters -*[:upper:]* [:upper:] uppercase letters (all letters when +*[:print:]* [:print:] (2) printable characters including space +*[:punct:]* [:punct:] ispunct ASCII punctuation characters +*[:space:]* [:space:] whitespace characters: space, tab, CR, + NL, vertical tab, form feed +*[:upper:]* [:upper:] (3) uppercase letters (all letters when 'ignorecase' is used) -*[:xdigit:]* [:xdigit:] hexadecimal digits -*[:return:]* [:return:] the character -*[:tab:]* [:tab:] the character -*[:escape:]* [:escape:] the character -*[:backspace:]* [:backspace:] the character +*[:xdigit:]* [:xdigit:] hexadecimal digits: 0-9, a-f, A-F +*[:return:]* [:return:] the character +*[:tab:]* [:tab:] the character +*[:escape:]* [:escape:] the character +*[:backspace:]* [:backspace:] the character The brackets in character class expressions are additional to the brackets delimiting a collection. For example, the following is a plausible pattern for a UNIX filename: "[-./[:alnum:]_~]\+" That is, @@ -1111,6 +1116,13 @@ x A single character, with no special meaning, matches itself regexp engine. See |two-engines|. In the future these items may work for multi-byte characters. For now, to get all "alpha" characters you can use: [[:lower:][:upper:]]. + + The "Func" column shows what library function is used. The + implementation depends on the system. Otherwise: + (1) Uses islower() for ASCII and Vim builtin rules for other + characters when built with the |+multi_byte| feature. + (2) Uses Vim builtin rules + (3) As with (1) but using isupper() */[[=* *[==]* - An equivalence class. This means that characters are matched that have almost the same meaning, e.g., when ignoring accents. This diff --git a/runtime/doc/pi_gzip.txt b/runtime/doc/pi_gzip.txt index 7049570..d8f63ac 100644 --- a/runtime/doc/pi_gzip.txt +++ b/runtime/doc/pi_gzip.txt @@ -1,4 +1,4 @@ -*pi_gzip.txt* For Vim version 8.0. Last change: 2016 Oct 30 +*pi_gzip.txt* For Vim version 8.0. Last change: 2016 Nov 06 VIM REFERENCE MANUAL by Bram Moolenaar @@ -28,6 +28,7 @@ with these extensions: *.lzma lzma *.xz xz *.lz lzip + *.zst zstd That's actually the only thing you need to know. There are no options. diff --git a/runtime/doc/pi_logipat.txt b/runtime/doc/pi_logipat.txt index d2eac80..f8d6662 100644 --- a/runtime/doc/pi_logipat.txt +++ b/runtime/doc/pi_logipat.txt @@ -1,4 +1,4 @@ -*logiPat.txt* Logical Patterns Jun 22, 2015 +*pi_logipat.txt* Logical Patterns Jun 22, 2015 Author: Charles E. Campbell Copyright: (c) 2004-2015 by Charles E. Campbell *logiPat-copyright* diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index 39a0b86..0ee2466 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1,4 +1,4 @@ -*quickfix.txt* For Vim version 8.0. Last change: 2016 Nov 04 +*quickfix.txt* For Vim version 8.0. Last change: 2017 Mar 06 VIM REFERENCE MANUAL by Bram Moolenaar @@ -45,10 +45,13 @@ The 'errorformat' option should be set to match the error messages from your compiler (see |errorformat| below). *location-list* *E776* -A location list is similar to a quickfix list and contains a list of positions -in files. A location list is associated with a window and each window can -have a separate location list. A location list can be associated with only -one window. The location list is independent of the quickfix list. +A location list is a window-local quickfix list. You get one after commands +like `:lvimgrep`, `:lgrep`, `:lhelpgrep`, `:lmake`, etc., which create a +location list instead of a quickfix list as the corresponding `:vimgrep`, +`:grep`, `:helpgrep`, `:make` do. +A location list is associated with a window and each window can have a +separate location list. A location list can be associated with only one +window. The location list is independent of the quickfix list. When a window with a location list is split, the new window gets a copy of the location list. When there are no longer any references to a location list, @@ -164,6 +167,9 @@ processing a quickfix or location list command, it will be aborted. keep Vim running while compiling. If you give the name of the errorfile, the 'errorfile' option will be set to [errorfile]. See |:cc| for [!]. + If the encoding of the error file differs from the + 'encoding' option, you can use the 'makeencoding' + option to specify the encoding. *:lf* *:lfile* :lf[ile][!] [errorfile] Same as ":cfile", except the location list for the @@ -175,6 +181,9 @@ processing a quickfix or location list command, it will be aborted. :cg[etfile] [errorfile] *:cg* *:cgetfile* Read the error file. Just like ":cfile" but don't jump to the first error. + If the encoding of the error file differs from the + 'encoding' option, you can use the 'makeencoding' + option to specify the encoding. :lg[etfile] [errorfile] *:lg* *:lgetfile* @@ -185,6 +194,9 @@ processing a quickfix or location list command, it will be aborted. :caddf[ile] [errorfile] Read the error file and add the errors from the errorfile to the current quickfix list. If a quickfix list is not present, then a new list is created. + If the encoding of the error file differs from the + 'encoding' option, you can use the 'makeencoding' + option to specify the encoding. *:laddf* *:laddfile* :laddf[ile] [errorfile] Same as ":caddfile", except the location list for the @@ -320,6 +332,7 @@ use this code: > endfunction au QuickfixCmdPost make call QfMakeConv() +Another option is using 'makeencoding'. EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST: @@ -586,6 +599,9 @@ lists, use ":cnewer 99" first. like |:cnext| and |:cprevious|, see above. This command does not accept a comment, any " characters are considered part of the arguments. + If the encoding of the program output differs from the + 'encoding' option, you can use the 'makeencoding' + option to specify the encoding. *:lmak* *:lmake* :lmak[e][!] [arguments] @@ -645,6 +661,7 @@ read the error messages: > au QuickfixCmdPost make call QfMakeConv() (Example by Faque Cheng) +Another option is using 'makeencoding'. ============================================================================== 5. Using :vimgrep and :grep *grep* *lid* @@ -759,6 +776,9 @@ id-utils) in a similar way to its compiler integration (see |:make| above). When 'grepprg' is "internal" this works like |:vimgrep|. Note that the pattern needs to be enclosed in separator characters then. + If the encoding of the program output differs from the + 'encoding' option, you can use the 'makeencoding' + option to specify the encoding. *:lgr* *:lgrep* :lgr[ep][!] [arguments] Same as ":grep", except the location list for the @@ -783,6 +803,10 @@ id-utils) in a similar way to its compiler integration (see |:make| above). \ | catch /E480:/ \ | endtry" < + If the encoding of the program output differs from the + 'encoding' option, you can use the 'makeencoding' + option to specify the encoding. + *:lgrepa* *:lgrepadd* :lgrepa[dd][!] [arguments] Same as ":grepadd", except the location list for the @@ -1399,7 +1423,7 @@ prints information about entering a directory in the form "Making all in dir". Making all in dir2 ./dir1/dir2 This can be solved by printing absolute directories in the "enter directory" - message or by printing "leave directory" messages.. + message or by printing "leave directory" messages. To avoid this problem, ensure to print absolute directory names and "leave directory" messages. diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt index 4ffc836..e64a5f6 100644 --- a/runtime/doc/quickref.txt +++ b/runtime/doc/quickref.txt @@ -1,4 +1,4 @@ -*quickref.txt* For Vim version 8.0. Last change: 2016 Aug 21 +*quickref.txt* For Vim version 8.0. Last change: 2016 Dec 16 VIM REFERENCE MANUAL by Bram Moolenaar @@ -782,6 +782,7 @@ Short explanation of each option: *option-list* 'macatsui' Mac GUI: use ATSUI text drawing 'magic' changes special characters in search patterns 'makeef' 'mef' name of the errorfile for ":make" +'makeencoding' 'menc' encoding of external make/grep commands 'makeprg' 'mp' program to use for the ":make" command 'matchpairs' 'mps' pairs of characters that "%" can match 'matchtime' 'mat' tenths of a second to show matching paren @@ -835,6 +836,7 @@ Short explanation of each option: *option-list* 'pumheight' 'ph' maximum height of the popup menu 'pythondll' name of the Python 2 dynamic library 'pythonthreedll' name of the Python 3 dynamic library +'pyxversion' 'pyx' Python version used for pyx* commands 'quoteescape' 'qe' escape characters used in a string 'readonly' 'ro' disallow writing the buffer 'redrawtime' 'rdt' timeout for 'hlsearch' and |:match| highlighting @@ -1067,6 +1069,8 @@ Short explanation of each option: *option-list* |c_| / recall older/newer command-line that starts with current command |c_| / recall older/newer command-line from history +|c_CTRL-G| CTRL-G next match when 'incsearch' is active +|c_CTRL-T| CTRL-T previous match when 'incsearch' is active |:history| :his[tory] show older command-lines Context-sensitive completion on the command-line: diff --git a/runtime/doc/remote.txt b/runtime/doc/remote.txt index 86fdd49..cecdd6a 100644 --- a/runtime/doc/remote.txt +++ b/runtime/doc/remote.txt @@ -1,4 +1,4 @@ -*remote.txt* For Vim version 8.0. Last change: 2015 Mar 01 +*remote.txt* For Vim version 8.0. Last change: 2017 Mar 18 VIM REFERENCE MANUAL by Bram Moolenaar @@ -149,6 +149,7 @@ the description in |eval.txt| or use CTRL-] on the function name to jump to the full explanation. synopsis explanation ~ + remote_startserver( name) run a server remote_expr( server, string, idvar) send expression remote_send( server, string, idvar) send key sequence serverlist() get a list of available servers diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt index e704681..8f81053 100644 --- a/runtime/doc/repeat.txt +++ b/runtime/doc/repeat.txt @@ -1,4 +1,4 @@ -*repeat.txt* For Vim version 8.0. Last change: 2016 Sep 11 +*repeat.txt* For Vim version 8.0. Last change: 2017 Feb 06 VIM REFERENCE MANUAL by Bram Moolenaar @@ -305,6 +305,11 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|. Mark) in utf-8 format Vim will recognize it, no need to use ":scriptencoding utf-8" then. + If you set the 'encoding' option in your |.vimrc|, + `:scriptencoding` must be placed after that. E.g.: > + set encoding=utf-8 + scriptencoding utf-8 +< When compiled without the |+multi_byte| feature this command is ignored. {not in Vi} diff --git a/runtime/doc/scroll.txt b/runtime/doc/scroll.txt index b3696d3..35301f6 100644 --- a/runtime/doc/scroll.txt +++ b/runtime/doc/scroll.txt @@ -1,4 +1,4 @@ -*scroll.txt* For Vim version 8.0. Last change: 2006 Aug 27 +*scroll.txt* For Vim version 8.0. Last change: 2016 Nov 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -108,7 +108,8 @@ z^ Without [count]: Redraw with the line just above the 3. Scrolling relative to cursor *scroll-cursor* The following commands reposition the edit window (the part of the buffer that -you see) while keeping the cursor on the same line: +you see) while keeping the cursor on the same line. Note that the 'scrolloff' +option may cause context lines to show above and below the cursor. *z* z Redraw, line [count] at top of window (default @@ -220,7 +221,7 @@ past its buffer's limits. However, if a 'scrollbind' window that has a relative offset that is past its buffer's limits is given the cursor focus, the other 'scrollbind' windows must jump to a location where the current window's relative offset is valid. This -behavior can be changed by clearing the 'jump' flag from the 'scrollopt' +behavior can be changed by clearing the "jump" flag from the 'scrollopt' option. *syncbind* *:syncbind* *:sync* diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index 8ce3c63..eb1fdc8 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -1,4 +1,4 @@ -*starting.txt* For Vim version 8.0. Last change: 2016 Sep 09 +*starting.txt* For Vim version 8.0. Last change: 2017 Jan 15 VIM REFERENCE MANUAL by Bram Moolenaar @@ -230,6 +230,7 @@ a slash. Thus "-R" means recovery and "-/R" readonly. the executable "view" has the same effect as the -R argument. The 'updatecount' option will be set to 10000, meaning that the swap file will not be updated automatically very often. + See |-M| for disallowing modifications. *-m* -m Modifications not allowed to be written. The 'write' option @@ -421,6 +422,10 @@ a slash. Thus "-R" means recovery and "-/R" readonly. not connected to a terminal. This will avoid the warning and the two second delay that would happen. {not in Vi} + *--ttyfail* +--ttyfail When the stdin or stdout is not a terminal (tty) then exit + right away. + *-d* -d Start in diff mode, like |vimdiff|. {not in Vi} {not available when compiled without the |+diff| @@ -1215,7 +1220,7 @@ There are several ways to exit Vim: - Use `:cquit`. Also when there are changes. When using `:cquit` or when there was an error message Vim exits with exit -code 1. Errors can be avoided by using `:silent!`. +code 1. Errors can be avoided by using `:silent!` or with `:catch`. ============================================================================== 8. Saving settings *save-settings* diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 2138f02..4a47c33 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 8.0. Last change: 2016 Oct 30 +*syntax.txt* For Vim version 8.0. Last change: 2017 Feb 06 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1476,7 +1476,7 @@ algorithm should work in the vast majority of cases. In some cases, such as a file that begins with 500 or more full-line comments, the script may incorrectly decide that the fortran code is in fixed form. If that happens, just add a non-comment statement beginning anywhere in the first five columns -of the first twenty five lines, save (:w) and then reload (:e!) the file. +of the first twenty-five lines, save (:w) and then reload (:e!) the file. Tabs in fortran files ~ Tabs are not recognized by the Fortran standards. Tabs are not a good idea in @@ -2646,9 +2646,9 @@ later, and part earlier) adds. RESTRUCTURED TEXT *rst.vim* *ft-rst-syntax* -You may set what syntax definitions should be used for code blocks via +You may set what syntax definitions should be used for code blocks via > let rst_syntax_code_list = ['vim', 'lisp', ...] - +< REXX *rexx.vim* *ft-rexx-syntax* @@ -2933,6 +2933,13 @@ reduce this, the "sh_maxlines" internal variable can be set. Example: > The default is to use the twice sh_minlines. Set it to a smaller number to speed up displaying. The disadvantage is that highlight errors may appear. +syntax/sh.vim tries to flag certain problems as errors; usually things like +extra ']'s, 'done's, 'fi's, etc. If you find the error handling problematic +for your purposes, you may suppress such error highlighting by putting +the following line in your .vimrc: > + + let g:sh_no_error= 1 +< *sh-embed* *sh-awk* Sh: EMBEDDING LANGUAGES~ @@ -3235,11 +3242,11 @@ syntax highlighting script handles this with the following logic: * If g:tex_stylish exists and is 1 then the file will be treated as a "sty" file, so the "_" will be allowed as part of keywords - (irregardless of g:tex_isk) + (regardless of g:tex_isk) * Else if the file's suffix is sty, cls, clo, dtx, or ltx, then the file will be treated as a "sty" file, so the "_" will be allowed as part of keywords - (irregardless of g:tex_isk) + (regardless of g:tex_isk) * If g:tex_isk exists, then it will be used for the local 'iskeyword' * Else the local 'iskeyword' will be set to 48-57,a-z,A-Z,192-255 @@ -3320,8 +3327,8 @@ Some folding is now supported with syntax/vim.vim: > g:vimsyn_folding =~ 't' : fold tcl script < *g:vimsyn_noerror* -Not all error highlighting that syntax/vim.vim does may be correct; VimL is a -difficult language to highlight correctly. A way to suppress error +Not all error highlighting that syntax/vim.vim does may be correct; Vim script +is a difficult language to highlight correctly. A way to suppress error highlighting is to put the following line in your |vimrc|: > let g:vimsyn_noerror = 1 @@ -3479,6 +3486,8 @@ DEFINING CASE *:syn-case* *E390* "ignore". Note that any items before this are not affected, and all items until the next ":syntax case" command are affected. +:sy[ntax] case + Show either "syntax case match" or "syntax case ignore" (translated). SPELL CHECKING *:syn-spell* @@ -3496,6 +3505,11 @@ SPELL CHECKING *:syn-spell* To activate spell checking the 'spell' option must be set. +:sy[ntax] spell + Show either "syntax spell toplevel", "syntax spell notoplevel" or + "syntax spell default" (translated). + + SYNTAX ISKEYWORD SETTING *:syn-iskeyword* :sy[ntax] iskeyword [clear | {option}] @@ -4089,6 +4103,9 @@ IMPLICIT CONCEAL *:syn-conceal-implicit* off" returns to the normal state where the "conceal" flag must be given explicitly. +:sy[ntax] conceal + Show either "syntax conceal on" or "syntax conceal off" (translated). + ============================================================================== 7. Syntax patterns *:syn-pattern* *E401* *E402* diff --git a/runtime/doc/tabpage.txt b/runtime/doc/tabpage.txt index bc40981..e72388c 100644 --- a/runtime/doc/tabpage.txt +++ b/runtime/doc/tabpage.txt @@ -139,6 +139,10 @@ something else. :+tabclose " close the next tab page :1tabclose " close the first tab page :$tabclose " close the last tab page + :tabclose -2 " close the two previous tab page + :tabclose + " close the next tab page + :tabclose 3 " close the third tab page + :tabclose $ " close the last tab page < *:tabo* *:tabonly* :tabo[nly][!] Close all other tab pages. @@ -153,13 +157,20 @@ something else. " one :{count}tabo[nly][!] - Close all tab pages except the {count}th one. > +:tabo[nly][!] {count} + Close all tab pages except {count} one. > :.tabonly " as above :-tabonly " close all tab pages except the previous " one :+tabonly " close all tab pages except the next one :1tabonly " close all tab pages except the first one :$tabonly " close all tab pages except the last one + :tabonly - " close all tab pages except the previous + " one + :tabonly +2 " close all tab pages except the two next + " one + :tabonly 1 " close all tab pages except the first one + :tabonly $ " close all tab pages except the last one SWITCHING TO ANOTHER TAB PAGE: @@ -174,7 +185,20 @@ gt *i_CTRL-* *i_* Go to the next tab page. Wraps around from the last to the first one. +:{count}tabn[ext] :tabn[ext] {count} + Go to tab page {count}. The first tab page has number one. > + :-tabnext " go to the previous tab page + :+tabnext " go to the next tab page + :+2tabnext " go to the two next tab page + :1tabnext " go to the first tab page + :$tabnext " go to the last tab page + :tabnext $ " as above + :tabnext - " go to the previous tab page + :tabnext -1 " as above + :tabnext + " go to the next tab page + :tabnext +1 " as above + {count} {count}gt Go to tab page {count}. The first tab page has number one. diff --git a/runtime/doc/tags b/runtime/doc/tags index 166ff59..f128394 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -427,6 +427,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX* 'macatsui' options.txt /*'macatsui'* 'magic' options.txt /*'magic'* 'makeef' options.txt /*'makeef'* +'makeencoding' options.txt /*'makeencoding'* 'makeprg' options.txt /*'makeprg'* 'mat' options.txt /*'mat'* 'matchpairs' options.txt /*'matchpairs'* @@ -439,6 +440,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX* 'maxmemtot' options.txt /*'maxmemtot'* 'mco' options.txt /*'mco'* 'mef' options.txt /*'mef'* +'menc' options.txt /*'menc'* 'menuitems' options.txt /*'menuitems'* 'mesg' vi_diff.txt /*'mesg'* 'mfd' options.txt /*'mfd'* @@ -774,6 +776,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX* 'pvw' options.txt /*'pvw'* 'pythondll' options.txt /*'pythondll'* 'pythonthreedll' options.txt /*'pythonthreedll'* +'pyx' options.txt /*'pyx'* +'pyxversion' options.txt /*'pyxversion'* 'qe' options.txt /*'qe'* 'quote motion.txt /*'quote* 'quoteescape' options.txt /*'quoteescape'* @@ -923,6 +927,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX* 't_AB' term.txt /*'t_AB'* 't_AF' term.txt /*'t_AF'* 't_AL' term.txt /*'t_AL'* +'t_BD' term.txt /*'t_BD'* +'t_BE' term.txt /*'t_BE'* 't_CS' term.txt /*'t_CS'* 't_CV' term.txt /*'t_CV'* 't_Ce' term.txt /*'t_Ce'* @@ -939,6 +945,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX* 't_F7' term.txt /*'t_F7'* 't_F8' term.txt /*'t_F8'* 't_F9' term.txt /*'t_F9'* +'t_GP' term.txt /*'t_GP'* 't_IE' term.txt /*'t_IE'* 't_IS' term.txt /*'t_IS'* 't_K1' term.txt /*'t_K1'* @@ -961,6 +968,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX* 't_KJ' term.txt /*'t_KJ'* 't_KK' term.txt /*'t_KK'* 't_KL' term.txt /*'t_KL'* +'t_PE' term.txt /*'t_PE'* +'t_PS' term.txt /*'t_PS'* 't_RB' term.txt /*'t_RB'* 't_RI' term.txt /*'t_RI'* 't_RV' term.txt /*'t_RV'* @@ -1357,6 +1366,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX* --servername remote.txt /*--servername* --socketid starting.txt /*--socketid* --startuptime starting.txt /*--startuptime* +--ttyfail starting.txt /*--ttyfail* --version starting.txt /*--version* --windowid starting.txt /*--windowid* -A starting.txt /*-A* @@ -1844,6 +1854,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX* :$ cmdline.txt /*:$* :% cmdline.txt /*:%* :& change.txt /*:&* +:&& change.txt /*:&&* :' cmdline.txt /*:'* :, cmdline.txt /*:,* :. cmdline.txt /*:.* @@ -1917,6 +1928,13 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX* :Print various.txt /*:Print* :Rexplore pi_netrw.txt /*:Rexplore* :RmVimball pi_vimball.txt /*:RmVimball* +:RustEmitAsm ft_rust.txt /*:RustEmitAsm* +:RustEmitIr ft_rust.txt /*:RustEmitIr* +:RustExpand ft_rust.txt /*:RustExpand* +:RustFmt ft_rust.txt /*:RustFmt* +:RustFmtRange ft_rust.txt /*:RustFmtRange* +:RustPlay ft_rust.txt /*:RustPlay* +:RustRun ft_rust.txt /*:RustRun* :Sexplore pi_netrw.txt /*:Sexplore* :TOhtml syntax.txt /*:TOhtml* :TarDiff pi_tar.txt /*:TarDiff* @@ -2720,6 +2738,10 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX* :pyfile if_pyth.txt /*:pyfile* :python if_pyth.txt /*:python* :python3 if_pyth.txt /*:python3* +:pythonx if_pyth.txt /*:pythonx* +:pyx if_pyth.txt /*:pyx* +:pyxdo if_pyth.txt /*:pyxdo* +:pyxfile if_pyth.txt /*:pyxfile* :q editing.txt /*:q* :qa editing.txt /*:qa* :qall editing.txt /*:qall* @@ -3256,6 +3278,9 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX* map.txt /** autocmd.txt /** os_mac.txt /** + os_mac.txt /** + os_mac.txt /** change.txt /** motion.txt /** change.txt /** @@ -4486,7 +4511,14 @@ E933 eval.txt /*E933* E934 sign.txt /*E934* E935 eval.txt /*E935* E936 autocmd.txt /*E936* +E937 autocmd.txt /*E937* +E938 eval.txt /*E938* +E939 change.txt /*E939* E94 windows.txt /*E94* +E940 eval.txt /*E940* +E941 eval.txt /*E941* +E942 eval.txt /*E942* +E943 message.txt /*E943* E95 message.txt /*E95* E96 diff.txt /*E96* E97 diff.txt /*E97* @@ -4766,6 +4798,8 @@ W16 message.txt /*W16* W17 arabic.txt /*W17* W18 syntax.txt /*W18* W19 autocmd.txt /*W19* +W20 if_pyth.txt /*W20* +W21 if_pyth.txt /*W21* WORD motion.txt /*WORD* WWW intro.txt /*WWW* Win32 os_win32.txt /*Win32* @@ -4993,6 +5027,7 @@ assert_inrange() eval.txt /*assert_inrange()* assert_match() eval.txt /*assert_match()* assert_notequal() eval.txt /*assert_notequal()* assert_notmatch() eval.txt /*assert_notmatch()* +assert_report() eval.txt /*assert_report()* assert_true() eval.txt /*assert_true()* at motion.txt /*at* atan() eval.txt /*atan()* @@ -5056,6 +5091,7 @@ backup-changed version4.txt /*backup-changed* backup-extension version4.txt /*backup-extension* backup-table editing.txt /*backup-table* balloon-eval debugger.txt /*balloon-eval* +balloon_show() eval.txt /*balloon_show()* bar motion.txt /*bar* bars help.txt /*bars* base_font_name_list mbyte.txt /*base_font_name_list* @@ -5248,6 +5284,7 @@ catch-text eval.txt /*catch-text* cc change.txt /*cc* ceil() eval.txt /*ceil()* ch.vim syntax.txt /*ch.vim* +ch_canread() eval.txt /*ch_canread()* ch_close() eval.txt /*ch_close()* ch_close_in() eval.txt /*ch_close_in()* ch_evalexpr() eval.txt /*ch_evalexpr()* @@ -5295,6 +5332,7 @@ channel-close channel.txt /*channel-close* channel-close-in channel.txt /*channel-close-in* channel-commands channel.txt /*channel-commands* channel-demo channel.txt /*channel-demo* +channel-drop channel.txt /*channel-drop* channel-functions usr_41.txt /*channel-functions* channel-mode channel.txt /*channel-mode* channel-more channel.txt /*channel-more* @@ -5327,6 +5365,7 @@ cino-: indent.txt /*cino-:* cino-= indent.txt /*cino-=* cino-> indent.txt /*cino->* cino-C indent.txt /*cino-C* +cino-E indent.txt /*cino-E* cino-J indent.txt /*cino-J* cino-L indent.txt /*cino-L* cino-M indent.txt /*cino-M* @@ -6104,6 +6143,7 @@ ft-rexx-syntax syntax.txt /*ft-rexx-syntax* ft-rst-syntax syntax.txt /*ft-rst-syntax* ft-ruby-omni insert.txt /*ft-ruby-omni* ft-ruby-syntax syntax.txt /*ft-ruby-syntax* +ft-rust filetype.txt /*ft-rust* ft-scheme-syntax syntax.txt /*ft-scheme-syntax* ft-sdl-syntax syntax.txt /*ft-sdl-syntax* ft-sed-syntax syntax.txt /*ft-sed-syntax* @@ -6136,6 +6176,7 @@ ft-xpm-syntax syntax.txt /*ft-xpm-syntax* ft-yaml-syntax syntax.txt /*ft-yaml-syntax* ft-zsh-syntax syntax.txt /*ft-zsh-syntax* ft_ada.txt ft_ada.txt /*ft_ada.txt* +ft_rust.txt ft_rust.txt /*ft_rust.txt* ft_sql.txt ft_sql.txt /*ft_sql.txt* ftdetect filetype.txt /*ftdetect* ftp pi_netrw.txt /*ftp* @@ -6213,6 +6254,7 @@ g:decada.Make_Command ft_ada.txt /*g:decada.Make_Command* g:decada.Unit_Name() ft_ada.txt /*g:decada.Unit_Name()* g:filetype_csh syntax.txt /*g:filetype_csh* g:filetype_r syntax.txt /*g:filetype_r* +g:ftplugin_rust_source_path ft_rust.txt /*g:ftplugin_rust_source_path* g:gnat ft_ada.txt /*g:gnat* g:gnat.Error_Format ft_ada.txt /*g:gnat.Error_Format* g:gnat.Find() ft_ada.txt /*g:gnat.Find()* @@ -6342,6 +6384,20 @@ g:netrw_win95ftp pi_netrw.txt /*g:netrw_win95ftp* g:netrw_winsize pi_netrw.txt /*g:netrw_winsize* g:netrw_wiw pi_netrw.txt /*g:netrw_wiw* g:netrw_xstrlen pi_netrw.txt /*g:netrw_xstrlen* +g:rust_bang_comment_leader ft_rust.txt /*g:rust_bang_comment_leader* +g:rust_conceal ft_rust.txt /*g:rust_conceal* +g:rust_conceal_mod_path ft_rust.txt /*g:rust_conceal_mod_path* +g:rust_conceal_pub ft_rust.txt /*g:rust_conceal_pub* +g:rust_fold ft_rust.txt /*g:rust_fold* +g:rust_playpen_url ft_rust.txt /*g:rust_playpen_url* +g:rust_recommended_style ft_rust.txt /*g:rust_recommended_style* +g:rust_shortener_url ft_rust.txt /*g:rust_shortener_url* +g:rustc_makeprg_no_percent ft_rust.txt /*g:rustc_makeprg_no_percent* +g:rustc_path ft_rust.txt /*g:rustc_path* +g:rustfmt_autosave ft_rust.txt /*g:rustfmt_autosave* +g:rustfmt_command ft_rust.txt /*g:rustfmt_command* +g:rustfmt_fail_silently ft_rust.txt /*g:rustfmt_fail_silently* +g:rustfmt_options ft_rust.txt /*g:rustfmt_options* g:syntax_on syntax.txt /*g:syntax_on* g:tar_browseoptions pi_tar.txt /*g:tar_browseoptions* g:tar_cmd pi_tar.txt /*g:tar_cmd* @@ -6572,7 +6628,7 @@ gui-x11-various gui_x11.txt /*gui-x11-various* gui.txt gui.txt /*gui.txt* gui_w32.txt gui_w32.txt /*gui_w32.txt* gui_x11.txt gui_x11.txt /*gui_x11.txt* -guifontwide_gtk2 options.txt /*guifontwide_gtk2* +guifontwide_gtk options.txt /*guifontwide_gtk* guifontwide_win_mbyte options.txt /*guifontwide_win_mbyte* guioptions_a options.txt /*guioptions_a* guu change.txt /*guu* @@ -6597,6 +6653,7 @@ hangulin.txt hangulin.txt /*hangulin.txt* has() eval.txt /*has()* has-patch eval.txt /*has-patch* has-python if_pyth.txt /*has-python* +has-pythonx if_pyth.txt /*has-pythonx* has_key() eval.txt /*has_key()* haskell.vim syntax.txt /*haskell.vim* haslocaldir() eval.txt /*haslocaldir()* @@ -6960,6 +7017,7 @@ job-callback channel.txt /*job-callback* job-channel-overview channel.txt /*job-channel-overview* job-close_cb channel.txt /*job-close_cb* job-control channel.txt /*job-control* +job-drop channel.txt /*job-drop* job-err_cb channel.txt /*job-err_cb* job-err_io channel.txt /*job-err_io* job-exit_cb channel.txt /*job-exit_cb* @@ -7095,7 +7153,6 @@ logiPat-man pi_logipat.txt /*logiPat-man* logiPat-manual pi_logipat.txt /*logiPat-manual* logiPat-operators pi_logipat.txt /*logiPat-operators* logiPat-pattern pi_logipat.txt /*logiPat-pattern* -logiPat.txt pi_logipat.txt /*logiPat.txt* long-lines version5.txt /*long-lines* love intro.txt /*love* lowercase change.txt /*lowercase* @@ -7126,6 +7183,7 @@ mac-compile os_mac.txt /*mac-compile* mac-faq os_mac.txt /*mac-faq* mac-filename os_mac.txt /*mac-filename* mac-lack os_mac.txt /*mac-lack* +mac-standard-mappings os_mac.txt /*mac-standard-mappings* mac-vimfile os_mac.txt /*mac-vimfile* macintosh os_mac.txt /*macintosh* macro map.txt /*macro* @@ -7636,6 +7694,8 @@ nice todo.txt /*nice* no-eval-feature eval.txt /*no-eval-feature* no-type-checking eval.txt /*no-type-checking* no_buffers_menu gui.txt /*no_buffers_menu* +no_mail_maps filetype.txt /*no_mail_maps* +no_plugin_maps filetype.txt /*no_plugin_maps* non-greedy pattern.txt /*non-greedy* non-zero-arg eval.txt /*non-zero-arg* none-variable eval.txt /*none-variable* @@ -7777,6 +7837,7 @@ php3.vim syntax.txt /*php3.vim* phtml.vim syntax.txt /*phtml.vim* pi_getscript.txt pi_getscript.txt /*pi_getscript.txt* pi_gzip.txt pi_gzip.txt /*pi_gzip.txt* +pi_logipat.txt pi_logipat.txt /*pi_logipat.txt* pi_netrw.txt pi_netrw.txt /*pi_netrw.txt* pi_paren.txt pi_paren.txt /*pi_paren.txt* pi_spec.txt pi_spec.txt /*pi_spec.txt* @@ -7864,6 +7925,7 @@ python-bindeval if_pyth.txt /*python-bindeval* python-bindeval-objects if_pyth.txt /*python-bindeval-objects* python-buffer if_pyth.txt /*python-buffer* python-buffers if_pyth.txt /*python-buffers* +python-building if_pyth.txt /*python-building* python-chdir if_pyth.txt /*python-chdir* python-command if_pyth.txt /*python-command* python-commands if_pyth.txt /*python-commands* @@ -7894,7 +7956,11 @@ python.vim syntax.txt /*python.vim* python2-directory if_pyth.txt /*python2-directory* python3 if_pyth.txt /*python3* python3-directory if_pyth.txt /*python3-directory* +python_x if_pyth.txt /*python_x* +python_x-special-comments if_pyth.txt /*python_x-special-comments* +pythonx if_pyth.txt /*pythonx* pythonx-directory if_pyth.txt /*pythonx-directory* +pyxeval() eval.txt /*pyxeval()* q repeat.txt /*q* q/ cmdline.txt /*q\/* q: cmdline.txt /*q:* @@ -7988,6 +8054,7 @@ remote_foreground() eval.txt /*remote_foreground()* remote_peek() eval.txt /*remote_peek()* remote_read() eval.txt /*remote_read()* remote_send() eval.txt /*remote_send()* +remote_startserver() eval.txt /*remote_startserver()* remove() eval.txt /*remove()* remove-filetype filetype.txt /*remove-filetype* remove-option-flags options.txt /*remove-option-flags* @@ -8043,6 +8110,13 @@ russian-issues russian.txt /*russian-issues* russian-keymap russian.txt /*russian-keymap* russian-l18n russian.txt /*russian-l18n* russian.txt russian.txt /*russian.txt* +rust ft_rust.txt /*rust* +rust-commands ft_rust.txt /*rust-commands* +rust-intro ft_rust.txt /*rust-intro* +rust-mappings ft_rust.txt /*rust-mappings* +rust-settings ft_rust.txt /*rust-settings* +rust_ ft_rust.txt /*rust_* +rust_ ft_rust.txt /*rust_* rview starting.txt /*rview* rvim starting.txt /*rvim* rxvt syntax.txt /*rxvt* @@ -8436,6 +8510,8 @@ t_@7 term.txt /*t_@7* t_AB term.txt /*t_AB* t_AF term.txt /*t_AF* t_AL term.txt /*t_AL* +t_BD term.txt /*t_BD* +t_BE term.txt /*t_BE* t_CS term.txt /*t_CS* t_CV term.txt /*t_CV* t_Ce term.txt /*t_Ce* @@ -8452,6 +8528,7 @@ t_F6 term.txt /*t_F6* t_F7 term.txt /*t_F7* t_F8 term.txt /*t_F8* t_F9 term.txt /*t_F9* +t_GP term.txt /*t_GP* t_IE term.txt /*t_IE* t_IS term.txt /*t_IS* t_K1 term.txt /*t_K1* @@ -8474,6 +8551,8 @@ t_KI term.txt /*t_KI* t_KJ term.txt /*t_KJ* t_KK term.txt /*t_KK* t_KL term.txt /*t_KL* +t_PE term.txt /*t_PE* +t_PS term.txt /*t_PS* t_RB term.txt /*t_RB* t_RI term.txt /*t_RI* t_RV term.txt /*t_RV* @@ -8705,20 +8784,23 @@ termcap-options term.txt /*termcap-options* termcap-title term.txt /*termcap-title* terminal-colors os_unix.txt /*terminal-colors* terminal-info term.txt /*terminal-info* +terminal-key-codes term.txt /*terminal-key-codes* terminal-options term.txt /*terminal-options* +terminal-output-codes term.txt /*terminal-output-codes* terminfo term.txt /*terminfo* termresponse-variable eval.txt /*termresponse-variable* test-functions usr_41.txt /*test-functions* test_alloc_fail() eval.txt /*test_alloc_fail()* test_autochdir() eval.txt /*test_autochdir()* -test_disable_char_avail() eval.txt /*test_disable_char_avail()* test_garbagecollect_now() eval.txt /*test_garbagecollect_now()* +test_ignore_error() eval.txt /*test_ignore_error()* test_null_channel() eval.txt /*test_null_channel()* test_null_dict() eval.txt /*test_null_dict()* test_null_job() eval.txt /*test_null_job()* test_null_list() eval.txt /*test_null_list()* test_null_partial() eval.txt /*test_null_partial()* test_null_string() eval.txt /*test_null_string()* +test_override() eval.txt /*test_override()* test_settime() eval.txt /*test_settime()* testing eval.txt /*testing* testing-variable eval.txt /*testing-variable* @@ -9119,15 +9201,19 @@ vim-dev intro.txt /*vim-dev* vim-mac intro.txt /*vim-mac* vim-modes intro.txt /*vim-modes* vim-modes-intro intro.txt /*vim-modes-intro* -vim-multibyte intro.txt /*vim-multibyte* vim-script-intro usr_41.txt /*vim-script-intro* +vim-use intro.txt /*vim-use* vim-variable eval.txt /*vim-variable* vim.vim syntax.txt /*vim.vim* vim7 version7.txt /*vim7* vim8 version8.txt /*vim8* vim: options.txt /*vim:* +vim_announce intro.txt /*vim_announce* +vim_dev intro.txt /*vim_dev* vim_did_enter-variable eval.txt /*vim_did_enter-variable* +vim_mac intro.txt /*vim_mac* vim_starting eval.txt /*vim_starting* +vim_use intro.txt /*vim_use* vimball pi_vimball.txt /*vimball* vimball-contents pi_vimball.txt /*vimball-contents* vimball-extract pi_vimball.txt /*vimball-extract* @@ -9321,6 +9407,7 @@ xterm-8-bit term.txt /*xterm-8-bit* xterm-8bit term.txt /*xterm-8bit* xterm-blink syntax.txt /*xterm-blink* xterm-blinking-cursor syntax.txt /*xterm-blinking-cursor* +xterm-bracketed-paste term.txt /*xterm-bracketed-paste* xterm-clipboard term.txt /*xterm-clipboard* xterm-codes term.txt /*xterm-codes* xterm-color syntax.txt /*xterm-color* diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt index 7e8b3cc..62c23ca 100644 --- a/runtime/doc/term.txt +++ b/runtime/doc/term.txt @@ -1,4 +1,4 @@ -*term.txt* For Vim version 8.0. Last change: 2016 Sep 02 +*term.txt* For Vim version 8.0. Last change: 2017 Apr 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -89,6 +89,28 @@ an external command (e.g., "!!"), the terminal will be put into Normal mode for a moment. This means that you can stop the output to the screen by hitting a printing key. Output resumes when you hit . + *xterm-bracketed-paste* +When the 't_BE' option is set then 't_BE' will be sent to the +terminal when entering "raw" mode and 't_BD' when leaving "raw" mode. The +terminal is then expected to put 't_PS' before pasted text and 't_PE' after +pasted text. This way Vim can separate text that is pasted from characters +that are typed. The pasted text is handled like when the middle mouse button +is used, it is inserted literally and not interpreted as commands. + +When the cursor is in the first column, the pasted text will be inserted +before it. Otherwise the pasted text is appended after the cursor position. +This means one cannot paste after the first column. Unfortunately Vim does +not have a way to tell where the mouse pointer was. + +Note that in some situations Vim will not recognize the bracketed paste and +you will get the raw text. In other situations Vim will only get the first +pasted character and drop the rest, e.g. when using the "r" command. If you +have a problem with this, disable bracketed paste by putting this in your +.vimrc: > + set t_BE= +If this is done while Vim is running the 't_BD' will be sent to the terminal +to disable bracketed paste. + *cs7-problem* Note: If the terminal settings are changed after running Vim, you might have an illegal combination of settings. This has been reported on Solaris 2.5 @@ -230,7 +252,7 @@ But any non-empty string means that the flag is set. An empty string means that the flag is not set. 't_CS' works like this too, but it isn't a termcap flag. -OUTPUT CODES +OUTPUT CODES *terminal-output-codes* option meaning ~ t_AB set background color (ANSI) *t_AB* *'t_AB'* @@ -292,6 +314,7 @@ Added by Vim (there are no standard codes for these): t_IS set icon text start *t_IS* *'t_IS'* t_IE set icon text end *t_IE* *'t_IE'* t_WP set window position (Y, X) in pixels *t_WP* *'t_WP'* + t_GP get window position (Y, X) in pixels *t_GP* *'t_GP'* t_WS set window size (height, width) in characters *t_WS* *'t_WS'* t_SI start insert mode (bar cursor shape) *t_SI* *'t_SI'* t_SR start replace mode (underline cursor shape) *t_SR* *'t_SR'* @@ -306,8 +329,12 @@ Added by Vim (there are no standard codes for these): |xterm-true-color| t_8b set background color (R, G, B) *t_8b* *'t_8b'* |xterm-true-color| + t_BE enable bracketed paste mode *t_BE* *'t_BE'* + |xterm-bracketed-paste| + t_BD disable bracketed paste mode *t_BD* *'t_BD'* + |xterm-bracketed-paste| -KEY CODES +KEY CODES *terminal-key-codes* Note: Use the <> form if possible option name meaning ~ @@ -398,6 +425,9 @@ Note: Use the <> form if possible t_KK keypad 8 ** *t_KK* *'t_KK'* t_KL keypad 9 ** *t_KL* *'t_KL'* leader of mouse code ** + *t_PS* *'t_PS'* + t_PS start of bracketed paste |xterm-bracketed-paste| + t_PE end of bracketed paste |xterm-bracketed-paste| *t_PE* *'t_PE'* Note about t_so and t_mr: When the termcap entry "so" is not present the entry for "mr" is used. And vice versa. The same is done for "se" and "me". diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index f9349d0..6b38586 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 8.0. Last change: 2016 Nov 06 +*todo.txt* For Vim version 8.0. Last change: 2017 Apr 23 VIM REFERENCE MANUAL by Bram Moolenaar @@ -28,17 +28,28 @@ See |develop.txt| for development plans. You can vote for which items should be worked on, but only if you sponsor Vim development. See |sponsor|. Issues can also be entered online: https://github.com/vim/vim/issues -Updates will be forwarded to the vim_dev maillist. Issues entered there will -not be repeated below, unless there is extra information. +Only use this for bug reports, not for questions! Those belong on the +maillist. Updates will be forwarded to the |vim_dev| maillist. Issues +entered there will not be repeated below, unless there is extra information. *known-bugs* -------------------- Known bugs and current work ----------------------- +Remove the Farsi code? + +channel: +- job_stop() should not always close the channel, e.g. for "int". + (Martin Gammelsæter, 2017 Apr 11, #1632) + Only assume killed on "kill". + Check job->jv_status not to be JOB_ENDED. +- Try out background make plugin: + https://github.com/AndrewVos/vim-make-background - Problem with stderr on Windows? (Vincent Rischmann, 2016 Aug 31, #1026) - Add 'cwd' argument to start_job(): directory to change to in the child. check for valid directory before forking. Part of patch for environment, Yasuhiro Matsumoto, #1160 +- When out_cb executes :sleep, the close_cb may be invoked. (Daniel Hahler, + 2016 Dec 11, #1320) - Implement |job-term| ? - Channel test fails with Motif. Sometimes kills the X11 server. - When a message in the queue but there is no callback, drop it after a while? @@ -53,6 +64,7 @@ not be repeated below, unless there is extra information. connecting in the main loop with zero timeout. - job_start(): run job in a newly opened terminal. With xterm could use -S{pty}. + Although user could use "xterm -e 'cmd arg'". Regexp problems: - Since 7.4.704 the old regex engine fails to match [[:print:]] in 0xf6. @@ -69,8 +81,8 @@ Regexp problems: - Issue 164: freeze on regexp search. - Ignorecase not handled properly for multi-byte characters. (Axel Bender, 2013 Dec 11) -- Using \@> and \?. (Brett Stahlman, 2013 Dec 21) Remark from Marcin Szamotulski - Remark from Brett 2014 Jan 6 and 7. +- Using \@> and \?. (Brett Stahlman, 2013 Dec 21) Remark from Marcin + Szamotulski; Remark from Brett 2014 Jan 6 and 7. - NFA regexp doesn't handle \%\/" on text "///" + (Chris Paul, 2016 Nov 13) New engine not greedy enough? -Patch to support nested namespace syntax. (Pauli, 2016 Oct 30, #1214) +Running test_gui and test_gui_init with Motif sometimes kills the window +manager. Problem with Motif? -Make html indent file use javascript indent, now that it's not just cindent. -#1220 +Memory leak in test97? The string is actually freed. Weird. -json_encode(): should convert to utf-8. (Nikolai Pavlov, 2016 Jan 23) -What if there is an invalid character? +Patch for shellescape(). (Christian Brabandt, 2017 Apr 20, #1590) -Bug: Json with same key should not give internal error. (Lcd, 2016 Oct 26) -Make dict_add give a duplicate key error. +Patch for flickering redraw. (Hirohito Higashi, 2017 Apr 23, #1637) -Should json_encode()/json_decode() restrict recursiveness? -Or avoid recursiveness. +New value "uselast" for 'switchbuf'. (Lemonboy, 2017 Apr 23, #1652) -Allow using json with empty key? Dict already has it. +Add a toolbar in the terminal. Can be global, above all windows, or specific +for one window. +Use tb_set(winid, [{'text': 'stop', 'cb': callback, 'hi': 'Green'}]) + tb_highlight(winid, 'ToolBar') + tb_get(winid) + +json_encode(): should convert to utf-8. (Nikolai Pavlov, 2016 Jan 23) +What if there is an invalid character? Json string with trailing \u should be an error. (Lcd) -Patch to reset ex_exitvalue after catch. (Christian Brabandt, 2016 Oct 23) +When session file has name in argument list but the buffer was deleted, the +buffer is not deleted when using the session file. (#1393) +Should add the buffer in hidden state. -Patch to deal with changed configure events in GTK 3. (Jan Alexander Steffens, -2016 Oct 23 #1193) -Remarks from nuko8, 2016 Nov 2. +When an item in the quickfix list has a file name that does not exist, behave +like the item was not a match for :cnext. Wrong diff highlighting with three files. (2016 Oct 20, #1186) Also get E749 on exit. +Another example in #1309 + +Patch to change all use of &sw to shiftwidth(). (Tyru, 2017 Feb 19) +Wait until maintainers integrate it. + +When deleting a mark or register, leave a tombstone, so that it's also deleted +when writing viminfo (and the delete was the most recent action). #1339 -Patch for better explanation of 'compatible' side effects. -https://github.com/vim/vim/pull/1161/files +Suggestion to improve pt-br spell checking. (Marcelo D Montu, 2016 Dec 15, +#1330) Error in test_startup_utf8 on Solaris. (Danek Duvall, 2016 Aug 17) +Completion for :!cmd shows each match twice. #1435 + +GTK: When adding a timer from 'balloonexpr' it won't fire, because +g_main_context_iteration() doesn't return. Need to trigger an event when the +timer expires. + +Screen update bug related to matchparen. (Chris Heath, 2017 Mar 4, #1532) + +Rule to use "^" for statusline does not work if a space is defined with +highlighting for both stl and stlnc. Patch by Ken Hamada (itchyny, 2016 Dec 11) + +8 "stl" and "stlnc" in 'fillchars' don't work for multi-byte characters. + Patch by Christian Wellenbrock, 2013 Jul 5. + +Using CTRL-G_U in InsertCharPre causes trouble for redo. (Israel Chauca +Fuentes, 2017 Feb 12, #1470) + +Check for errors E704 and E705 only does VAR_FUNC, should also do VAR_PARTIAL. +(Nikolai Pavlov, 2017 Mar 13, #1557) +Make a function to check for function-like type? + Screen updated delayed when using CTRL-O u in Insert mode. (Barlik, #1191) Perhaps because status message? +Implement optional arguments for functions. + func Foo(start, count = 1 all = 1) + call Foo(12) + call Foo(12, all = 0) + call Foo(12, 15, 0) + +writefile() does not abort as soon as an error is found. (Nikolai Pavlov, +2017 Feb 14, #1476) + +Patch to support on-the-spot and over-the-spot input method. (Ken Takata, 2017 +Feb 14). + +Add a command to take a range of lines, filter them and put the output +somewhere else. :{range}copy {dest} !cmd + +Patch to fix that empty first tab is not in session. +(Hirohito Higashi, 2016 Nov 25, #1282) + Patch for restoring wide characters in the console buffer. (Ken Takata, 2016 Jun 7) Patch to fix escaping of job arguments. (Yasuhiro Matsumoto, 2016 Oct 5) Update Oct 14: https://gist.github.com/mattn/d47e7d3bfe5ade4be86062b565a4bfca +Characters deleted on completion. (Adrià Farrés, 2017 Apr 20, #1645) +Remarks from Christian Brabandt (Apr 21) + +The TermResponse event is not triggered when a plugin has set 'eventignore' to +"all". Netrw does this. (Gary Johnson, 2017 Jan 24) +Postpone the event until 'eventignore' is reset. + +Patch to make urxvt mouse work better, recognize Esc[*M termcap code. +(Maurice Bos, 2017 Feb 17, #1486) + +Expanding /**/ is slow. Idea by Luc Hermitte, 2017 Apr 14. + Once .exe with updated installer is available: Add remark to download page about /S and /D options (Ken Takata, 2016 Apr 13) Or point to nightly builds: https://github.com/vim/vim-win32-installer/releases @@ -145,14 +222,41 @@ Or point to nightly builds: https://github.com/vim/vim-win32-installer/releases Problem passing non-UTF-8 strings to Python 3. (Björn Linse, 2016 Sep 11, #1053) With patch, does it work? +Using --remote to open a file in which a # appears does not work on +MS-Windows. Perhaps in \# the \ is seen as a path separator. (Axel Bender, +2017 Feb 9) Can we expand wildcards first and send the path literally to the +receiving Vim? Or make an exception for #, it's not useful remotely. + +":sbr" docs state it respect 'switchbuf', but "vsplit" does not cause a +vertical split. (Haldean Brown, 2017 Mar 1) + Use ADDR_OTHER instead of ADDR_LINES for many more commands. Add tests for using number larger than number of lines in buffer. +Might be useful to have isreadonly(), like we have islocked(). +Avoids exceptions, e.g. when using the b: namespace as a dict. + Patch to make v:shell_error writable. (Christian Brabandt, 2016 Sep 27) -Is there another solution? +Useful to restore it. Is there another solution? -On MS-Windows with 'clipboard' set to "unnamed" this doesn't work to double -lines: :g/^/normal yyp On Unix it works OK. (Bryce Orgill, 2016 Nov 5) +"ci[" does not look for next [ like ci" does look for next ". +(J.F. 2017 Jan 7) + +Patch for wrong cursor position on wrapped line, involving breakindent. +(Ozaki Kiichi, 2016 Nov 25) +Does this also fix #1408 ? + +Patch for 'cursorlinenr' option. (Ozaki Kiichi, 2016 Nov 30) + +When 'completeopt' has "noselect" does not insert a newline. (Lifepillar, 2017 +Apr 23, #1653) + +Window resizing with 'winfixheight': With a vertical split the height changes +anyway. (Tommy allen, 2017 Feb 21, #1502) + +When adding an item to a new quickfix list make ":cnext" jump to that item. +Make a difference being at the first item and not having used :cnext at all. +(Afanasiy Fet, 2017 Jan 3) Invalid behavior with NULL list. (Nikolai Pavlov, #768) E.g. deepcopy(test_null_list()) @@ -162,6 +266,15 @@ Patch to make it possible to extend a list with itself. Patch to add Zstandard compressed file support. (Nick Terrell, 2016 Oct 24) +Patch to add trim() function. (Bukn, 2016 Nov 25, #1280) + +Patch to add MODIFIED_BY to MSVC build file. (Chen Lei, 2016 Nov 24, #1275) + +Patch to change argument of :marks. (LemonBoy, 2017 Jan 29, #1426) + +On Windows buffer completion sees backslash as escape char instead of path +separator. (Toffanim, 2016 Nov 24, #1274) + min() and max() spawn lots of error messages if sorted list/dictionary contains invalid data (Nikolay Pavlov, 2016 Sep 4, #1039) @@ -179,18 +292,34 @@ sort() is not stable when using numeric/float sort (Nikolay Pavlov, 2016 Sep Patch to add "cmdline" completion to getcompletion(). (Shougo, Oct 1, #1140) +Feature request: Complete members of a dictionary. (Luc Hermitte, 2017 Jan 4, +#1350) + +Undo message is not always properly displayed. Patch by Ken Takata, 2013 oct +3. Doesn't work properly according to Yukihiro Nakadaira. +Also see #1635. + Patch for systemlist(), add empty item. (thinca, Sep 30, #1135) Add an argument to choose binary or non-binary (like readfile()), when omitted use the current behavior. Include the test. +Patch to add tagfunc(). Cleaned up by Christian Brabandt, 2013 Jun 22. +New update 2017 Apr 10, #1628 + +Unnamed register only contains the last deleted text when appending deleted +text to a register. (Wolfgang Jeltsch, reproduced by Ben Fritz, 2017 Apr 10) + When 'keywordprg' starts with ":" the argument is still escaped as a shell command argument. (Romain Lafourcade, 2016 Oct 16, #1175) +Patch to support CamelCase for spell checking: See a lower-to-upper case +change as a word boundary. (btucker-MPCData, 2016 Nov 6, #1235) + Idea from Sven: record sequence of keys. Useful to show others what they are doing (look over the shoulder), and also to see what happened. Probably list of keystrokes, with some annotations for mode changes. -Could store in logfile to be able to analyise it with an external command. +Could store in logfile to be able to analyse it with an external command. E.g. to see when's the last time a plugin command was used. execute() cannot be used with command completeion. (Daniel Hahler, 2016 Oct 1, @@ -198,12 +327,10 @@ execute() cannot be used with command completeion. (Daniel Hahler, 2016 Oct 1, cmap using execute() has side effects. (Killthemule, 2016 Aug 17, #983) -Patch to change order of compiler flags. (Yousong Zhou, 2016 Sep 19, #1100) - Patch to order results from taglist(). (Duncan McDougall, 2016 Oct 25) -Patch for :pyx, run python commands depending on the supported version. -(Marc Weber, update from Ken Takata, 2016 Sep 19) +patch for 'spellcamelcase' option: spellcheck each CamelCased word. +(Ben Tucker, 2016 Dec 2) When using ":diffput" through a mapping, undo in the target buffer isn't synced. (Ryan Carney, 2016 Sep 14) @@ -220,7 +347,7 @@ Also with latest version. Cannot delete a file with square brackets with delete(). (#696) Patch to add ":syn foldlevel" to use fold level further down the line. -(Brad King, 2016 Oct 19) +(Brad King, 2016 Oct 19, update 2017 Jan 30) Completion for input() does not expand environment variables. (chdiza, 2016 Jul 25, #948) @@ -228,14 +355,22 @@ Jul 25, #948) Patch to fix wrong encoding of error message on Cygwin/MSYS terminal. (Ken Takata, 2016 Oct 4) +Patch to add 'systemencoding', convert between 'encoding' and this for file +names, shell commands and the like. (Kikuchan, 2010 Oct 14) +Assume the system converts between the actual encoding of the filesystem to +the system encoding (usually utf-8). + 'hlsearch' interferes with a Conceal match. (Rom Grk, 2016 Aug 9) Patch to add context information to quickfix/location list. (Yegappan -Lakshmanan, 2016 Aug 25) +Lakshmanan, 2016 Aug 25, #1012) MS-Windows: use WS_HIDE instead of SW_SHOWMINNOACTIVE in os_win32.c? Otherwise task flickers in taskbar. +Bogus characters inserted when triggering indent while changing test. +(Vitor Antunes, 2016 Nov 22, #1269) + Should make ":@r" handle line continuation. (Cesar Romani, 2016 Jun 26) Also for ":@.". @@ -244,6 +379,9 @@ Repeating 'opfunc' in a function only works once. (Tarmean, 2016 Jul 15, #925) Have a way to get the call stack, in a function and from an exception. #1125 +Patch to add 'pythonhome' and 'pythonthreehome' options. (Kazuki Sakamoto, +2016 Nov 21, #1266) + Second problem in #966: ins_compl_add_tv() uses get_dict_string() multiple times, overwrites the one buffer. (Nikolay Pavlov, 2016 Aug 5) @@ -289,16 +427,13 @@ When doing "vi buf.md" a BufNew autocommand for *.md is not triggered. Because of using the initial buffer? (Dun Peal, 2016 May 12) Patch to add the :bvimgrep command. (Christian Brabandt, 2014 Nov 12) -Updated 2016 Jun 10, #858 +Updated 2016 Jun 10, #858 Update 2017 Mar 28: use Add redrawtabline command. (Naruhiko Nishino, 2016 Jun 11) Neovim patch for utfc_ptr2char_len() https://github.com/neovim/neovim/pull/4574 No test, needs some work to include. -Patch to make finding duplicate tags much faster, using a hashtab. (James -McCoy, 2016 Sept 14, #1046) Should work now. -> Patch to improve indenting for C++ constructor with initializer list. (Hirohito Higashi, 2016 Mar 31) @@ -306,6 +441,9 @@ Add stronger encryption. Could use libsodium (NaCl). https://github.com/jedisct1/libsodium/ Possibly include the needed code so that it can be build everywhere. +Add a way to restart a timer. It's similar to timer_stop() and timer_start(), +but the reference remains valid. + Patch to add setbufline(). (email from Yasuhiro Matsumoto, patch by Ozaki Kiichi, 2016 Feb 28) Update Mar 8: https://gist.github.com/mattn/23c1f50999084992ca98 @@ -359,13 +497,8 @@ Should use /usr/local/share/applications or /usr/share/applications. Or use $XDG_DATA_DIRS. Also need to run update-desktop-database (Kuriyama Kazunobu, 2015 Nov 4) -Patch to introduce 'cmdencoding'. (Ken Takata, Aug 18?) -Better help Aug 19. -Problem: applies to too many commands, such as :cbuffer. -Updated patch with three options, 2016 Sep 8. - Win32: When running ":make" and 'encoding' differs from the system locale, - the output should be converted. Esp. when 'encoding' is "utf-8". (Yongwei - Wu) Should we use 'termencoding' for this? +Test object i{ and it do not behave the same. #1379 +Do not include the linebreak at the start? Patch to have text objects defined by arbitrary single characters. (Daniel Thau, 2013 Nov 20, 2014 Jan 29, 2014 Jan 31) @@ -380,6 +513,9 @@ Access to uninitialized memory in match_backref() regexp_nda.c:4882 ":cd C:\Windows\System32\drivers\etc*" does not work, even though the directory exists. (Sergio Gallelli, 2013 Dec 29) +In debug mode one can inspect variables, but not the function parameters +(starting with a:). (Luc Hermitte, 2017 Jan 4, #1352) + 7 Add a watchpoint in the debug mode: An expression that breaks execution when evaluating to non-zero. Add the "watchadd expr" command, stop when the value of the expression changes. ":watchdel" deletes an item, @@ -468,6 +604,9 @@ Patch to add :mapgroup, put mappings in a group like augroup. Value returned by virtcol() changes depending on how lines wrap. This is inconsistent with the documentation. +Value of virtcol() for '[ and '] depend on multi-byte character. +(Luchr, #277) + Can we cache the syntax attributes, so that updates for 'relativenumber' and 'cursorline'/'cursorcolumn' are a lot faster? @@ -784,9 +923,6 @@ Patch to handle integer overflow. (Aaron Burrow, 2013 Dec 12) Patch to add "ntab" item in 'listchars' to repeat first character. (Nathaniel Braun, pragm, 2013 Oct 13) A better solution 2014 Mar 5. -Undo message is not always properly displayed. Patch by Ken Takata, 2013 oct -3. Doesn't work properly according to Yukihiro Nakadaira. - /[b-a] gives error E16, should probably be E769. 7 Windows XP: When using "ClearType" for text smoothing, a column of yellow @@ -861,11 +997,6 @@ highlighted as the cursor line. (Alessandro Ivaldi, 2013 Jun 4) Two highlighting bugs. (ZyX, 2013 Aug 18) -Patch to add the bufferlist() function. (Yegappan Lakshmanan, 2013 May 5) -May 17: with winlist() and tabpagelist(). -May 19: with local variables. -May 28: with options - Patch to support 'u' in interactive substitute. (Christian Brabandt, 2012 Sep 28) With tests: Oct 9. @@ -931,6 +1062,9 @@ Patch for :tabcloseleft, after closing a tab go to left tab. (William Bowers, Patch to improve equivalence classes in regexp patterns. (Christian Brabandt, 2013 Jan 16, update Jan 17) +Patch to add new regexp classes :ident:, :keyword:, :fname:. +(ichizok, 2016 Jan 12, #1373) + Patch with suggestions for starting.txt. (Tony Mechelynck, 2012 Oct 24) But use Gnome instead of GTK? @@ -941,9 +1075,6 @@ Szamotulski, 2012 Nov 8) Session file creation: 'autochdir' causes trouble. Keep it off until after loading all files. -8 "stl" and "stlnc" in 'fillchars' don't work for multi-byte characters. - Patch by Christian Wellenbrock, 2013 Jul 5. - MS-Windows resizing problems: - Windows window on screen positioning: Patch by Yukihiro Nakadaira, 2012 Jun 20. Uses getWindowRect() instead of GetWindowPlacement() @@ -956,8 +1087,6 @@ MS-Windows resizing problems: Patch to append regexp to tag commands to make it possible to select one out of many matches. (Cody Cutler, 2013 Mar 28) -Patch to add tagfunc(). Cleaned up by Christian Brabandt, 2013 Jun 22. - The input map for CTRL-O in mswin.vim causes problems after CTRL-X CTRL-O. Suggestion for another map. (Philip Mat, 2012 Jun 18) But use "gi" instead of "a". Or use CTRL-\ CTRL-O. @@ -968,9 +1097,6 @@ Aug 16) When there are no command line arguments ":next" and ":argu" give E163, which is confusing. Should say "the argument list is empty". -xterm supports escape sequences to mark a paste operation. Need to be -enabled. (Bruno Sutic, 2014 Jul 11) How to know the terminal supports this? - URXVT: - will get stuck if byte sequence does not contain the expected semicolon. - Use urxvt mouse support also in xterm. Explanations: @@ -1111,8 +1237,6 @@ right type. string() can't parse back "inf" and "nan". Fix documentation or fix code? (ZyX, 2010 Aug 23) -Make 'formatprg' global-local. (Sung Pae) - When doing "redir => s:foo" in a script and then "redir END" somewhere else (e.g. in a function) it can't find s:foo. When a script contains "redir => s:foo" but doesn't end redirection, a @@ -1250,11 +1374,6 @@ Regexp engine performance: 7.2.274. (Christian Brabandt, 2010 May 27) Generally, folding with 'foldmethod' set to "syntax" is slow. Do profiling to find out why. -Patch to add 'systemencoding', convert between 'encoding' and this for file -names, shell commands and the like. (Kikuchan, 2010 Oct 14) -Assume the system converts between the actual encoding of the filesystem to -the system encoding (usually utf-8). - Problem producing tags file when hebrew.frx is present. It has a BOM. Results in E670. (Tony Mechelynck, 2010 May 2) @@ -1273,6 +1392,7 @@ With "tw=55 fo+=a" typing space before ) doesn't work well. (Scott Mcdermott, Patch to add random number generator. (Hong Xu, 2010 Nov 8, update Nov 10) Alternative from Christian Brabandt. (2010 Sep 19) +New one from Yasuhiro Matsumoto, #1277. Messages in message.txt are highlighted as examples. @@ -3830,7 +3950,7 @@ Code size: left out. 8 When compiled with a GUI-only version, the termcap entries for terminals can be removed. -8 Can the check for libelf in configure.in be removed? +8 Can the check for libelf in configure.ac be removed? Messages: @@ -5552,7 +5672,7 @@ From vile: Far future and "big" extensions: - Instead of using a Makefile and autoconf, use a simple shell script to find the C compiler and do everything with C code. Translate something - like an Aap recipe and configure.in to C. Avoids depending on Python, + like an Aap recipe and configure.ac to C. Avoids depending on Python, thus will work everywhere. With batch file to find the C compiler it would also work on MS-Windows. - Make it easy to setup Vim for groups of users: novice vi users, novice diff --git a/runtime/doc/usr_02.txt b/runtime/doc/usr_02.txt index 48dede8..2ccde79 100644 --- a/runtime/doc/usr_02.txt +++ b/runtime/doc/usr_02.txt @@ -1,4 +1,4 @@ -*usr_02.txt* For Vim version 8.0. Last change: 2016 Jan 16 +*usr_02.txt* For Vim version 8.0. Last change: 2017 Mar 14 VIM USER MANUAL - by Bram Moolenaar @@ -554,7 +554,7 @@ Summary: *help-summary* > 8) Ex-commands always start with ":", so to go to the :s command help: > :help :s -9) Commands specifically for debugging start with ">". To go to to the help +9) Commands specifically for debugging start with ">". To go to the help for the "cont" debug command: > :help >cont @@ -589,7 +589,7 @@ Summary: *help-summary* > register: > :help quote: -13) Vim Script (VimL) is available at > +13) Vim script is available at > :help eval.txt < Certain aspects of the language are available at :h expr-X where "X" is a single letter. E.g. > @@ -599,10 +599,10 @@ Summary: *help-summary* > Also important is > :help function-list < to find a short description of all functions available. Help topics for - VimL functions always include the "()", so: > + Vim script functions always include the "()", so: > :help append() -< talks about the append VimL function rather than how to append text in the - current buffer. +< talks about the append Vim script function rather than how to append text + in the current buffer. 14) Mappings are talked about in the help page :h |map.txt|. Use > :help mapmode-i @@ -663,7 +663,7 @@ Summary: *help-summary* > 22) Autocommand events can be found by their name: > :help BufWinLeave < To see all possible events: > - :help autocommands-events + :help autocommand-events 23) Command-line switches always start with "-". So for the help of the -f command switch of Vim use: > diff --git a/runtime/doc/usr_03.txt b/runtime/doc/usr_03.txt index 2c66172..fe0e4b0 100644 --- a/runtime/doc/usr_03.txt +++ b/runtime/doc/usr_03.txt @@ -182,7 +182,7 @@ the following: This tells you that you might want to fix something on line 33. So how do you find line 33? One way is to do "9999k" to go to the top of the file and "32j" -to go down thirty two lines. It is not a good way, but it works. A much +to go down thirty-two lines. It is not a good way, but it works. A much better way of doing things is to use the "G" command. With a count, this command positions you at the given line number. For example, "33G" puts you on line 33. (For a better way of going through a compiler's error list, see diff --git a/runtime/doc/usr_22.txt b/runtime/doc/usr_22.txt index f0efbc5..68352da 100644 --- a/runtime/doc/usr_22.txt +++ b/runtime/doc/usr_22.txt @@ -1,4 +1,4 @@ -*usr_22.txt* For Vim version 8.0. Last change: 2012 Nov 15 +*usr_22.txt* For Vim version 8.0. Last change: 2016 Dec 13 VIM USER MANUAL - by Bram Moolenaar @@ -93,7 +93,7 @@ browser. This is what you get: > o................Browsing with a Horizontal Split...........|netrw-o| p................Use Preview Window.........................|netrw-p| P................Edit in Previous Window....................|netrw-p| - q................Listing Bookmarks and History..............|netrw-q| + q................Listing Bookmarks and History..............|netrw-qb| r................Reversing Sorting Order....................|netrw-r| < (etc) diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt index 2e2fd4f..d675c5e 100644 --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -1,4 +1,4 @@ -*usr_41.txt* For Vim version 8.0. Last change: 2016 Sep 01 +*usr_41.txt* For Vim version 8.0. Last change: 2017 Mar 28 VIM USER MANUAL - by Bram Moolenaar @@ -95,7 +95,7 @@ Then there is the ":let i += 1" command. This does the same thing as to the same variable. The example was given to explain the commands, but would you really want to -make such a loop it can be written much more compact: > +make such a loop, it can be written much more compact: > :for i in range(1, 4) : echo "count is" i @@ -693,6 +693,7 @@ Other computation: *bitwise-function* Variables: *var-functions* type() type of a variable islocked() check if a variable is locked + funcref() get a Funcref for a function reference function() get a Funcref for a function name getbufvar() get a variable value from a specific buffer setbufvar() set a variable in a specific buffer @@ -884,9 +885,11 @@ GUI: *gui-functions* getfontname() get name of current font being used getwinposx() X position of the GUI Vim window getwinposy() Y position of the GUI Vim window + balloon_show() set the balloon content Vim server: *server-functions* serverlist() return the list of server names + remote_startserve() run a server remote_send() send command characters to a Vim server remote_expr() evaluate an expression in a Vim server server2client() send a reply to a client of a Vim server @@ -918,18 +921,22 @@ Testing: *test-functions* assert_true() assert that an expression is true assert_exception() assert that a command throws an exception assert_fails() assert that a function call fails + assert_report() report a test failure test_alloc_fail() make memory allocation fail test_autochdir() enable 'autochdir' during startup - test_disable_char_avail() test without typeahead - test_garbagecollect_now() free memory right now + test_override() test with Vim internal overrides + test_garbagecollect_now() free memory right now + test_ignore_error() ignore a specific error message test_null_channel() return a null Channel test_null_dict() return a null Dict test_null_job() return a null Job test_null_list() return a null List test_null_partial() return a null Partial function test_null_string() return a null String + test_settime() set the time Vim uses internally Inter-process communication: *channel-functions* + ch_canread() check if there is something to read ch_open() open a channel ch_close() close a channel ch_close_in() close the in part of a channel @@ -999,6 +1006,7 @@ Various: *various-functions* perleval() evaluate Perl expression (|+perl|) py3eval() evaluate Python expression (|+python3|) pyeval() evaluate Python expression (|+python|) + pyxeval() evaluate |python_x| expression ============================================================================== *41.7* Defining a function @@ -1586,7 +1594,7 @@ WHITE SPACE Blank lines are allowed and ignored. Leading whitespace characters (blanks and TABs) are always ignored. The -whitespaces between parameters (e.g. between the 'set' and the 'cpoptions' in +whitespaces between parameters (e.g. between the "set" and the "cpoptions" in the example below) are reduced to one blank character and plays the role of a separator, the whitespaces after the last (visible) character may or may not be ignored depending on the situation, see below. @@ -2269,8 +2277,8 @@ plugin for the mail filetype: > endif Two global variables are used: -no_plugin_maps disables mappings for all filetype plugins -no_mail_maps disables mappings for a specific filetype +|no_plugin_maps| disables mappings for all filetype plugins +|no_mail_maps| disables mappings for the "mail" filetype USER COMMANDS diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt index 2bcb1ca..b3aa4b5 100644 --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -1,4 +1,4 @@ -*various.txt* For Vim version 8.0. Last change: 2016 Sep 06 +*various.txt* For Vim version 8.0. Last change: 2017 Feb 24 VIM REFERENCE MANUAL by Bram Moolenaar @@ -527,12 +527,14 @@ N *+X11* Unix only: can restore window title |X11| :redi[r] END End redirecting messages. {not in Vi} *:filt* *:filter* -:filt[er] {pat} {command} -:filt[er] /{pat}/ {command} - Restrict the output of {command} to matches with {pat}. - For example, to list only xml files: > +:filt[er][!] {pat} {command} +:filt[er][!] /{pat}/ {command} + Restrict the output of {command} to lines matching + with {pat}. For example, to list only xml files: > :filter /\.xml$/ oldfiles -< +< If the [!] is given, restrict the output of {command} + to lines that do NOT match {pat}. + {pat} is a Vim search pattern. Instead of enclosing it in / any non-ID character (see |'isident'|) can be used, so long as it does not appear in {pat}. Without @@ -634,7 +636,7 @@ K Run a program to lookup the keyword under the with the command > :!{program} {keyword} < There is an example of a program to use in the tools - directory of Vim. It is called 'ref' and does a + directory of Vim. It is called "ref" and does a simple spelling check. Special cases: - If 'keywordprg' begins with ":" it is invoked as diff --git a/runtime/doc/version6.txt b/runtime/doc/version6.txt index 53f1a21..f0205dd 100644 --- a/runtime/doc/version6.txt +++ b/runtime/doc/version6.txt @@ -886,7 +886,7 @@ Adjusted test2 for this. Allow using a URL in 'path'. Makes ":find index.html" work. GTK: Allow dropping a http:// and ftp:// URL on Vim. The netrw plugin takes -care of downloading the file. (MiKael Berthe) +care of downloading the file. (Mikael Berthe) Window for command-line editing *new-cmdwin* @@ -5388,7 +5388,7 @@ Files: src/os_win32.c Patch 6.0.256 (extra) Problem: Win32: ":highlight Comment guifg=asdf" does not give an error - message. (Randall W. Morris) Also for other systems. + message. (Randall W. Morris) Also for other systems. Solution: Add gui_get_color() to give one error message for all systems. Files: src/gui.c, src/gui_amiga.c, src/gui_athena.c, src/gui_motif.c, src/gui_riscos.c, src/gui_x11.c, src/gui_gtk_x11.c, @@ -9955,7 +9955,7 @@ Use "copy /y" in Make_bc5.mak to avoid a prompt for overwriting. Patch 6.2.001 Problem: The ":stopinsert" command doesn't have a help tag. -Solution: Add the tag. (Antoine J. Mechelynck) +Solution: Add the tag. (Antoine J. Mechelynck) Files: runtime/doc/insert.txt, runtime/doc/tags Patch 6.2.002 diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt index e5ed6df..98ea0a3 100644 --- a/runtime/doc/version7.txt +++ b/runtime/doc/version7.txt @@ -1445,7 +1445,7 @@ g CTRL-G also shows the number of characters if it differs from the number of bytes. Completion for ":debug" and entering an expression for the '=' register. Skip -":" between range and command name. (Peter winters) +":" between range and command name. (Peter Winters) CTRL-Q in Insert mode now works like CTRL-V by default. Previously it was ignored. @@ -3371,7 +3371,7 @@ Files: runtime/scripts.vim Patch 7.0.050 Problem: After using the netbeans interface close command a stale pointer may be used. -Solution: Clear the pointer to the closed buffer. (Xaview de Gaye) +Solution: Clear the pointer to the closed buffer. (Xavier de Gaye) Files: src/netbeans.c Patch 7.0.051 (after 7.0.44) @@ -10202,7 +10202,7 @@ objects in place of `str()` ones avoiding possibility of UnicodeDecodeError. interfaces to some extent. Extent will be improved in the future. Added special |python-vars| objects also available for |python-buffer| and -|python-window|. They ease access to VimL variables from Python. +|python-window|. They ease access to Vim script variables from Python. Now you no longer need to alter `sys.path` to import your module: special hooks are responsible for importing from {rtp}/python2, {rtp}/python3 and @@ -16272,7 +16272,7 @@ Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok Patch 7.3.1026 Problem: New regexp: pattern that includes a new-line matches too early. - (john McGowan) + (John McGowan) Solution: Do not start searching in the second line. Files: src/regexp_nfa.c, src/testdir/test64.in, src/testdir/test64.ok diff --git a/runtime/doc/version8.txt b/runtime/doc/version8.txt index a419bd7..09285c6 100644 --- a/runtime/doc/version8.txt +++ b/runtime/doc/version8.txt @@ -1,4 +1,4 @@ -*version8.txt* For Vim version 8.0. Last change: 2016 Nov 06 +*version8.txt* For Vim version 8.0. Last change: 2017 Apr 23 VIM REFERENCE MANUAL by Bram Moolenaar @@ -181,6 +181,12 @@ Insert mode commands: ~ |i_CTRL-G_U| CTRL-G U don't break undo with next cursor movement +Cmdline mode commands: ~ + +|/_CTRL-G| CTRL-G move to the next match in 'incsearch' mode +|/_CTRL-T| CTRL-T move to the previous match in 'incsearch' mode + + Options: ~ 'belloff' do not ring the bell for these reasons @@ -194,9 +200,9 @@ Options: ~ 'perldll' name of the Perl dynamic library 'pythondll' name of the Python 2 dynamic library 'pythonthreedll' name of the Python 3 dynamic library -'signcolumn' when to display the sign column 'renderoptions' options for text rendering on Windows 'rubydll' name of the Ruby dynamic library +'signcolumn' when to display the sign column 'tagcase' how to handle case when searching in tags files 'tcldll' name of the Tcl dynamic library 'termguicolors' use GUI colors for the terminal @@ -224,6 +230,7 @@ Ex commands: ~ Ex command modifiers: ~ |:keeppatterns| following command keeps search pattern history +|| supply command modifiers to user defined commands New and extended functions: ~ @@ -289,7 +296,7 @@ New and extended functions: ~ |systemlist()| get the result of a shell command as a list |test_alloc_fail()| make memory allocation fail |test_autochdir()| test 'autochdir' functionality -|test_disable_char_avail()| test without typeahead +test_disable_char_avail() test without typeahead (removed later) |test_garbagecollect_now()| free memory right now |test_null_channel()| return a null Channel |test_null_dict()| return a null Dict @@ -419,7 +426,7 @@ When no vimrc file is found, the |defaults.vim| script is loaded to set more useful default values for new users. That includes setting 'nocompatible'. Thus Vim no longer starts up in Vi compatible mode. If you do want that, either create a .vimrc file that does "set compatible" or start Vim with -"Vim -C". +"vim -C". Support removed ~ @@ -1859,7 +1866,7 @@ Files: runtime/doc/eval.txt, src/eval.c, src/testdir/test60.in, src/testdir/test60.ok Patch 7.4.237 (after 7.4.236) -Problem: When some patches was not included has("patch-7.4.123") may return +Problem: When some patches were not included has("patch-7.4.123") may return true falsely. Solution: Check for the specific patch number. Files: runtime/doc/eval.txt, src/eval.c @@ -3429,7 +3436,7 @@ Files: runtime/doc/options.txt, src/Makefile, src/regexp.c, src/regexp.h, Patch 7.4.498 (after 7.4.497) Problem: Typo in DOS makefile. Solution: Change exists to exist. (Ken Takata) -Files: src/testdirMake_dos.mak +Files: src/testdir/Make_dos.mak Patch 7.4.499 Problem: substitute() can be slow with long strings. @@ -14923,4 +14930,3111 @@ Solution: Define ONE_WINDOW and add #ifdef. Files: src/globals.h, src/buffer.c, src/ex_docmd.c, src/move.c, src/screen.c, src/quickfix.c, src/window.c +Patch 8.0.0070 +Problem: Tests referred in Makefile that no longer exist. +Solution: Remove test71 and test74 entries. (Michael Soyka) +Files: src/testdir/Mak_ming.mak + +Patch 8.0.0071 +Problem: Exit value from a shell command is wrong. (Hexchain Tong) +Solution: Do not check for ended jobs while waiting for a shell command. + (ichizok, closes #1196) +Files: src/os_unix.c + +Patch 8.0.0072 +Problem: MS-Windows: Crash with long font name. (Henry Hu) +Solution: Fix comparing with LF_FACESIZE. (Ken Takata, closes #1243) +Files: src/os_mswin.c + +Patch 8.0.0073 (after 8.0.0069) +Problem: More comparisons between firstwin and lastwin. +Solution: Use ONE_WINDOW for consistency. (Hirohito Higashi) +Files: src/buffer.c, src/ex_cmds.c, src/ex_docmd.c, src/option.c, + src/window.c + +Patch 8.0.0074 +Problem: Cannot make Vim fail on an internal error. +Solution: Add IEMSG() and IEMSG2(). (Dominique Pelle) Avoid reporting an + internal error without mentioning where. +Files: src/globals.h, src/blowfish.c, src/dict.c, src/edit.c, src/eval.c, + src/evalfunc.c, src/ex_eval.c, src/getchar.c, src/gui_beval.c, + src/gui_w32.c, src/hangulin.c, src/hashtab.c, src/if_cscope.c, + src/json.c, src/memfile.c, src/memline.c, src/message.c, + src/misc2.c, src/option.c, src/quickfix.c, src/regexp.c, + src/spell.c, src/undo.c, src/userfunc.c, src/vim.h, src/window.c, + src/proto/misc2.pro, src/proto/message.pro, src/Makefile + +Patch 8.0.0075 +Problem: Using number for exception type lacks type checking. +Solution: Use an enum. +Files: src/structs.h, src/ex_docmd.c, src/ex_eval.c, + src/proto/ex_eval.pro + +Patch 8.0.0076 +Problem: Channel log has double parens ()(). +Solution: Remove () for write_buf_line. (Yasuhiro Matsumoto) +Files: src/channel.c + +Patch 8.0.0077 +Problem: The GUI code is not tested by Travis. +Solution: Install the virtual framebuffer. +Files: .travis.yml + +Patch 8.0.0078 +Problem: Accessing freed memory in quickfix. +Solution: Reset pointer when freeing 'errorformat'. (Dominique Pelle) +Files: src/quickfix.c, src/testdir/test_quickfix.vim + +Patch 8.0.0079 +Problem: Accessing freed memory in quickfix. (Dominique Pelle) +Solution: Do not free the current list when adding to it. +Files: src/quickfix.c, src/testdir/test_quickfix.vim + +Patch 8.0.0080 +Problem: The OS X build fails on Travis. +Solution: Skip the virtual framebuffer on OS X. +Files: .travis.yml + +Patch 8.0.0081 +Problem: Inconsistent function names. +Solution: Rename do_cscope to ex_cscope. Clean up comments. +Files: src/ex_cmds.h, src/if_cscope.c, src/ex_docmd.c, + src/proto/if_cscope.pro + +Patch 8.0.0082 +Problem: Extension for configure should be ".ac". +Solution: Rename configure.in to configure.ac. (James McCoy, closes #1173) +Files: src/configure.in, src/configure.ac, Filelist, src/Makefile, + src/blowfish.c, src/channel.c, src/config.h.in, src/main.aap, + src/os_unix.c, src/INSTALL, src/mysign + +Patch 8.0.0083 +Problem: Using freed memory with win_getid(). (Dominique Pelle) +Solution: For the current tab use curwin. +Files: src/window.c, src/testdir/test_window_id.vim + +Patch 8.0.0084 +Problem: Using freed memory when adding to a quickfix list. (Dominique + Pelle) +Solution: Clear the directory name. +Files: src/quickfix.c, src/testdir/test_quickfix.vim + +Patch 8.0.0085 +Problem: Using freed memory with recursive function call. (Dominique Pelle) +Solution: Make a copy of the function name. +Files: src/eval.c, src/testdir/test_nested_function.vim + +Patch 8.0.0086 +Problem: Cannot add a comment after ":hide". (Norio Takagi) +Solution: Make it work, add a test. (Hirohito Higashi) +Files: src/Makefile, src/ex_cmds.h, src/ex_docmd.c, + src/testdir/Make_all.mak, src/testdir/test_hide.vim + +Patch 8.0.0087 +Problem: When the channel callback gets job info the job may already have + been deleted. (lifepillar) +Solution: Do not delete the job when the channel is still useful. (ichizok, + closes #1242, closes #1245) +Files: src/channel.c, src/eval.c, src/os_unix.c, src/os_win32.c, + src/structs.h, src/testdir/test_channel.vim + +Patch 8.0.0088 +Problem: When a test fails in Setup or Teardown the problem is not reported. +Solution: Add a try/catch. (Hirohito Higashi) +Files: src/testdir/runtest.vim + +Patch 8.0.0089 +Problem: Various problems with GTK 3.22.2. +Solution: Fix the problems, add #ifdefs. (Kazunobu Kuriyama) +Files: src/gui_beval.c, src/gui_gtk.c, src/gui_gtk_x11.c + +Patch 8.0.0090 +Problem: Cursor moved after last character when using 'breakindent'. +Solution: Fix the cursor positioning. Turn the breakindent test into new + style. (Christian Brabandt) +Files: src/screen.c, src/testdir/Make_all.mak, + src/testdir/test_breakindent.in, src/testdir/test_breakindent.ok, + src/testdir/test_breakindent.vim, src/Makefile + +Patch 8.0.0091 +Problem: Test_help_complete sometimes fails in MS-Windows console. +Solution: Use getcompletion() instead of feedkeys() and command line + completion. (Hirohito Higashi) +Files: src/testdir/test_help_tagjump.vim + +Patch 8.0.0092 +Problem: C indenting does not support nested namespaces that C++ 17 has. +Solution: Add check that passes double colon inside a name. (Pauli, closes + #1214) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + +Patch 8.0.0093 +Problem: Not using multiprocess build feature. +Solution: Enable multiprocess build with MSVC 10. (Ken Takata) +Files: src/Make_mvc.mak + +Patch 8.0.0094 +Problem: When vimrun.exe is not found the error message is not properly + encoded. +Solution: Use utf-16 and MessageBoxW(). (Ken Takata) +Files: src/os_win32.c + +Patch 8.0.0095 +Problem: Problems with GTK 3.22.2 fixed in 3.22.4. +Solution: Adjust the #ifdefs. (Kazunobu Kuriyama) +Files: src/gui_gtk_x11.c + +Patch 8.0.0096 +Problem: When the input or output is not a tty Vim appears to hang. +Solution: Add the --ttyfail argument. Also add the "ttyin" and "ttyout" + features to be able to check in Vim script. +Files: src/globals.h, src/structs.h, src/main.c, src/evalfunc.c, + runtime/doc/starting.txt, runtime/doc/eval.txt + +Patch 8.0.0097 +Problem: When a channel callback consumes a lot of time Vim becomes + unresponsive. (skywind) +Solution: Bail out of checking channel readahead after 100 msec. +Files: src/os_unix.c, src/misc2.c, src/vim.h, src/os_win32.c, + src/channel.c + +Patch 8.0.0098 (after 8.0.0097) +Problem: Can't build on MS-Windows. +Solution: Add missing parenthesis. +Files: src/vim.h + +Patch 8.0.0099 +Problem: Popup menu always appears above the cursor when it is in the lower + half of the screen. (Matt Gardner) +Solution: Compute the available space better. (Hirohito Higashi, + closes #1241) +Files: src/popupmnu.c + +Patch 8.0.0100 +Problem: Options that are a file name may contain non-filename characters. +Solution: Check for more invalid characters. +Files: src/option.c + +Patch 8.0.0101 +Problem: Some options are not strictly checked. +Solution: Add flags for strickter checks. +Files: src/option.c + +Patch 8.0.0102 (after 8.0.0101) +Problem: Cannot set 'dictionary' to a path. +Solution: Allow for slash and backslash. Add a test (partly by Daisuke + Suzuki, closes #1279, closes #1284) +Files: src/option.c, src/testdir/test_options.vim + +Patch 8.0.0103 +Problem: May not process channel readahead. (skywind) +Solution: If there is readahead don't block on input. +Files: src/channel.c, src/proto/channel.pro, src/os_unix.c, + src/os_win32.c, src/misc2.c + +Patch 8.0.0104 +Problem: Value of 'thesaurus' option not checked properly. +Solution: Add P_NDNAME flag. (Daisuke Suzuki) +Files: src/option.c, src/testdir/test_options.vim + +Patch 8.0.0105 +Problem: When using ch_read() with zero timeout, can't tell the difference + between reading an empty line and nothing available. +Solution: Add ch_canread(). +Files: src/evalfunc.c, src/channel.c, src/proto/channel.pro, + src/testdir/test_channel.vim, src/testdir/shared.vim, + runtime/doc/eval.txt, runtime/doc/channel.txt + +Patch 8.0.0106 (after 8.0.0100) +Problem: Cannot use a semicolon in 'backupext'. (Jeff) +Solution: Allow for a few more characters when "secure" isn't set. +Files: src/option.c + +Patch 8.0.0107 +Problem: When reading channel output in a timer, messages may go missing. + (Skywind) +Solution: Add the "drop" option. Write error messages in the channel log. + Don't have ch_canread() check for the channel being open. +Files: src/structs.h, src/channel.c, src/message.c, src/evalfunc.c, + src/proto/channel.pro, runtime/doc/channel.txt + +Patch 8.0.0108 (after 8.0.0107) +Problem: The channel "drop" option is not tested. +Solution: Add a test. +Files: src/testdir/test_channel.vim + +Patch 8.0.0109 +Problem: Still checking if memcmp() exists while every system should have + it now. +Solution: Remove vim_memcmp(). (James McCoy, closes #1295) +Files: src/config.h.in, src/configure.ac, src/misc2.c, src/os_vms_conf.h, + src/osdef1.h.in, src/search.c, src/tag.c, src/vim.h + +Patch 8.0.0110 +Problem: Drop command doesn't use existing window. +Solution: Check the window width properly. (Hirohito Higashi) +Files: src/buffer.c, src/testdir/test_tabpage.vim + +Patch 8.0.0111 +Problem: The :history command is not tested. +Solution: Add tests. (Dominique Pelle) +Files: runtime/doc/cmdline.txt, src/testdir/test_history.vim + +Patch 8.0.0112 +Problem: Tests 92 and 93 are old style. +Solution: Make test92 and test93 new style. (Hirohito Higashi, closes #1289) +Files: src/Makefile, src/testdir/Make_all.mak, src/testdir/Make_vms.mms, + src/testdir/test92.in, src/testdir/test92.ok, + src/testdir/test93.in, src/testdir/test93.ok, + src/testdir/test_mksession.vim, + src/testdir/test_mksession_utf8.vim + +Patch 8.0.0113 +Problem: MS-Windows: message box to prompt for saving changes may appear on + the wrong monitor. +Solution: Adjust the CenterWindow function. (Ken Takata) +Files: src/gui_w32.c + +Patch 8.0.0114 +Problem: Coding style not optimal. +Solution: Add spaces. (Ken Takata) +Files: src/gui_w32.c, src/os_mswin.c + +Patch 8.0.0115 +Problem: When building with Cygwin libwinpthread isn't found. +Solution: Link winpthread statically. (jmmerz, closes #1255, closes #1256) +Files: src/Make_cyg_ming.mak + +Patch 8.0.0116 +Problem: When reading English help and using CTRl-] the language from + 'helplang' is used. +Solution: Make help tag jumps keep the language. (Tatsuki, test by Hirohito + Higashi, closes #1249) +Files: src/tag.c, src/testdir/test_help_tagjump.vim + +Patch 8.0.0117 +Problem: Parallel make fails. (J. Lewis Muir) +Solution: Make sure the objects directory exists. (closes #1259) +Files: src/Makefile + +Patch 8.0.0118 +Problem: "make proto" adds extra function prototype. +Solution: Add #ifdef. +Files: src/misc2.c + +Patch 8.0.0119 +Problem: No test for using CTRL-R on the command line. +Solution: Add a test. (Dominique Pelle) And some more. +Files: src/testdir/test_cmdline.vim + +Patch 8.0.0120 +Problem: Channel test is still flaky on OS X. +Solution: Set the drop argument to "never". +Files: src/testdir/test_channel.vim + +Patch 8.0.0121 +Problem: Setting 'cursorline' changes the curswant column. (Daniel Hahler) +Solution: Add the P_RWINONLY flag. (closes #1297) +Files: src/option.c, src/testdir/test_goto.vim + +Patch 8.0.0122 +Problem: Channel test is still flaky on OS X. +Solution: Add a short sleep. +Files: src/testdir/test_channel.py + +Patch 8.0.0123 +Problem: Modern Sun compilers define "__sun" instead of "sun". +Solution: Use __sun. (closes #1296) +Files: src/mbyte.c, src/pty.c, src/os_unixx.h, src/vim.h + +Patch 8.0.0124 +Problem: Internal error for assert_inrange(1, 1). +Solution: Adjust number of allowed arguments. (Dominique Pelle) +Files: src/evalfunc.c, src/testdir/test_assert.vim + +Patch 8.0.0125 +Problem: Not enough testing for entering Ex commands. +Solution: Add test for CTRL-\ e {expr}. (Dominique Pelle) +Files: src/testdir/test_cmdline.vim + +Patch 8.0.0126 +Problem: Display problem with 'foldcolumn' and a wide character. + (esiegerman) +Solution: Don't use "extra" but an allocated buffer. (Christian Brabandt, + closes #1310) +Files: src/screen.c, src/testdir/Make_all.mak, src/Makefile, + src/testdir/test_display.vim + +Patch 8.0.0127 +Problem: Cancelling completion still inserts text when formatting is done + for 'textwidth'. (lacygoill) +Solution: Don't format when CTRL-E was typed. (Hirohito Higashi, + closes #1312) +Files: src/edit.c, src/testdir/test_popup.vim + +Patch 8.0.0128 (after 8.0.0126) +Problem: Display test fails on MS-Windows. +Solution: Set 'isprint' to "@". +Files: src/testdir/test_display.vim + +Patch 8.0.0129 +Problem: Parallel make still doesn't work. (Lewis Muir) +Solution: Define OBJ_MAIN. +Files: src/Makefile + +Patch 8.0.0130 +Problem: Configure uses "ushort" while the Vim code doesn't. +Solution: Use "unsigned short" instead. (Fredrik Fornwall, closes #1314) +Files: src/configure.ac, src/auto/configure + +Patch 8.0.0131 +Problem: Not enough test coverage for syntax commands. +Solution: Add more tests. (Dominique Pelle) +Files: src/testdir/test_syntax.vim + +Patch 8.0.0132 (after 8.0.0131) +Problem: Test fails because of using :finish. +Solution: Change to return. +Files: src/testdir/test_syntax.vim + +Patch 8.0.0133 +Problem: "2;'(" causes ml_get errors in an empty buffer. (Dominique Pelle) +Solution: Check the cursor line earlier. +Files: src/ex_docmd.c, src/testdir/test_cmdline.vim + +Patch 8.0.0134 +Problem: Null pointer access reported by UBsan. +Solution: Check curwin->w_buffer is not NULL. (Yegappan Lakshmanan) +Files: src/ex_cmds.c + +Patch 8.0.0135 +Problem: An address relative to the current line, ":.,+3y", does not work + properly on a closed fold. (Efraim Yawitz) +Solution: Correct for including the closed fold. (Christian Brabandt) +Files: src/ex_docmd.c, src/testdir/test_fold.vim, + src/testdir/Make_all.mak, src/Makefile + +Patch 8.0.0136 +Problem: When using indent folding and changing indent the wrong fold is + opened. (Jonathan Fudger) +Solution: Open the fold under the cursor a bit later. (Christian Brabandt) +Files: src/ops.c, src/testdir/test_fold.vim + +Patch 8.0.0137 +Problem: When 'maxfuncdepth' is set above 200 the nesting is limited to + 200. (Brett Stahlman) +Solution: Allow for Ex command recursion depending on 'maxfuncdepth'. +Files: src/ex_docmd.c, src/testdir/test_nested_function.vim + +Patch 8.0.0138 (after 8.0.0137) +Problem: Small build fails. +Solution: Add #ifdef. +Files: src/ex_docmd.c + +Patch 8.0.0139 (after 8.0.0135) +Problem: Warning for unused argument. +Solution: Add UNUSED. +Files: src/ex_docmd.c + +Patch 8.0.0140 +Problem: Pasting inserted text in Visual mode does not work properly. + (Matthew Malcomson) +Solution: Stop Visual mode before stuffing the inserted text. (Christian + Brabandt, from neovim #5709) +Files: src/ops.c, src/testdir/test_visual.vim + +Patch 8.0.0141 (after 8.0.0137) +Problem: Nested function test fails on AppVeyor. +Solution: Disable the test on Windows for now. +Files: src/testdir/test_nested_function.vim + +Patch 8.0.0142 +Problem: Normal colors are wrong with 'termguicolors'. +Solution: Initialize to INVALCOLOR instead of zero. (Ben Jackson, closes + #1344) +Files: src/syntax.c + +Patch 8.0.0143 +Problem: Line number of current buffer in getbufinfo() is wrong. +Solution: For the current buffer use the current line number. (Ken Takata) +Files: src/evalfunc.c + +Patch 8.0.0144 +Problem: When using MSVC the GvimExt directory is cleaned twice. +Solution: Remove the lines. (Ken Takata) +Files: src/Make_mvc.mak + +Patch 8.0.0145 +Problem: Running tests on MS-Windows is a little bit noisy. +Solution: Redirect some output to "nul". (Ken Takata) +Files: src/testdir/Make_dos.mak + +Patch 8.0.0146 +Problem: When using 'termguicolors' on MS-Windows the RGB definition causes + the colors to be wrong. +Solution: Undefined RGB and use our own. (Gabriel Barta) +Files: src/term.c + +Patch 8.0.0147 +Problem: searchpair() does not work when 'magic' is off. (Chris Paul) +Solution: Add \m in the pattern. (Christian Brabandt, closes #1341) +Files: src/evalfunc.c, src/testdir/test_search.vim + +Patch 8.0.0148 +Problem: When a C preprocessor statement has two line continuations the + following line does not have the right indent. (Ken Takata) +Solution: Add the indent of the previous continuation line. (Hirohito + Higashi) +Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok + +Patch 8.0.0149 +Problem: ":earlier" and ":later" do not work after startup or reading the + undo file. +Solution: Use absolute time stamps instead of relative to the Vim start + time. (Christian Brabandt, Pavel Juhas, closes #1300, closes + #1254) +Files: src/testdir/test_undo.vim, src/undo.c + +Patch 8.0.0150 +Problem: When the pattern of :filter does not have a separator then + completion of the command fails. +Solution: Skip over the pattern. (Ozaki Kiichi, clodes #1299) +Files: src/ex_docmd.c, src/testdir/test_filter_cmd.vim + +Patch 8.0.0151 +Problem: To pass buffer content to system() and systemlist() one has to + first create a string or list. +Solution: Allow passing a buffer number. (LemonBoy, closes #1240) +Files: runtime/doc/eval.txt, src/Makefile, src/evalfunc.c, + src/testdir/Make_all.mak, src/testdir/test_system.vim + +Patch 8.0.0152 +Problem: Running the channel test creates channellog. +Solution: Delete the debug line. +Files: src/testdir/test_channel.vim + +Patch 8.0.0153 (after 8.0.0151) +Problem: system() test fails on MS-Windows. +Solution: Deal with extra space and CR. +Files: src/testdir/test_system.vim + +Patch 8.0.0154 (after 8.0.0151) +Problem: system() test fails on OS/X. +Solution: Deal with leading spaces. +Files: src/testdir/test_system.vim + +Patch 8.0.0155 +Problem: When sorting zero elements a NULL pointer is passed to qsort(), + which ubsan warns for. +Solution: Don't call qsort() if there are no elements. (Dominique Pelle) +Files: src/syntax.c + +Patch 8.0.0156 +Problem: Several float functions are not covered by tests. +Solution: Add float tests. (Dominique Pelle) +Files: src/Makefile, src/testdir/test_alot.vim, + src/testdir/test_float_func.vim + +Patch 8.0.0157 +Problem: No command line completion for ":syntax spell" and ":syntax sync". +Solution: Implement the completion. (Dominique Pelle) +Files: src/syntax.c, src/testdir/test_syntax.vim + +Patch 8.0.0158 (after 8.0.0156) +Problem: On MS-Windows some float functions return a different value when + passed unusual values. strtod() doesn't work for "inf" and "nan". +Solution: Accept both results. Fix str2float() for MS-Windows. Also + reorder assert function arguments. +Files: src/testdir/test_float_func.vim, src/eval.c + +Patch 8.0.0159 +Problem: Using a NULL pointer when using feedkeys() to trigger drawing a + tabline. +Solution: Skip drawing a tabline if TabPageIdxs is NULL. (Dominique Pelle) + Also fix recursing into getcmdline() from the cmd window. +Files: src/screen.c, src/ex_getln.c + +Patch 8.0.0160 +Problem: EMSG() is sometimes used for internal errors. +Solution: Change them to IEMSG(). (Dominique Pelle) And a few more. +Files: src/regexp_nfa.c, src/channel.c, src/eval.c + +Patch 8.0.0161 (after 8.0.0159) +Problem: Build fails when using small features. +Solution: Update #ifdef for using save_ccline. (Hirohito Higashi) +Files: src/ex_getln.c + +Patch 8.0.0162 +Problem: Build error on Fedora 23 with small features and gnome2. +Solution: Undefine ngettext(). (Hirohito Higashi) +Files: src/gui_gtk.c, src/gui_gtk_x11.c + +Patch 8.0.0163 +Problem: Ruby 2.4 no longer supports rb_cFixnum. +Solution: move rb_cFixnum into an #ifdef. (Kazuki Sakamoto, closes #1365) +Files: src/if_ruby.c + +Patch 8.0.0164 +Problem: Outdated and misplaced comments. +Solution: Fix the comments. +Files: src/charset.c, src/getchar.c, src/list.c, src/misc2.c, + src/testdir/README.txt + +Patch 8.0.0165 +Problem: Ubsan warns for integer overflow. +Solution: Swap two conditions. (Dominique Pelle) +Files: src/regexp_nfa.c + +Patch 8.0.0166 +Problem: JSON with a duplicate key gives an internal error. (Lcd) +Solution: Give a normal error. Avoid an error when parsing JSON from a + remote client fails. +Files: src/evalfunc.c, src/json.c, src/channel.c, + src/testdir/test_json.vim + +Patch 8.0.0167 +Problem: str2nr() and str2float() do not always work with negative values. +Solution: Be more flexible about handling signs. (LemonBoy, closes #1332) + Add more tests. +Files: src/evalfunc.c, src/testdir/test_float_func.vim, + src/testdir/test_functions.vim, src/testdir/test_alot.vim, + src/Makefile + +Patch 8.0.0168 +Problem: Still some float functionality is not covered by tests. +Solution: Add more tests. (Dominique Pelle, closes #1364) +Files: src/testdir/test_float_func.vim + +Patch 8.0.0169 +Problem: For complicated string json_decode() may run out of stack space. +Solution: Change the recursive solution into an iterative solution. +Files: src/json.c + +Patch 8.0.0170 (after 8.0.0169) +Problem: Channel test fails for using freed memory. +Solution: Fix memory use in json_decode(). +Files: src/json.c + +Patch 8.0.0171 +Problem: JS style JSON does not support single quotes. +Solution: Allow for single quotes. (Yasuhiro Matsumoto, closes #1371) +Files: src/json.c, src/testdir/test_json.vim, src/json_test.c, + runtime/doc/eval.txt + +Patch 8.0.0172 (after 8.0.0159) +Problem: The command selected in the command line window is not executed. + (Andrey Starodubtsev) +Solution: Save and restore the command line at a lower level. (closes #1370) +Files: src/ex_getln.c, src/testdir/test_history.vim + +Patch 8.0.0173 +Problem: When compiling with EBCDIC defined the build fails. (Yaroslav + Kuzmin) +Solution: Move sortFunctions() to the right file. Avoid warning for + redefining __SUSV3. +Files: src/eval.c, src/evalfunc.c, src/os_unixx.h + +Patch 8.0.0174 +Problem: For completion "locale -a" is executed on MS-Windows, even though + it most likely won't work. +Solution: Skip executing "locale -a" on MS-Windows. (Ken Takata) +Files: src/ex_cmds2.c + +Patch 8.0.0175 +Problem: Setting language in gvim on MS-Windows does not work when + libintl.dll is dynamically linked with msvcrt.dll. +Solution: Use putenv() from libintl as well. (Ken Takata, closes #1082) +Files: src/mbyte.c, src/misc1.c, src/os_win32.c, src/proto/os_win32.pro, + src/vim.h + +Patch 8.0.0176 +Problem: Using :change in between :function and :endfunction fails. +Solution: Recognize :change inside a function. (ichizok, closes #1374) +Files: src/userfunc.c, src/testdir/test_viml.vim + +Patch 8.0.0177 +Problem: When opening a buffer on a directory and inside a try/catch then + the BufEnter event is not triggered. +Solution: Return NOTDONE from readfile() for a directory and deal with the + three possible return values. (Justin M. Keyes, closes #1375, + closes #1353) +Files: src/buffer.c, src/ex_cmds.c, src/ex_docmd.c, src/fileio.c, + src/memline.c + +Patch 8.0.0178 +Problem: test_command_count may fail when a previous test interferes, seen + on MS-Windows. +Solution: Run it separately. +Files: src/testdir/test_alot.vim, src/testdir/Make_all.mak + +Patch 8.0.0179 +Problem: 'formatprg' is a global option but the value may depend on the + type of buffer. (Sung Pae) +Solution: Make 'formatprg' global-local. (closes #1380) +Files: src/structs.h, src/option.h, src/option.c, src/normal.c, + runtime/doc/options.txt, src/testdir/test_normal.vim + +Patch 8.0.0180 +Problem: Error E937 is used both for duplicate key in JSON and for trying + to delete a buffer that is in use. +Solution: Rename the JSON error to E938. (Norio Takagi, closes #1376) +Files: src/json.c, src/testdir/test_json.vim + +Patch 8.0.0181 +Problem: When 'cursorbind' and 'cursorcolumn' are both on, the column + highlignt in non-current windows is wrong. +Solution: Add validate_cursor(). (Masanori Misono, closes #1372) +Files: src/move.c + +Patch 8.0.0182 +Problem: When 'cursorbind' and 'cursorline' are set, but 'cursorcolumn' is + not, then the cursor line highlighting is not updated. (Hirohito + Higashi) +Solution: Call redraw_later() with NOT_VALID. +Files: src/move.c + +Patch 8.0.0183 +Problem: Ubsan warns for using a pointer that is not aligned. +Solution: First copy the address. (Yegappan Lakshmanan) +Files: src/channel.c + +Patch 8.0.0184 +Problem: When in Ex mode and an error is caught by try-catch, Vim still + exits with a non-zero exit code. +Solution: Don't set ex_exitval when inside a try-catch. (partly by Christian + Brabandt) +Files: src/message.c, src/testdir/test_system.vim + +Patch 8.0.0185 (after 8.0.0184) +Problem: The system() test fails on MS-Windows. +Solution: Skip the test on MS-Windows. +Files: src/testdir/test_system.vim + +Patch 8.0.0186 +Problem: The error message from assert_notequal() is confusing. +Solution: Only mention the expected value. +Files: src/eval.c, src/testdir/test_assert.vim + +Patch 8.0.0187 +Problem: Building with a new Ruby version fails. +Solution: Use ruby_sysinit() instead of NtInitialize(). (Tomas Volf, + closes #1382) +Files: src/if_ruby.c + +Patch 8.0.0188 (after 8.0.0182) +Problem: Using NOT_VALID for redraw_later() to update the cursor + line/column highlighting is not efficient. +Solution: Call validate_cursor() when 'cul' or 'cuc' is set. +Files: src/move.c + +Patch 8.0.0189 +Problem: There are no tests for the :profile command. +Solution: Add tests. (Dominique Pelle, closes #1383) +Files: src/Makefile, src/testdir/Make_all.mak, + src/testdir/test_profile.vim + +Patch 8.0.0190 +Problem: Detecting duplicate tags uses a slow linear search. +Solution: Use a much faster hash table solution. (James McCoy, closes #1046) + But don't add hi_keylen, it makes hash tables 50% bigger. +Files: src/tag.c + +Patch 8.0.0191 (after 8.0.0187) +Problem: Some systems do not have ruby_sysinit(), causing the build to + fail. +Solution: Clean up how ruby_sysinit() and NtInitialize() are used. (Taro + Muraoka) +Files: src/if_ruby.c + +Patch 8.0.0192 (after 8.0.0190) +Problem: Build fails with tiny features. +Solution: Change #ifdef for hash_clear(). Avoid warning for unused + argument. +Files: src/hashtab.c, src/if_cscope.c + +Patch 8.0.0193 (after 8.0.0188) +Problem: Accidentally removed #ifdef. +Solution: Put it back. (Masanori Misono) +Files: src/move.c + +Patch 8.0.0194 (after 8.0.0189) +Problem: Profile tests fails if total and self time are equal. +Solution: Make one time optional. +Files: src/testdir/test_profile.vim + +Patch 8.0.0195 (after 8.0.0190) +Problem: Jumping to a tag that is a static item in the current file fails. + (Kazunobu Kuriyama) +Solution: Make sure the first byte of the tag key is not NUL. (Suggested by + James McCoy, closes #1387) +Files: src/tag.c, src/testdir/test_tagjump.vim + +Patch 8.0.0196 (after 8.0.0194) +Problem: The test for :profile is slow and does not work on MS-Windows. +Solution: Use the "-es" argument. (Dominique Pelle) Swap single and double + quotes for system() +Files: src/testdir/test_profile.vim + +Patch 8.0.0197 +Problem: On MS-Windows the system() test skips a few parts. +Solution: Swap single and double quotes for the command. +Files: src/testdir/test_system.vim + +Patch 8.0.0198 +Problem: Some syntax arguments take effect even after "if 0". (Taylor + Venable) +Solution: Properly skip the syntax statements. Make "syn case" and "syn + conceal" report the current state. Fix that "syn clear" didn't + reset the conceal flag. Add tests for :syntax skipping properly. +Files: src/syntax.c, src/testdir/test_syntax.vim + +Patch 8.0.0199 +Problem: Warning for an unused parameter when the libcall feature is + disabled. Warning for a function type cast when compiling with + -pedantic. +Solution: Add UNUSED. Use a different type cast. (Damien Molinier) +Files: src/evalfunc.c, src/os_unix.c + +Patch 8.0.0200 +Problem: Some syntax arguments are not tested. +Solution: Add more syntax command tests. +Files: src/testdir/test_syntax.vim + +Patch 8.0.0201 +Problem: When completing a group name for a highlight or syntax command + cleared groups are included. +Solution: Skip groups that have been cleared. +Files: src/syntax.c, src/testdir/test_syntax.vim + +Patch 8.0.0202 +Problem: No test for invalid syntax group name. +Solution: Add a test for group name error and warning. +Files: src/testdir/test_syntax.vim + +Patch 8.0.0203 +Problem: Order of complication flags is sometimes wrong. +Solution: Put interface-specific flags before ALL_CFLAGS. (idea by Yousong + Zhou, closes #1100) +Files: src/Makefile + +Patch 8.0.0204 +Problem: Compiler warns for uninitialized variable. (Tony Mechelynck) +Solution: When skipping set "id" to -1. +Files: src/syntax.c + +Patch 8.0.0205 +Problem: After :undojoin some commands don't work properly, such as :redo. + (Matthew Malcomson) +Solution: Don't set curbuf->b_u_curhead. (closes #1390) +Files: src/undo.c, src/testdir/test_undo.vim + +Patch 8.0.0206 +Problem: Test coverage for :retab insufficient. +Solution: Add test for :retab. (Dominique Pelle, closes #1391) +Files: src/Makefile, src/testdir/Make_all.mak, src/testdir/test_retab.vim + +Patch 8.0.0207 +Problem: Leaking file descriptor when system() cannot find the buffer. + (Coverity) +Solution: Close the file descriptor. (Dominique Pelle, closes #1398) +Files: src/evalfunc.c + +Patch 8.0.0208 +Problem: Internally used commands for CTRL-Z and mouse click end up in + history. (Matthew Malcomson) +Solution: Use do_cmdline_cmd() instead of stuffing them in the readahead + buffer. (James McCoy, closes #1395) +Files: src/edit.c, src/normal.c + +Patch 8.0.0209 +Problem: When using :substitute with the "c" flag and 'cursorbind' is set + the cursor is not updated in other windows. +Solution: Call do_check_cursorbind(). (Masanori Misono) +Files: src/ex_cmds.c + +Patch 8.0.0210 +Problem: Vim does not support bracketed paste, as implemented by xterm and + other terminals. +Solution: Add t_BE, t_BD, t_PS and t_PE. +Files: src/term.c, src/term.h, src/option.c, src/misc2.c, src/keymap.h, + src/edit.c, src/normal.c, src/evalfunc.c, src/getchar.c, + src/vim.h, src/proto/edit.pro, runtime/doc/term.txt + +Patch 8.0.0211 (after 8.0.0210) +Problem: Build fails if the multi-byte feature is disabled. +Solution: Change #ifdef around ins_char_bytes. +Files: src/misc1.c + +Patch 8.0.0212 +Problem: The buffer used to store a key name theoreticaly could be too + small. (Coverity) +Solution: Count all possible modifier characters. Add a check for the + length just in case. +Files: src/keymap.h, src/misc2.c + +Patch 8.0.0213 +Problem: The Netbeans "specialKeys" command does not check if the argument + fits in the buffer. (Coverity) +Solution: Add a length check. +Files: src/netbeans.c + +Patch 8.0.0214 +Problem: Leaking memory when syntax cluster id is unknown. (Coverity) +Solution: Free the memory. +Files: src/syntax.c + +Patch 8.0.0215 +Problem: When a Cscope line contains CTRL-L a NULL pointer may be used. + (Coverity) +Solution: Don't check for an emacs tag in a cscope line. +Files: src/tag.c + +Patch 8.0.0216 +Problem: When decoding JSON with a JS style object the JSON test may use a + NULL pointer. (Coverity) +Solution: Check for a NULL pointer. +Files: src/json.c, src/json_test.c + +Patch 8.0.0217 (after 8.0.0215) +Problem: Build fails without the cscope feature. +Solution: Add #ifdef. +Files: src/tag.c + +Patch 8.0.0218 +Problem: No command line completion for :cexpr, :cgetexpr, :caddexpr, etc. +Solution: Make completion work. (Yegappan Lakshmanan) Add a test. +Files: src/ex_docmd.c, src/testdir/test_cmdline.vim + +Patch 8.0.0219 +Problem: Ubsan reports errors for integer overflow. +Solution: Define macros for minimum and maximum values. Select an + expression based on the value. (Mike Williams) +Files: src/charset.c, src/eval.c, src/evalfunc.c, src/structs.h, + src/testdir/test_viml.vim + +Patch 8.0.0220 +Problem: Completion for :match does not show "none" and other missing + highlight names. +Solution: Skip over cleared entries before checking the index to be at the + end. +Files: src/syntax.c, src/testdir/test_cmdline.vim + +Patch 8.0.0221 +Problem: Checking if PROTO is defined inside a function has no effect. +Solution: Remove the check for PROTO. (Hirohito Higashi) +Files: src/misc1.c + +Patch 8.0.0222 +Problem: When a multi-byte character ends in a zero byte, putting blockwise + text puts it before the character instead of after it. +Solution: Use int instead of char for the character under the cursor. + (Luchr, closes #1403) Add a test. +Files: src/ops.c, src/testdir/test_put.vim, src/Makefile, + src/testdir/test_alot.vim + +Patch 8.0.0223 +Problem: Coverity gets confused by the flags passed to find_tags() and + warnts for an uninitialized variable. +Solution: Disallow using cscope and help tags at the same time. +Files: src/tag.c + +Patch 8.0.0224 +Problem: When 'fileformats' is changed in a BufReadPre auto command, it + does not take effect in readfile(). (Gary Johnson) +Solution: Check the value of 'fileformats' after executing auto commands. + (Christian Brabandt) +Files: src/fileio.c, src/testdir/test_fileformat.vim + +Patch 8.0.0225 +Problem: When a block is visually selected and put is used on the end of + the selection only one line is changed. +Solution: Check for the end properly. (Christian Brabandt, neovim issue + 5781) +Files: src/ops.c, src/testdir/test_put.vim + +Patch 8.0.0226 +Problem: The test for patch 8.0.0224 misses the CR characters and passes + even without the fix. (Christian Brabandt) +Solution: Use double quotes and \. +Files: src/testidr/test_fileformat.vim + +Patch 8.0.0227 +Problem: Crash when 'fileformat' is forced to "dos" and the first line in + the file is empty and does not have a CR character. +Solution: Don't check for CR before the start of the buffer. +Files: src/fileio.c, src/testidr/test_fileformat.vim + +Patch 8.0.0228 (after 8.0.0210) +Problem: When pasting test in an xterm on the command line it is surrounded + by and . (Johannes Kaltenbach) +Solution: Add missing changes. +Files: src/ex_getln.c, src/term.c + +Patch 8.0.0229 (after 8.0.0179) +Problem: When freeing a buffer the local value of the 'formatprg' option is + not cleared. +Solution: Add missing change. +Files: src/buffer.c + +Patch 8.0.0230 (after 8.0.0210) +Problem: When using bracketed paste line breaks are not respected. +Solution: Turn CR characters into a line break if the text is being + inserted. (closes #1404) +Files: src/edit.c + +Patch 8.0.0231 +Problem: There are no tests for bracketed paste mode. +Solution: Add a test. Fix repeating with "normal .". +Files: src/edit.c, src/testdir/test_paste.vim, src/Makefile, + src/testdir/Make_all.mak + +Patch 8.0.0232 +Problem: Pasting in Insert mode does not work when bracketed paste is used + and 'esckeys' is off. +Solution: When 'esckeys' is off disable bracketed paste in Insert mode. +Files: src/edit.c + +Patch 8.0.0233 (after 8.0.0231) +Problem: The paste test fails if the GUI is being used. +Solution: Skip the test in the GUI. +Files: src/testdir/test_paste.vim + +Patch 8.0.0234 (after 8.0.0225) +Problem: When several lines are visually selected and one of them is short, + using put may cause a crash. (Axel Bender) +Solution: Check for a short line. (Christian Brabandt) +Files: src/ops.c, src/testdir/test_put.vim + +Patch 8.0.0235 +Problem: Memory leak detected when running tests for diff mode. +Solution: Free p_extra_free. +Files: src/screen.c + +Patch 8.0.0236 (after 8.0.0234) +Problem: Gcc complains that a variable may be used uninitialized. Confusion + between variable and label name. (John Marriott) +Solution: Initialize it. Rename end to end_lnum. +Files: src/ops.c + +Patch 8.0.0237 +Problem: When setting wildoptions=tagfile the completion context is not set + correctly. (desjardins) +Solution: Check for EXPAND_TAGS_LISTFILES. (Christian Brabandt, closes #1399) +Files: src/ex_getln.c, src/testdir/test_cmdline.vim + +Patch 8.0.0238 +Problem: When using bracketed paste autoindent causes indent to be + increased. +Solution: Disable 'ai' and set 'paste' temporarily. (Ken Takata) +Files: src/edit.c, src/testdir/test_paste.vim + +Patch 8.0.0239 +Problem: The address sanitizer sometimes finds errors, but it needs to be + run manually. +Solution: Add an environment to Travis with clang and the address sanitizer. + (Christian Brabandt) Also include changes only on github. +Files: .travis.yml + +Patch 8.0.0240 (after 8.0.0239) +Problem: The clang build on CI fails with one configuration. +Solution: Redo a previous patch that was accidentally reverted. +Files: .travis.yml + +Patch 8.0.0241 +Problem: Vim defines a mch_memmove() function but it doesn't work, thus is + always unused. +Solution: Remove the mch_memmove implementation. (suggested by Dominique + Pelle) +Files: src/os_unix.h, src/misc2.c, src/vim.h + +Patch 8.0.0242 +Problem: Completion of user defined functions is not covered by tests. +Solution: Add tests. Also test various errors of user-defined commands. + (Dominique Pelle, closes #1413) +Files: src/testdir/test_usercommands.vim + +Patch 8.0.0243 +Problem: When making a character lower case with tolower() changes the byte + cound, it is not made lower case. +Solution: Add strlow_save(). (Dominique Pelle, closes #1406) +Files: src/evalfunc.c, src/misc2.c, src/proto/misc2.pro, + src/testdir/test_functions.vim + +Patch 8.0.0244 +Problem: When the user sets t_BE empty after startup to disable bracketed + paste, this has no direct effect. +Solution: When t_BE is made empty write t_BD. When t_BE is made non-empty + write the new value. +Files: src/option.c + +Patch 8.0.0245 +Problem: The generated zh_CN.cp936.po message file is not encoded properly. +Solution: Instead of using zh_CN.po as input, use zh_CN.UTF-8.po. +Files: src/po/Makefile + +Patch 8.0.0246 +Problem: Compiler warnings for int to pointer conversion. +Solution: Fix macro for mch_memmove(). (John Marriott) +Files: src/vim.h + +Patch 8.0.0247 +Problem: Under some circumstances, one needs to type Ctrl-N or Ctrl-P twice + to have a menu entry selected. (Lifepillar) +Solution: call ins_compl_free(). (Christian Brabandt, closes #1411) +Files: src/edit.c, src/testdir/test_popup.vim + +Patch 8.0.0248 +Problem: vim_strcat() cannot handle overlapping arguments. +Solution: Use mch_memmove() instead of strcpy(). (Justin M Keyes, + closes #1415) +Files: src/misc2.c + +Patch 8.0.0249 +Problem: When two submits happen quick after each other, the tests for the + first one may error out. +Solution: Use a git depth of 10 instead of 1. (Christian Brabandt) +Files: .travis.yml + +Patch 8.0.0250 +Problem: When virtcol() gets a column that is not the first byte of a + multi-byte character the result is unpredictable. (Christian + Ludwig) +Solution: Correct the column to the first byte of a multi-byte character. + Change the utf-8 test to new style. +Files: src/charset.c, src/testdir/test_utf8.in, src/testdir/test_utf8.ok, + src/testdir/test_utf8.vim, src/Makefile, src/testdir/Make_all.mak, + src/testdir/test_alot_utf8.vim + +Patch 8.0.0251 +Problem: It is not so easy to write a script that works with both Python 2 + and Python 3, even when the Python code works with both. +Solution: Add 'pyxversion', :pyx, etc. (Marc Weber, Ken Takata) +Files: Filelist, runtime/doc/eval.txt, runtime/doc/if_pyth.txt, + runtime/doc/index.txt, runtime/doc/options.txt, + runtime/optwin.vim, runtime/doc/quickref.txt, + runtime/doc/usr_41.txt, src/Makefile, src/evalfunc.c, + src/ex_cmds.h, src/ex_cmds2.c, src/ex_docmd.c, src/if_python.c, + src/if_python3.c, src/option.c, src/option.h, + src/proto/ex_cmds2.pro, src/testdir/Make_all.mak, + src/testdir/pyxfile/py2_magic.py, + src/testdir/pyxfile/py2_shebang.py, + src/testdir/pyxfile/py3_magic.py, + src/testdir/pyxfile/py3_shebang.py, src/testdir/pyxfile/pyx.py, + src/testdir/test_pyx2.vim, src/testdir/test_pyx3.vim + src/userfunc.c + +Patch 8.0.0252 +Problem: Characters below 256 that are not one byte are not always + recognized as word characters. +Solution: Make vim_iswordc() and vim_iswordp() work the same way. Add a test + for this. (Ozaki Kiichi) +Files: src/Makefile, src/charset.c, src/kword_test.c, src/mbyte.c, + src/proto/mbyte.pro + +Patch 8.0.0253 +Problem: When creating a session when winminheight is 2 or larger and + loading that session gives an error. +Solution: Also set winminheight before setting winheight to 1. (Rafael + Bodill, neovim #5717) +Files: src/ex_docmd.c, src/testdir/test_mksession.vim + +Patch 8.0.0254 +Problem: When using an assert function one can either specify a message or + get a message about what failed, not both. +Solution: Concatenate the error with the message. +Files: src/eval.c, src/testdir/test_assert.vim + +Patch 8.0.0255 +Problem: When calling setpos() with a buffer argument it often is ignored. + (Matthew Malcomson) +Solution: Make the buffer argument work for all marks local to a buffer. + (neovim #5713) Add more tests. +Files: src/mark.c, src/testdir/test_marks.vim, runtime/doc/eval.txt + +Patch 8.0.0256 (after 8.0.0255) +Problem: Tests fail because some changes were not included. +Solution: Add changes to evalfunc.c +Files: src/evalfunc.c + +Patch 8.0.0257 (after 8.0.0252) +Problem: The keyword test file is not included in the archive. +Solution: Update the list of files. +Files: Filelist + +Patch 8.0.0258 (after 8.0.0253) +Problem: mksession test leaves file behind. +Solution: Delete the file. Rename files to start with "X". +Files: src/testdir/test_mksession.vim + +Patch 8.0.0259 +Problem: Tab commands do not handle count correctly. (Ken Hamada) +Solution: Add ADDR_TABS_RELATIVE. (Hirohito Higashi) +Files: runtime/doc/tabpage.txt, src/ex_cmds.h, src/ex_docmd.c, + src/testdir/test_tabpage.vim + +Patch 8.0.0260 +Problem: Build fails with tiny features. +Solution: Move get_tabpage_arg() inside #ifdef. +Files: src/ex_docmd.c + +Patch 8.0.0261 +Problem: Not enough test coverage for eval functions. +Solution: Add more tests. (Dominique Pelle, closes #1420) +Files: src/testdir/test_functions.vim + +Patch 8.0.0262 +Problem: Farsi support is barely tested. +Solution: Add more tests for Farsi. Clean up the code. +Files: src/edit.c, src/farsi.c, src/testdir/test_farsi.vim + +Patch 8.0.0263 +Problem: Farsi support is not tested enough. +Solution: Add more tests for Farsi. Clean up the code. +Files: src/farsi.c, src/testdir/test_farsi.vim + +Patch 8.0.0264 +Problem: Memory error reported by ubsan, probably for using the string + returned by execute(). +Solution: NUL terminate the result of execute(). +Files: src/evalfunc.c + +Patch 8.0.0265 +Problem: May get ml_get error when :pydo deletes lines or switches to + another buffer. (Nikolai Pavlov, issue #1421) +Solution: Check the buffer and line every time. +Files: src/if_py_both.h, src/testdir/test_python2.vim, + src/testdir/test_python3.vim, src/Makefile, + src/testdir/Make_all.mak + +Patch 8.0.0266 +Problem: Compiler warning for using uninitialized variable. +Solution: Set tab_number also when there is an error. +Files: src/ex_docmd.c + +Patch 8.0.0267 +Problem: A channel test sometimes fails on Mac. +Solution: Add the test to the list of flaky tests. +Files: src/testdir/runtest.vim + +Patch 8.0.0268 +Problem: May get ml_get error when :luado deletes lines or switches to + another buffer. (Nikolai Pavlov, issue #1421) +Solution: Check the buffer and line every time. +Files: src/if_lua.c, src/testdir/test_lua.vim, src/Makefile, + src/testdir/Make_all.mak + +Patch 8.0.0269 +Problem: May get ml_get error when :perldo deletes lines or switches to + another buffer. (Nikolai Pavlov, issue #1421) +Solution: Check the buffer and line every time. +Files: src/if_perl.xs, src/testdir/test_perl.vim + +Patch 8.0.0270 +Problem: May get ml_get error when :rubydo deletes lines or switches to + another buffer. (Nikolai Pavlov, issue #1421) +Solution: Check the buffer and line every time. +Files: src/if_ruby.c, src/testdir/test_ruby.vim + +Patch 8.0.0271 +Problem: May get ml_get error when :tcldo deletes lines or switches to + another buffer. (Nikolai Pavlov, closes #1421) +Solution: Check the buffer and line every time. +Files: src/if_tcl.c, src/testdir/test_tcl.vim, src/Makefile, + src/testdir/Make_all.mak + +Patch 8.0.0272 +Problem: Crash on exit is not detected when running tests. +Solution: Remove the dash before the command. (Dominique Pelle, closes + #1425) +Files: src/testdir/Makefile + +Patch 8.0.0273 +Problem: Dead code detected by Coverity when not using gnome. +Solution: Rearrange the #ifdefs to avoid dead code. +Files: src/gui_gtk_x11.c + +Patch 8.0.0274 +Problem: When update_single_line() is called recursively, or another screen + update happens while it is busy, errors may occur. +Solution: Check and update updating_screen. (Christian Brabandt) +Files: src/screen.c + +Patch 8.0.0275 +Problem: When checking for CTRL-C typed the GUI may detect a screen resize + and redraw the screen, causing trouble. +Solution: Set updating_screen in ui_breakcheck(). +Files: src/ui.c + +Patch 8.0.0276 +Problem: Checking for FEAT_GUI_GNOME inside GTK 3 code is unnecessary. +Solution: Remove the #ifdef. (Kazunobu Kuriyama) +Files: src/gui_gtk_x11.c + +Patch 8.0.0277 +Problem: The GUI test may trigger fontconfig and take a long time. +Solution: Set $XDG_CACHE_HOME. (Kazunobu Kuriyama) +Files: src/testdir/unix.vim, src/testdir/test_gui.vim + +Patch 8.0.0278 (after 8.0.0277) +Problem: GUI test fails on MS-Windows. +Solution: Check that tester_HOME exists. +Files: src/testdir/test_gui.vim + +Patch 8.0.0279 +Problem: With MSVC 2015 the dll name is vcruntime140.dll. +Solution: Check the MSVC version and use the right dll name. (Ken Takata) +Files: src/Make_mvc.mak + +Patch 8.0.0280 +Problem: On MS-Windows setting an environment variable with multi-byte + strings does not work well. +Solution: Use wputenv when possible. (Taro Muraoka, Ken Takata) +Files: src/misc1.c, src/os_win32.c, src/os_win32.h, + src/proto/os_win32.pro, src/vim.h + +Patch 8.0.0281 +Problem: MS-Windows files are still using ARGSUSED while most other files + have UNUSED. +Solution: Change ARGSUSED to UNUSED or delete it. +Files: src/os_win32.c, src/gui_w32.c, src/os_mswin.c, src/os_w32exe.c, + src/winclip.c + +Patch 8.0.0282 +Problem: When doing a Visual selection and using "I" to go to insert mode, + CTRL-O needs to be used twice to go to Normal mode. (Coacher) +Solution: Check for the return value of edit(). (Christian Brabandt, + closes #1290) +Files: src/normal.c, src/ops.c + +Patch 8.0.0283 +Problem: The return value of mode() does not indicate that completion is + active in Replace and Insert mode. (Zhen-Huan (Kenny) Hu) +Solution: Add "c" or "x" for two kinds of completion. (Yegappan Lakshmanan, + closes #1397) Test some more modes. +Files: runtime/doc/eval.txt, src/evalfunc.c, + src/testdir/test_functions.vim, src/testdir/test_mapping.vim + +Patch 8.0.0284 +Problem: The Test_collapse_buffers() test failed once, looks like it is + flaky. +Solution: Add it to the list of flaky tests. +Files: src/testdir/runtest.vim + +Patch 8.0.0285 (after 8.0.0277) +Problem: Tests fail with tiny build on Unix. +Solution: Only set g:tester_HOME when build with the +eval feature. +Files: src/testdir/unix.vim + +Patch 8.0.0286 +Problem: When concealing is active and the screen is resized in the GUI it + is not immediately redrawn. +Solution: Use update_prepare() and update_finish() from + update_single_line(). +Files: src/screen.c + +Patch 8.0.0287 +Problem: Cannot access the arguments of the current function in debug mode. + (Luc Hermitte) +Solution: use get_funccal(). (Lemonboy, closes #1432, closes #1352) +Files: src/userfunc.c + +Patch 8.0.0288 (after 8.0.0284) +Problem: Errors reported while running tests. +Solution: Put comma in the right place. +Files: src/testdir/runtest.vim + +Patch 8.0.0289 +Problem: No test for "ga" and :ascii. +Solution: Add a test. (Dominique Pelle, closes #1429) +Files: src/Makefile, src/testdir/test_alot.vim, src/testdir/test_ga.vim + +Patch 8.0.0290 +Problem: If a wide character doesn't fit at the end of the screen line, and + the line doesn't fit on the screen, then the cursor position may + be wrong. (anliting) +Solution: Don't skip over wide character. (Christian Brabandt, closes #1408) +Files: src/screen.c + +Patch 8.0.0291 (after 8.0.0282) +Problem: Visual block insertion does not insert in all lines. +Solution: Don't bail out of insert too early. Add a test. (Christian + Brabandt, closes #1290) +Files: src/ops.c, src/testdir/test_visual.vim + +Patch 8.0.0292 +Problem: The stat test is a bit slow. +Solution: Remove a couple of sleep comments and reduce another. +Files: src/testdir/test_stat.vim + +Patch 8.0.0293 +Problem: Some tests have a one or three second wait. +Solution: Reset the 'showmode' option. Use a test time of one to disable + sleep after an error or warning message. +Files: src/misc1.c, src/testdir/runtest.vim, src/testdir/test_normal.vim + +Patch 8.0.0294 +Problem: Argument list is not stored correctly in a session file. + (lgpasquale) +Solution: Use "$argadd" instead of "argadd". (closes #1434) +Files: src/ex_docmd.c, src/testdir/test_mksession.vim + +Patch 8.0.0295 (after 8.0.0293) +Problem: test_viml hangs. +Solution: Put resetting 'more' before sourcing the script. +Files: src/testdir/runtest.vim + +Patch 8.0.0296 +Problem: Bracketed paste can only append, not insert. +Solution: When the cursor is in the first column insert the text. +Files: src/normal.c, src/testdir/test_paste.vim, runtime/doc/term.txt + +Patch 8.0.0297 +Problem: Double free on exit when using a closure. (James McCoy) +Solution: Split free_al_functions in two parts. (closes #1428) +Files: src/userfunc.c, src/structs.h + +Patch 8.0.0298 +Problem: Ex command range with repeated search does not work. (Bruce + DeVisser) +Solution: Skip over \/, \? and \&. +Files: src/ex_docmd.c, src/testdir/test_cmdline.vim + +Patch 8.0.0299 +Problem: When the GUI window is resized Vim does not always take over the + new size. (Luchr) +Solution: Reset new_p_guifont in gui_resize_shell(). Call + gui_may_resize_shell() in the main loop. +Files: src/main.c, src/gui.c + +Patch 8.0.0300 +Problem: Cannot stop diffing hidden buffers. (Daniel Hahler) +Solution: When using :diffoff! make the whole list if diffed buffers empty. + (closes #736) +Files: src/diff.c, src/testdir/test_diffmode.vim + +Patch 8.0.0301 +Problem: No tests for ":set completion" and various errors of the :set + command. +Solution: Add more :set tests. (Dominique Pelle, closes #1440) +Files: src/testdir/test_options.vim + +Patch 8.0.0302 +Problem: Cannot set terminal key codes with :let. +Solution: Make it work. +Files: src/option.c, src/testdir/test_assign.vim + +Patch 8.0.0303 +Problem: Bracketed paste does not work in Visual mode. +Solution: Delete the text before pasting +Files: src/normal.c, src/ops.c, src/proto/ops.pro, + src/testdir/test_paste.vim + +Patch 8.0.0304 (after 8.0.0302) +Problem: Assign test fails in the GUI. +Solution: Skip the test for setting t_k1. +Files: src/testdir/test_assign.vim + +Patch 8.0.0305 +Problem: Invalid memory access when option has duplicate flag. +Solution: Correct pointer computation. (Dominique Pelle, closes #1442) +Files: src/option.c, src/testdir/test_options.vim + +Patch 8.0.0306 +Problem: mode() not sufficiently tested. +Solution: Add more tests. (Yegappan Lakshmanan) +Files: src/testdir/test_functions.vim + +Patch 8.0.0307 +Problem: Asan detects a memory error when EXITFREE is defined. (Dominique + Pelle) +Solution: In getvcol() check for ml_get_buf() returning an empty string. + Also skip adjusting the scroll position. Set "exiting" in + mch_exit() for all systems. +Files: src/charset.c, src/window.c, src/os_mswin.c, src/os_win32.c, + src/os_amiga.c + +Patch 8.0.0308 +Problem: When using a symbolic link, the package path will not be inserted + at the right position in 'runtimepath'. (Dugan Chen, Norio Takagi) +Solution: Resolve symbolic links when finding the right position in + 'runtimepath'. (Hirohito Higashi) +Files: src/ex_cmds2.c, src/testdir/test_packadd.vim + +Patch 8.0.0309 +Problem: Cannot use an empty key in json. +Solution: Allow for using an empty key. +Files: src/json.c, src/testdir/test_json.vim + +Patch 8.0.0310 +Problem: Not enough testing for GUI functionality. +Solution: Add tests for v:windowid and getwinpos[xy](). (Kazunobu Kuriyama) +Files: src/testdir/test_gui.vim + +Patch 8.0.0311 +Problem: Linebreak tests are old style. +Solution: Turn the tests into new style. Share utility functions. (Ozaki + Kiichi, closes #1444) +Files: src/Makefile, src/testdir/Make_all.mak, + src/testdir/test_breakindent.vim, src/testdir/test_listlbr.in, + src/testdir/test_listlbr.ok, src/testdir/test_listlbr.vim, + src/testdir/test_listlbr_utf8.in, + src/testdir/test_listlbr_utf8.ok, + src/testdir/test_listlbr_utf8.vim, src/testdir/view_util.vim + +Patch 8.0.0312 +Problem: When a json message arrives in pieces, the start is dropped and + the decoding fails. +Solution: Do not drop the start when it is still needed. (Kay Zheng) Add a + test. Reset the timeout when something is received. +Files: src/channel.c, src/testdir/test_channel.vim, src/structs.h, + src/testdir/test_channel_pipe.py + +Patch 8.0.0313 (after 8.0.0310) +Problem: Not enough testing for GUI functionality. +Solution: Add tests for the GUI font. (Kazunobu Kuriyama) +Files: src/testdir/test_gui.vim + +Patch 8.0.0314 +Problem: getcmdtype(), getcmdpos() and getcmdline() are not tested. +Solution: Add tests. (Yegappan Lakshmanan) +Files: src/testdir/test_cmdline.vim + +Patch 8.0.0315 +Problem: ":help :[range]" does not work. (Tony Mechelynck) +Solution: Translate to insert a backslash. +Files: src/ex_cmds.c + +Patch 8.0.0316 +Problem: ":help z?" does not work. (Pavol Juhas) +Solution: Remove exception for z?. +Files: src/ex_cmds.c + +Patch 8.0.0317 +Problem: No test for setting 'guifont'. +Solution: Add a test for X11 GUIs. (Kazunobu Kuriyama) +Files: src/testdir/test_gui.vim + +Patch 8.0.0318 +Problem: Small mistake in 7x13 font name. +Solution: Use ISO 8859-1 name instead of 10646-1. (Kazunobu Kuriyama) +Files: src/testdir/test_gui.vim + +Patch 8.0.0319 +Problem: Insert mode completion does not respect "start" in 'backspace'. +Solution: Check whether backspace can go before where insert started. + (Hirohito Higashi) +Files: src/edit.c, src/testdir/test_popup.vim + +Patch 8.0.0320 +Problem: Warning for unused variable with small build. +Solution: Change #ifdef to exclude FEAT_CMDWIN. (Kazunobu Kuriyama) +Files: src/ex_getln.c + +Patch 8.0.0321 +Problem: When using the tiny version trying to load the matchit plugin + gives an error. On MS-Windows some default mappings fail. +Solution: Add a check if the command used is available. (Christian Brabandt) +Files: runtime/mswin.vim, runtime/macros/matchit.vim + +Patch 8.0.0322 +Problem: Possible overflow with spell file where the tree length is + corrupted. +Solution: Check for an invalid length (suggested by shqking) +Files: src/spellfile.c + +Patch 8.0.0323 +Problem: When running the command line tests there is a one second wait. +Solution: Change an Esc to Ctrl-C. (Yegappan Lakshmanan) +Files: src/testdir/test_cmdline.vim + +Patch 8.0.0324 +Problem: Illegal memory access with "1;y". +Solution: Call check_cursor() instead of check_cursor_lnum(). (Dominique + Pelle, closes #1455) +Files: src/ex_docmd.c, src/testdir/test_cmdline.vim + +Patch 8.0.0325 +Problem: Packadd test does not clean up symlink. +Solution: Delete the link. (Hirohito Higashi) +Files: src/testdir/test_packadd.vim + +Patch 8.0.0326 (after 8.0.0325) +Problem: Packadd test uses wrong directory name. +Solution: Use the variable name value. (Hirohito Higashi) +Files: src/testdir/test_packadd.vim + +Patch 8.0.0327 +Problem: The E11 error message in the command line window is not + translated. +Solution: use _(). (Hirohito Higashi) +Files: src/ex_docmd.c + +Patch 8.0.0328 +Problem: The "zero count" error doesn't have a number. (Hirohito Higashi) +Solution: Give it a number and be more specific about the error. +Files: src/globals.h + +Patch 8.0.0329 +Problem: Xfontset and guifontwide are not tested. +Solution: Add tests. (Kazunobu Kuriyama) +Files: src/testdir/test_gui.vim + +Patch 8.0.0330 +Problem: Illegal memory access after "vapo". (Dominique Pelle) +Solution: Fix the cursor column. +Files: src/search.c, src/testdir/test_visual.vim + +Patch 8.0.0331 +Problem: Restoring help snapshot accesses freed memory. (Dominique Pelle) +Solution: Don't restore a snapshot when the window closes. +Files: src/window.c, src/Makefile, src/testdir/Make_all.mak, + src/testdir/test_help.vim + +Patch 8.0.0332 +Problem: GUI test fails on some systems. +Solution: Try different language settings. (Kazunobu Kuriyama) +Files: src/testdir/test_gui.vim + +Patch 8.0.0333 +Problem: Illegal memory access when 'complete' ends in a backslash. +Solution: Check for trailing backslash. (Dominique Pelle, closes #1478) +Files: src/option.c, src/testdir/test_options.vim + +Patch 8.0.0334 +Problem: Can't access b:changedtick from a dict reference. +Solution: Make changedtick a member of the b: dict. (inspired by neovim + #6112) +Files: src/structs.h, src/buffer.c, src/edit.c, src/eval.c, + src/evalfunc.c, src/ex_docmd.c, src/main.c, src/globals.h, + src/fileio.c, src/memline.c, src/misc1.c, src/syntax.c, + src/proto/eval.pro, src/testdir/test_changedtick.vim, + src/Makefile, src/testdir/test_alot.vim, src/testdir/test91.in, + src/testdir/test91.ok, src/testdir/test_functions.vim + +Patch 8.0.0335 (after 8.0.0335) +Problem: Functions test fails. +Solution: Use the right buffer number. +Files: src/testdir/test_functions.vim + +Patch 8.0.0336 +Problem: Flags of :substitute not sufficiently tested. +Solution: Test up to two letter flag combinations. (James McCoy, closes + #1479) +Files: src/testdir/test_substitute.vim + +Patch 8.0.0337 +Problem: Invalid memory access in :recover command. +Solution: Avoid access before directory name. (Dominique Pelle, + closes #1488) +Files: src/Makefile, src/memline.c, src/testdir/test_alot.vim, + src/testdir/test_recover.vim + +Patch 8.0.0338 (after 8.0.0337) +Problem: :recover test fails on MS-Windows. +Solution: Use non-existing directory on MS-Windows. +Files: src/testdir/test_recover.vim + +Patch 8.0.0339 +Problem: Illegal memory access with vi' +Solution: For quoted text objects bail out if the Visual area spans more + than one line. +Files: src/search.c, src/testdir/test_visual.vim + +Patch 8.0.0340 +Problem: Not checking return valud of dict_add(). (Coverity) +Solution: Handle a failure. +Files: src/buffer.c + +Patch 8.0.0341 +Problem: When using complete() and typing a character undo is saved after + the character was inserted. (Shougo) +Solution: Save for undo before inserting the character. +Files: src/edit.c, src/testdir/test_popup.vim + +Patch 8.0.0342 +Problem: Double free when compiled with EXITFREE and setting 'ttytype'. +Solution: Avoid setting P_ALLOCED on 'ttytype'. (Dominique Pelle, + closes #1461) +Files: src/option.c, src/testdir/test_options.vim + +Patch 8.0.0343 +Problem: b:changedtick can be unlocked, even though it has no effect. + (Nikolai Pavlov) +Solution: Add a check and error E940. (closes #1496) +Files: src/eval.c, src/testdir/test_changedtick.vim, runtime/doc/eval.txt + +Patch 8.0.0344 +Problem: Unlet command leaks memory. (Nikolai Pavlov) +Solution: Free the memory on error. (closes #1497) +Files: src/eval.c, src/testdir/test_unlet.vim + +Patch 8.0.0345 +Problem: islocked('d.changedtick') does not work. +Solution: Make it work. +Files: src/buffer.c, src/eval.c, src/evalfunc.c, src/vim.h, + src/testdir/test_changedtick.vim, + +Patch 8.0.0346 +Problem: Vim relies on limits.h to be included indirectly, but on Solaris 9 + it may not be. (Ben Fritz) +Solution: Always include limits.h. +Files: src/os_unixx.h, src/vim.h + +Patch 8.0.0347 +Problem: When using CTRL-X CTRL-U inside a comment, the use of the comment + leader may not work. (Klement) +Solution: Save and restore did_ai. (Christian Brabandt, closes #1494) +Files: src/edit.c, src/testdir/test_popup.vim + +Patch 8.0.0348 +Problem: When building with a shadow directory on macOS lacks the + +clipboard feature. +Solution: Link *.m files, specifically os_macosx.m. (Kazunobu Kuriyama) +Files: src/Makefile + +Patch 8.0.0349 +Problem: Redrawing errors with GTK 3. +Solution: When updating, first clear all rectangles and then draw them. + (Kazunobu Kuriyama, Christian Ludwig, closes #848) +Files: src/gui_gtk_x11.c + +Patch 8.0.0350 +Problem: Not enough test coverage for Perl. +Solution: Add more Perl tests. (Dominique Perl, closes #1500) +Files: src/testdir/test_perl.vim + +Patch 8.0.0351 +Problem: No test for concatenating an empty string that results from out of + bounds indexing. +Solution: Add a simple test. +Files: src/testdir/test_expr.vim + +Patch 8.0.0352 +Problem: The condition for when a typval needs to be cleared is too + complicated. +Solution: Init the type to VAR_UNKNOWN and clear it always. +Files: src/eval.c + +Patch 8.0.0353 +Problem: If [RO] in the status line is translated to a longer string, it is + trunctted to 4 bytes. +Solution: Skip over the resulting string. (Jente Hidskes, closes #1499) +Files: src/screen.c + +Patch 8.0.0354 +Problem: Test to check that setting termcap key fails sometimes. +Solution: Check for "t_k1" to exist. (Christian Brabandt, closes #1459) +Files: src/testdir/test_assign.vim + +Patch 8.0.0355 +Problem: Using uninitialized memory when 'isfname' is empty. +Solution: Don't call getpwnam() without an argument. (Dominique Pelle, + closes #1464) +Files: src/misc1.c, src/testdir/test_options.vim + +Patch 8.0.0356 (after 8.0.0342) +Problem: Leaking memory when setting 'ttytype'. +Solution: Get free_oldval from the right option entry. +Files: src/option.c + +Patch 8.0.0357 +Problem: Crash when setting 'guicursor' to weird value. +Solution: Avoid negative size. (Dominique Pelle, closes #1465) +Files: src/misc2.c, src/testdir/test_options.vim + +Patch 8.0.0358 +Problem: Invalid memory access in C-indent code. +Solution: Don't go over end of empty line. (Dominique Pelle, closes #1492) +Files: src/edit.c, src/testdir/test_options.vim + +Patch 8.0.0359 +Problem: 'number' and 'relativenumber' are not properly tested. +Solution: Add tests, change old style to new style tests. (Ozaki Kiichi, + closes #1447) +Files: src/Makefile, src/testdir/Make_all.mak, src/testdir/Make_vms.mms, + src/testdir/test89.in, src/testdir/test89.ok, + src/testdir/test_alot.vim, src/testdir/test_findfile.vim, + src/testdir/test_number.vim + +Patch 8.0.0360 +Problem: Sometimes VimL is used, which is confusing. +Solution: Consistently use "Vim script". (Hirohito Higashi) +Files: runtime/doc/if_mzsch.txt, runtime/doc/if_pyth.txt, + runtime/doc/syntax.txt, runtime/doc/usr_02.txt, + runtime/doc/version7.txt, src/Makefile, src/eval.c, + src/ex_getln.c, src/if_py_both.h, src/if_xcmdsrv.c, + src/testdir/Make_all.mak, src/testdir/runtest.vim, + src/testdir/test49.vim, src/testdir/test_vimscript.vim, + src/testdir/test_viml.vim + +Patch 8.0.0361 +Problem: GUI initialisation is not sufficiently tested. +Solution: Add the gui_init test. (Kazunobu Kuriyama) +Files: src/Makefile, src/testdir/Make_all.mak, src/testdir/Make_dos.mak, + src/testdir/Make_ming.mak, src/testdir/Makefile, + src/testdir/gui_init.vim, src/testdir/setup_gui.vim, + src/testdir/test_gui.vim, src/testdir/test_gui_init.vim, Filelist + +Patch 8.0.0362 (after 8.0.0361) +Problem: Tests fail on MS-Windows. +Solution: Use $*.vim instead of $<. +Files: src/testdir/Make_dos.mak + +Patch 8.0.0363 +Problem: Travis is too slow to keep up with patches. +Solution: Increase git depth to 20 +Files: .travis.yml + +Patch 8.0.0364 +Problem: ]s does not move cursor with two spell errors in one line. (Manuel + Ortega) +Solution: Don't stop search immediately when wrapped, search the line first. + (Ken Takata) Add a test. +Files: src/spell.c, src/Makefile, src/testdir/test_spell.vim, + src/testdir/Make_all.mak + +Patch 8.0.0365 +Problem: Might free a dict item that wasn't allocated. +Solution: Call dictitem_free(). (Nikolai Pavlov) Use this for + b:changedtick. +Files: src/dict.c, src/structs.h, src/buffer.c, src/edit.c, + src/evalfunc.c, src/ex_docmd.c, src/fileio.c, src/main.c, + src/memline.c, src/misc1.c, src/syntax.c + +Patch 8.0.0366 (after 8.0.0365) +Problem: Build fails with tiny features. +Solution: Add #ifdef. +Files: src/buffer.c + +Patch 8.0.0367 +Problem: If configure defines _LARGE_FILES some include files are included + before it is defined. +Solution: Include vim.h first. (Sam Thursfield, closes #1508) +Files: src/gui_at_sb.c, src/gui_athena.c, src/gui_motif.c, src/gui_x11.c, + src/gui_xmdlg.c + +Patch 8.0.0368 +Problem: Not all options are tested with a range of values. +Solution: Generate a test script from the source code. +Files: Filelist, src/gen_opt_test.vim, src/testdir/test_options.vim, + src/Makefile + +Patch 8.0.0369 (after 8.0.0368) +Problem: The 'balloondelay', 'ballooneval' and 'balloonexpr' options are + not defined without the +balloon_eval feature. Testing that an + option value fails does not work for unsupported options. +Solution: Make the options defined but not supported. Don't test if + setting unsupported options fails. +Files: src/option.c, src/gen_opt_test.vim + +Patch 8.0.0370 +Problem: Invalid memory access when setting wildchar empty. +Solution: Avoid going over the end of the option value. (Dominique Pelle, + closes #1509) Make option test check all number options with + empty value. +Files: src/gen_opt_test.vim, src/option.c, src/testdir/test_options.vim + +Patch 8.0.0371 (after 8.0.0365) +Problem: Leaking memory when setting v:completed_item. +Solution: Or the flags instead of setting them. +Files: src/eval.c + +Patch 8.0.0372 +Problem: More options are not always defined. +Solution: Consistently define all possible options. +Files: src/option.c, src/testdir/test_expand_dllpath.vim + +Patch 8.0.0373 +Problem: Build fails without +folding. +Solution: Move misplaced #ifdef. +Files: src/option.c + +Patch 8.0.0374 +Problem: Invalid memory access when using :sc in Ex mode. (Dominique Pelle) +Solution: Avoid the column being negative. Also fix a hang in Ex mode. +Files: src/ex_getln.c, src/ex_cmds.c, src/testdir/test_substitute.vim + +Patch 8.0.0375 +Problem: The "+ register is not tested. +Solution: Add a test using another Vim instance to change the "+ register. + (Kazunobu Kuriyama) +Files: src/testdir/test_gui.vim + +Patch 8.0.0376 +Problem: Size computations in spell file reading are not exactly right. +Solution: Make "len" a "long" and check with LONG_MAX. +Files: src/spellfile.c + +Patch 8.0.0377 +Problem: Possible overflow when reading corrupted undo file. +Solution: Check if allocated size is not too big. (King) +Files: src/undo.c + +Patch 8.0.0378 +Problem: Another possible overflow when reading corrupted undo file. +Solution: Check if allocated size is not too big. (King) +Files: src/undo.c + +Patch 8.0.0379 +Problem: CTRL-Z and mouse click use CTRL-O unnecessary. +Solution: Remove stuffing CTRL-O. (James McCoy, closes #1453) +Files: src/edit.c, src/normal.c + +Patch 8.0.0380 +Problem: With 'linebreak' set and 'breakat' includes ">" a double-wide + character results in "<<" displayed. +Solution: Check for the character not to be replaced. (Ozaki Kiichi, + closes #1456) +Files: src/screen.c, src/testdir/test_listlbr_utf8.vim + +Patch 8.0.0381 +Problem: Diff mode is not sufficiently tested. +Solution: Add more diff mode tests. (Dominique Pelle, closes #1515) +Files: src/testdir/test_diffmode.vim + +Patch 8.0.0382 (after 8.0.0380) +Problem: Warning in tiny build for unused variable. (Tony Mechelynck) +Solution: Add #ifdefs. +Files: src/screen.c + +Patch 8.0.0383 (after 8.0.0382) +Problem: Misplaced #ifdef. (Christ van Willigen) +Solution: Split assignment. +Files: src/screen.c + +Patch 8.0.0384 +Problem: Timer test failed for no apparent reason. +Solution: Mark the test as flaky. +Files: src/testdir/runtest.vim + +Patch 8.0.0385 +Problem: No tests for arabic. +Solution: Add a first test for arabic. (Dominique Pelle, closes #1518) +Files: src/Makefile, src/testdir/Make_all.mak, + src/testdir/test_arabic.vim + +Patch 8.0.0386 +Problem: Tiny build has a problem with generating the options test. +Solution: Change the "if" to skip over statements. +Files: src/gen_opt_test.vim + +Patch 8.0.0387 +Problem: compiler warnings +Solution: Add type casts. (Christian Brabandt) +Files: src/channel.c, src/memline.c, + +Patch 8.0.0388 +Problem: filtering lines through "cat", without changing the line count, + changes manual folds. +Solution: Change how marks and folds are adjusted. (Matthew Malcomson, from + neovim #6194. +Files: src/fold.c, src/testdir/test_fold.vim + +Patch 8.0.0389 +Problem: Test for arabic does not check what is displayed. +Solution: Improve what is asserted. (Dominique Pelle, closes #1523) + Add a first shaping test. +Files: src/testdir/test_arabic.vim + +Patch 8.0.0390 +Problem: When the window scrolls horizontally when the popup menu is + displayed part of it may not be cleared. (Neovim issue #6184) +Solution: Remove the menu when the windows scrolled. (closes #1524) +Files: src/edit.c + +Patch 8.0.0391 +Problem: Arabic support is verbose and not well tested. +Solution: Simplify the code. Add more tests. +Files: src/arabic.c, src/testdir/test_arabic.vim + +Patch 8.0.0392 +Problem: GUI test fails with Athena and Motif. +Solution: Add test_ignore_error(). Use it to ignore the "failed to create + input context" error. +Files: src/message.c, src/proto/message.pro, src/evalfunc.c, + src/testdir/test_gui.vim, runtime/doc/eval.txt + +Patch 8.0.0393 (after 8.0.0190) +Problem: When the same tag appears more than once, the order is + unpredictable. (Charles Campbell) +Solution: Besides using a dict for finding duplicates, use a grow array for + keeping the tags in sequence. +Files: src/tag.c, src/testdir/test_tagjump.vim + +Patch 8.0.0394 +Problem: Tabs are not aligned when scrolling horizontally and a Tab doesn't + fit. (Axel Bender) +Solution: Handle a Tab as a not fitting character. (Christian Brabandt) + Also fix that ":redraw" does not scroll horizontally to show the + cursor. And fix the test that depended on the old behavior. +Files: src/screen.c, src/ex_docmd.c, src/testdir/test_listlbr.vim, + src/testdir/test_listlbr_utf8.vim, + src/testdir/test_breakindent.vim + +Patch 8.0.0395 (after 8.0.0392) +Problem: Testing the + register fails with Motif. +Solution: Also ignore the "failed to create input context" error in the + second gvim. Don't use msg() when it would result in a dialog. +Files: src/message.c, src/testdir/test_gui.vim, src/testdir/setup_gui.vim + +Patch 8.0.0396 +Problem: 'balloonexpr' only works synchronously. +Solution: Add balloon_show(). (Jusufadis Bakamovic, closes #1449) +Files: runtime/doc/eval.txt, src/evalfunc.c, src/os_unix.c, + src/os_win32.c + +Patch 8.0.0397 (after 8.0.0392) +Problem: Cannot build with the viminfo feature but without the eval + feature. +Solution: Adjust #ifdef. (John Marriott) +Files: src/message.c, src/misc2.c + +Patch 8.0.0398 +Problem: Illegal memory access with "t". +Solution: Use strncmp() instead of memcmp(). (Dominique Pelle, closes #1528) +Files: src/search.c, src/testdir/test_search.vim + +Patch 8.0.0399 +Problem: Crash when using balloon_show() when not supported. (Hirohito + Higashi) +Solution: Check for balloonEval not to be NULL. (Ken Takata) +Files: src/evalfunc.c, src/testdir/test_functions.vim + +Patch 8.0.0400 +Problem: Some tests have a one second delay. +Solution: Add --not-a-term in RunVim(). +Files: src/testdir/shared.vim + +Patch 8.0.0401 +Problem: Test fails with missing balloon feature. +Solution: Add check for balloon feature. +Files: src/testdir/test_functions.vim + +Patch 8.0.0402 +Problem: :map completion does not have . (Dominique Pelle) +Solution: Recognize in completion. Add a test. +Files: src/getchar.c, src/testdir/test_cmdline.vim + +Patch 8.0.0403 +Problem: GUI tests may fail. +Solution: Ignore the E285 error better. (Kazunobu Kuriyama) +Files: src/testdir/test_gui.vim, src/testdir/test_gui_init.vim + +Patch 8.0.0404 +Problem: Not enough testing for quickfix. +Solution: Add some more tests. (Yegappan Lakshmanan) +Files: src/testdir/test_quickfix.vim + +Patch 8.0.0405 +Problem: v:progpath may become invalid after ":cd". +Solution: Turn v:progpath into a full path if needed. +Files: src/main.c, src/testdir/test_startup.vim, runtime/doc/eval.txt + +Patch 8.0.0406 +Problem: The arabic shaping code is verbose. +Solution: Shorten the code without changing the functionality. +Files: src/arabic.c + +Patch 8.0.0407 (after 8.0.0388) +Problem: Filtering folds with marker method not tested. +Solution: Also set 'foldmethod' to "marker". +Files: src/testdir/test_fold.vim + +Patch 8.0.0408 +Problem: Updating folds does not work properly when inserting a file and a + few other situations. +Solution: Adjust the way folds are updated. (Matthew Malcomson) +Files: src/fold.c, src/testdir/test_fold.vim + +Patch 8.0.0409 +Problem: set_progpath is defined but not always used +Solution: Adjust #ifdef. +Files: src/main.c + +Patch 8.0.0410 +Problem: Newer gettext/iconv library has extra dll file. +Solution: Add the file to the Makefile and nsis script. (Christian Brabandt) +Files: Makefile, nsis/gvim.nsi + +Patch 8.0.0411 +Problem: We can't change the case in menu entries, it breaks translations. +Solution: Ignore case when looking up a menu translation. +Files: src/menu.c, src/testdir/test_menu.vim + +Patch 8.0.0412 (after 8.0.0411) +Problem: Menu test fails on MS-Windows. +Solution: Use a menu entry with only ASCII characters. +Files: src/testdir/test_menu.vim + +Patch 8.0.0413 (after 8.0.0412) +Problem: Menu test fails on MS-Windows using gvim. +Solution: First delete the English menus. +Files: src/testdir/test_menu.vim + +Patch 8.0.0414 +Problem: Balloon eval is not tested. +Solution: Add a few balloon tests. (Kazunobu Kuriyama) +Files: src/testdir/test_gui.vim + +Patch 8.0.0415 (after 8.0.0414) +Problem: Balloon test fails on MS-Windows. +Solution: Test with 0x7fffffff instead of 0xffffffff. +Files: src/testdir/test_gui.vim + +Patch 8.0.0416 +Problem: Setting v:progpath is not quite right. +Solution: On MS-Windows add the extension. On Unix use the full path for a + relative directory. (partly by James McCoy, closes #1531) +Files: src/main.c, src/os_win32.c, src/os_unix.c + +Patch 8.0.0417 +Problem: Test for the clipboard fails sometimes. +Solution: Add it to the flaky tests. +Files: src/testdir/runtest.vim + +Patch 8.0.0418 +Problem: ASAN logs are disabled and don't cause a failure. +Solution: Enable ASAN logs and fail if not empty. (James McCoy, + closes #1425) +Files: .travis.yml + +Patch 8.0.0419 +Problem: Test for v:progpath fails on MS-Windows. +Solution: Expand to full path. Also add ".exe" when the path is an absolute + path. +Files: src/os_win32.c, src/main.c + +Patch 8.0.0420 +Problem: When running :make the output may be in the system encoding, + different from 'encoding'. +Solution: Add the 'makeencoding' option. (Ken Takata) +Files: runtime/doc/options.txt, runtime/doc/quickfix.txt, + runtime/doc/quickref.txt, src/Makefile, src/buffer.c, + src/if_cscope.c, src/main.c, src/option.c, src/option.h, + src/proto/quickfix.pro, src/quickfix.c, src/structs.h, + src/testdir/Make_all.mak, src/testdir/test_makeencoding.py, + src/testdir/test_makeencoding.vim + +Patch 8.0.0421 +Problem: Diff mode is displayed wrong when adding a line at the end of a + buffer. +Solution: Adjust marks in diff mode. (James McCoy, closes #1329) +Files: src/misc1.c, src/ops.c, src/testdir/test_diffmode.vim + +Patch 8.0.0422 +Problem: Python test fails with Python 3.6. +Solution: Convert new exception messages to old ones. (closes #1359) +Files: src/testdir/test87.in + +Patch 8.0.0423 +Problem: The effect of adding "#" to 'cinoptions' is not always removed. + (David Briscoe) +Solution: Reset b_ind_hash_comment. (Christian Brabandt, closes #1475) +Files: src/misc1.c, src/Makefile, src/testdir/Make_all.mak, + src/testdir/test_cindent.vim, src/testdir/test3.in + +Patch 8.0.0424 +Problem: Compiler warnings on MS-Windows. (Ajit Thakkar) +Solution: Add type casts. +Files: src/os_win32.c + +Patch 8.0.0425 +Problem: Build errors when building without folding. +Solution: Add #ifdefs. (John Marriott) +Files: src/diff.c, src/edit.c, src/option.c, src/syntax.c + +Patch 8.0.0426 +Problem: Insufficient testing for statusline. +Solution: Add several tests. (Dominique Pelle, closes #1534) +Files: src/testdir/test_statusline.vim + +Patch 8.0.0427 +Problem: 'makeencoding' missing from the options window. +Solution: Add the entry. +Files: runtime/optwin.vim + +Patch 8.0.0428 +Problem: Git and hg see new files after running tests. (Manuel Ortega) +Solution: Add the generated file to .hgignore (or .gitignore). Delete the + resulting verbose file. (Christian Brabandt) Improve dependency + on opt_test.vim. Reset the 'more' option. +Files: .hgignore, src/gen_opt_test.vim, src/testdir/gen_opt_test.vim, + src/Makefile, src/testdir/Make_all.mak, src/testdir/Makefile, + src/testdir/Make_dos.mak, src/testdir/Make_ming.mak, + Filelist + +Patch 8.0.0429 +Problem: Options test does not always test everything. +Solution: Fix dependency for opt_test.vim. Give a message when opt_test.vim + was not found. +Files: src/testdir/test_options.vim, src/testdir/gen_opt_test.vim, + src/testdir/Makefile, src/testdir/Make_all.mak, + src/testdir/Make_dos.mak, src/testdir/Make_ming.mak + +Patch 8.0.0430 +Problem: Options test fails or hangs on MS-Windows. +Solution: Run it separately instead of part of test_alot. Use "-S" instead + of "-u" to run the script. Fix failures. +Files: src/testdir/Make_all.mak, src/testdir/test_alot.vim, + src/testdir/Makefile, src/testdir/Make_dos.mak, + src/testdir/Make_ming.mak, src/testdir/gen_opt_test.vim + +Patch 8.0.0431 +Problem: 'cinoptions' cannot set indent for extern block. +Solution: Add the "E" flag in 'cinoptions'. (Hirohito Higashi) +Files: runtime/doc/indent.txt, src/misc1.c, src/structs.h, + src/testdir/test_cindent.vim + +Patch 8.0.0432 +Problem: "make shadow" creates an invalid link. +Solution: Don't link "*.vim". (Kazunobu Kuriyama) +Files: src/Makefile + +Patch 8.0.0433 +Problem: Quite a few beeps when running tests. +Solution: Set 'belloff' for these tests. (Christian Brabandt) +Files: src/testdir/test103.in, src/testdir/test14.in, + src/testdir/test29.in, src/testdir/test30.in, + src/testdir/test32.in, src/testdir/test45.in, + src/testdir/test72.in, src/testdir/test73.in, + src/testdir/test77.in, src/testdir/test78.in, + src/testdir/test85.in, src/testdir/test94.in, + src/testdir/test_alot.vim, src/testdir/test_alot_utf8.vim, + src/testdir/test_close_count.in, src/testdir/test_cmdline.vim, + src/testdir/test_diffmode.vim, src/testdir/test_digraph.vim, + src/testdir/test_erasebackword.in, src/testdir/test_normal.vim, + src/testdir/test_packadd.vim, src/testdir/test_search.vim, + src/testdir/test_textobjects.vim, src/testdir/test_undo.vim, + src/testdir/test_usercommands.vim, src/testdir/test_visual.vim + +Patch 8.0.0434 +Problem: Clang version not correctly detected. +Solution: Adjust the configure script. (Kazunobu Kuriyama) +Files: src/configure.ac, src/auto/configure + +Patch 8.0.0435 +Problem: Some functions are not tested. +Solution: Add more tests for functions. (Dominique Pelle, closes #1541) +Files: src/testdir/test_functions.vim + +Patch 8.0.0436 +Problem: Running the options test sometimes resizes the terminal. +Solution: Clear out t_WS. +Files: src/testdir/gen_opt_test.vim + +Patch 8.0.0437 +Problem: The packadd test does not create the symlink correctly and does + not test the right thing. +Solution: Create the directory and symlink correctly. +Files: src/testdir/test_packadd.vim + +Patch 8.0.0438 +Problem: The fnamemodify test changes 'shell' in a way later tests may not + be able to use system(). +Solution: Save and restore 'shell'. +Files: src/testdir/test_fnamemodify.vim + +Patch 8.0.0439 +Problem: Using ":%argdel" while the argument list is already empty gives an + error. (Pavol Juhas) +Solution: Don't give an error. (closes #1546) +Files: src/ex_cmds2.c, src/testdir/test_arglist.vim + +Patch 8.0.0440 +Problem: Not enough test coverage in Insert mode. +Solution: Add lots of tests. Add test_override(). (Christian Brabandt, + closes #1521) +Files: runtime/doc/eval.txt, runtime/doc/usr_41.txt, src/edit.c, + src/evalfunc.c, src/globals.h, src/screen.c, + src/testdir/Make_all.mak, src/testdir/test_cursor_func.vim, + src/testdir/test_edit.vim, src/testdir/test_search.vim, + src/testdir/test_assert.vim, src/Makefile, src/testdir/runtest.vim + +Patch 8.0.0441 +Problem: Dead code in #ifdef. +Solution: Remove the #ifdef and #else part. +Files: src/option.c + +Patch 8.0.0442 +Problem: Patch shell command uses double quotes around the argument, which + allows for $HOME to be expanded. (Etienne) +Solution: Use single quotes on Unix. (closes #1543) +Files: src/diff.c, src/testdir/test_diffmode.vim + +Patch 8.0.0443 +Problem: Terminal width is set to 80 in test3. +Solution: Instead of setting 'columns' set 'wrapmargin' depending on + 'columns. +Files: src/testdir/test3.in + +Patch 8.0.0444 (after 8.0.0442) +Problem: Diffpatch fails when the file name has a quote. +Solution: Escape the name properly. (zetzei) +Files: src/diff.c, src/testdir/test_diffmode.vim + +Patch 8.0.0445 +Problem: Getpgid is not supported on all systems. +Solution: Add a configure check. +Files: src/configure.ac, src/auto/configure, src/config.h.in, + src/os_unix.c + +Patch 8.0.0446 +Problem: The ";" command does not work after characters with a lower byte + that is NUL. +Solution: Properly check for not having a previous character. (Hirohito + Higashi) +Files: src/Makefile, src/search.c, src/testdir/test_alot_utf8.vim, + src/testdir/test_charsearch_utf8.vim + +Patch 8.0.0447 +Problem: Getting font name does not work on X11. +Solution: Implement gui_mch_get_fontname() for X11. Add more GUI tests. + (Kazunobu Kuriyama) +Files: src/gui_x11.c, src/syntax.c, src/testdir/Make_dos.mak, + src/testdir/Make_ming.mak, src/testdir/Makefile, + src/testdir/gui_init.vim, src/testdir/gui_preinit.vim, + src/testdir/test_gui.vim, src/testdir/test_gui_init.vim, + Filelist + +Patch 8.0.0448 +Problem: Some macros are in lower case, which can be confusing. +Solution: Make a few lower case macros upper case. +Files: src/macros.h, src/buffer.c, src/charset.c, src/ops.c, src/diff.c, + src/edit.c, src/evalfunc.c, src/ex_cmds.c, src/ex_getln.c, + src/fileio.c, src/fold.c, src/gui.c, src/gui_beval.c, src/main.c, + src/mark.c, src/misc1.c, src/move.c, src/normal.c, + src/option.c, src/popupmnu.c, src/regexp.c, src/screen.c, + src/search.c, src/spell.c, src/tag.c, src/ui.c, src/undo.c, + src/version.c, src/workshop.c, src/if_perl.xs + +Patch 8.0.0449 (after 8.0.0448) +Problem: Part of fold patch accidentally included. +Solution: Revert that part of the patch. +Files: src/ex_cmds.c + +Patch 8.0.0450 +Problem: v:progpath is not reliably set. +Solution: Read /proc/self/exe if possible. (idea by Michal Grochmal) + Also fixes missing #if. +Files: src/main.c, src/config.h.in + +Patch 8.0.0451 +Problem: Some macros are in lower case. +Solution: Make a few more macros upper case. Avoid lower case macros use an + argument twice. +Files: src/macros.h, src/charset.c, src/misc2.c, src/proto/misc2.pro, + src/edit.c, src/eval.c, src/ex_cmds.c, src/ex_cmds2.c, + src/ex_docmd.c, src/ex_getln.c, src/fileio.c, src/fold.c, + src/gui.c, src/gui_gtk.c, src/mark.c, src/memline.c, src/mbyte.c, + src/menu.c, src/message.c, src/misc1.c, src/ops.c, src/option.c, + src/os_amiga.c, src/os_mswin.c, src/os_unix.c, src/os_win32.c, + src/popupmnu.c, src/regexp.c, src/regexp_nfa.c, src/screen.c, + src/search.c, src/spell.c, src/spellfile.c, src/syntax.c, + src/tag.c, src/ui.c, src/undo.c, src/window.c + +Patch 8.0.0452 +Problem: Some macros are in lower case. +Solution: Make a few more macros upper case. +Files: src/vim.h, src/macros.h, src/evalfunc.c, src/fold.c, + src/gui_gtk.c, src/gui_gtk_x11.c, src/charset.c, src/diff.c, + src/edit.c, src/eval.c, src/ex_cmds.c, src/ex_cmds2.c, + src/ex_docmd.c, src/ex_getln.c, src/fileio.c, src/getchar.c, + src/gui.c, src/gui_w32.c, src/if_cscope.c, src/mbyte.c, + src/menu.c, src/message.c, src/misc1.c, src/misc2.c, src/normal.c, + src/ops.c, src/option.c, src/os_unix.c, src/os_win32.c, + src/quickfix.c, src/regexp.c, src/regexp_nfa.c, src/screen.c, + src/search.c, src/spell.c, src/syntax.c, src/tag.c, src/userfunc.c + +Patch 8.0.0453 +Problem: Adding fold marker creates new comment. +Solution: Use an existing comment if possible. (LemonBoy, closes #1549) +Files: src/ops.c, src/proto/ops.pro, src/fold.c, + src/testdir/test_fold.vim + +Patch 8.0.0454 +Problem: Compiler warnings for comparing unsigned char with 256 always + being true. (Manuel Ortega) +Solution: Add type cast. +Files: src/screen.c, src/charset.c + +Patch 8.0.0455 +Problem: The mode test may hang in Test_mode(). (Michael Soyka) +Solution: Set 'complete' to only search the current buffer (as suggested by + Michael) +Files: src/testdir/test_functions.vim + +Patch 8.0.0456 +Problem: Typo in MinGW test makefile. +Solution: Change an underscore to a dot. (Michael Soyka) +Files: src/testdir/Make_ming.mak + +Patch 8.0.0457 +Problem: Using :move messes up manual folds. +Solution: Split adjusting marks and folds. Add foldMoveRange(). (neovim + patch #6221) +Files: src/ex_cmds.c, src/fold.c, src/mark.c, src/proto/fold.pro, + src/proto/mark.pro src/testdir/test_fold.vim + +Patch 8.0.0458 +Problem: Potential crash if adding list or dict to dict fails. +Solution: Make sure the reference count is correct. (Nikolai Pavlov, closes + #1555) +Files: src/dict.c + +Patch 8.0.0459 (after 8.0.0457) +Problem: Old fix for :move messing up folding no longer needed, now that we + have a proper solution. +Solution: Revert patch 7.4.700. (Christian Brabandt) +Files: src/ex_cmds.c + +Patch 8.0.0460 (after 8.0.0452) +Problem: Can't build on HPUX. +Solution: Fix argument names in vim_stat(). (John Marriott) +Files: src/misc2.c + +Patch 8.0.0461 (after 8.0.0457) +Problem: Test 45 hangs on MS-Windows. +Solution: Reset 'shiftwidth'. Also remove redundent function. +Files: src/fold.c, src/testdir/test45.in + +Patch 8.0.0462 +Problem: If an MS-Windows tests succeeds at first and then fails in a way + it does not produce a test.out file it looks like the test + succeeded. +Solution: Delete the previous output file. +Files: src/testdir/Make_dos.mak + +Patch 8.0.0463 +Problem: Resetting 'compatible' in defaults.vim has unexpected side + effects. (David Fishburn) +Solution: Only reset 'compatible' if it was set. +Files: runtime/defaults.vim + +Patch 8.0.0464 +Problem: Can't find executable name on Solaris and FreeBSD. +Solution: Check for "/proc/self/path/a.out". (Danek Duvall) And for + "/proc/curproc/file". +Files: src/config.h.in, src/configure.ac, src/main.c, + src/auto/configure + +Patch 8.0.0465 +Problem: Off-by-one error in using :move with folding. +Solution: Correct off-by-one mistakes and add more tests. (Matthew + Malcomson) +Files: src/fold.c, src/testdir/test_fold.vim + +Patch 8.0.0466 +Problem: There are still a few macros that should be all-caps. +Solution: Make a few more macros all-caps. +Files: src/buffer.c, src/edit.c, src/ex_cmds.c, src/ex_cmds2.c, + src/ex_docmd.c, src/ex_getln.c, src/farsi.c, src/fileio.c, + src/getchar.c, src/gui_beval.c, src/hardcopy.c, src/if_cscope.c, + src/if_xcmdsrv.c, src/mark.c, src/memline.c, src/menu.c, + src/message.c, src/misc1.c, src/normal.c, src/ops.c, src/option.c, + src/quickfix.c, src/screen.c, src/search.c, src/syntax.c, + src/tag.c, src/term.c, src/term.h, src/ui.c, src/undo.c, + src/userfunc.c, src/version.c, src/vim.h + +Patch 8.0.0467 +Problem: Using g< after :for does not show the right output. (Marcin + Szamotulski) +Solution: Call msg_sb_eol() in :echomsg. +Files: src/eval.c + +Patch 8.0.0468 +Problem: After aborting an Ex command g< does not work. (Marcin + Szamotulski) +Solution: Postpone clearing scrollback messages to until the command line + has been entered. Also fix that the screen isn't redrawn if after + g< the command line is cancelled. +Files: src/message.c, src/proto/message.pro, src/ex_getln.c, src/misc2.c, + src/gui.c + +Patch 8.0.0469 +Problem: Compiler warnings on MS-Windows. +Solution: Add type casts. (Christian Brabandt) +Files: src/fold.c + +Patch 8.0.0470 +Problem: Not enough testing for help commands. +Solution: Add a few more help tests. (Dominique Pelle, closes #1565) +Files: src/testdir/test_help.vim, src/testdir/test_help_tagjump.vim + +Patch 8.0.0471 +Problem: Exit callback test sometimes fails. +Solution: Add it to the list of flaky tests. +Files: src/testdir/runtest.vim + +Patch 8.0.0472 +Problem: When a test fails and test.log is created, Test_edit_CTRL_I + matches it instead of test1.in. +Solution: Match with runtest.vim instead. +Files: src/testdir/test_edit.vim + +Patch 8.0.0473 +Problem: No test covering arg_all(). +Solution: Add a test expanding ##. +Files: src/testdir/test_arglist.vim + +Patch 8.0.0474 +Problem: The client-server feature is not tested. +Solution: Add a test. +Files: src/Makefile, src/testdir/Make_all.mak, src/testdir/shared.vim, + src/testdir/test_clientserver.vim, src/os_mswin.c + +Patch 8.0.0475 +Problem: Not enough testing for the client-server feature. +Solution: Add more tests. Add the remote_startserver() function. Fix that + a locally evaluated expression uses function-local variables. +Files: src/if_xcmdsrv.c, src/evalfunc.c, src/os_mswin.c, + src/proto/main.pro, src/testdir/test_clientserver.vim, + runtime/doc/eval.txt + +Patch 8.0.0476 (after 8.0.0475) +Problem: Missing change to main.c. +Solution: Add new function. +Files: src/main.c + +Patch 8.0.0477 +Problem: The client-server test may hang when failing. +Solution: Set a timer. Add assert_report() +Files: src/testdir/test_clientserver.vim, src/testdir/runtest.vim, + src/eval.c, src/evalfunc.c, src/proto/eval.pro, src/if_xcmdsrv.c, + src/os_mswin.c, runtime/doc/eval.txt + +Patch 8.0.0478 +Problem: Tests use assert_true(0) and assert_false(1) to report errors. +Solution: Use assert_report(). +Files: src/testdir/test_cscope.vim, src/testdir/test_expr.vim, + src/testdir/test_perl.vim, src/testdir/test_channel.vim, + src/testdir/test_cursor_func.vim, src/testdir/test_gui.vim, + src/testdir/test_menu.vim, src/testdir/test_popup.vim, + src/testdir/test_viminfo.vim, src/testdir/test_vimscript.vim, + src/testdir/test_assert.vim + +Patch 8.0.0479 +Problem: remote_peek() is not tested. +Solution: Add a test. +Files: src/testdir/test_clientserver.vim, src/testdir/runtest.vim + +Patch 8.0.0480 +Problem: The remote_peek() test fails on MS-Windows. +Solution: Check for pending messages. Also report errors in the first run if + a flaky test fails twice. +Files: src/os_mswin.c, src/testdir/runtest.vim + +Patch 8.0.0481 +Problem: Unnecessary if statement. +Solution: Remove the statement. Fix "it's" vs "its" mistakes. (Dominique + Pelle, closes #1568) +Files: src/syntax.c + +Patch 8.0.0482 +Problem: The setbufvar() function may mess up the window layout. (Kay Z.) +Solution: Do not check the window to be valid if it is NULL. +Files: src/window.c, src/testdir/test_functions.vim + +Patch 8.0.0483 +Problem: Illegal memory access when using :all. (Dominique Pelle) +Solution: Adjust the cursor position right after setting "curwin". +Files: src/window.c, src/testdir/test_window_cmd.vim + +Patch 8.0.0484 +Problem: Using :lhelpgrep with an argument that should fail does not + produce an error if the previous :helpgrep worked. +Solution: Use another way to detect that autocommands made the quickfix info + invalid. (Yegappan Lakshmanan) +Files: src/quickfix.c, src/testdir/test_quickfix.vim + +Patch 8.0.0485 +Problem: Not all windows commands are tested. +Solution: Add more tests for windows commands. (Dominique Pelle, + closes #1575) Run test_autocmd separately, it interferes with + other tests. Fix tests that depended on side effects. +Files: src/testdir/test_window_cmd.vim, src/testdir/test_alot.vim, + src/testdir/test_autocmd.vim, src/testdir/test_fnamemodify.vim, + src/testdir/test_functions.vim, src/testdir/test_delete.vim, + src/testdir/Make_all.mak + +Patch 8.0.0486 +Problem: Crash and endless loop when closing windows in a SessionLoadPost + autocommand. +Solution: Check for valid tabpage. (partly neovim #6308) +Files: src/testdir/test_autocmd.vim, src/fileio.c, src/proto/window.pro, + src/window.c + +Patch 8.0.0487 +Problem: The autocmd test hangs on MS-Windows. +Solution: Skip the hanging tests for now. +Files: src/testdir/test_autocmd.vim + +Patch 8.0.0488 +Problem: Running tests leaves an "xxx" file behind. +Solution: Delete the 'verbosefile' after resetting the option. +Files: src/testdir/gen_opt_test.vim + +Patch 8.0.0489 +Problem: Clipboard and "* register is not tested. +Solution: Add a test for Mac and X11. (Kazunobu Kuriyama) +Files: src/Makefile, src/testdir/Make_all.mak, + src/testdir/test_quotestar.vim, src/testdir/runtest.vim + +Patch 8.0.0490 +Problem: Splitting a 'winfixwidth' window vertically makes it one column + smaller. (Dominique Pelle) +Solution: Add one to the width for the separator. +Files: src/window.c, src/testdir/test_window_cmd.vim + +Patch 8.0.0491 +Problem: The quotestar test fails when a required feature is missing. +Solution: Prepend "Skipped" to the thrown exception. +Files: src/testdir/test_quotestar.vim + +Patch 8.0.0492 +Problem: A failing client-server request can make Vim hang. +Solution: Add a timeout argument to functions that wait. +Files: src/evalfunc.c, src/if_xcmdsrv.c, src/proto/if_xcmdsrv.pro, + src/main.c, src/os_mswin.c, src/proto/os_mswin.pro, + src/vim.h, runtime/doc/eval.txt, src/testdir/test_clientserver.vim + +Patch 8.0.0493 +Problem: Crash with cd command with very long argument. +Solution: Check for running out of space. (Dominique pending, closes #1576) +Files: src/testdir/test_alot.vim, src/testdir/test_cd.vim, src/Makefile, + src/misc2.c + +Patch 8.0.0494 +Problem: Build failure with older compiler on MS-Windows. +Solution: Move declaration to start of block. +Files: src/evalfunc.c, src/main.c, src/os_mswin.c + +Patch 8.0.0495 +Problem: The quotestar test uses a timer instead of a timeout, thus it + cannot be rerun like a flaky test. +Solution: Remove the timer and add a timeout. (Kazunobu Kuriyama) +Files: src/testdir/test_quotestar.vim + +Patch 8.0.0496 +Problem: Insufficient testing for folding. +Solution: Add a couple more fold tests. (Dominique Pelle, closes #1579) +Files: src/testdir/test_fold.vim + +Patch 8.0.0497 +Problem: Arabic support is not fully tested. +Solution: Add more tests for the untested functions. Comment out + unreachable code. +Files: src/arabic.c, src/testdir/test_arabic.vim + +Patch 8.0.0498 +Problem: Two autocmd tests are skipped on MS-Windows. +Solution: Make the test pass on MS-Windows. Write the messages in a file + instead of getting the output of system(). +Files: src/testdir/test_autocmd.vim + +Patch 8.0.0499 +Problem: taglist() does not prioritize tags for a buffer. +Solution: Add an optional buffer argument. (Duncan McDougall, closes #1194) +Files: runtime/doc/eval.txt, src/evalfunc.c, src/proto/tag.pro, + src/Makefile, src/tag.c, src/testdir/test_alot.vim, + src/testdir/test_taglist.vim + +Patch 8.0.0500 +Problem: Quotestar test is still a bit flaky. +Solution: Add a slower check for v:version. +Files: src/testdir/test_quotestar.vim + +Patch 8.0.0501 +Problem: On MS-Windows ":!start" does not work as expected. +Solution: When creating a process fails try passing the argument to + ShellExecute(). (Katsuya Hino, closes #1570) +Files: runtime/doc/os_win32.txt, src/os_win32.c + +Patch 8.0.0502 +Problem: Coverity complains about possible NULL pointer. +Solution: Add an assert(), let's see if this works on all systems. +Files: src/window.c + +Patch 8.0.0503 +Problem: Endless loop in updating folds with 32 bit ints. +Solution: Subtract from LHS instead of add to the RHS. (Matthew Malcomson) +Files: src/fold.c + +Patch 8.0.0504 +Problem: Looking up an Ex command is a bit slow. +Solution: Instead of just using the first letter, also use the second letter + to skip ahead in the list of commands. Generate the table with a + Perl script. (Dominique Pelle, closes #1589) +Files: src/Makefile, src/create_cmdidxs.pl, src/ex_docmd.c, Filelist + +Patch 8.0.0505 +Problem: Failed window split for :stag not handled. (Coverity CID 99204) +Solution: If the split fails skip to the end. (bstaletic, closes #1577) +Files: src/tag.c + +Patch 8.0.0506 (after 8.0.0504) +Problem: Can't build with ANSI C. +Solution: Move declarations to start of block. +Files: src/ex_docmd.c + +Patch 8.0.0507 +Problem: Client-server tests fail when $DISPLAY is not set. +Solution: Check for E240 before running the test. +Files: src/testdir/test_quotestar.vim, src/testdir/test_clientserver.vim + +Patch 8.0.0508 +Problem: Coveralls no longer shows per-file coverage. +Solution: Add coverage from codecov.io. (Christian Brabandt) +Files: .travis.yml + +Patch 8.0.0509 +Problem: No link to codecov.io results. +Solution: Add a badge to the readme file. +Files: README.md + +Patch 8.0.0510 (after 8.0.0509) +Problem: Typo in link to codecov.io results. +Solution: Remove duplicate https:. +Files: README.md + +Patch 8.0.0511 +Problem: Menuage for skipping client-server tests is unclear. +Solution: Be more specific about what's missing (Hirohito Higashi, Kazunobu + Kuriyama) +Files: src/testdir/test_quotestar.vim, src/testdir/test_clientserver.vim + +Patch 8.0.0512 +Problem: Check for available characters takes too long. +Solution: Only check did_start_blocking if wtime is negative. (Daisuke + Suzuki, closes #1591) +Files: src/os_unix.c + +Patch 8.0.0513 (after 8.0.0201) +Problem: Getting name of cleared highlight group is wrong. (Matt Wozniski) +Solution: Only skip over cleared names for completion. (closes #1592) + Also fix that a cleared group causes duplicate completions. +Files: src/syntax.c, src/proto/syntax.pro, src/evalfunc.c, + src/ex_cmds.c, src/testdir/test_syntax.vim, + src/testdir/test_cmdline.vim + +Patch 8.0.0514 +Problem: Script for creating cmdidxs can be improved. +Solution: Count skipped lines instead of collecting the lines. Add "const". + (Dominique Pelle, closes #1594) +Files: src/create_cmdidxs.pl, src/ex_docmd.c + +Patch 8.0.0515 +Problem: ml_get errors in silent Ex mode. (Dominique Pelle) +Solution: Clear valid flags when setting the cursor. Set the topline when + not in full screen mode. +Files: src/ex_docmd.c, src/move.c, src/testdir/test_startup.vim + +Patch 8.0.0516 +Problem: A large count on a normal command causes trouble. (Dominique + Pelle) +Solution: Make "opcount" long. +Files: src/globals.h, src/testdir/test_normal.vim + +Patch 8.0.0517 +Problem: There is no way to remove quickfix lists (for testing). +Solution: Add the 'f' action to setqflist(). Add tests. (Yegappan + Lakshmanan) +Files: runtime/doc/eval.txt, src/evalfunc.c, src/quickfix.c, + src/testdir/test_quickfix.vim + +Patch 8.0.0518 +Problem: Storing a zero byte from a multi-byte character causes fold text + to show up wrong. +Solution: Avoid putting zero in ScreenLines. (Christian Brabandt, + closes #1567) +Files: src/screen.c, src/testdir/test_display.vim + +Patch 8.0.0519 +Problem: Character classes are not well tested. They can differ between + platforms. +Solution: Add tests. In the documentation make clear which classes depend + on what library function. Only use :cntrl: and :graph: for ASCII. + (Kazunobu Kuriyama, Dominique Pelle, closes #1560) + Update the documentation. +Files: src/regexp.c, src/regexp_nfa.c, runtime/doc/pattern.txt, + src/testdir/test_regexp_utf8.vim + +Patch 8.0.0520 +Problem: Using a function pointer instead of the actual function, which we + know. +Solution: Change mb_ functions to utf_ functions when already checked for + Unicode. (Dominique Pelle, closes #1582) +Files: src/message.c, src/misc2.c, src/regexp.c, src/regexp_nfa.c, + src/screen.c, src/spell.c + +Patch 8.0.0521 +Problem: GtkForm handling is outdated. +Solution: Get rid of event filter functions. Get rid of GtkForm.width and + .height. Eliminate gtk_widget_size_request() calls. (Kazunobu + Kuriyama) +Files: src/gui_gtk_f.c, src/gui_gtk_f.h + +Patch 8.0.0522 +Problem: MS-Windows: when 'clipboard' is "unnamed" yyp does not work in a + :global command. +Solution: When setting the clipboard was postponed, do not clear the + register. +Files: src/ops.c, src/proto/ui.pro, src/ui.c, src/globals.h, + src/testdir/test_global.vim, src/Makefile, + src/testdir/test_alot.vim + +Patch 8.0.0523 +Problem: dv} deletes part of a multi-byte character. (Urtica Dioica) +Solution: Include the whole character. +Files: src/search.c, src/testdir/test_normal.vim + +Patch 8.0.0524 (after 8.0.0518) +Problem: Folds are messed up when 'encodin' is "utf-8". +Solution: Also set the fold character when it's not multi-byte. +Files: src/screen.c, src/testdir/test_display.vim + +Patch 8.0.0525 +Solution: Completion for user command argument not tested. +Problem: Add a test. +Files: src/testdir/test_cmdline.vim + +Patch 8.0.0526 +Problem: Coverity complains about possible negative value. +Solution: Check return value of ftell() not to be negative. +Files: src/os_unix.c + +Patch 8.0.0527 +Problem: RISC OS support was removed long ago, but one file is still + included. +Solution: Delete the file. (Thomas Dziedzic, closes #1603) +Files: Filelist, src/swis.s + +Patch 8.0.0528 +Problem: When 'wildmenu' is set and 'wildmode' has "longest" then the first + file name is highlighted, even though the text shows the longest + match. +Solution: Do not highlight the first match. (LemonBoy, closes #1602) +Files: src/ex_getln.c + +Patch 8.0.0529 +Problem: Line in test commented out. +Solution: Uncomment the lines for character classes that were failing before + 8.0.0519. (Dominique Pelle, closes #1599) +Files: src/testdir/test_regexp_utf8.vim + +Patch 8.0.0530 +Problem: Buffer overflow when 'columns' is very big. (Nikolai Pavlov) +Solution: Correctly compute where to truncate. Fix translation. + (closes #1600) +Files: src/edit.c, src/testdir/test_edit.vim + +Patch 8.0.0531 (after 8.0.0530) +Problem: Test with long directory name fails on non-unix systems. +Solution: Skip the test on non-unix systems. +Files: src/testdir/test_edit.vim + +Patch 8.0.0532 (after 8.0.0531) +Problem: Test with long directory name fails on Mac. +Solution: Skip the test on Mac systems. +Files: src/testdir/test_edit.vim + +Patch 8.0.0533 +Problem: Abbreviation doesn't work after backspacing newline. (Hkonrk) +Solution: Set the insert start column. (closes #1609) +Files: src/testdir/test_mapping.vim, src/edit.c + +Patch 8.0.0534 +Problem: Defaults.vim does not work well with tiny features. (crd477) +Solution: When the +eval feature is not available always reset 'compatible'. +Files: runtime/defaults.vim + +Patch 8.0.0535 +Problem: Memory leak when exiting from within a user function. +Solution: Clear the function call stack on exit. +Files: src/userfunc.c + +Patch 8.0.0536 +Problem: Quickfix window not updated when freeing quickfix stack. +Solution: Update the quickfix window. (Yegappan Lakshmanan) +Files: src/quickfix.c, src/testdir/test_quickfix.vim + +Patch 8.0.0537 +Problem: Illegal memory access with :z and large count. +Solution: Check for number overflow, using long instead of int. (Dominique + Pelle, closes #1612) +Files: src/Makefile, src/ex_cmds.c, src/testdir/test_alot.vim, + src/testdir/test_ex_z.vim + +Patch 8.0.0538 +Problem: No test for falling back to default term value. +Solution: Add a test. +Files: src/testdir/test_startup.vim + +Patch 8.0.0539 (after 8.0.0538) +Problem: Startup test fails on Mac. +Solution: Use another term name, "unknown" is known. Avoid a 2 second delay. +Files: src/testdir/test_startup.vim, src/main.c, src/proto/main.pro, + src/term.c + +Patch 8.0.0540 (after 8.0.0540) +Problem: Building unit tests fails. +Solution: Move params outside of #ifdef. +Files: src/main.c, src/message_test.c + +Patch 8.0.0541 +Problem: Compiler warning on MS-Windows. +Solution: Add a type cast. (Mike Williams) +Files: src/edit.c + +Patch 8.0.0542 +Problem: getpos() can return a negative line number. (haya14busa) +Solution: Handle a zero topline and botline. (closes #1613) +Files: src/eval.c, runtime/doc/eval.txt + +Patch 8.0.0543 +Problem: Test_edit causes older xfce4-terminal to close. (Dominique Pelle) +Solution: Reduce number of columns to 2000. Try to restore the window + position. +Files: src/testdir/test_edit.vim, src/evalfunc.c, src/term.c, + src/proto/term.pro, src/term.h + +Patch 8.0.0544 +Problem: Cppcheck warnings. +Solution: Use temp variable. Change NUL to NULL. Swap conditions. (Dominique + Pelle) +Files: src/channel.c, src/edit.c, src/farsi.c + +Patch 8.0.0545 +Problem: Edit test may fail on some systems. +Solution: If creating a directory with a very long path fails, bail out. +Files: src/testdir/test_edit.vim + +Patch 8.0.0546 +Problem: Swap file exists briefly when opening the command window. +Solution: Set the noswapfile command modifier before splitting the window. + (James McCoy, closes #1620) +Files: src/ex_getln.c, src/option.c + +Patch 8.0.0547 +Problem: Extra line break in verbosefile when using ":echomsg". (Ingo + Karkat) +Solution: Don't call msg_start(). (closes #1618) +Files: src/eval.c, src/testdir/test_cmdline.vim + +Patch 8.0.0548 +Problem: Saving the redo buffer only works one time, resulting in the "." + command not working well for a function call inside another + function call. (Ingo Karkat) +Solution: Save the redo buffer at every user function call. (closes #1619) +Files: src/getchar.c, src/proto/getchar.pro, src/structs.h, + src/fileio.c, src/userfunc.c, src/testdir/test_functions.vim + +Patch 8.0.0549 +Problem: No test for the 8g8 command. +Solution: Add a test. (Dominique Pelle, closes #1615) +Files: src/testdir/test_normal.vim + +Patch 8.0.0550 +Problem: Some etags format tags file use 0x01, breaking the parsing. +Solution: Use 0x02 for TAG_SEP. (James McCoy, closes #1614) +Files: src/tag.c, src/testdir/test_taglist.vim + +Patch 8.0.0551 +Problem: The typeahead buffer is reallocated too often. +Solution: Re-use the existing buffer if possible. +Files: src/getchar.c + +Patch 8.0.0552 +Problem: Toupper and tolower don't work properly for Turkish when 'casemap' + is empty. (Bjorn Linse) +Solution: Check the 'casemap' options when deciding how to upper/lower case. +Files: src/charset.c, src/testdir/test_normal.vim + +Patch 8.0.0553 (after 8.0.0552) +Problem: Toupper/tolower test with Turkish locale fails on Mac. +Solution: Skip the test on Mac. +Files: src/testdir/test_normal.vim + +Patch 8.0.0554 (after 8.0.0552) +Problem: Toupper and tolower don't work properly for Turkish when 'casemap' + contains "keepascii". (Bjorn Linse) +Solution: When 'casemap' contains "keepascii" use ASCII toupper/tolower. +Files: src/charset.c, src/testdir/test_normal.vim + +Patch 8.0.0555 (after 8.0.0552) +Problem: Toupper/tolower test fails on OSX without Darwin. +Solution: Skip that part of the test also for OSX. (Kazunobu Kuriyama) +Files: src/testdir/test_normal.vim + +Patch 8.0.0556 +Problem: Getting the window position fails if both the GUI and term + code is built in. +Solution: Return after getting the GUI window position. (Kazunobu Kuriyama) +Files: src/evalfunc.c + +Patch 8.0.0557 +Problem: GTK: using static gravities is not useful. +Solution: Remove setting static gravities. (Kazunobu Kuriyama) +Files: src/gui_gtk_f.c + +Patch 8.0.0558 +Problem: The :ownsyntax command is not tested. +Solution: Add a test. (Dominique Pelle, closes #1622) +Files: src/testdir/test_syntax.vim + +Patch 8.0.0559 +Problem: Setting ttytype to xxx does not always fail as expected. (Marvin + Schmidt) +Solution: Catch both possible errors. (closes #1601) +Files: src/testdir/test_options.vim + +Patch 8.0.0560 +Problem: :windo allows for ! but it's not supported. +Solution: Disallow passing !. (Hirohito Higashi) +Files: src/ex_cmds.h + +Patch 8.0.0561 +Problem: Undefined behavior when using backslash after empty line. +Solution: Check for an empty line. (Dominique Pelle, closes #1631) +Files: src/misc2.c, src/testdir/test_vimscript.vim + +Patch 8.0.0562 +Problem: Not enough test coverage for syntax commands. +Solution: Add a few more tests. (Dominique Pelle, closes #1624) +Files: src/testdir/test_cmdline.vim, src/testdir/test_syntax.vim + +Patch 8.0.0563 +Problem: Crash when getting the window position in tmux. (Marvin Schmidt) +Solution: Add t_GP to the list of terminal options. (closes #1627) +Files: src/option.c + +Patch 8.0.0564 +Problem: Cannot detect Bazel BUILD files on some systems. +Solution: Check for BUILD after script checks. (Issue #1340) +Files: runtime/filetype.vim + +Patch 8.0.0565 +Problem: Using freed memory in :caddbuf after clearing quickfix list. + (Dominique Pelle) +Solution: Set qf_last to NULL. +Files: src/quickfix.c + +Patch 8.0.0566 +Problem: Setting nocompatible for the tiny version moves the cursor. +Solution: Use another trick to skip commands when the +eval feature is + present. (Christian Brabandt, closes #1630) +Files: runtime/defaults.vim + +Patch 8.0.0567 +Problem: Call for requesting color and ambiwidth is too early. (Hirohito + Higashi) +Solution: Move the call down to below resetting "starting". +Files: src/main.c + +Patch 8.0.0568 +Problem: "1gd" may hang. +Solution: Don't get stuck in one position. (Christian Brabandt, closes #1643) +Files: src/testdir/test_goto.vim, src/normal.c + +Patch 8.0.0569 +Problem: Bracketed paste is still enabled when executing a shell command. + (Michael Smith) +Solution: Disable brackted paste when going into cooked mode. (closes #1638) +Files: src/term.c + +Patch 8.0.0570 +Problem: Can't run make with several jobs, creating directories has a race + condition. +Solution: Use the MKDIR_P autoconf mechanism. (Eric N. Vander Weele, + closes #1639) +Files: src/configure.ac, src/auto/configure, src/Makefile, + src/config.mk.in, src/install-sh, src/mkinstalldirs, Filelist + +Patch 8.0.0571 +Problem: The cursor line number becomes negative when using :z^ in an empty + buffer. (neovim #6557) +Solution: Correct the line number. Also reset the column. +Files: src/testdir/test_ex_z.vim, src/ex_cmds.c + +Patch 8.0.0572 +Problem: Building the command table requires Perl. +Solution: Use a Vim script solution. (Dominique Pelle, closes #1641) +Files: src/Makefile, src/create_cmdidxs.pl, src/create_cmdidxs.vim, + src/ex_cmdidxs.h, src/ex_docmd.c, Filelist + +Patch 8.0.0573 +Problem: Running parallel make after distclean fails. (Manuel Ortega) +Solution: Instead of using targets "scratch config myself" use "reconfig". +Files: src/Makefile, src/config.mk.dist + +Patch 8.0.0574 +Problem: Get only one quickfix list after :caddbuf. +Solution: Reset qf_multiline. (Yegappan Lakshmanan) +Files: src/quickfix.c, src/testdir/test_quickfix.vim + +Patch 8.0.0575 +Problem: Using freed memory when resetting 'indentexpr' while evaluating + it. (Dominique Pelle) +Solution: Make a copy of 'indentexpr'. +Files: src/misc1.c, src/testdir/test_options.vim + +Patch 8.0.0576 (after 8.0.0570 and 8.0.0573) +Problem: Can't build when configure choses "install-sh". (Daniel Hahler) +Solution: Always use install-sh. Fix remaining use of mkinstalldirs. + (closes #1647) +Files: src/installman.sh, src/installml.sh, src/config.mk.in, + src/configure.ac, src/auto/configure, src/Makefile + +Patch 8.0.0577 (after 8.0.0575) +Problem: Warning for uninitialized variable. (John Marriott) +Solution: Initialize "indent". +Files: src/misc1.c + +Patch 8.0.0578 +Problem: :simalt on MS-Windows does not work properly. +Solution: Put something in the typeahead buffer. (Christian Brabandt) +Files: src/gui_w32.c + +Patch 8.0.0579 +Problem: Duplicate test case for quickfix. +Solution: Remove the function. (Yegappan Lakshmanan) +Files: src/testdir/test_quickfix.vim + +Patch 8.0.0580 +Problem: Cannot set the valid flag with setqflist(). +Solution: Add the "valid" argument. (Yegappan Lakshmanan, closes #1642) +Files: runtime/doc/eval.txt, src/quickfix.c, + src/testdir/test_quickfix.vim + +Patch 8.0.0581 +Problem: Moving folded text is sometimes not correct. +Solution: Bail out when "move_end" is zero. (Matthew Malcomson) +Files: src/fold.c, src/testdir/test_fold.vim + +Patch 8.0.0582 +Problem: Illegal memory access with z= command. (Dominique Pelle) +Solution: Avoid case folded text to be longer than the original text. Use + MB_PTR2LEN() instead of MB_BYTE2LEN(). +Files: src/spell.c, src/testdir/test_spell.vim + +Patch 8.0.0583 +Problem: Fold test hangs on MS-Windows. +Solution: Avoid overflow in compare. +Files: src/fold.c + +Patch 8.0.0584 +Problem: Memory leak when executing quickfix tests. +Solution: Free the list reference. (Yegappan Lakshmanan) +Files: src/quickfix.c + +Patch 8.0.0585 +Problem: Test_options fails when run in the GUI. +Solution: Also check the 'imactivatekey' value when the GUI is not running. + Specify test values that work and that fail. +Files: src/option.c, src/testdir/gen_opt_test.vim + +Patch 8.0.0586 +Problem: No test for mapping timing out. +Solution: Add a test. +Files: src/testdir/test_mapping.vim + vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt index 3c695e6..fac7381 100644 --- a/runtime/doc/windows.txt +++ b/runtime/doc/windows.txt @@ -1,4 +1,4 @@ -*windows.txt* For Vim version 8.0. Last change: 2016 Oct 21 +*windows.txt* For Vim version 8.0. Last change: 2016 Dec 01 VIM REFERENCE MANUAL by Bram Moolenaar @@ -696,6 +696,8 @@ can also get to them with the buffer list commands, like ":bnext". - If the file is not open in a window edit the file in the current window. If the current buffer can't be |abandon|ed, the window is split first. + - Windows that are not in the argument list or are not full + width will be closed if possible. The |argument-list| is set, like with the |:next| command. The purpose of this command is that it can be used from a program that wants Vim to edit another file, e.g., a debugger. diff --git a/runtime/filetype.vim b/runtime/filetype.vim index df8f7fd..3871165 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: Bram Moolenaar -" Last Change: 2016 Oct 31 +" Last Change: 2017 Apr 20 " Listen very carefully, I will say this only once if exists("did_load_filetypes") @@ -288,7 +288,8 @@ au BufNewFile,BufRead *.bib setf bib au BufNewFile,BufRead *.bst setf bst " BIND configuration -au BufNewFile,BufRead named.conf,rndc.conf setf named +" sudoedit uses namedXXXX.conf +au BufNewFile,BufRead named*.conf,rndc*.conf setf named " BIND zone au BufNewFile,BufRead named.root setf bindzone @@ -309,7 +310,11 @@ au BufNewFile,BufRead *.bl setf blank au BufNewFile,BufRead */etc/blkid.tab,*/etc/blkid.tab.old setf xml " Bazel (http://bazel.io) -autocmd BufRead,BufNewFile *.bzl,BUILD,WORKSPACE setfiletype bzl +autocmd BufRead,BufNewFile *.bzl,WORKSPACE setf bzl +if has("fname_case") + " There is another check for BUILD further below. + autocmd BufRead,BufNewFile BUILD setf bzl +endif " C or lpc au BufNewFile,BufRead *.c call s:FTlpc() @@ -673,8 +678,14 @@ au BufNewFile,BufRead *.dtd setf dtd " DTS/DSTI (device tree files) au BufNewFile,BufRead *.dts,*.dtsi setf dts -" EDIF (*.edf,*.edif,*.edn,*.edo) -au BufNewFile,BufRead *.ed\(f\|if\|n\|o\) setf edif +" EDIF (*.edf,*.edif,*.edn,*.edo) or edn +au BufNewFile,BufRead *.ed\(f\|if\|o\) setf edif +au BufNewFile,BufRead *.edn + \ if getline(1) =~ '^\s*(\s*edif\>' | + \ setf edif | + \ else | + \ setf clojure | + \ endif " EditorConfig (close enough to dosini) au BufNewFile,BufRead .editorconfig setf dosini @@ -1357,6 +1368,9 @@ endfunc " Not Quite C au BufNewFile,BufRead *.nqc setf nqc +" NSE - Nmap Script Engine - uses Lua syntax +au BufNewFile,BufRead *.nse setf lua + " NSIS au BufNewFile,BufRead *.nsi,*.nsh setf nsis @@ -2119,7 +2133,10 @@ au BufNewFile,BufRead ssh_config,*/.ssh/config setf sshconfig au BufNewFile,BufRead sshd_config setf sshdconfig " Stata -au BufNewFile,BufRead *.ado,*.class,*.do,*.imata,*.mata setf stata +au BufNewFile,BufRead *.ado,*.do,*.imata,*.mata setf stata +" Also *.class, but not when it's a Java bytecode file +au BufNewFile,BufRead *.class + \ if getline(1) !~ "^\xca\xfe\xba\xbe" | setf stata | endif " SMCL au BufNewFile,BufRead *.hlp,*.ihlp,*.smcl setf smcl @@ -2271,6 +2288,9 @@ au BufNewFile,BufRead .tidyrc,tidyrc setf tidy " TF mud client au BufNewFile,BufRead *.tf,.tfrc,tfrc setf tf +" tmux configuration +au BufNewFile,BufRead {.,}tmux*.conf setf tmux + " TPP - Text Presentation Program au BufNewFile,BufReadPost *.tpp setf tpp @@ -2586,6 +2606,11 @@ au BufNewFile,BufRead *asterisk*/*voicemail.conf* call s:StarSetf('asteriskvm') " Bazaar version control au BufNewFile,BufRead bzr_log.* setf bzr +" Bazel build file +if !has("fname_case") + au BufNewFile,BufRead BUILD setf bzl +endif + " BIND zone au BufNewFile,BufRead */named/db.*,*/bind/db.* call s:StarSetf('bindzone') diff --git a/runtime/ftplugin/a2ps.vim b/runtime/ftplugin/a2ps.vim index 6653351..0e24e30 100644 --- a/runtime/ftplugin/a2ps.vim +++ b/runtime/ftplugin/a2ps.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: a2ps(1) configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: a2ps(1) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/alsaconf.vim b/runtime/ftplugin/alsaconf.vim index 5d763c8..6d9d80a 100644 --- a/runtime/ftplugin/alsaconf.vim +++ b/runtime/ftplugin/alsaconf.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: alsaconf(8) configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: alsaconf(8) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/arch.vim b/runtime/ftplugin/arch.vim index 71d831e..1c697b8 100644 --- a/runtime/ftplugin/arch.vim +++ b/runtime/ftplugin/arch.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: GNU Arch inventory file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: GNU Arch inventory file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/automake.vim b/runtime/ftplugin/automake.vim index 20b06af..9f981a7 100644 --- a/runtime/ftplugin/automake.vim +++ b/runtime/ftplugin/automake.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: Automake -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: Automake +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/awk.vim b/runtime/ftplugin/awk.vim new file mode 100644 index 0000000..dcefc85 --- /dev/null +++ b/runtime/ftplugin/awk.vim @@ -0,0 +1,18 @@ +" Vim filetype plugin +" Language: awk, nawk, gawk, mawk +" Maintainer: Antonio Colombo +" Last Change: 2017 Feb 17 + +" This plugin was prepared by Mark Sikora + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif + +" Don't load another plugin for this buffer +let b:did_ftplugin = 1 + +let b:undo_ftplugin = "setl commentstring<" + +setlocal commentstring=#\ %s diff --git a/runtime/ftplugin/bdf.vim b/runtime/ftplugin/bdf.vim index 120c5df..85b7b40 100644 --- a/runtime/ftplugin/bdf.vim +++ b/runtime/ftplugin/bdf.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: BDF font definition -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: BDF font definition +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/calendar.vim b/runtime/ftplugin/calendar.vim index 6f117e3..f454ba1 100644 --- a/runtime/ftplugin/calendar.vim +++ b/runtime/ftplugin/calendar.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: calendar(1) input file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: calendar(1) input file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/cdrdaoconf.vim b/runtime/ftplugin/cdrdaoconf.vim index 557fd82..563bb8f 100644 --- a/runtime/ftplugin/cdrdaoconf.vim +++ b/runtime/ftplugin/cdrdaoconf.vim @@ -1,6 +1,6 @@ " Vim filetype plugin file -" Maintainer: Nikolai Weibull -" Latest Revision: 2007-12-04 +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2007-12-04 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/conf.vim b/runtime/ftplugin/conf.vim index 1b110e4..ff2add1 100644 --- a/runtime/ftplugin/conf.vim +++ b/runtime/ftplugin/conf.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: generic configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: generic configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/crm.vim b/runtime/ftplugin/crm.vim index e86e683..06baee8 100644 --- a/runtime/ftplugin/crm.vim +++ b/runtime/ftplugin/crm.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: CRM114 -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: CRM114 +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/css.vim b/runtime/ftplugin/css.vim index 43d1edf..ea44244 100644 --- a/runtime/ftplugin/css.vim +++ b/runtime/ftplugin/css.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: CSS -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: CSS +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/cvsrc.vim b/runtime/ftplugin/cvsrc.vim index c410530..34b1484 100644 --- a/runtime/ftplugin/cvsrc.vim +++ b/runtime/ftplugin/cvsrc.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: cvs(1) RC file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: cvs(1) RC file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/denyhosts.vim b/runtime/ftplugin/denyhosts.vim index 557fd82..563bb8f 100644 --- a/runtime/ftplugin/denyhosts.vim +++ b/runtime/ftplugin/denyhosts.vim @@ -1,6 +1,6 @@ " Vim filetype plugin file -" Maintainer: Nikolai Weibull -" Latest Revision: 2007-12-04 +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2007-12-04 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/dictconf.vim b/runtime/ftplugin/dictconf.vim index 659046c..71a2b67 100644 --- a/runtime/ftplugin/dictconf.vim +++ b/runtime/ftplugin/dictconf.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: dict(1) configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: dict(1) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/dictdconf.vim b/runtime/ftplugin/dictdconf.vim index ee738c5..0ee4c9d 100644 --- a/runtime/ftplugin/dictdconf.vim +++ b/runtime/ftplugin/dictdconf.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: dictd(8) configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: dictd(8) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/dircolors.vim b/runtime/ftplugin/dircolors.vim index 3b3d046..d07d1e3 100644 --- a/runtime/ftplugin/dircolors.vim +++ b/runtime/ftplugin/dircolors.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: dircolors(1) input file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: dircolors(1) input file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/dosini.vim b/runtime/ftplugin/dosini.vim index 461403c..0d0f0f8 100644 --- a/runtime/ftplugin/dosini.vim +++ b/runtime/ftplugin/dosini.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: Configuration File (ini file) for MSDOS/MS Windows -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: Configuration File (ini file) for MSDOS/MS Windows +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/elinks.vim b/runtime/ftplugin/elinks.vim index 7d92575..921f9c2 100644 --- a/runtime/ftplugin/elinks.vim +++ b/runtime/ftplugin/elinks.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: elinks(1) configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: elinks(1) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/eterm.vim b/runtime/ftplugin/eterm.vim index e072c63..e2f88ef 100644 --- a/runtime/ftplugin/eterm.vim +++ b/runtime/ftplugin/eterm.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: eterm(1) configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: eterm(1) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/fetchmail.vim b/runtime/ftplugin/fetchmail.vim index a0d4650..33bb417 100644 --- a/runtime/ftplugin/fetchmail.vim +++ b/runtime/ftplugin/fetchmail.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: fetchmail(1) RC File -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: fetchmail(1) RC File +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/framescript.vim b/runtime/ftplugin/framescript.vim index 805401a..48fe0ac 100644 --- a/runtime/ftplugin/framescript.vim +++ b/runtime/ftplugin/framescript.vim @@ -1,7 +1,7 @@ " Vim ftplugin file -" Language: FrameScript -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-19 +" Language: FrameScript +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-19 let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/ftplugin/gpg.vim b/runtime/ftplugin/gpg.vim index 5caa1f6..3f890e5 100644 --- a/runtime/ftplugin/gpg.vim +++ b/runtime/ftplugin/gpg.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: gpg(1) configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: gpg(1) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/group.vim b/runtime/ftplugin/group.vim index eef3cd6..e6b76ba 100644 --- a/runtime/ftplugin/group.vim +++ b/runtime/ftplugin/group.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: group(5) user group file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: group(5) user group file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/grub.vim b/runtime/ftplugin/grub.vim index 21c4e36..cd6e113 100644 --- a/runtime/ftplugin/grub.vim +++ b/runtime/ftplugin/grub.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: grub(8) configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: grub(8) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/hamster.vim b/runtime/ftplugin/hamster.vim index c23adc4..6c0630f 100644 --- a/runtime/ftplugin/hamster.vim +++ b/runtime/ftplugin/hamster.vim @@ -1,8 +1,8 @@ " Vim filetype plugin " Language: Hamster Script " Version: 2.0.6.0 -" Maintainer: David Fishburn -" Last Change: Wed Nov 08 2006 12:03:09 PM +" Maintainer: David Fishburn +" Last Change: 2017 Mar 18 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -13,7 +13,7 @@ endif let b:did_ftplugin = 1 let s:cpo_save = &cpo -set cpo-=C +set cpo&vim let b:undo_ftplugin = "setl fo< com< tw< commentstring<" \ . "| unlet! b:match_ignorecase b:match_words b:match_skip" diff --git a/runtime/ftplugin/haskell.vim b/runtime/ftplugin/haskell.vim index 144f9f6..de77bdf 100644 --- a/runtime/ftplugin/haskell.vim +++ b/runtime/ftplugin/haskell.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: Haskell -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: Haskell +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/help.vim b/runtime/ftplugin/help.vim index a0a0f29..9eb7214 100644 --- a/runtime/ftplugin/help.vim +++ b/runtime/ftplugin/help.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: Vim help file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: Vim help file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/hostconf.vim b/runtime/ftplugin/hostconf.vim index 557fd82..563bb8f 100644 --- a/runtime/ftplugin/hostconf.vim +++ b/runtime/ftplugin/hostconf.vim @@ -1,6 +1,6 @@ " Vim filetype plugin file -" Maintainer: Nikolai Weibull -" Latest Revision: 2007-12-04 +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2007-12-04 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/hostsaccess.vim b/runtime/ftplugin/hostsaccess.vim index a2f55ac..d32485f 100644 --- a/runtime/ftplugin/hostsaccess.vim +++ b/runtime/ftplugin/hostsaccess.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: hosts_access(5) control file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: hosts_access(5) control file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/indent.vim b/runtime/ftplugin/indent.vim index 0e195b0..e6d928a 100644 --- a/runtime/ftplugin/indent.vim +++ b/runtime/ftplugin/indent.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: indent(1) configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: indent(1) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/ld.vim b/runtime/ftplugin/ld.vim index 31ce5c9..1ab80d5 100644 --- a/runtime/ftplugin/ld.vim +++ b/runtime/ftplugin/ld.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: ld(1) script -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: ld(1) script +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/lftp.vim b/runtime/ftplugin/lftp.vim index 9e2eeb5..5bc496c 100644 --- a/runtime/ftplugin/lftp.vim +++ b/runtime/ftplugin/lftp.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: lftp(1) configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: lftp(1) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/libao.vim b/runtime/ftplugin/libao.vim index 38bd3de..0ce5831 100644 --- a/runtime/ftplugin/libao.vim +++ b/runtime/ftplugin/libao.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: libao.conf(5) configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: libao.conf(5) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/limits.vim b/runtime/ftplugin/limits.vim index cd5b7b5..90a10a6 100644 --- a/runtime/ftplugin/limits.vim +++ b/runtime/ftplugin/limits.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: limits(5) configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: limits(5) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/loginaccess.vim b/runtime/ftplugin/loginaccess.vim index 7c44f97..d27114a 100644 --- a/runtime/ftplugin/loginaccess.vim +++ b/runtime/ftplugin/loginaccess.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: login.access(5) configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: login.access(5) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/logindefs.vim b/runtime/ftplugin/logindefs.vim index 668d08a..7873396 100644 --- a/runtime/ftplugin/logindefs.vim +++ b/runtime/ftplugin/logindefs.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: login.defs(5) configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: login.defs(5) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/m4.vim b/runtime/ftplugin/m4.vim index 0ffe0ac..3745507 100644 --- a/runtime/ftplugin/m4.vim +++ b/runtime/ftplugin/m4.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: m4 -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: m4 +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/mailaliases.vim b/runtime/ftplugin/mailaliases.vim index 1b10c86..0ae4b45 100644 --- a/runtime/ftplugin/mailaliases.vim +++ b/runtime/ftplugin/mailaliases.vim @@ -1,6 +1,6 @@ " Vim filetype plugin file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/mailcap.vim b/runtime/ftplugin/mailcap.vim index f4c8c23..ba8573c 100644 --- a/runtime/ftplugin/mailcap.vim +++ b/runtime/ftplugin/mailcap.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: Mailcap configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: Mailcap configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/man.vim b/runtime/ftplugin/man.vim index 6939493..c7fc3bb 100644 --- a/runtime/ftplugin/man.vim +++ b/runtime/ftplugin/man.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: man " Maintainer: SungHyun Nam -" Last Change: 2016 Jun 20 +" Last Change: 2017 Jan 18 " To make the ":Man" command available before editing a manual page, source " this script from your startup vimrc file. @@ -47,6 +47,7 @@ endif if exists(":Man") != 2 com -nargs=+ Man call s:GetPage() nmap K :call PreGetPage(0) + nmap ManPreGetPage :call PreGetPage(0) endif " Define functions only once. @@ -96,7 +97,7 @@ func GetCmdArg(sect, page) endfunc func FindPage(sect, page) - let where = system("/usr/bin/man ".s:man_find_arg.' '.s:GetCmdArg(a:sect, a:page)) + let where = system("man ".s:man_find_arg.' '.s:GetCmdArg(a:sect, a:page)) if where !~ "^/" if matchstr(where, " [^ ]*$") !~ "^ /" return 0 @@ -175,7 +176,7 @@ func GetPage(...) let $MANWIDTH = winwidth(0) let unsetwidth = 1 endif - silent exec "r!/usr/bin/man ".s:GetCmdArg(sect, page)." | col -b" + silent exec "r !man ".s:GetCmdArg(sect, page)." | col -b" if unsetwidth let $MANWIDTH = '' endif diff --git a/runtime/ftplugin/manconf.vim b/runtime/ftplugin/manconf.vim index a249a97..aa85408 100644 --- a/runtime/ftplugin/manconf.vim +++ b/runtime/ftplugin/manconf.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: man.conf(5) - man configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: man.conf(5) - man configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/modconf.vim b/runtime/ftplugin/modconf.vim index f200e9f..c8e76b5 100644 --- a/runtime/ftplugin/modconf.vim +++ b/runtime/ftplugin/modconf.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: modules.conf(5) configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: modules.conf(5) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/mplayerconf.vim b/runtime/ftplugin/mplayerconf.vim index 65034a8..8654760 100644 --- a/runtime/ftplugin/mplayerconf.vim +++ b/runtime/ftplugin/mplayerconf.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: mplayer(1) configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: mplayer(1) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/muttrc.vim b/runtime/ftplugin/muttrc.vim index a109e5d..c8ad0f2 100644 --- a/runtime/ftplugin/muttrc.vim +++ b/runtime/ftplugin/muttrc.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: mutt RC File -" Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Language: mutt RC File +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2006-04-19 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/nanorc.vim b/runtime/ftplugin/nanorc.vim index be20d12..e45ebac 100644 --- a/runtime/ftplugin/nanorc.vim +++ b/runtime/ftplugin/nanorc.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: nanorc(5) - GNU nano configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: nanorc(5) - GNU nano configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/netrc.vim b/runtime/ftplugin/netrc.vim index 105a1d3..02ee327 100644 --- a/runtime/ftplugin/netrc.vim +++ b/runtime/ftplugin/netrc.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: netrc(5) configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: netrc(5) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/nsis.vim b/runtime/ftplugin/nsis.vim index acc2620..949691b 100644 --- a/runtime/ftplugin/nsis.vim +++ b/runtime/ftplugin/nsis.vim @@ -1,7 +1,7 @@ " Vim ftplugin file -" Language: NSIS script -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: NSIS script +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 let s:cpo_save = &cpo set cpo&vim diff --git a/runtime/ftplugin/pamconf.vim b/runtime/ftplugin/pamconf.vim index 96d9646..f0a693e 100644 --- a/runtime/ftplugin/pamconf.vim +++ b/runtime/ftplugin/pamconf.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: pam(8) configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: pam(8) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/passwd.vim b/runtime/ftplugin/passwd.vim index 5088c43..f6e0f50 100644 --- a/runtime/ftplugin/passwd.vim +++ b/runtime/ftplugin/passwd.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: passwd(5) password file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: passwd(5) password file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/pinfo.vim b/runtime/ftplugin/pinfo.vim index 6ec1f87..50473a8 100644 --- a/runtime/ftplugin/pinfo.vim +++ b/runtime/ftplugin/pinfo.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: pinfo(1) configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: pinfo(1) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/procmail.vim b/runtime/ftplugin/procmail.vim index cc2ceed..d64f192 100644 --- a/runtime/ftplugin/procmail.vim +++ b/runtime/ftplugin/procmail.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: procmail(1) configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: procmail(1) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/prolog.vim b/runtime/ftplugin/prolog.vim index caeb574..f4e7d13 100644 --- a/runtime/ftplugin/prolog.vim +++ b/runtime/ftplugin/prolog.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: Prolog -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: Prolog +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/protocols.vim b/runtime/ftplugin/protocols.vim index 2486ff9..83856ce 100644 --- a/runtime/ftplugin/protocols.vim +++ b/runtime/ftplugin/protocols.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: protocols(5) - Internet protocols definition file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: protocols(5) - Internet protocols definition file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/quake.vim b/runtime/ftplugin/quake.vim index f62693b..c3a2e52 100644 --- a/runtime/ftplugin/quake.vim +++ b/runtime/ftplugin/quake.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: Quake[1-3] configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: Quake[1-3] configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/racc.vim b/runtime/ftplugin/racc.vim index 7ff22f8..0cd852c 100644 --- a/runtime/ftplugin/racc.vim +++ b/runtime/ftplugin/racc.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: Racc input file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: Racc input file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/readline.vim b/runtime/ftplugin/readline.vim index 0a4dbb5..e9ef93e 100644 --- a/runtime/ftplugin/readline.vim +++ b/runtime/ftplugin/readline.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: readline(3) configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: readline(3) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/rnc.vim b/runtime/ftplugin/rnc.vim index 2b8fd50..90aa111 100644 --- a/runtime/ftplugin/rnc.vim +++ b/runtime/ftplugin/rnc.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: Relax NG compact syntax -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: Relax NG compact syntax +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/rst.vim b/runtime/ftplugin/rst.vim index b871cf1..e61213e 100644 --- a/runtime/ftplugin/rst.vim +++ b/runtime/ftplugin/rst.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: reStructuredText documentation format -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: reStructuredText documentation format +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/rust.vim b/runtime/ftplugin/rust.vim new file mode 100644 index 0000000..7efca59 --- /dev/null +++ b/runtime/ftplugin/rust.vim @@ -0,0 +1,197 @@ +" Language: Rust +" Description: Vim ftplugin for Rust +" Maintainer: Chris Morgan +" Maintainer: Kevin Ballard +" Last Change: June 08, 2016 +" For bugs, patches and license go to https://github.com/rust-lang/rust.vim + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:save_cpo = &cpo +set cpo&vim + +augroup rust.vim +autocmd! + +" Variables {{{1 + +" The rust source code at present seems to typically omit a leader on /*! +" comments, so we'll use that as our default, but make it easy to switch. +" This does not affect indentation at all (I tested it with and without +" leader), merely whether a leader is inserted by default or not. +if exists("g:rust_bang_comment_leader") && g:rust_bang_comment_leader != 0 + " Why is the `,s0:/*,mb:\ ,ex:*/` there, you ask? I don't understand why, + " but without it, */ gets indented one space even if there were no + " leaders. I'm fairly sure that's a Vim bug. + setlocal comments=s1:/*,mb:*,ex:*/,s0:/*,mb:\ ,ex:*/,:///,://!,:// +else + setlocal comments=s0:/*!,m:\ ,ex:*/,s1:/*,mb:*,ex:*/,:///,://!,:// +endif +setlocal commentstring=//%s +setlocal formatoptions-=t formatoptions+=croqnl +" j was only added in 7.3.541, so stop complaints about its nonexistence +silent! setlocal formatoptions+=j + +" smartindent will be overridden by indentexpr if filetype indent is on, but +" otherwise it's better than nothing. +setlocal smartindent nocindent + +if !exists("g:rust_recommended_style") || g:rust_recommended_style != 0 + setlocal tabstop=4 shiftwidth=4 softtabstop=4 expandtab + setlocal textwidth=99 +endif + +" This includeexpr isn't perfect, but it's a good start +setlocal includeexpr=substitute(v:fname,'::','/','g') + +setlocal suffixesadd=.rs + +if exists("g:ftplugin_rust_source_path") + let &l:path=g:ftplugin_rust_source_path . ',' . &l:path +endif + +if exists("g:loaded_delimitMate") + if exists("b:delimitMate_excluded_regions") + let b:rust_original_delimitMate_excluded_regions = b:delimitMate_excluded_regions + endif + + let s:delimitMate_extra_excluded_regions = ',rustLifetimeCandidate,rustGenericLifetimeCandidate' + + " For this buffer, when delimitMate issues the `User delimitMate_map` + " event in the autocommand system, add the above-defined extra excluded + " regions to delimitMate's state, if they have not already been added. + autocmd User + \ if expand('') ==# 'delimitMate_map' && match( + \ delimitMate#Get("excluded_regions"), + \ s:delimitMate_extra_excluded_regions) == -1 + \| let b:delimitMate_excluded_regions = + \ delimitMate#Get("excluded_regions") + \ . s:delimitMate_extra_excluded_regions + \|endif + + " For this buffer, when delimitMate issues the `User delimitMate_unmap` + " event in the autocommand system, delete the above-defined extra excluded + " regions from delimitMate's state (the deletion being idempotent and + " having no effect if the extra excluded regions are not present in the + " targeted part of delimitMate's state). + autocmd User + \ if expand('') ==# 'delimitMate_unmap' + \| let b:delimitMate_excluded_regions = substitute( + \ delimitMate#Get("excluded_regions"), + \ '\C\V' . s:delimitMate_extra_excluded_regions, + \ '', 'g') + \|endif +endif + +if has("folding") && exists('g:rust_fold') && g:rust_fold != 0 + let b:rust_set_foldmethod=1 + setlocal foldmethod=syntax + if g:rust_fold == 2 + setlocal foldlevel< + else + setlocal foldlevel=99 + endif +endif + +if has('conceal') && exists('g:rust_conceal') && g:rust_conceal != 0 + let b:rust_set_conceallevel=1 + setlocal conceallevel=2 +endif + +" Motion Commands {{{1 + +" Bind motion commands to support hanging indents +nnoremap [[ :call rust#Jump('n', 'Back') +nnoremap ]] :call rust#Jump('n', 'Forward') +xnoremap [[ :call rust#Jump('v', 'Back') +xnoremap ]] :call rust#Jump('v', 'Forward') +onoremap [[ :call rust#Jump('o', 'Back') +onoremap ]] :call rust#Jump('o', 'Forward') + +" Commands {{{1 + +" See |:RustRun| for docs +command! -nargs=* -complete=file -bang -buffer RustRun call rust#Run(0, ) + +" See |:RustExpand| for docs +command! -nargs=* -complete=customlist,rust#CompleteExpand -bang -buffer RustExpand call rust#Expand(0, ) + +" See |:RustEmitIr| for docs +command! -nargs=* -buffer RustEmitIr call rust#Emit("llvm-ir", ) + +" See |:RustEmitAsm| for docs +command! -nargs=* -buffer RustEmitAsm call rust#Emit("asm", ) + +" See |:RustPlay| for docs +command! -range=% RustPlay :call rust#Play(, , , ) + +" See |:RustFmt| for docs +command! -buffer RustFmt call rustfmt#Format() + +" See |:RustFmtRange| for docs +command! -range -buffer RustFmtRange call rustfmt#FormatRange(, ) + +" Mappings {{{1 + +" Bind ⌘R in MacVim to :RustRun +nnoremap :RustRun +" Bind ⌘⇧R in MacVim to :RustRun! pre-filled with the last args +nnoremap :RustRun! =join(b:rust_last_rustc_args)erust#AppendCmdLine(' -- ' . join(b:rust_last_args)) + +if !exists("b:rust_last_rustc_args") || !exists("b:rust_last_args") + let b:rust_last_rustc_args = [] + let b:rust_last_args = [] +endif + +" Cleanup {{{1 + +let b:undo_ftplugin = " + \ setlocal formatoptions< comments< commentstring< includeexpr< suffixesadd< + \|setlocal tabstop< shiftwidth< softtabstop< expandtab< textwidth< + \|if exists('b:rust_original_delimitMate_excluded_regions') + \|let b:delimitMate_excluded_regions = b:rust_original_delimitMate_excluded_regions + \|unlet b:rust_original_delimitMate_excluded_regions + \|else + \|unlet! b:delimitMate_excluded_regions + \|endif + \|if exists('b:rust_set_foldmethod') + \|setlocal foldmethod< foldlevel< + \|unlet b:rust_set_foldmethod + \|endif + \|if exists('b:rust_set_conceallevel') + \|setlocal conceallevel< + \|unlet b:rust_set_conceallevel + \|endif + \|unlet! b:rust_last_rustc_args b:rust_last_args + \|delcommand RustRun + \|delcommand RustExpand + \|delcommand RustEmitIr + \|delcommand RustEmitAsm + \|delcommand RustPlay + \|nunmap + \|nunmap + \|nunmap [[ + \|nunmap ]] + \|xunmap [[ + \|xunmap ]] + \|ounmap [[ + \|ounmap ]] + \|set matchpairs-=<:> + \" + +" }}}1 + +" Code formatting on save +if get(g:, "rustfmt_autosave", 0) + autocmd BufWritePre *.rs silent! call rustfmt#Format() +endif + +augroup END + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim: set noet sw=8 ts=8: diff --git a/runtime/ftplugin/screen.vim b/runtime/ftplugin/screen.vim index 95c3849..c22089b 100644 --- a/runtime/ftplugin/screen.vim +++ b/runtime/ftplugin/screen.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: screen(1) configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: screen(1) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/sensors.vim b/runtime/ftplugin/sensors.vim index 813d14c..c02a729 100644 --- a/runtime/ftplugin/sensors.vim +++ b/runtime/ftplugin/sensors.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: sensors.conf(5) - libsensors configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: sensors.conf(5) - libsensors configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/services.vim b/runtime/ftplugin/services.vim index d34349e..dda08ac 100644 --- a/runtime/ftplugin/services.vim +++ b/runtime/ftplugin/services.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: services(5) - Internet network services list -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: services(5) - Internet network services list +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/setserial.vim b/runtime/ftplugin/setserial.vim index f9d5945..e5823f4 100644 --- a/runtime/ftplugin/setserial.vim +++ b/runtime/ftplugin/setserial.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: setserial(8) configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: setserial(8) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/sieve.vim b/runtime/ftplugin/sieve.vim index 9a8759c..3092b5d 100644 --- a/runtime/ftplugin/sieve.vim +++ b/runtime/ftplugin/sieve.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: Sieve filtering language input file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: Sieve filtering language input file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/slpconf.vim b/runtime/ftplugin/slpconf.vim index 0c45689..a975a49 100644 --- a/runtime/ftplugin/slpconf.vim +++ b/runtime/ftplugin/slpconf.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: RFC 2614 - An API for Service Location configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: RFC 2614 - An API for Service Location configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/slpreg.vim b/runtime/ftplugin/slpreg.vim index e9d533e..74c7285 100644 --- a/runtime/ftplugin/slpreg.vim +++ b/runtime/ftplugin/slpreg.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: RFC 2614 - An API for Service Location registration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: RFC 2614 - An API for Service Location registration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/slpspi.vim b/runtime/ftplugin/slpspi.vim index 8d64d47..633555e 100644 --- a/runtime/ftplugin/slpspi.vim +++ b/runtime/ftplugin/slpspi.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: RFC 2614 - An API for Service Location SPI file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: RFC 2614 - An API for Service Location SPI file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/sql.vim b/runtime/ftplugin/sql.vim index c2bc857..4d6fcd9 100644 --- a/runtime/ftplugin/sql.vim +++ b/runtime/ftplugin/sql.vim @@ -1,8 +1,8 @@ " SQL filetype plugin file " Language: SQL (Common for Oracle, Microsoft SQL Server, Sybase) -" Version: 11.0 +" Version: 12.0 " Maintainer: David Fishburn -" Last Change: 2013 May 13 +" Last Change: 2017 Mar 07 " Download: http://vim.sourceforge.net/script.php?script_id=454 " For more details please use: @@ -36,6 +36,14 @@ " " History " +" Version 12.0 (April 2013) +" +" NF: Added support for "BEGIN TRY ... END TRY ... BEGIN CATCH ... END CATCH +" BF: This plugin is designed to be used with other plugins to enable the +" SQL completion with Perl, Python, Java, ... The loading mechanism +" was not checking if the SQL objects were created, which can lead to +" the plugin not loading the SQL support. +" " Version 11.0 (May 2013) " " NF: Updated to use SyntaxComplete's new regex support for syntax groups. @@ -80,15 +88,17 @@ " Only do this when not done yet for this buffer -if exists("b:did_ftplugin") - finish +" This ftplugin can be used with other ftplugins. So ensure loading +" happens if all elements of this plugin have not yet loaded. +if exists("b:did_ftplugin") && exists("b:current_ftplugin") && b:current_ftplugin == 'sql' + finish endif let s:save_cpo = &cpo set cpo&vim " Disable autowrapping for code, but enable for comments -" t Auto-wrap text using textwidth +" t Auto-wrap text using textwidth " c Auto-wrap comments using textwidth, inserting the current comment " leader automatically. setlocal formatoptions-=t @@ -171,6 +181,9 @@ if !exists("*SQL_SetType") if exists("b:current_syntax") " echomsg 'SQLSetType - clearing syntax' syntax clear + if exists("b:current_syntax") + unlet b:current_syntax + endif endif if exists("b:did_indent") " echomsg 'SQLSetType - clearing indent' @@ -187,7 +200,7 @@ if !exists("*SQL_SetType") " Do not specify a buffer local variable if it is " the default value if new_sql_type == 'sql' - let new_sql_type = 'sqloracle' + let new_sql_type = 'sqloracle' endif let b:sql_type_override = new_sql_type @@ -234,25 +247,26 @@ if exists("b:sql_type_override") " echo 'sourcing buffer ftplugin/'.b:sql_type_override.'.vim' if globpath(&runtimepath, 'ftplugin/'.b:sql_type_override.'.vim') != '' exec 'runtime ftplugin/'.b:sql_type_override.'.vim' - " else - " echomsg 'ftplugin/'.b:sql_type_override.' not exist, using default' + " else + " echomsg 'ftplugin/'.b:sql_type_override.' not exist, using default' endif elseif exists("g:sql_type_default") " echo 'sourcing global ftplugin/'.g:sql_type_default.'.vim' if globpath(&runtimepath, 'ftplugin/'.g:sql_type_default.'.vim') != '' exec 'runtime ftplugin/'.g:sql_type_default.'.vim' - " else - " echomsg 'ftplugin/'.g:sql_type_default.'.vim not exist, using default' + " else + " echomsg 'ftplugin/'.g:sql_type_default.'.vim not exist, using default' endif endif " If the above runtime command succeeded, do not load the default settings -if exists("b:did_ftplugin") - finish +" as they should have already been loaded from a previous run. +if exists("b:did_ftplugin") && exists("b:current_ftplugin") && b:current_ftplugin == 'sql' + finish endif let b:undo_ftplugin = "setl comments< formatoptions< define< omnifunc<" . - \ " | unlet! b:browsefilter b:match_words" + \ " | unlet! b:browsefilter b:match_words" " Don't load another plugin for this buffer let b:did_ftplugin = 1 @@ -261,7 +275,7 @@ let b:current_ftplugin = 'sql' " Win32 can filter files in the browse dialog if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "SQL Files (*.sql)\t*.sql\n" . - \ "All Files (*.*)\t*.*\n" + \ "All Files (*.*)\t*.*\n" endif " Some standard expressions for use with the matchit strings @@ -312,14 +326,24 @@ if !exists("b:match_words") " WHEN column_not_found THEN " WHEN OTHERS THEN " + " begin try + " end try + " begin catch + " end catch + " " create[ or replace] procedure|function|event - " \ '^\s*\<\%(do\|for\|while\|loop\)\>.*:'. + " \ '^\s*\<\%(do\|for\|while\|loop\)\>.*:'. " For ColdFusion support setlocal matchpairs+=<:> let b:match_words = &matchpairs . - \ ',\:\\W*$,'. - \ + \ ',\%(\\)\@!:\\W*$,'. + \ + \ '\:'. + \ '\:'. + \ '\:'. + \ '\,'. + \ \ s:notend . '\:'. \ '\\|\\|\:'. \ '\,'. @@ -339,14 +363,14 @@ if !exists("b:match_words") \ '\%(\' - " \ '\\|\:'. - " \ '\\(;\)\?\s*$' - " \ '\:'.s:when_no_matched_or_others. - " \ ':\,'. - " - " \ '\%(\\|\%('. s:notend . '\\)\):'. - " \ '\%(\\|'.s:when_no_matched_or_others.'\):'. - " \ '\%(\%(\\)\|\\),' . + " \ '\\|\:'. + " \ '\\(;\)\?\s*$' + " \ '\:'.s:when_no_matched_or_others. + " \ ':\,'. + " + " \ '\%(\\|\%('. s:notend . '\\)\):'. + " \ '\%(\\|'.s:when_no_matched_or_others.'\):'. + " \ '\%(\%(\\)\|\\),' . endif " Define how to find the macro definition of a variable using the various diff --git a/runtime/ftplugin/sshconfig.vim b/runtime/ftplugin/sshconfig.vim index f940af9..d933ce0 100644 --- a/runtime/ftplugin/sshconfig.vim +++ b/runtime/ftplugin/sshconfig.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: OpenSSH client configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: OpenSSH client configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/sudoers.vim b/runtime/ftplugin/sudoers.vim index 5756302..38dbf55 100644 --- a/runtime/ftplugin/sudoers.vim +++ b/runtime/ftplugin/sudoers.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: sudoers(5) configuration files -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: sudoers(5) configuration files +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/sysctl.vim b/runtime/ftplugin/sysctl.vim index fb1098d..8d331ce 100644 --- a/runtime/ftplugin/sysctl.vim +++ b/runtime/ftplugin/sysctl.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: sysctl.conf(5) configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: sysctl.conf(5) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/terminfo.vim b/runtime/ftplugin/terminfo.vim index 7ce31d1..0ffcc58 100644 --- a/runtime/ftplugin/terminfo.vim +++ b/runtime/ftplugin/terminfo.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: terminfo(5) definition -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: terminfo(5) definition +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/tmux.vim b/runtime/ftplugin/tmux.vim new file mode 100644 index 0000000..ed91549 --- /dev/null +++ b/runtime/ftplugin/tmux.vim @@ -0,0 +1,12 @@ +" Vim filetype plugin file +" Language: tmux(1) configuration file +" URL: https://github.com/ericpruitt/tmux.vim/ +" Maintainer: Eric Pruitt +" Last Changed: 2017 Mar 10 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +setlocal commentstring=#\ %s diff --git a/runtime/ftplugin/treetop.vim b/runtime/ftplugin/treetop.vim index 2da3c40..f978d15 100644 --- a/runtime/ftplugin/treetop.vim +++ b/runtime/ftplugin/treetop.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: Treetop -" Maintainer: Nikolai Weibull -" Latest Revision: 2011-03-14 +" Language: Treetop +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2011-03-14 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/udevconf.vim b/runtime/ftplugin/udevconf.vim index 6042e14..0bbd86a 100644 --- a/runtime/ftplugin/udevconf.vim +++ b/runtime/ftplugin/udevconf.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: udev(8) configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: udev(8) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/udevperm.vim b/runtime/ftplugin/udevperm.vim index e7ad31d..f8fb4d4 100644 --- a/runtime/ftplugin/udevperm.vim +++ b/runtime/ftplugin/udevperm.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: udev(8) permissions file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: udev(8) permissions file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/udevrules.vim b/runtime/ftplugin/udevrules.vim index be8d646..6404f6c 100644 --- a/runtime/ftplugin/udevrules.vim +++ b/runtime/ftplugin/udevrules.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: udev(8) rules file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: udev(8) rules file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/updatedb.vim b/runtime/ftplugin/updatedb.vim index f4e7bce..3015918 100644 --- a/runtime/ftplugin/updatedb.vim +++ b/runtime/ftplugin/updatedb.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: updatedb.conf(5) configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: updatedb.conf(5) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/xdefaults.vim b/runtime/ftplugin/xdefaults.vim index cd85182..c1aff70 100644 --- a/runtime/ftplugin/xdefaults.vim +++ b/runtime/ftplugin/xdefaults.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: X resources files like ~/.Xdefaults (xrdb) -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: X resources files like ~/.Xdefaults (xrdb) +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/xf86conf.vim b/runtime/ftplugin/xf86conf.vim index ab7569a..5a21539 100644 --- a/runtime/ftplugin/xf86conf.vim +++ b/runtime/ftplugin/xf86conf.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: XFree86 Configuration File -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: XFree86 Configuration File +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/xinetd.vim b/runtime/ftplugin/xinetd.vim index f209af1..2b7b64e 100644 --- a/runtime/ftplugin/xinetd.vim +++ b/runtime/ftplugin/xinetd.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: xinetd.conf(5) configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: xinetd.conf(5) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/xmodmap.vim b/runtime/ftplugin/xmodmap.vim index 027ae09..77fccd5 100644 --- a/runtime/ftplugin/xmodmap.vim +++ b/runtime/ftplugin/xmodmap.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: xmodmap(1) definition file -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: xmodmap(1) definition file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/yaml.vim b/runtime/ftplugin/yaml.vim index b88803a..ceff36f 100644 --- a/runtime/ftplugin/yaml.vim +++ b/runtime/ftplugin/yaml.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: YAML (YAML Ain't Markup Language) -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: YAML (YAML Ain't Markup Language) +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/indent/automake.vim b/runtime/indent/automake.vim index 5fbc222..7e38f92 100644 --- a/runtime/indent/automake.vim +++ b/runtime/indent/automake.vim @@ -1,7 +1,7 @@ " Vim indent file -" Language: automake -" Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Language: automake +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2006-04-19 if exists("b:did_indent") finish diff --git a/runtime/indent/config.vim b/runtime/indent/config.vim index 7eb1657..074f467 100644 --- a/runtime/indent/config.vim +++ b/runtime/indent/config.vim @@ -1,8 +1,8 @@ " Vim indent file -" Language: Autoconf configure.{ac,in} file -" Maintainer: Nikolai Weibull -" Latest Revision: 2006-12-20 -" TODO: how about nested [()]'s in one line +" Language: Autoconf configure.{ac,in} file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2006-12-20 +" TODO: how about nested [()]'s in one line " what's wrong with '\\\@!'? " Only load this indent file when no other was loaded. diff --git a/runtime/indent/css.vim b/runtime/indent/css.vim index f0a272e..4d15b8d 100644 --- a/runtime/indent/css.vim +++ b/runtime/indent/css.vim @@ -2,6 +2,7 @@ " Language: CSS " Maintainer: Nikolai Weibull " Latest Revision: 2012-05-30 +" Use of shiftwidth() added by Oleg Zubchenko. if exists("b:did_indent") finish @@ -75,8 +76,8 @@ function GetCSSIndent() return 0 endif - return indent(pnum) + s:count_braces(pnum, 1) * &sw - \ - s:count_braces(v:lnum, 0) * &sw + return indent(pnum) + s:count_braces(pnum, 1) * shiftwidth() + \ - s:count_braces(v:lnum, 0) * shiftwidth() endfunction let &cpo = s:keepcpo diff --git a/runtime/indent/dictconf.vim b/runtime/indent/dictconf.vim index adbc1a5..2e15c76 100644 --- a/runtime/indent/dictconf.vim +++ b/runtime/indent/dictconf.vim @@ -1,7 +1,7 @@ " Vim indent file -" Language: dict(1) configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2006-12-20 +" Language: dict(1) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2006-12-20 if exists("b:did_indent") finish diff --git a/runtime/indent/dictdconf.vim b/runtime/indent/dictdconf.vim index 9427342..5c4fbda 100644 --- a/runtime/indent/dictdconf.vim +++ b/runtime/indent/dictdconf.vim @@ -1,7 +1,7 @@ " Vim indent file -" Language: dictd(8) configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2006-12-20 +" Language: dictd(8) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2006-12-20 if exists("b:did_indent") finish diff --git a/runtime/indent/docbk.vim b/runtime/indent/docbk.vim index 3fde2a1..d8661ff 100644 --- a/runtime/indent/docbk.vim +++ b/runtime/indent/docbk.vim @@ -1,7 +1,7 @@ " Vim indent file -" Language: DocBook Documentation Format -" Maintainer: Nikolai Weibull -" Latest Revision: 2006-04-19 +" Language: DocBook Documentation Format +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2006-04-19 if exists("b:did_indent") finish diff --git a/runtime/indent/dtd.vim b/runtime/indent/dtd.vim index 88c0c51..5633362 100644 --- a/runtime/indent/dtd.vim +++ b/runtime/indent/dtd.vim @@ -1,7 +1,7 @@ " Vim indent file -" Language: DTD (Document Type Definition for XML) -" Maintainer: Nikolai Weibull -" Latest Revision: 2011-07-08 +" Language: DTD (Document Type Definition for XML) +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2011-07-08 let s:cpo_save = &cpo set cpo&vim @@ -84,7 +84,7 @@ function GetDTDIndent() let [declaration, end] = s:lex1(line, col) if declaration == "" - return indent + &sw + return indent + shiftwidth() elseif declaration == '--' " We’re looking at a comment. Now, simply determine if the comment is " terminated or not. If it isn’t, let Vim take care of that using @@ -100,7 +100,7 @@ function GetDTDIndent() " Check for element name. If none exists, indent one level. let [name, end] = s:lex(line, end) if name == "" - return indent + &sw + return indent + shiftwidth() endif " Check for token following element name. This can be a specification of @@ -113,7 +113,7 @@ function GetDTDIndent() let n += 1 endwhile if token == "" - return indent + &sw + return indent + shiftwidth() endif " Next comes the content model. If the token we’ve found isn’t a @@ -148,7 +148,7 @@ function GetDTDIndent() return indent endif " TODO: Should use s:lex here on getline(v:lnum) and check for >. - return getline(v:lnum) =~ '^\s*>' || count(values(seen), 0) == 0 ? indent : (indent + &sw) + return getline(v:lnum) =~ '^\s*>' || count(values(seen), 0) == 0 ? indent : (indent + shiftwidth()) endif " If we’ve seen an addition or exception already and this is of the same @@ -167,7 +167,7 @@ function GetDTDIndent() " Check for element name. If none exists, indent one level. let [name, end] = s:lex(line, end) if name == "" - return indent + &sw + return indent + shiftwidth() endif " Check for any number of attributes. @@ -180,7 +180,7 @@ function GetDTDIndent() let [name, end] = s:lex(line, end) if name == "" " TODO: Should use s:lex here on getline(v:lnum) and check for >. - return getline(v:lnum) =~ '^\s*>' ? indent : (indent + &sw) + return getline(v:lnum) =~ '^\s*>' ? indent : (indent + shiftwidth()) elseif name == ">" return indent endif @@ -194,14 +194,14 @@ function GetDTDIndent() " (CDATA|NMTOKEN|NMTOKENS|ID|IDREF|IDREFS|ENTITY|ENTITIES)? let [value, end] = s:lex(line, end, '^\%((\|[^[:space:]]\+\)') if value == "" - return indent + &sw * 2 + return indent + shiftwidth() * 2 elseif value == 'NOTATION' " If this is a enumerated value based on notations, read another token " for the actual value. If it doesn’t exist, indent three levels. " TODO: If validating according to above, value must be equal to '('. let [value, end] = s:lex(line, end, '^\%((\|[^[:space:]]\+\)') if value == "" - return indent + &sw * 3 + return indent + shiftwidth() * 3 endif endif @@ -216,13 +216,13 @@ function GetDTDIndent() " two levels. let [default, end] = s:lex(line, end, '^\%("\_[^"]*"\|#\(REQUIRED\|IMPLIED\|FIXED\)\)') if default == "" - return indent + &sw * 2 + return indent + shiftwidth() * 2 elseif default == '#FIXED' " We need to look for the fixed value. If non exists, indent three " levels. let [default, end] = s:lex(line, end, '^"\_[^"]*"') if default == "" - return indent + &sw * 3 + return indent + shiftwidth() * 3 endif endif endwhile @@ -233,11 +233,11 @@ function GetDTDIndent() " again, if none exists, indent one level. let [name, end] = s:lex(line, end) if name == "" - return indent + &sw + return indent + shiftwidth() elseif name == '%' let [name, end] = s:lex(line, end) if name == "" - return indent + &sw + return indent + shiftwidth() endif endif @@ -256,27 +256,27 @@ function GetDTDIndent() " we’re now done with this entity. let [value, end] = s:lex(line, end) if value == "" - return indent + &sw + return indent + shiftwidth() elseif value == 'SYSTEM' || value == 'PUBLIC' let [quoted_string, end] = s:lex(line, end, '\%("[^"]\+"\|''[^'']\+''\)') if quoted_string == "" - return indent + &sw * 2 + return indent + shiftwidth() * 2 endif if value == 'PUBLIC' let [quoted_string, end] = s:lex(line, end, '\%("[^"]\+"\|''[^'']\+''\)') if quoted_string == "" - return indent + &sw * 2 + return indent + shiftwidth() * 2 endif endif let [ndata, end] = s:lex(line, end) if ndata == "" - return indent + &sw + return indent + shiftwidth() endif let [name, end] = s:lex(line, end) - return name == "" ? (indent + &sw * 2) : indent + return name == "" ? (indent + shiftwidth() * 2) : indent else return indent endif @@ -284,24 +284,24 @@ function GetDTDIndent() " Check for notation name. If none exists, indent one level. let [name, end] = s:lex(line, end) if name == "" - return indent + &sw + return indent + shiftwidth() endif " Now check for the external ID. If none exists, indent one level. let [id, end] = s:lex(line, end) if id == "" - return indent + &sw + return indent + shiftwidth() elseif id == 'SYSTEM' || id == 'PUBLIC' let [quoted_string, end] = s:lex(line, end, '\%("[^"]\+"\|''[^'']\+''\)') if quoted_string == "" - return indent + &sw * 2 + return indent + shiftwidth() * 2 endif if id == 'PUBLIC' let [quoted_string, end] = s:lex(line, end, '\%("[^"]\+"\|''[^'']\+''\|>\)') if quoted_string == "" " TODO: Should use s:lex here on getline(v:lnum) and check for >. - return getline(v:lnum) =~ '^\s*>' ? indent : (indent + &sw * 2) + return getline(v:lnum) =~ '^\s*>' ? indent : (indent + shiftwidth() * 2) elseif quoted_string == '>' return indent endif diff --git a/runtime/indent/eiffel.vim b/runtime/indent/eiffel.vim index 87e82e8..d7667a8 100644 --- a/runtime/indent/eiffel.vim +++ b/runtime/indent/eiffel.vim @@ -2,9 +2,10 @@ " Language: Eiffel " Maintainer: Jocelyn Fiat " Previous-Maintainer: David Clarke +" Contributions from: Takuya Fujiwara " Contributions from: Thilo Six -" $Date: 2004/12/09 21:33:52 $ -" $Revision: 1.3 $ +" $Date: 2017/03/08 06:00:00 $ +" $Revision: 1.4 $ " URL: https://github.com/eiffelhub/vim-eiffel " Only load this indent file when no other was loaded. @@ -28,7 +29,7 @@ let b:undo_indent = "setl smartindent< indentkeys< indentexpr< autoindent< comme " Define some stuff " keywords grouped by indenting let s:trust_user_indent = '\(+\)\(\s*\(--\).*\)\=$' -let s:relative_indent = '^\s*\(deferred\|class\|feature\|creation\|inherit\|loop\|from\|until\|if\|else\|elseif\|ensure\|require\|check\|do\|local\|invariant\|variant\|rename\|redefine\|do\|export\)\>' +let s:relative_indent = '^\s*\(deferred\|class\|feature\|creation\|inherit\|loop\|from\|across\|until\|if\|else\|elseif\|ensure\|require\|check\|do\|local\|invariant\|variant\|rename\|redefine\|do\|export\)\>' let s:outdent = '^\s*\(else\|invariant\|variant\|do\|require\|until\|loop\|local\)\>' let s:no_indent = '^\s*\(class\|feature\|creation\|inherit\)\>' let s:single_dent = '^[^-]\+[[:alnum:]]\+ is\(\s*\(--\).*\)\=$' @@ -63,23 +64,23 @@ function GetEiffelIndent() " Add a 'shiftwidth' after lines that start with an indent word let ind = indent(lnum) if getline(lnum) =~ s:relative_indent - let ind = ind + &sw + let ind = ind + shiftwidth() endif " Indent to single indent if getline(v:lnum) =~ s:single_dent && getline(v:lnum) !~ s:relative_indent \ && getline(v:lnum) !~ '\s*\<\(and\|or\|implies\)\>' - let ind = &sw + let ind = shiftwidth() endif " Indent to double indent if getline(v:lnum) =~ s:inheritance_dent - let ind = 2 * &sw + let ind = 2 * shiftwidth() endif " Indent line after the first line of the function definition if getline(lnum) =~ s:single_dent - let ind = ind + &sw + let ind = ind + shiftwidth() endif " The following should always be at the start of a line, no indenting @@ -91,17 +92,17 @@ function GetEiffelIndent() " or first thing after the 'do' if getline(v:lnum) =~ s:outdent && getline(v:lnum - 1) !~ s:single_dent \ && getline(v:lnum - 1) !~ '^\s*do\>' - let ind = ind - &sw + let ind = ind - shiftwidth() endif " Subtract a shiftwidth for end statements if getline(v:lnum) =~ '^\s*end\>' - let ind = ind - &sw + let ind = ind - shiftwidth() endif " set indent of zero end statements that are at an indent of 3, this should " only ever be the class's end. - if getline(v:lnum) =~ '^\s*end\>' && ind == &sw + if getline(v:lnum) =~ '^\s*end\>' && ind == shiftwidth() let ind = 0 endif diff --git a/runtime/indent/eterm.vim b/runtime/indent/eterm.vim index f25f5f4..8ee342f 100644 --- a/runtime/indent/eterm.vim +++ b/runtime/indent/eterm.vim @@ -1,7 +1,7 @@ " Vim indent file -" Language: Eterm configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2006-12-20 +" Language: Eterm configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2006-12-20 if exists("b:did_indent") finish @@ -25,11 +25,11 @@ function GetEtermIndent() let ind = indent(lnum) if getline(lnum) =~ '^\s*begin\>' - let ind = ind + &sw + let ind = ind + shiftwidth() endif if getline(v:lnum) =~ '^\s*end\>' - let ind = ind - &sw + let ind = ind - shiftwidth() endif return ind diff --git a/runtime/indent/fortran.vim b/runtime/indent/fortran.vim index c9bee78..2ba69e8 100644 --- a/runtime/indent/fortran.vim +++ b/runtime/indent/fortran.vim @@ -1,7 +1,7 @@ " Vim indent file " Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77) -" Version: 0.46 -" Last Change: 2016 Sep. 27 +" Version: 47 +" Last Change: 2016 Oct. 29 " Maintainer: Ajit J. Thakkar ; " Usage: For instructions, do :help fortran-indent from Vim " Credits: @@ -100,9 +100,9 @@ function FortranGetIndent(lnum) endif endif - "Add a shiftwidth to statements following if, else, else if, case, + "Add a shiftwidth to statements following if, else, else if, case, class, "where, else where, forall, type, interface and associate statements - if prevstat =~? '^\s*\(case\|else\|else\s*if\|else\s*where\)\>' + if prevstat =~? '^\s*\(case\|class\|else\|else\s*if\|else\s*where\)\>' \ ||prevstat=~? '^\s*\(type\|interface\|associate\|enum\)\>' \ ||prevstat=~?'^\s*\(\d\+\s\)\=\s*\(\a\w*\s*:\)\=\s*\(forall\|where\|block\)\>' \ ||prevstat=~? '^\s*\(\d\+\s\)\=\s*\(\a\w*\s*:\)\=\s*if\>' @@ -136,11 +136,11 @@ function FortranGetIndent(lnum) endif endif - "Subtract a shiftwidth from else, else if, elsewhere, case, end if, + "Subtract a shiftwidth from else, else if, elsewhere, case, class, end if, " end where, end select, end forall, end interface, end associate, " end enum, end type, end block and end type statements if getline(v:lnum) =~? '^\s*\(\d\+\s\)\=\s*' - \. '\(else\|else\s*if\|else\s*where\|case\|' + \. '\(else\|else\s*if\|else\s*where\|case\|class\|' \. 'end\s*\(if\|where\|select\|interface\|' \. 'type\|forall\|associate\|enum\|block\)\)\>' let ind = ind - shiftwidth() diff --git a/runtime/indent/framescript.vim b/runtime/indent/framescript.vim index 49ff92a..f9a274e 100644 --- a/runtime/indent/framescript.vim +++ b/runtime/indent/framescript.vim @@ -1,7 +1,7 @@ " Vim indent file -" Language: FrameScript -" Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-19 +" Language: FrameScript +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-19 if exists("b:did_indent") finish @@ -30,11 +30,11 @@ function GetFrameScriptIndent() let ind = indent(lnum) if getline(lnum) =~? '^\s*\%(If\|Loop\|Sub\)' - let ind = ind + &sw + let ind = ind + shiftwidth() endif if getline(v:lnum) =~? '^\s*\%(Else\|End\%(If\|Loop\|Sub\)\)' - let ind = ind - &sw + let ind = ind - shiftwidth() endif return ind diff --git a/runtime/indent/html.vim b/runtime/indent/html.vim index 13adaae..57ba53e 100644 --- a/runtime/indent/html.vim +++ b/runtime/indent/html.vim @@ -2,7 +2,7 @@ " Header: "{{{ " Maintainer: Bram Moolenaar " Original Author: Andy Wokula -" Last Change: 2016 Mar 30 +" Last Change: 2017 Jan 17 " Version: 1.0 " Description: HTML indent script with cached state for faster indenting on a " range of lines. @@ -25,27 +25,22 @@ if exists("b:did_indent") "{{{ finish endif + +" Load the Javascript indent script first, it defines GetJavascriptIndent(). +" Undo the rest. +" Load base python indent. +if !exists('*GetJavascriptIndent') + runtime! indent/javascript.vim +endif let b:did_indent = 1 setlocal indentexpr=HtmlIndent() setlocal indentkeys=o,O,,<>>,{,},!^F -" "j1" is included to make cindent() work better with Javascript. -setlocal cino=j1 -" "J1" should be included, but it doen't work properly before 7.4.355. -if has("patch-7.4.355") - setlocal cino+=J1 -endif -" Before patch 7.4.355 indenting after "(function() {" does not work well, add -" )2 to limit paren search. -if !has("patch-7.4.355") - setlocal cino+=)2 -endif - " Needed for % to work when finding start/end of a tag. setlocal matchpairs+=<:> -let b:undo_indent = "setlocal inde< indk< cino<" +let b:undo_indent = "setlocal inde< indk<" " b:hi_indent keeps state to speed up indenting consecutive lines. let b:hi_indent = {"lnum": -1} @@ -596,7 +591,7 @@ func! s:Alien3() return eval(b:hi_js1indent) endif if b:hi_indent.scripttype == "javascript" - return cindent(v:lnum) + return GetJavascriptIndent() else return -1 endif diff --git a/runtime/indent/java.vim b/runtime/indent/java.vim index e0aec0f..49f8010 100644 --- a/runtime/indent/java.vim +++ b/runtime/indent/java.vim @@ -1,12 +1,14 @@ " Vim indent file " Language: Java " Previous Maintainer: Toby Allsopp -" Current Maintainer: Hong Xu -" Last Change: 2012 May 18 -" Version: 1.0 +" Current Maintainer: Hong Xu +" Homepage: http://www.vim.org/scripts/script.php?script_id=3899 +" https://github.com/xuhdev/indent-java.vim +" Last Change: 2016 Mar 7 +" Version: 1.1 " License: Same as Vim. -" Copyright (c) 2012 Hong Xu -" Before 2012, this file is maintained by Toby Allsopp. +" Copyright (c) 2012-2016 Hong Xu +" Before 2012, this file was maintained by Toby Allsopp. " Only load this indent file when no other was loaded. if exists("b:did_indent") @@ -29,6 +31,7 @@ let b:undo_indent = "set cin< cino< indentkeys< indentexpr<" if exists("*GetJavaIndent") finish endif + let s:keepcpo= &cpo set cpo&vim @@ -70,7 +73,7 @@ function GetJavaIndent() " If the previous line starts with '@', we should have the same indent as " the previous one - if getline(lnum) =~ '^\s*@\S\+\s*$' + if getline(lnum) =~ '^\s*@.*$' return indent(lnum) endif @@ -85,9 +88,9 @@ function GetJavaIndent() " Try to align "throws" lines for methods and "extends" and "implements" for " classes. - if getline(v:lnum) =~ '^\s*\(extends\|implements\)\>' - \ && getline(lnum) !~ '^\s*\(extends\|implements\)\>' - let theIndent = theIndent + &sw + if getline(v:lnum) =~ '^\s*\(throws\|extends\|implements\)\>' + \ && getline(lnum) !~ '^\s*\(throws\|extends\|implements\)\>' + let theIndent = theIndent + shiftwidth() endif " correct for continuation lines of "throws", "implements" and "extends" @@ -96,27 +99,27 @@ function GetJavaIndent() if strlen(cont_kw) > 0 let amount = strlen(cont_kw) + 1 if getline(lnum) !~ ',\s*$' - let theIndent = theIndent - (amount + &sw) + let theIndent = theIndent - (amount + shiftwidth()) if theIndent < 0 let theIndent = 0 endif elseif prev == lnum let theIndent = theIndent + amount if cont_kw ==# 'throws' - let theIndent = theIndent + &sw + let theIndent = theIndent + shiftwidth() endif endif elseif getline(prev) =~ '^\s*\(throws\|implements\|extends\)\>' \ && (getline(prev) =~ '{\s*$' \ || getline(v:lnum) =~ '^\s*{\s*$') - let theIndent = theIndent - &sw + let theIndent = theIndent - shiftwidth() endif " When the line starts with a }, try aligning it with the matching {, " skipping over "throws", "extends" and "implements" clauses. if getline(v:lnum) =~ '^\s*}\s*\(//.*\|/\*.*\)\=$' call cursor(v:lnum, 1) - silent normal % + silent normal! % let lnum = line('.') if lnum < v:lnum while lnum > 1 diff --git a/runtime/indent/javascript.vim b/runtime/indent/javascript.vim index 0d6c11d..304c0fe 100644 --- a/runtime/indent/javascript.vim +++ b/runtime/indent/javascript.vim @@ -2,7 +2,7 @@ " Language: Javascript " Maintainer: Chris Paul ( https://github.com/bounceme ) " URL: https://github.com/pangloss/vim-javascript -" Last Change: August 25, 2016 +" Last Change: March 21, 2017 " Only load this indent file when no other was loaded. if exists('b:did_indent') @@ -12,11 +12,14 @@ let b:did_indent = 1 " Now, set up our indentation expression and keys that trigger it. setlocal indentexpr=GetJavascriptIndent() -setlocal nolisp noautoindent nosmartindent -setlocal indentkeys=0{,0},0),0],:,!^F,o,O,e -setlocal cinoptions+=j1,J1 +setlocal autoindent nolisp nosmartindent +setlocal indentkeys+=0],0) +" Testable with something like: +" vim -eNs "+filetype plugin indent on" "+syntax on" "+set ft=javascript" \ +" "+norm! gg=G" '+%print' '+:q!' testfile.js \ +" | diff -uBZ testfile.js - -let b:undo_indent = 'setlocal indentexpr< smartindent< autoindent< indentkeys< cinoptions<' +let b:undo_indent = 'setlocal indentexpr< smartindent< autoindent< indentkeys<' " Only define the function once. if exists('*GetJavascriptIndent') @@ -33,162 +36,342 @@ if exists('*shiftwidth') endfunction else function s:sw() - return &sw + return &l:shiftwidth == 0 ? &l:tabstop : &l:shiftwidth endfunction endif -let s:line_pre = '^\s*\%(\%(\%(\/\*.\{-}\)\=\*\+\/\s*\)\=\)\@>' -let s:expr_case = s:line_pre . '\%(\%(case\>.\+\)\|default\)\s*:' -" Regex of syntax group names that are or delimit string or are comments. -let s:syng_strcom = '\%(s\%(tring\|pecial\)\|comment\|regex\|doc\|template\)' - -" Regex of syntax group names that are strings or documentation. -let s:syng_comment = '\%(comment\|doc\)' - -" Expression used to check whether we should skip a match with searchpair(). -let s:skip_expr = "synIDattr(synID(line('.'),col('.'),0),'name') =~? '".s:syng_strcom."'" +" Performance for forwards search(): start search at pos rather than masking +" matches before pos. +let s:z = has('patch-7.4.984') ? 'z' : '' +" searchpair() wrapper if has('reltime') - function s:GetPair(start,end,flags,time) - return searchpair(a:start,'',a:end,a:flags,s:skip_expr,max([prevnonblank(v:lnum) - 2000,0]),a:time) + function s:GetPair(start,end,flags,skip,time,...) + return searchpair('\m'.a:start,'','\m'.a:end,a:flags,a:skip,max([prevnonblank(v:lnum) - 2000,0] + a:000),a:time) endfunction else - function s:GetPair(start,end,flags,n) - return searchpair(a:start,'',a:end,a:flags,0,max([prevnonblank(v:lnum) - 2000,0])) + function s:GetPair(start,end,flags,skip,...) + return searchpair('\m'.a:start,'','\m'.a:end,a:flags,a:skip,max([prevnonblank(v:lnum) - 1000,get(a:000,1)])) endfunction endif -let s:line_term = '\s*\%(\%(\/\%(\%(\*.\{-}\*\/\)\|\%(\*\+\)\)\)\s*\)\=$' +" Regex of syntax group names that are or delimit string or are comments. +let s:syng_strcom = 'string\|comment\|regex\|special\|doc\|template\%(braces\)\@!' +let s:syng_str = 'string\|template\|special' +let s:syng_com = 'comment\|doc' +" Expression used to check whether we should skip a match with searchpair(). +let s:skip_expr = "synIDattr(synID(line('.'),col('.'),0),'name') =~? '".s:syng_strcom."'" -" configurable regexes that define continuation lines, not including (, {, or [. -if !exists('g:javascript_opfirst') - let g:javascript_opfirst = '\%([<>,:?^%|*&]\|\/[^/*]\|\([-.+]\)\1\@!\|=>\@!\|in\%(stanceof\)\=\>\)' -endif -if !exists('g:javascript_continuation') - let g:javascript_continuation = '\%([<=,.?/*:^%|&]\|+\@\|\'.col('.').'c[''"]\|\\$' + return eval(s:skip_expr) + elseif s:checkIn || search('\m`\|\${\|\*\/','nW'.s:z,s:looksyn) + let s:checkIn = eval(s:skip_expr) + endif + let s:looksyn = line('.') + return s:checkIn +endfunction -function s:OneScope(lnum,text,add) - return a:text =~# '\%(\\)' . s:line_term ? 'no b' : - \ ((a:add && a:text =~ s:line_pre . '$' && search('\%' . s:PrevCodeLine(a:lnum - 1) . 'l.)' . s:line_term)) || - \ cursor(a:lnum, match(a:text, ')' . s:line_term)) > -1) && - \ s:GetPair('(', ')', 'cbW', 100) > 0 && search('\C\l\+\_s*\%#','bW') && - \ (a:add || ((expand('') !=# 'while' || !s:GetPair('\C\', '\C\','nbW',100)) && - \ (expand('') !=# 'each' || search('\C\') : '' +function s:alternatePair(stop) + let pos = getpos('.')[1:2] + let pat = '[][(){};]' + while search('\m'.pat,'bW',a:stop) + if s:skip_func() | continue | endif + let idx = stridx('])};',s:looking_at()) + if idx is 3 | let pat = '[{}()]' | continue | endif + if idx + 1 + if s:GetPair(['\[','(','{'][idx], '])}'[idx],'bW','s:skip_func()',2000,a:stop) <= 0 + break + endif + else + return + endif + endwhile + call call('cursor',pos) endfunction -" https://github.com/sweet-js/sweet.js/wiki/design#give-lookbehind-to-the-reader -function s:IsBlock() - return getline(line('.'))[col('.')-1] == '{' && !search( - \ '\C\%(\\|\*\@') : s:looking_at() +endfunction + +function s:previous_token() + let l:pos = getpos('.')[1:2] + if search('\m\k\{1,}\zs\k\|\S','bW') + if (getline('.')[col('.')-2:col('.')-1] == '*/' || line('.') != l:pos[0] && + \ getline('.') =~ '\%<'.col('.').'c\/\/') && s:syn_at(line('.'),col('.')) =~? s:syng_com + while search('\m\S\ze\_s*\/[/*]','bW') + if s:syn_at(line('.'),col('.')) !~? s:syng_com + return s:token() + endif + endwhile + else + return s:token() + endif + endif + call call('cursor',l:pos) + return '' +endfunction + +function s:expr_col() + if getline('.')[col('.')-2] == ':' + return 1 + endif + let bal = 0 + while search('\m[{}?:;]','bW') + if eval(s:skip_expr) | continue | endif + " switch (looking_at()) + exe { '}': "if s:GetPair('{','}','bW',s:skip_expr,200) <= 0 | return | endif", + \ ';': "return", + \ '{': "return getpos('.')[1:2] != b:js_cache[1:] && !s:IsBlock()", + \ ':': "let bal -= getline('.')[max([col('.')-2,0]):col('.')] !~ '::'", + \ '?': "let bal += 1 | if bal > 0 | return 1 | endif" }[s:looking_at()] + endwhile +endfunction + +" configurable regexes that define continuation lines, not including (, {, or [. +let s:opfirst = '^' . get(g:,'javascript_opfirst', + \ '\C\%([<>=,?^%|*/&]\|\([-.:+]\)\1\@!\|!=\|in\%(stanceof\)\=\>\)') +let s:continuation = get(g:,'javascript_continuation', + \ '\C\%([-+<>=,.~!?/*^%|&:]\|\<\%(typeof\|new\|delete\|void\|in\|instanceof\|await\)\)') . '$' + +function s:continues(ln,con) + if !cursor(a:ln, match(' '.a:con,s:continuation)) + let teol = s:looking_at() + if teol == '/' + return s:syn_at(line('.'),col('.')) !~? 'regex' + elseif teol =~ '[-+>]' + return getline('.')[col('.')-2] != tr(teol,'>','=') + elseif teol =~ '\l' + return s:previous_token() != '.' + elseif teol == ':' + return s:expr_col() + endif + return 1 + endif endfunction -" Auxiliary Functions {{{2 +" get the line of code stripped of comments and move cursor to the last +" non-comment char. +function s:Trim(ln) + let pline = substitute(getline(a:ln),'\s*$','','') + let l:max = max([strridx(pline,'//'), strridx(pline,'/*')]) + while l:max != -1 && s:syn_at(a:ln, strlen(pline)) =~? s:syng_com + let pline = pline[: l:max] + let l:max = max([strridx(pline,'//'), strridx(pline,'/*')]) + let pline = substitute(pline[:-2],'\s*$','','') + endwhile + return pline is '' || cursor(a:ln,strlen(pline)) ? pline : pline +endfunction -" Find line above 'lnum' that isn't empty, in a comment, or in a string. +" Find line above 'lnum' that isn't empty or in a comment function s:PrevCodeLine(lnum) - let l:lnum = prevnonblank(a:lnum) - while l:lnum - if synIDattr(synID(l:lnum,matchend(getline(l:lnum), '^\s*[^''"]'),0),'name') !~? s:syng_strcom - return l:lnum + let [l:pos, l:n] = [getpos('.')[1:2], prevnonblank(a:lnum)] + while l:n + if getline(l:n) =~ '^\s*\/[/*]' + let l:n = prevnonblank(l:n-1) + elseif stridx(getline(l:n), '*/') + 1 && s:syn_at(l:n,1) =~? s:syng_com + call cursor(l:n,1) + keepjumps norm! [* + let l:n = search('\m\S','nbW') + else + break endif - let l:lnum = prevnonblank(l:lnum - 1) endwhile + call call('cursor',l:pos) + return l:n endfunction " Check if line 'lnum' has a balanced amount of parentheses. function s:Balanced(lnum) - let [open_0,open_2,open_4] = [0,0,0] + let l:open = 0 let l:line = getline(a:lnum) let pos = match(l:line, '[][(){}]', 0) while pos != -1 - if synIDattr(synID(a:lnum,pos + 1,0),'name') !~? s:syng_strcom - let idx = stridx('(){}[]', l:line[pos]) - if idx % 2 == 0 - let open_{idx} = open_{idx} + 1 - else - let open_{idx - 1} = open_{idx - 1} - 1 + if s:syn_at(a:lnum,pos + 1) !~? s:syng_strcom + let l:open += match(' ' . l:line[pos],'[[({]') + if l:open < 0 + return endif endif - let pos = match(l:line, '[][(){}]', pos + 1) + let pos = match(l:line, (l:open ? + \ '['.escape(tr(l:line[pos],'({[]})',')}][{(').l:line[pos],']').']' : + \ '[][(){}]'), pos + 1) endwhile - return (!open_4 + !open_2 + !open_0) - 2 + return !l:open endfunction -" }}} -function GetJavascriptIndent() - if !exists('b:js_cache') - let b:js_cache = [0,0,0] +function s:OneScope(lnum) + let pline = s:Trim(a:lnum) + let kw = 'else do' + if pline[-1:] == ')' && s:GetPair('(', ')', 'bW', s:skip_expr, 100) > 0 + if s:previous_token() =~# '^\%(await\|each\)$' + call s:previous_token() + let kw = 'for' + else + let kw = 'for if let while with' + endif endif + return pline[-2:] == '=>' || index(split(kw),s:token()) + 1 && + \ s:save_pos('s:previous_token') != '.' +endfunction + +" returns braceless levels started by 'i' and above lines * &sw. 'num' is the +" lineNr which encloses the entire context, 'cont' if whether line 'i' + 1 is +" a continued expression, which could have started in a braceless context +function s:iscontOne(i,num,cont) + let [l:i, l:num, bL] = [a:i, a:num + !a:num, 0] + let pind = a:num ? indent(l:num) + s:W : 0 + let ind = indent(l:i) + (a:cont ? 0 : s:W) + while l:i >= l:num && (ind > pind || l:i == l:num) + if indent(l:i) < ind && s:OneScope(l:i) + let bL += s:W + let l:i = line('.') + elseif !a:cont || bL || ind < indent(a:i) + break + endif + let ind = min([ind, indent(l:i)]) + let l:i = s:PrevCodeLine(l:i - 1) + endwhile + return bL +endfunction + +" https://github.com/sweet-js/sweet.js/wiki/design#give-lookbehind-to-the-reader +function s:IsBlock() + if s:looking_at() == '{' + let l:n = line('.') + let char = s:previous_token() + if match(s:stack,'\cxml\|jsx') + 1 && s:syn_at(line('.'),col('.')-1) =~? 'xml\|jsx' + return char != '{' + elseif char =~ '\k' + if char ==# 'type' + return s:previous_token() !~# '^\%(im\|ex\)port$' + endif + return index(split('return const let import export extends yield default delete var await void typeof throw case new of in instanceof') + \ ,char) < (line('.') != l:n) || s:save_pos('s:previous_token') == '.' + elseif char == '>' + return getline('.')[col('.')-2] == '=' || s:syn_at(line('.'),col('.')) =~? '^jsflow' + elseif char == ':' + return !s:save_pos('s:expr_col') + elseif char == '/' + return s:syn_at(line('.'),col('.')) =~? 'regex' + endif + return char !~ '[=~!<*,?^%|&([]' && + \ (char !~ '[-+]' || l:n != line('.') && getline('.')[col('.')-2] == char) + endif +endfunction + +function GetJavascriptIndent() + let b:js_cache = get(b:,'js_cache',[0,0,0]) " Get the current line. - let l:line = getline(v:lnum) - let syns = synIDattr(synID(v:lnum, 1, 0), 'name') + call cursor(v:lnum,1) + let l:line = getline('.') + " use synstack as it validates syn state and works in an empty line + let s:stack = map(synstack(v:lnum,1),"synIDattr(v:val,'name')") + let syns = get(s:stack,-1,'') - " start with strings,comments,etc.{{{2 - if (l:line !~ '^[''"`]' && syns =~? '\%(string\|template\)') || - \ (l:line !~ '^\s*[/*]' && syns =~? s:syng_comment) + " start with strings,comments,etc. + if syns =~? s:syng_com + if l:line =~ '^\s*\*' + return cindent(v:lnum) + elseif l:line !~ '^\s*\/[/*]' + return -1 + endif + elseif syns =~? s:syng_str + if b:js_cache[0] == v:lnum - 1 && s:Balanced(v:lnum-1) + let b:js_cache[0] = v:lnum + endif return -1 endif - if l:line !~ '^\%(\/\*\|\s*\/\/\)' && syns =~? s:syng_comment - return cindent(v:lnum) - endif let l:lnum = s:PrevCodeLine(v:lnum - 1) - if l:lnum == 0 - return 0 + if !l:lnum + return endif - if (l:line =~# s:expr_case) - let cpo_switch = &cpo - set cpo+=% - let ind = cindent(v:lnum) - let &cpo = cpo_switch - return ind + let l:line = substitute(l:line,'^\s*','','') + if l:line[:1] == '/*' + let l:line = substitute(l:line,'^\%(\/\*.\{-}\*\/\s*\)*','','') + endif + if l:line =~ '^\/[/*]' + let l:line = '' endif - "}}} - " the containing paren, bracket, curly. Memoize, last lineNr either has the - " same scope or starts a new one, unless if it closed a scope. - call cursor(v:lnum,1) - if b:js_cache[0] >= l:lnum && b:js_cache[0] < v:lnum && b:js_cache[0] && - \ (b:js_cache[0] > l:lnum || s:Balanced(l:lnum) > 0) - let num = b:js_cache[1] - elseif syns != '' && l:line[0] =~ '\s' - let pattern = syns =~? 'block' ? ['{','}'] : syns =~? 'jsparen' ? ['(',')'] : - \ syns =~? 'jsbracket'? ['\[','\]'] : ['[({[]','[])}]'] - let num = s:GetPair(pattern[0],pattern[1],'bW',2000) + " the containing paren, bracket, or curly. Many hacks for performance + let idx = index([']',')','}'],l:line[0]) + if b:js_cache[0] >= l:lnum && b:js_cache[0] < v:lnum && + \ (b:js_cache[0] > l:lnum || s:Balanced(l:lnum)) + call call('cursor',b:js_cache[1:]) else - let num = s:GetPair('[({[]','[])}]','bW',2000) + let [s:looksyn, s:checkIn, top] = [v:lnum - 1, 0, (!indent(l:lnum) && + \ s:syn_at(l:lnum,1) !~? s:syng_str) * l:lnum] + if idx + 1 + call s:GetPair(['\[','(','{'][idx],'])}'[idx],'bW','s:skip_func()',2000,top) + elseif getline(v:lnum) !~ '^\S' && syns =~? 'block' + call s:GetPair('{','}','bW','s:skip_func()',2000,top) + else + call s:alternatePair(top) + endif endif - let b:js_cache = [v:lnum,num,line('.') == v:lnum ? b:js_cache[2] : col('.')] - if l:line =~ s:line_pre . '[])}]' - return indent(num) - endif + let b:js_cache = [v:lnum] + (line('.') == v:lnum ? [0,0] : getpos('.')[1:2]) + let num = b:js_cache[1] - call cursor(b:js_cache[1],b:js_cache[2]) - - let swcase = getline(l:lnum) =~# s:expr_case - let pline = swcase ? getline(l:lnum) : substitute(getline(l:lnum), '\%(:\@' && - \ l:line !~ s:line_pre . '{') - return (num > 0 ? indent(num) : -s:sw()) + (s:sw() * 2) + switch_offset - elseif num > 0 - return indent(num) + s:sw() + switch_offset + let [s:W, isOp, bL, switch_offset] = [s:sw(),0,0,0] + if !num || s:IsBlock() + let ilnum = line('.') + let pline = s:save_pos('s:Trim',l:lnum) + if num && s:looking_at() == ')' && s:GetPair('(', ')', 'bW', s:skip_expr, 100) > 0 + let num = ilnum == num ? line('.') : num + if idx < 0 && s:previous_token() ==# 'switch' && s:previous_token() != '.' + if &cino !~ ':' + let switch_offset = s:W + else + let switch_offset = max([-indent(num),s:parse_cino(':')]) + endif + if pline[-1:] != '.' && l:line =~# '^\%(default\|case\)\>' + return indent(num) + switch_offset + endif + endif + endif + if idx < 0 && pline[-1:] !~ '[{;]' + let isOp = (l:line =~# s:opfirst || s:continues(l:lnum,pline)) * s:W + let bL = s:iscontOne(l:lnum,b:js_cache[1],isOp) + let bL -= (bL && l:line[0] == '{') * s:W + endif + elseif idx < 0 && getline(b:js_cache[1])[b:js_cache[2]-1] == '(' && &cino =~ '(' + let pval = s:parse_cino('(') + return !pval ? (s:parse_cino('w') ? 0 : -(!!search('\m\S','W'.s:z,num))) + virtcol('.') : + \ max([indent('.') + pval + (s:GetPair('(',')','nbrmW',s:skip_expr,100,num) * s:W),0]) endif + " main return + if l:line =~ '^\%([])}]\||}\)' + return max([indent(num),0]) + elseif num + return indent(num) + s:W + switch_offset + bL + isOp + endif + return bL + isOp endfunction - let &cpo = s:cpo_save unlet s:cpo_save diff --git a/runtime/indent/ld.vim b/runtime/indent/ld.vim index eccf42b..a72a3a9 100644 --- a/runtime/indent/ld.vim +++ b/runtime/indent/ld.vim @@ -1,7 +1,7 @@ " Vim indent file -" Language: ld(1) script -" Maintainer: Nikolai Weibull -" Latest Revision: 2006-12-20 +" Language: ld(1) script +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2006-12-20 if exists("b:did_indent") finish @@ -65,7 +65,7 @@ function GetLDIndent() if line =~ '^\s*\*' return cindent(v:lnum) elseif line =~ '^\s*}' - return indent(v:lnum) - &sw + return indent(v:lnum) - shiftwidth() endif let pnum = s:prevnonblanknoncomment(v:lnum - 1) @@ -73,11 +73,11 @@ function GetLDIndent() return 0 endif - let ind = indent(pnum) + s:count_braces(pnum, 1) * &sw + let ind = indent(pnum) + s:count_braces(pnum, 1) * shiftwidth() let pline = getline(pnum) if pline =~ '}\s*$' - let ind -= (s:count_braces(pnum, 0) - (pline =~ '^\s*}' ? 1 : 0)) * &sw + let ind -= (s:count_braces(pnum, 0) - (pline =~ '^\s*}' ? 1 : 0)) * shiftwidth() endif return ind diff --git a/runtime/indent/make.vim b/runtime/indent/make.vim index 8412fbb..66a8a40 100644 --- a/runtime/indent/make.vim +++ b/runtime/indent/make.vim @@ -1,7 +1,7 @@ " Vim indent file -" Language: Makefile -" Maintainer: Nikolai Weibull -" Latest Revision: 2007-05-07 +" Language: Makefile +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2007-05-07 if exists("b:did_indent") finish @@ -48,14 +48,14 @@ function GetMakeIndent() if prev_prev_line =~ s:continuation_rx return indent(prev_lnum) elseif prev_line =~ s:rule_rx - return &sw + return shiftwidth() elseif prev_line =~ s:assignment_rx call cursor(prev_lnum, 1) if search(s:assignment_rx, 'W') != 0 return virtcol('.') - 1 else " TODO: ? - return &sw + return shiftwidth() endif else " TODO: OK, this might be a continued shell command, so perhaps indent @@ -66,7 +66,7 @@ function GetMakeIndent() " return indent(prev_lnum) + 2 " endif "endif - return indent(prev_lnum) + &sw + return indent(prev_lnum) + shiftwidth() endif elseif prev_prev_line =~ s:continuation_rx let folded_line = s:remove_continuation(prev_prev_line) . ' ' . s:remove_continuation(prev_line) @@ -102,13 +102,13 @@ function GetMakeIndent() return &ts endif elseif prev_line =~ s:conditional_directive_rx - return &sw + return shiftwidth() else let line = getline(v:lnum) if line =~ s:just_inserted_rule_rx return 0 elseif line =~ s:end_conditional_directive_rx - return v:lnum - 1 == 0 ? 0 : indent(v:lnum - 1) - &sw + return v:lnum - 1 == 0 ? 0 : indent(v:lnum - 1) - shiftwidth() else return v:lnum - 1 == 0 ? 0 : indent(v:lnum - 1) endif diff --git a/runtime/indent/php.vim b/runtime/indent/php.vim index 07ecd8f..06b49f3 100644 --- a/runtime/indent/php.vim +++ b/runtime/indent/php.vim @@ -3,8 +3,8 @@ " Author: John Wellesz " URL: http://www.2072productions.com/vim/indent/php.vim " Home: https://github.com/2072/PHP-Indenting-for-VIm -" Last Change: 2015 September 8th -" Version: 1.60 +" Last Change: 2017 March 12th +" Version: 1.62 " " " Type :help php-indent for available options @@ -141,11 +141,13 @@ 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 = '\\%(\s\+'.s:PHP_validVariable.'\)\=\s*(.*' -let s:endline= '\s*\%(//.*\|#.*\|/\*.*\*/\s*\)\=$' +let s:endline = '\s*\%(//.*\|#.*\|/\*.*\*/\s*\)\=$' +let s:unstated = '\%(^\s*'.s:blockstart.'.*)\|\%(//.*\)\@\)'.s:endline -let s:terminated = '\%(\%(;\%(\s*\%(?>\|}\)\)\=\|<<<\s*[''"]\=\a\w*[''"]\=$\|^\s*}\|^\s*'.s:PHP_validVariable.':\)'.s:endline.'\)\|^[^''"`]*[''"`]$' +let s:terminated = '\%(\%(;\%(\s*\%(?>\|}\)\)\=\|<<<\s*[''"]\=\a\w*[''"]\=$\|^\s*}\|^\s*'.s:PHP_validVariable.':\)'.s:endline.'\)' let s:PHP_startindenttag = '\)\@!\|]*>\%(.*<\/script>\)\@!' +let s:structureHead = '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . s:endline . '\|\' @@ -214,10 +216,28 @@ function! GetLastRealCodeLNum(startline) " {{{ let lnum = lnum - 1 endwhile elseif lastline =~ '^[^''"`]*[''"`][;,]'.s:endline - let tofind=substitute( lastline, '^.*\([''"`]\)[;,].*$', '^[^\1]\\+[\1]$', '') - while getline(lnum) !~? tofind && lnum > 1 - let lnum = lnum - 1 + + let tofind=substitute( lastline, '^.*\([''"`]\)[;,].*$', '^[^\1]\\+[\1]$\\|^[^\1]\\+[=([]\\s*[\1]', '') + let trylnum = lnum + while getline(trylnum) !~? tofind && trylnum > 1 + let trylnum = trylnum - 1 endwhile + + if trylnum == 1 + break + else + if lastline =~ ';'.s:endline + while getline(trylnum) !~? s:terminated && getline(trylnum) !~? '{'.s:endline && trylnum > 1 + let trylnum = prevnonblank(trylnum - 1) + endwhile + + + if trylnum == 1 + break + end + end + let lnum = trylnum + end else break endif @@ -262,7 +282,7 @@ function! FindOpenBracket(lnum, blockStarter) " {{{ while line > 1 let linec = getline(line) - if linec =~ s:terminated || linec =~ '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . s:endline + if linec =~ s:terminated || linec =~ s:structureHead break endif @@ -273,6 +293,20 @@ function! FindOpenBracket(lnum, blockStarter) " {{{ return line endfun " }}} +let s:blockChars = {'{':1, '[': 1, '(': 1, ')':-1, ']':-1, '}':-1} +function! BalanceDirection (str) + + let balance = 0 + + for c in split(a:str, '\zs') + if has_key(s:blockChars, c) + let balance += s:blockChars[c] + endif + endfor + + return balance +endfun + function! FindTheIfOfAnElse (lnum, StopAfterFirstPrevElse) " {{{ if getline(a:lnum) =~# '^\s*}\s*else\%(if\)\=\>' @@ -457,7 +491,7 @@ function! GetPhpIndent() if synname!="" if synname == "SpecStringEntrails" - let b:InPHPcode = -1 + let b:InPHPcode = -1 " thumb down let b:InPHPcode_tofind = "" elseif synname != "phpHereDoc" && synname != "phpHereDocDelimiter" let b:InPHPcode = 1 @@ -540,7 +574,7 @@ function! GetPhpIndent() let b:InPHPcode_and_script = 1 endif - elseif last_line =~ '^[^''"`]\+[''"`]$' + elseif last_line =~ '^[^''"`]\+[''"`]$' " a string identifier with nothing after it and no other string identifier before let b:InPHPcode = -1 let b:InPHPcode_tofind = substitute( last_line, '^.*\([''"`]\).*$', '^[^\1]*\1[;,]$', '') elseif last_line =~? '<<<\s*[''"]\=\a\w*[''"]\=$' @@ -660,7 +694,8 @@ function! GetPhpIndent() let terminated = s:terminated - let unstated = '\%(^\s*'.s:blockstart.'.*)\|\%(//.*\)\@\)'.endline + let unstated = s:unstated + if ind != b:PHP_default_indenting && cline =~# '^\s*else\%(if\)\=\>' let b:PHP_CurrentIndentLevel = b:PHP_default_indenting @@ -673,7 +708,7 @@ function! GetPhpIndent() while last_line_num > 1 - if previous_line =~ terminated || previous_line =~ '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . endline + if previous_line =~ terminated || previous_line =~ s:structureHead let ind = indent(last_line_num) @@ -689,7 +724,7 @@ function! GetPhpIndent() endwhile elseif last_line =~# unstated && cline !~ '^\s*);\='.endline - let ind = ind + s:sw() + let ind = ind + s:sw() " we indent one level further when the preceding line is not stated return ind + addSpecial elseif (ind != b:PHP_default_indenting || last_line =~ '^[)\]]' ) && last_line =~ terminated @@ -699,7 +734,7 @@ function! GetPhpIndent() let isSingleLineBlock = 0 while 1 - if ! isSingleLineBlock && previous_line =~ '^\s*}\|;\s*}'.endline + if ! isSingleLineBlock && previous_line =~ '^\s*}\|;\s*}'.endline " XXX call cursor(last_line_num, 1) if previous_line !~ '^}' @@ -780,10 +815,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 && BalanceDirection(last_line) > 0 let dontIndent = 0 - if last_line =~ '\S\+\s*{'.endline && 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:structureHead let dontIndent = 1 endif @@ -797,9 +832,9 @@ function! GetPhpIndent() return ind + addSpecial endif - elseif last_line =~ '\S\+\s*),'.endline + elseif last_line =~ '\S\+\s*),'.endline && BalanceDirection(last_line) < 0 call cursor(lnum, 1) - call search('),'.endline, 'W') + call search('),'.endline, 'W') " line never begins with ) so no need for 'c' flag let openedparent = searchpair('(', '', ')', 'bW', 'Skippmatch()') if openedparent != lnum let ind = indent(openedparent) @@ -809,7 +844,7 @@ function! GetPhpIndent() let ind = ind + s:sw() - elseif AntepenultimateLine =~ '{'.endline || AntepenultimateLine =~ terminated || AntepenultimateLine =~# s:defaultORcase + elseif AntepenultimateLine =~ '{'.endline && AntepenultimateLine !~? '^\s*use\>' || AntepenultimateLine =~ terminated || AntepenultimateLine =~# s:defaultORcase let ind = ind + s:sw() endif diff --git a/runtime/indent/r.vim b/runtime/indent/r.vim index 01f3812..373b0e6 100644 --- a/runtime/indent/r.vim +++ b/runtime/indent/r.vim @@ -274,7 +274,7 @@ function GetRIndent() let nlnum = s:Get_prev_line(nlnum) let nline = SanitizeRLine(getline(nlnum)) . nline endwhile - if nline =~ '^\s*function\s*(' && indent(nlnum) == &sw + if nline =~ '^\s*function\s*(' && indent(nlnum) == shiftwidth() return 0 endif endif @@ -285,7 +285,7 @@ function GetRIndent() " line is an incomplete command: if line =~ '\<\(if\|while\|for\|function\)\s*()$' || line =~ '\$' - return indent(lnum) + &sw + return indent(lnum) + shiftwidth() endif " Deal with () and [] @@ -293,14 +293,14 @@ function GetRIndent() let pb = s:Get_paren_balance(line, '(', ')') if line =~ '^\s*{$' || line =~ '(\s*{' || (pb == 0 && (line =~ '{$' || line =~ '(\s*{$')) - return indent(lnum) + &sw + return indent(lnum) + shiftwidth() endif let s:curtabstop = repeat(' ', &tabstop) if g:r_indent_align_args == 1 if pb > 0 && line =~ '{$' - return s:Get_last_paren_idx(line, '(', ')', pb) + &sw + return s:Get_last_paren_idx(line, '(', ')', pb) + shiftwidth() endif let bb = s:Get_paren_balance(line, '[', ']') @@ -364,11 +364,11 @@ function GetRIndent() if oline =~ g:r_indent_op_pattern && s:Get_paren_balance(line, "(", ")") == 0 return indent(lnum) else - return indent(lnum) + &sw + return indent(lnum) + shiftwidth() endif else if oline =~ g:r_indent_op_pattern && s:Get_paren_balance(line, "(", ")") == 0 - return indent(lnum) - &sw + return indent(lnum) - shiftwidth() endif endif endif @@ -383,7 +383,7 @@ function GetRIndent() let line = linepiece . line endwhile if line =~ '{$' && post_block == 0 - return indent(lnum) + &sw + return indent(lnum) + shiftwidth() endif " Now we can do some tests again @@ -393,19 +393,19 @@ function GetRIndent() if post_block == 0 let newl = SanitizeRLine(line) if newl =~ '\<\(if\|while\|for\|function\)\s*()$' || newl =~ '\ -" Latest Revision: 2006-12-20 +" Language: readline configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2006-12-20 if exists("b:did_indent") finish @@ -25,11 +25,11 @@ function GetReadlineIndent() let ind = indent(lnum) if getline(lnum) =~ '^\s*$\(if\|else\)\>' - let ind = ind + &sw + let ind = ind + shiftwidth() endif if getline(v:lnum) =~ '^\s*$\(else\|endif\)\>' - let ind = ind - &sw + let ind = ind - shiftwidth() endif return ind diff --git a/runtime/indent/rhelp.vim b/runtime/indent/rhelp.vim index 9dc2031..cf69ae3 100644 --- a/runtime/indent/rhelp.vim +++ b/runtime/indent/rhelp.vim @@ -82,7 +82,7 @@ function GetRHelpIndent() let closeb = strlen(line2) - strlen(line3) let bb = openb - closeb - let ind = indent(lnum) + (bb * &sw) + let ind = indent(lnum) + (bb * shiftwidth()) if line =~ '^\s*}\s*$' let ind = indent(lnum) diff --git a/runtime/indent/rst.vim b/runtime/indent/rst.vim index 80d3308..c1ef8c9 100644 --- a/runtime/indent/rst.vim +++ b/runtime/indent/rst.vim @@ -1,7 +1,7 @@ " Vim indent file -" Language: reStructuredText Documentation Format -" Maintainer: Nikolai Weibull -" Latest Revision: 2011-08-03 +" Language: reStructuredText Documentation Format +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2011-08-03 if exists("b:did_indent") finish diff --git a/runtime/indent/rust.vim b/runtime/indent/rust.vim new file mode 100644 index 0000000..a3051f0 --- /dev/null +++ b/runtime/indent/rust.vim @@ -0,0 +1,213 @@ +" Vim indent file +" Language: Rust +" Author: Chris Morgan +" Last Change: 2017 Mar 21 +" For bugs, patches and license go to https://github.com/rust-lang/rust.vim + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal cindent +setlocal cinoptions=L0,(0,Ws,J1,j1 +setlocal cinkeys=0{,0},!^F,o,O,0[,0] +" Don't think cinwords will actually do anything at all... never mind +setlocal cinwords=for,if,else,while,loop,impl,mod,unsafe,trait,struct,enum,fn,extern + +" Some preliminary settings +setlocal nolisp " Make sure lisp indenting doesn't supersede us +setlocal autoindent " indentexpr isn't much help otherwise +" Also do indentkeys, otherwise # gets shoved to column 0 :-/ +setlocal indentkeys=0{,0},!^F,o,O,0[,0] + +setlocal indentexpr=GetRustIndent(v:lnum) + +" Only define the function once. +if exists("*GetRustIndent") + finish +endif + +let s:save_cpo = &cpo +set cpo&vim + +" Come here when loading the script the first time. + +function! s:get_line_trimmed(lnum) + " Get the line and remove a trailing comment. + " Use syntax highlighting attributes when possible. + " NOTE: this is not accurate; /* */ or a line continuation could trick it + let line = getline(a:lnum) + let line_len = strlen(line) + if has('syntax_items') + " If the last character in the line is a comment, do a binary search for + " the start of the comment. synID() is slow, a linear search would take + " too long on a long line. + if synIDattr(synID(a:lnum, line_len, 1), "name") =~ 'Comment\|Todo' + let min = 1 + let max = line_len + while min < max + let col = (min + max) / 2 + if synIDattr(synID(a:lnum, col, 1), "name") =~ 'Comment\|Todo' + let max = col + else + let min = col + 1 + endif + endwhile + let line = strpart(line, 0, min - 1) + endif + return substitute(line, "\s*$", "", "") + else + " Sorry, this is not complete, nor fully correct (e.g. string "//"). + " Such is life. + return substitute(line, "\s*//.*$", "", "") + endif +endfunction + +function! s:is_string_comment(lnum, col) + if has('syntax_items') + for id in synstack(a:lnum, a:col) + let synname = synIDattr(id, "name") + if synname == "rustString" || synname =~ "^rustComment" + return 1 + endif + endfor + else + " without syntax, let's not even try + return 0 + endif +endfunction + +function GetRustIndent(lnum) + + " Starting assumption: cindent (called at the end) will do it right + " normally. We just want to fix up a few cases. + + let line = getline(a:lnum) + + if has('syntax_items') + let synname = synIDattr(synID(a:lnum, 1, 1), "name") + if synname == "rustString" + " If the start of the line is in a string, don't change the indent + return -1 + elseif synname =~ '\(Comment\|Todo\)' + \ && line !~ '^\s*/\*' " not /* opening line + if synname =~ "CommentML" " multi-line + if line !~ '^\s*\*' && getline(a:lnum - 1) =~ '^\s*/\*' + " This is (hopefully) the line after a /*, and it has no + " leader, so the correct indentation is that of the + " previous line. + return GetRustIndent(a:lnum - 1) + endif + endif + " If it's in a comment, let cindent take care of it now. This is + " for cases like "/*" where the next line should start " * ", not + " "* " as the code below would otherwise cause for module scope + " Fun fact: " /*\n*\n*/" takes two calls to get right! + return cindent(a:lnum) + endif + endif + + " cindent gets second and subsequent match patterns/struct members wrong, + " as it treats the comma as indicating an unfinished statement:: + " + " match a { + " b => c, + " d => e, + " f => g, + " }; + + " Search backwards for the previous non-empty line. + let prevlinenum = prevnonblank(a:lnum - 1) + let prevline = s:get_line_trimmed(prevlinenum) + while prevlinenum > 1 && prevline !~ '[^[:blank:]]' + let prevlinenum = prevnonblank(prevlinenum - 1) + let prevline = s:get_line_trimmed(prevlinenum) + endwhile + + " Handle where clauses nicely: subsequent values should line up nicely. + if prevline[len(prevline) - 1] == "," + \ && prevline =~# '^\s*where\s' + return indent(prevlinenum) + 6 + endif + + if prevline[len(prevline) - 1] == "," + \ && s:get_line_trimmed(a:lnum) !~ '^\s*[\[\]{}]' + \ && prevline !~ '^\s*fn\s' + \ && prevline !~ '([^()]\+,$' + \ && s:get_line_trimmed(a:lnum) !~ '^\s*\S\+\s*=>' + " Oh ho! The previous line ended in a comma! I bet cindent will try to + " take this too far... For now, let's normally use the previous line's + " indent. + + " One case where this doesn't work out is where *this* line contains + " square or curly brackets; then we normally *do* want to be indenting + " further. + " + " Another case where we don't want to is one like a function + " definition with arguments spread over multiple lines: + " + " fn foo(baz: Baz, + " baz: Baz) // <-- cindent gets this right by itself + " + " Another case is similar to the previous, except calling a function + " instead of defining it, or any conditional expression that leaves + " an open paren: + " + " foo(baz, + " baz); + " + " if baz && (foo || + " bar) { + " + " Another case is when the current line is a new match arm. + " + " There are probably other cases where we don't want to do this as + " well. Add them as needed. + return indent(prevlinenum) + endif + + if !has("patch-7.4.355") + " cindent before 7.4.355 doesn't do the module scope well at all; e.g.:: + " + " static FOO : &'static [bool] = [ + " true, + " false, + " false, + " true, + " ]; + " + " uh oh, next statement is indented further! + + " Note that this does *not* apply the line continuation pattern properly; + " that's too hard to do correctly for my liking at present, so I'll just + " start with these two main cases (square brackets and not returning to + " column zero) + + call cursor(a:lnum, 1) + if searchpair('{\|(', '', '}\|)', 'nbW', + \ 's:is_string_comment(line("."), col("."))') == 0 + if searchpair('\[', '', '\]', 'nbW', + \ 's:is_string_comment(line("."), col("."))') == 0 + " Global scope, should be zero + return 0 + else + " At the module scope, inside square brackets only + "if getline(a:lnum)[0] == ']' || search('\[', '', '\]', 'nW') == a:lnum + if line =~ "^\\s*]" + " It's the closing line, dedent it + return 0 + else + return &shiftwidth + endif + endif + endif + endif + + " Fall back on cindent, which does it mostly right + return cindent(a:lnum) +endfunction + +let &cpo = s:save_cpo +unlet s:save_cpo diff --git a/runtime/indent/sas.vim b/runtime/indent/sas.vim new file mode 100644 index 0000000..d591b27 --- /dev/null +++ b/runtime/indent/sas.vim @@ -0,0 +1,138 @@ +" Vim indent file +" Language: SAS +" Maintainer: Zhen-Huan Hu +" Version: 3.0.1 +" Last Change: Mar 13, 2017 + +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal indentexpr=GetSASIndent() +setlocal indentkeys+=;,=~data,=~proc,=~macro + +if exists("*GetSASIndent") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +" Regex that captures the start of a data/proc section +let s:section_str = '\v%(^|;)\s*%(data|proc)>' +" Regex that captures the end of a run-processing section +let s:section_run = '\v%(^|;)\s*run\s*;' +" Regex that captures the end of a data/proc section +let s:section_end = '\v%(^|;)\s*%(quit|enddata)\s*;' + +" Regex that captures the start of a control block (anything inside a section) +let s:block_str = '\v<%(do>%([^;]+<%(to|over)>[^;]+)=|%(define|layout|method|select)>[^;]+|begingraph)\s*;' +" Regex that captures the end of a control block (anything inside a section) +let s:block_end = '\v<%(end|endlayout|endgraph)\s*;' + +" Regex that captures the start of a macro +let s:macro_str = '\v%(^|;)\s*\%macro>' +" Regex that captures the end of a macro +let s:macro_end = '\v%(^|;)\s*\%mend\s*;' + +" Regex that defines the end of the program +let s:program_end = '\v%(^|;)\s*endsas\s*;' + +" List of procs supporting run-processing +let s:run_processing_procs = [ + \ 'catalog', 'chart', 'datasets', 'document', 'ds2', 'plot', 'sql', + \ 'gareabar', 'gbarline', 'gchart', 'gkpi', 'gmap', 'gplot', 'gradar', 'greplay', 'gslide', 'gtile', + \ 'anova', 'arima', 'catmod', 'factex', 'glm', 'model', 'optex', 'plan', 'reg', + \ 'iml', + \ ] + +" Find the line number of previous keyword defined by the regex +function! s:PrevMatch(lnum, regex) + let prev_lnum = prevnonblank(a:lnum - 1) + while prev_lnum > 0 + let prev_line = getline(prev_lnum) + if prev_line =~ a:regex + break + else + let prev_lnum = prevnonblank(prev_lnum - 1) + endif + endwhile + return prev_lnum +endfunction + +" Main function +function! GetSASIndent() + let prev_lnum = prevnonblank(v:lnum - 1) + if prev_lnum ==# 0 + " Leave the indentation of the first line unchanged + return indent(1) + else + let prev_line = getline(prev_lnum) + " Previous non-blank line contains the start of a macro/section/block + " while not the end of a macro/section/block (at the same line) + if (prev_line =~ s:section_str && prev_line !~ s:section_run && prev_line !~ s:section_end) || + \ (prev_line =~ s:block_str && prev_line !~ s:block_end) || + \ (prev_line =~ s:macro_str && prev_line !~ s:macro_end) + let ind = indent(prev_lnum) + &sts + elseif prev_line =~ s:section_run && prev_line !~ s:section_end + let prev_section_str_lnum = s:PrevMatch(v:lnum, s:section_str) + let prev_section_end_lnum = max([ + \ s:PrevMatch(v:lnum, s:section_end), + \ s:PrevMatch(v:lnum, s:macro_end ), + \ s:PrevMatch(v:lnum, s:program_end)]) + " Check if the section supports run-processing + if prev_section_end_lnum < prev_section_str_lnum && + \ getline(prev_section_str_lnum) =~ '\v%(^|;)\s*proc\s+%(' . + \ join(s:run_processing_procs, '|') . ')>' + let ind = indent(prev_lnum) + &sts + else + let ind = indent(prev_lnum) + endif + else + let ind = indent(prev_lnum) + endif + endif + " Re-adjustments based on the inputs of the current line + let curr_line = getline(v:lnum) + if curr_line =~ s:program_end + " End of the program + " Same indentation as the first non-blank line + return indent(nextnonblank(1)) + elseif curr_line =~ s:macro_end + " Current line is the end of a macro + " Match the indentation of the start of the macro + return indent(s:PrevMatch(v:lnum, s:macro_str)) + elseif curr_line =~ s:block_end && curr_line !~ s:block_str + " Re-adjust if current line is the end of a block + " while not the beginning of a block (at the same line) + " Returning the indent of previous block start directly + " would not work due to nesting + let ind = ind - &sts + elseif curr_line =~ s:section_str || curr_line =~ s:section_run || curr_line =~ s:section_end + " Re-adjust if current line is the start/end of a section + " since the end of a section could be inexplicit + let prev_section_str_lnum = s:PrevMatch(v:lnum, s:section_str) + " Check if the previous section supports run-processing + if getline(prev_section_str_lnum) =~ '\v%(^|;)\s*proc\s+%(' . + \ join(s:run_processing_procs, '|') . ')>' + let prev_section_end_lnum = max([ + \ s:PrevMatch(v:lnum, s:section_end), + \ s:PrevMatch(v:lnum, s:macro_end ), + \ s:PrevMatch(v:lnum, s:program_end)]) + else + let prev_section_end_lnum = max([ + \ s:PrevMatch(v:lnum, s:section_end), + \ s:PrevMatch(v:lnum, s:section_run), + \ s:PrevMatch(v:lnum, s:macro_end ), + \ s:PrevMatch(v:lnum, s:program_end)]) + endif + if prev_section_end_lnum < prev_section_str_lnum + let ind = ind - &sts + endif + endif + return ind +endfunction + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/indent/scala.vim b/runtime/indent/scala.vim index f97c79b..6fd8ca9 100644 --- a/runtime/indent/scala.vim +++ b/runtime/indent/scala.vim @@ -412,24 +412,24 @@ function! GetScalaIndent() if prevline =~ '^\s*\.' return ind else - return ind + &shiftwidth + return ind + shiftwidth() endif endif " Indent html literals if prevline !~ '/>\s*$' && prevline =~ '^\s*<[a-zA-Z][^>]*>\s*$' call scala#ConditionalConfirm("3") - return ind + &shiftwidth + return ind + shiftwidth() endif " assumes curly braces around try-block if curline =~ '^\s*}\s*\' - return ind - &shiftwidth + return ind - shiftwidth() elseif curline =~ '^\s*\' return ind endif - " Add a 'shiftwidth' after lines that start a block + " Add a shiftwidth()' after lines that start a block " If 'if', 'for' or 'while' end with ), this is a one-line block " If 'val', 'var', 'def' end with =, this is a one-line block if (prevline =~ '^\s*\<\%(\%(}\?\s*else\s\+\)\?if\|for\|while\)\>.*[)=]\s*$' && scala#NumberOfBraceGroups(prevline) <= 1) @@ -438,7 +438,7 @@ function! GetScalaIndent() \ || prevline =~ '^\s*\%(}\s*\)\?\\s*$' \ || prevline =~ '=\s*$' call scala#ConditionalConfirm("4") - let ind = ind + &shiftwidth + let ind = ind + shiftwidth() elseif prevline =~ '^\s*\<\%(}\?\s*else\s\+\)\?if\>' && curline =~ '^\s*}\?\s*\' return ind endif @@ -447,7 +447,7 @@ function! GetScalaIndent() let bracketCount = scala#CountBrackets(prevline, '{', '}') if bracketCount > 0 || prevline =~ '.*{\s*$' call scala#ConditionalConfirm("5b") - let ind = ind + &shiftwidth + let ind = ind + shiftwidth() elseif bracketCount < 0 call scala#ConditionalConfirm("6b") " if the closing brace actually completes the braces entirely, then we @@ -475,7 +475,7 @@ function! GetScalaIndent() let bracketCount = scala#CountBrackets(prevline, '(', ')') if bracketCount > 0 || prevline =~ '.*(\s*$' call scala#ConditionalConfirm("5a") - let ind = ind + &shiftwidth + let ind = ind + shiftwidth() elseif bracketCount < 0 call scala#ConditionalConfirm("6a") " if the closing brace actually completes the braces entirely, then we @@ -497,7 +497,7 @@ function! GetScalaIndent() else " This is the only part that's different from from the '{', '}' one below " Yup... some refactoring is necessary at some point. - let ind = ind + (bracketCount * &shiftwidth) + let ind = ind + (bracketCount * shiftwidth()) let lineCompletedBrackets = 1 endif endif @@ -506,10 +506,10 @@ function! GetScalaIndent() if curline =~ '^\s*}\?\s*\\%(\s\+\\s*(.*)\)\?\s*{\?\s*$' && \ ! scala#LineIsCompleteIf(prevline) && \ prevline !~ '^.*}\s*$' - let ind = ind - &shiftwidth + let ind = ind - shiftwidth() endif - " Subtract a 'shiftwidth' on '}' or html + " Subtract a shiftwidth()' on '}' or html let curCurlyCount = scala#CountCurlies(curline) if curCurlyCount < 0 call scala#ConditionalConfirm("14a") @@ -517,7 +517,7 @@ function! GetScalaIndent() return indent(matchline) elseif curline =~ '^\s*]*>' call scala#ConditionalConfirm("14c") - return ind - &shiftwidth + return ind - shiftwidth() endif let prevParenCount = scala#CountParens(prevline) @@ -529,7 +529,7 @@ function! GetScalaIndent() let prevCurlyCount = scala#CountCurlies(prevline) if prevCurlyCount == 0 && prevline =~ '^.*\%(=>\|⇒\)\s*$' && prevline !~ '^\s*this\s*:.*\%(=>\|⇒\)\s*$' && curline !~ '^\s*\' call scala#ConditionalConfirm("16") - let ind = ind + &shiftwidth + let ind = ind + shiftwidth() endif if ind == originalIndentValue && curline =~ '^\s*\' @@ -555,7 +555,7 @@ function! GetScalaIndent() if scala#LineIsAClosingXML(prevline) if scala#LineCompletesXML(prevlnum, prevline) call scala#ConditionalConfirm("20a") - return ind - &shiftwidth + return ind - shiftwidth() else call scala#ConditionalConfirm("20b") return ind @@ -566,7 +566,7 @@ function! GetScalaIndent() "let indentMultiplier = scala#LineCompletesDefValr(prevlnum, prevline) "if indentMultiplier != 0 " call scala#ConditionalConfirm("19a") - " let ind = ind - (indentMultiplier * &shiftwidth) + " let ind = ind - (indentMultiplier * shiftwidth()) let defValrLine = scala#Test(prevlnum, prevline, '{', '}') if defValrLine != -1 call scala#ConditionalConfirm("21a") @@ -575,10 +575,10 @@ function! GetScalaIndent() call scala#ConditionalConfirm("21b") if scala#GetLine(prevnonblank(prevlnum - 1)) =~ '^.*\\s*\%(//.*\)\?$' call scala#ConditionalConfirm("21c") - let ind = ind - &shiftwidth + let ind = ind - shiftwidth() elseif scala#LineCompletesIfElse(prevlnum, prevline) call scala#ConditionalConfirm("21d") - let ind = ind - &shiftwidth + let ind = ind - shiftwidth() elseif scala#CountParens(curline) < 0 && curline =~ '^\s*)' && scala#GetLine(scala#GetLineThatMatchesBracket('(', ')')) =~ '.*(\s*$' " Handles situations that look like this: " @@ -592,7 +592,7 @@ function! GetScalaIndent() " 10 " ).somethingHere() call scala#ConditionalConfirm("21e") - let ind = ind - &shiftwidth + let ind = ind - shiftwidth() endif endif endif diff --git a/runtime/indent/tcl.vim b/runtime/indent/tcl.vim index a92f57d..e9d61e4 100644 --- a/runtime/indent/tcl.vim +++ b/runtime/indent/tcl.vim @@ -56,7 +56,7 @@ function GetTclIndent() if line =~ '^\s*\*' return cindent(v:lnum) elseif line =~ '^\s*}' - return indent(v:lnum) - &sw + return indent(v:lnum) - shiftwidth() endif let pnum = s:prevnonblanknoncomment(v:lnum - 1) @@ -64,11 +64,11 @@ function GetTclIndent() return 0 endif - let ind = indent(pnum) + s:count_braces(pnum, 1) * &sw + let ind = indent(pnum) + s:count_braces(pnum, 1) * shiftwidth() let pline = getline(pnum) if pline =~ '}\s*$' - let ind -= (s:count_braces(pnum, 0) - (pline =~ '^\s*}' ? 1 : 0)) * &sw + let ind -= (s:count_braces(pnum, 0) - (pline =~ '^\s*}' ? 1 : 0)) * shiftwidth() endif return ind diff --git a/runtime/indent/tcsh.vim b/runtime/indent/tcsh.vim index 59a9d56..ed08e6c 100644 --- a/runtime/indent/tcsh.vim +++ b/runtime/indent/tcsh.vim @@ -32,17 +32,17 @@ function TcshGetIndent() let ind = indent(lnum) let line = getline(lnum) if line =~ '\v^\s*%(while|foreach)>|^\s*%(case\s.*:|default:|else)\s*$|%(' - let ind = ind - &sw + let ind = ind - shiftwidth() endif " Subtract indent if current line has on end, endif, case commands let line = getline(v:lnum) if line =~ '\v^\s*%(else|end|endif)\s*$' - let ind = ind - &sw + let ind = ind - shiftwidth() endif return ind diff --git a/runtime/indent/tf.vim b/runtime/indent/tf.vim index 1759773..a980538 100644 --- a/runtime/indent/tf.vim +++ b/runtime/indent/tf.vim @@ -1,8 +1,8 @@ " Vim indent file " Language: tf (TinyFugue) " Maintainer: Christian J. Robinson -" URL: http://christianrobinson.name/vim/indent/tf.vim -" Last Change: 2002 May 29 +" URL: http://www.vim.org/scripts/script.php?script_id=174 +" Last Change: 2017 Feb 25 " Only load this indent file when no other was loaded. if exists("b:did_indent") @@ -38,14 +38,14 @@ function GetTFIndent() endif if line =~ '\(/def.*\\\|/for.*\(%;\s*\)\@\ -" Latest Revision: 2011-03-14 +" Language: Treetop +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2011-03-14 if exists("b:did_indent") finish @@ -26,12 +26,12 @@ function GetTreetopIndent() let line = getline(pnum) if line =~ '^\s*\%(grammar\|module\|rule\)\>' - let ind += &sw + let ind += shiftwidth() endif let line = getline(v:lnum) if line =~ '^\s*end\>' - let ind -= &sw + let ind -= shiftwidth() end retur ind diff --git a/runtime/indent/verilog.vim b/runtime/indent/verilog.vim index ecca462..6222dc3 100644 --- a/runtime/indent/verilog.vim +++ b/runtime/indent/verilog.vim @@ -1,10 +1,12 @@ " Language: Verilog HDL -" Maintainer: Chih-Tsun Huang -" Last Change: 2011 Dec 10 by Thilo Six -" URL: http://larc.ee.nthu.edu.tw/~cthuang/vim/indent/verilog.vim +" Maintainer: Chih-Tsun Huang +" Last Change: 2017 Feb 24 by Chih-Tsun Huang +" URL: http://www.cs.nthu.edu.tw/~cthuang/vim/indent/verilog.vim " " Credits: " Suggestions for improvement, bug reports by +" Takuya Fujiwara +" Thilo Six " Leo Butlero " " Buffer Variables: @@ -38,7 +40,7 @@ function GetVerilogIndent() if exists('b:verilog_indent_width') let offset = b:verilog_indent_width else - let offset = &sw + let offset = shiftwidth() endif if exists('b:verilog_indent_modules') let indent_modules = offset diff --git a/runtime/indent/xf86conf.vim b/runtime/indent/xf86conf.vim index 4174a24..5a8bc0f 100644 --- a/runtime/indent/xf86conf.vim +++ b/runtime/indent/xf86conf.vim @@ -1,7 +1,7 @@ " Vim indent file -" Language: XFree86 Configuration File -" Maintainer: Nikolai Weibull -" Latest Revision: 2006-12-20 +" Language: XFree86 Configuration File +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2006-12-20 if exists("b:did_indent") finish @@ -26,11 +26,11 @@ function GetXF86ConfIndent() let ind = indent(lnum) if getline(lnum) =~? '^\s*\(Sub\)\=Section\>' - let ind = ind + &sw + let ind = ind + shiftwidth() endif if getline(v:lnum) =~? '^\s*End\(Sub\)\=Section\>' - let ind = ind - &sw + let ind = ind - shiftwidth() endif return ind diff --git a/runtime/indent/xinetd.vim b/runtime/indent/xinetd.vim index c812723..977ee3d 100644 --- a/runtime/indent/xinetd.vim +++ b/runtime/indent/xinetd.vim @@ -1,7 +1,7 @@ " Vim indent file -" Language: xinetd.conf(5) configuration file -" Maintainer: Nikolai Weibull -" Latest Revision: 2006-12-20 +" Language: xinetd.conf(5) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2006-12-20 if exists("b:did_indent") finish @@ -47,8 +47,8 @@ function GetXinetdIndent() return 0 endif - return indent(pnum) + s:count_braces(pnum, 1) * &sw - \ - s:count_braces(v:lnum, 0) * &sw + return indent(pnum) + s:count_braces(pnum, 1) * shiftwidth() + \ - s:count_braces(v:lnum, 0) * shiftwidth() endfunction let &cpo = s:keepcpo diff --git a/runtime/indent/yacc.vim b/runtime/indent/yacc.vim index 2ab7d7b..01ad4fc 100644 --- a/runtime/indent/yacc.vim +++ b/runtime/indent/yacc.vim @@ -1,7 +1,7 @@ " Vim indent file -" Language: YACC input file -" Maintainer: Nikolai Weibull -" Latest Revision: 2006-12-20 +" Language: YACC input file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2006-12-20 " Only load this indent file when no other was loaded. if exists("b:did_indent") diff --git a/runtime/keymap/armenian-eastern_utf-8.vim b/runtime/keymap/armenian-eastern_utf-8.vim index 7b03c5a..eaa60a7 100644 --- a/runtime/keymap/armenian-eastern_utf-8.vim +++ b/runtime/keymap/armenian-eastern_utf-8.vim @@ -1,5 +1,5 @@ " Maintainer: Benjamin Linskey -" Last Changed: 2016 July 20 +" Last Changed: 2016 December 5 " URL: https://github.com/blinskey/vim-armenian-keymaps let b:keymap_name = "hy" @@ -98,6 +98,8 @@ f ֆ 7 . 8 « 9 » +* ( +( ) \\ ' | ՞ diff --git a/runtime/keymap/armenian-western_utf-8.vim b/runtime/keymap/armenian-western_utf-8.vim index e02485e..cf3efdc 100644 --- a/runtime/keymap/armenian-western_utf-8.vim +++ b/runtime/keymap/armenian-western_utf-8.vim @@ -1,5 +1,5 @@ " Maintainer: Benjamin Linskey -" Last Changed: 2016 July 20 +" Last Changed: 2016 December 5 " URL: https://github.com/blinskey/vim-armenian-keymaps let b:keymap_name = "hy" @@ -98,6 +98,8 @@ f ֆ 7 . 8 « 9 » +* ( +( ) \\ ' | ՞ diff --git a/runtime/macros/less.vim b/runtime/macros/less.vim index 72b53f2..53857c6 100644 --- a/runtime/macros/less.vim +++ b/runtime/macros/less.vim @@ -1,6 +1,6 @@ " Vim script to work like "less" " Maintainer: Bram Moolenaar -" Last Change: 2015 Nov 15 +" Last Change: 2017 Mar 31 " Avoid loading this file twice, allow the user to define his own script. if exists("loaded_less") @@ -81,6 +81,10 @@ fun! s:Help() echo "\n" echo "/pattern Search for pattern ?pattern Search backward for pattern" echo "n next pattern match N Previous pattern match" + if &foldmethod != "manual" + echo "\n" + echo "zR open all folds zm increase fold level" + endif echo "\n" echo ":n Next file :p Previous file" echo "\n" @@ -96,7 +100,11 @@ map map map map -map z +" If 'foldmethod' was changed keep the "z" commands, e.g. "zR" to open all +" folds. +if &foldmethod == "manual" + map z +endif map fun! s:NextPage() if line(".") == line("$") diff --git a/runtime/macros/matchit.vim b/runtime/macros/matchit.vim index 9cfe2e5..f6f463f 100644 --- a/runtime/macros/matchit.vim +++ b/runtime/macros/matchit.vim @@ -1,3 +1,5 @@ " Load the matchit package. " For those users who were loading the matchit plugin from here. -packadd matchit +if 1 + packadd matchit +endif diff --git a/runtime/menu.vim b/runtime/menu.vim index 5c34616..87ac937 100644 --- a/runtime/menu.vim +++ b/runtime/menu.vim @@ -2,7 +2,7 @@ " You can also use this as a start for your own set of menus. " " Maintainer: Bram Moolenaar -" Last Change: 2016 Jul 27 +" Last Change: 2017 Mar 04 " Note that ":an" (short for ":anoremenu") is often used to make a menu work " in all modes and avoid side effects from mappings defined by the user. @@ -70,7 +70,7 @@ endif " Help menu an 9999.10 &Help.&Overview :help an 9999.20 &Help.&User\ Manual :help usr_toc -an 9999.30 &Help.&How-to\ links :help how-to +an 9999.30 &Help.&How-To\ Links :help how-to an 9999.40 &Help.&Find\.\.\. :call Helpfind() an 9999.45 &Help.-sep1- an 9999.50 &Help.&Credits :help credits @@ -112,7 +112,7 @@ an 10.350 &File.Save\ &As\.\.\.:sav :browse confirm saveas if has("diff") an 10.400 &File.-SEP2- - an 10.410 &File.Split\ &Diff\ with\.\.\. :browse vert diffsplit + an 10.410 &File.Split\ &Diff\ With\.\.\. :browse vert diffsplit an 10.420 &File.Split\ Patched\ &By\.\.\. :browse vert diffpatch endif @@ -214,25 +214,25 @@ endfun " Edit/Global Settings an 20.440.100 &Edit.&Global\ Settings.Toggle\ Pattern\ &Highlight:set\ hls! :set hls! hls? -an 20.440.110 &Edit.&Global\ Settings.Toggle\ &Ignore-case:set\ ic! :set ic! ic? -an 20.440.110 &Edit.&Global\ Settings.Toggle\ &Showmatch:set\ sm! :set sm! sm? - -an 20.440.120 &Edit.&Global\ Settings.&Context\ lines.\ 1\ :set so=1 -an 20.440.120 &Edit.&Global\ Settings.&Context\ lines.\ 2\ :set so=2 -an 20.440.120 &Edit.&Global\ Settings.&Context\ lines.\ 3\ :set so=3 -an 20.440.120 &Edit.&Global\ Settings.&Context\ lines.\ 4\ :set so=4 -an 20.440.120 &Edit.&Global\ Settings.&Context\ lines.\ 5\ :set so=5 -an 20.440.120 &Edit.&Global\ Settings.&Context\ lines.\ 7\ :set so=7 -an 20.440.120 &Edit.&Global\ Settings.&Context\ lines.\ 10\ :set so=10 -an 20.440.120 &Edit.&Global\ Settings.&Context\ lines.\ 100\ :set so=100 +an 20.440.110 &Edit.&Global\ Settings.Toggle\ &Ignoring\ Case:set\ ic! :set ic! ic? +an 20.440.110 &Edit.&Global\ Settings.Toggle\ &Showing\ Matched\ Pairs:set\ sm! :set sm! sm? + +an 20.440.120 &Edit.&Global\ Settings.&Context\ Lines.\ 1\ :set so=1 +an 20.440.120 &Edit.&Global\ Settings.&Context\ Lines.\ 2\ :set so=2 +an 20.440.120 &Edit.&Global\ Settings.&Context\ Lines.\ 3\ :set so=3 +an 20.440.120 &Edit.&Global\ Settings.&Context\ Lines.\ 4\ :set so=4 +an 20.440.120 &Edit.&Global\ Settings.&Context\ Lines.\ 5\ :set so=5 +an 20.440.120 &Edit.&Global\ Settings.&Context\ Lines.\ 7\ :set so=7 +an 20.440.120 &Edit.&Global\ Settings.&Context\ Lines.\ 10\ :set so=10 +an 20.440.120 &Edit.&Global\ Settings.&Context\ Lines.\ 100\ :set so=100 an 20.440.130.40 &Edit.&Global\ Settings.&Virtual\ Edit.Never :set ve= an 20.440.130.50 &Edit.&Global\ Settings.&Virtual\ Edit.Block\ Selection :set ve=block -an 20.440.130.60 &Edit.&Global\ Settings.&Virtual\ Edit.Insert\ mode :set ve=insert +an 20.440.130.60 &Edit.&Global\ Settings.&Virtual\ Edit.Insert\ Mode :set ve=insert an 20.440.130.70 &Edit.&Global\ Settings.&Virtual\ Edit.Block\ and\ Insert :set ve=block,insert an 20.440.130.80 &Edit.&Global\ Settings.&Virtual\ Edit.Always :set ve=all an 20.440.140 &Edit.&Global\ Settings.Toggle\ Insert\ &Mode:set\ im! :set im! -an 20.440.145 &Edit.&Global\ Settings.Toggle\ Vi\ C&ompatible:set\ cp! :set cp! +an 20.440.145 &Edit.&Global\ Settings.Toggle\ Vi\ C&ompatibility:set\ cp! :set cp! an 20.440.150 &Edit.&Global\ Settings.Search\ &Path\.\.\. :call SearchP() an 20.440.160 &Edit.&Global\ Settings.Ta&g\ Files\.\.\. :call TagFiles() " @@ -276,13 +276,13 @@ endfun " Boolean options an 20.440.100 &Edit.F&ile\ Settings.Toggle\ Line\ &Numbering:set\ nu! :set nu! nu? -an 20.440.105 &Edit.F&ile\ Settings.Toggle\ relati&ve\ Line\ Numbering:set\ rnu! :set rnu! rnu? +an 20.440.105 &Edit.F&ile\ Settings.Toggle\ Relati&ve\ Line\ Numbering:set\ rnu! :set rnu! rnu? an 20.440.110 &Edit.F&ile\ Settings.Toggle\ &List\ Mode:set\ list! :set list! list? -an 20.440.120 &Edit.F&ile\ Settings.Toggle\ Line\ &Wrap:set\ wrap! :set wrap! wrap? -an 20.440.130 &Edit.F&ile\ Settings.Toggle\ W&rap\ at\ word:set\ lbr! :set lbr! lbr? -an 20.440.160 &Edit.F&ile\ Settings.Toggle\ &expand-tab:set\ et! :set et! et? -an 20.440.170 &Edit.F&ile\ Settings.Toggle\ &auto-indent:set\ ai! :set ai! ai? -an 20.440.180 &Edit.F&ile\ Settings.Toggle\ &C-indenting:set\ cin! :set cin! cin? +an 20.440.120 &Edit.F&ile\ Settings.Toggle\ Line\ &Wrapping:set\ wrap! :set wrap! wrap? +an 20.440.130 &Edit.F&ile\ Settings.Toggle\ W&rapping\ at\ Word:set\ lbr! :set lbr! lbr? +an 20.440.160 &Edit.F&ile\ Settings.Toggle\ Tab\ &Expanding:set\ et! :set et! et? +an 20.440.170 &Edit.F&ile\ Settings.Toggle\ &Auto\ Indenting:set\ ai! :set ai! ai? +an 20.440.180 &Edit.F&ile\ Settings.Toggle\ &C-Style\ Indenting:set\ cin! :set cin! cin? " other options an 20.440.600 &Edit.F&ile\ Settings.-SEP2- @@ -311,7 +311,7 @@ fun! s:TextWidth() " Remove leading zeros to avoid it being used as an octal number. " But keep a zero by itself. let tw = substitute(n, "^0*", "", "") - let &tw = tw == '' ? 0 : tw + let &tw = tw == '' ? 0 : tw endif endfun @@ -396,10 +396,10 @@ if !exists("g:ctags_command") endif endif -an 40.300 &Tools.&Jump\ to\ this\ tagg^] g -vunmenu &Tools.&Jump\ to\ this\ tagg^] -vnoremenu &Tools.&Jump\ to\ this\ tagg^] g -an 40.310 &Tools.Jump\ &back^T +an 40.300 &Tools.&Jump\ to\ This\ Tagg^] g +vunmenu &Tools.&Jump\ to\ This\ Tagg^] +vnoremenu &Tools.&Jump\ to\ This\ Tagg^] g +an 40.310 &Tools.Jump\ &Back^T an 40.320 &Tools.Build\ &Tags\ File :exe "!" . g:ctags_command if has("folding") || has("spell") @@ -410,17 +410,17 @@ endif if has("spell") an 40.335.110 &Tools.&Spelling.&Spell\ Check\ On :set spell an 40.335.120 &Tools.&Spelling.Spell\ Check\ &Off :set nospell - an 40.335.130 &Tools.&Spelling.To\ &Next\ error]s ]s - an 40.335.130 &Tools.&Spelling.To\ &Previous\ error[s [s + an 40.335.130 &Tools.&Spelling.To\ &Next\ Error]s ]s + an 40.335.130 &Tools.&Spelling.To\ &Previous\ Error[s [s an 40.335.140 &Tools.&Spelling.Suggest\ &Correctionsz= z= - an 40.335.150 &Tools.&Spelling.&Repeat\ correction:spellrepall :spellrepall + an 40.335.150 &Tools.&Spelling.&Repeat\ Correction:spellrepall :spellrepall an 40.335.200 &Tools.&Spelling.-SEP1- - an 40.335.210 &Tools.&Spelling.Set\ language\ to\ "en" :set spl=en spell - an 40.335.220 &Tools.&Spelling.Set\ language\ to\ "en_au" :set spl=en_au spell - an 40.335.230 &Tools.&Spelling.Set\ language\ to\ "en_ca" :set spl=en_ca spell - an 40.335.240 &Tools.&Spelling.Set\ language\ to\ "en_gb" :set spl=en_gb spell - an 40.335.250 &Tools.&Spelling.Set\ language\ to\ "en_nz" :set spl=en_nz spell - an 40.335.260 &Tools.&Spelling.Set\ language\ to\ "en_us" :set spl=en_us spell + an 40.335.210 &Tools.&Spelling.Set\ Language\ to\ "en" :set spl=en spell + an 40.335.220 &Tools.&Spelling.Set\ Language\ to\ "en_au" :set spl=en_au spell + an 40.335.230 &Tools.&Spelling.Set\ Language\ to\ "en_ca" :set spl=en_ca spell + an 40.335.240 &Tools.&Spelling.Set\ Language\ to\ "en_gb" :set spl=en_gb spell + an 40.335.250 &Tools.&Spelling.Set\ Language\ to\ "en_nz" :set spl=en_nz spell + an 40.335.260 &Tools.&Spelling.Set\ Language\ to\ "en_us" :set spl=en_us spell an 40.335.270 &Tools.&Spelling.&Find\ More\ Languages :call SpellLang() let s:undo_spellang = ['aun &Tools.&Spelling.&Find\ More\ Languages'] @@ -437,7 +437,7 @@ if has("spell") endif if !exists("g:menutrans_set_lang_to") - let g:menutrans_set_lang_to = 'Set language to' + let g:menutrans_set_lang_to = 'Set Language to' endif let found = 0 @@ -474,14 +474,14 @@ endif " Tools.Fold Menu if has("folding") " open close folds - an 40.340.110 &Tools.&Folding.&Enable/Disable\ foldszi zi + an 40.340.110 &Tools.&Folding.&Enable/Disable\ Foldszi zi an 40.340.120 &Tools.&Folding.&View\ Cursor\ Linezv zv - an 40.340.120 &Tools.&Folding.Vie&w\ Cursor\ Line\ onlyzMzx zMzx - inoremenu 40.340.120 &Tools.&Folding.Vie&w\ Cursor\ Line\ onlyzMzx zMzx - an 40.340.130 &Tools.&Folding.C&lose\ more\ foldszm zm - an 40.340.140 &Tools.&Folding.&Close\ all\ foldszM zM - an 40.340.150 &Tools.&Folding.O&pen\ more\ foldszr zr - an 40.340.160 &Tools.&Folding.&Open\ all\ foldszR zR + an 40.340.120 &Tools.&Folding.Vie&w\ Cursor\ Line\ OnlyzMzx zMzx + inoremenu 40.340.120 &Tools.&Folding.Vie&w\ Cursor\ Line\ OnlyzMzx zMzx + an 40.340.130 &Tools.&Folding.C&lose\ More\ Foldszm zm + an 40.340.140 &Tools.&Folding.&Close\ All\ FoldszM zM + an 40.340.150 &Tools.&Folding.O&pen\ More\ Foldszr zr + an 40.340.160 &Tools.&Folding.&Open\ All\ FoldszR zR " fold method an 40.340.200 &Tools.&Folding.-SEP1- an 40.340.210 &Tools.&Folding.Fold\ Met&hod.M&anual :set fdm=manual @@ -496,14 +496,14 @@ if has("folding") an 40.340.240 &Tools.&Folding.Delete\ &All\ FoldszD zD " moving around in folds an 40.340.300 &Tools.&Folding.-SEP2- - an 40.340.310.10 &Tools.&Folding.Fold\ col&umn\ width.\ &0\ :set fdc=0 - an 40.340.310.20 &Tools.&Folding.Fold\ col&umn\ width.\ &2\ :set fdc=2 - an 40.340.310.30 &Tools.&Folding.Fold\ col&umn\ width.\ &3\ :set fdc=3 - an 40.340.310.40 &Tools.&Folding.Fold\ col&umn\ width.\ &4\ :set fdc=4 - an 40.340.310.50 &Tools.&Folding.Fold\ col&umn\ width.\ &5\ :set fdc=5 - an 40.340.310.60 &Tools.&Folding.Fold\ col&umn\ width.\ &6\ :set fdc=6 - an 40.340.310.70 &Tools.&Folding.Fold\ col&umn\ width.\ &7\ :set fdc=7 - an 40.340.310.80 &Tools.&Folding.Fold\ col&umn\ width.\ &8\ :set fdc=8 + an 40.340.310.10 &Tools.&Folding.Fold\ Col&umn\ Width.\ &0\ :set fdc=0 + an 40.340.310.20 &Tools.&Folding.Fold\ Col&umn\ Width.\ &2\ :set fdc=2 + an 40.340.310.30 &Tools.&Folding.Fold\ Col&umn\ Width.\ &3\ :set fdc=3 + an 40.340.310.40 &Tools.&Folding.Fold\ Col&umn\ Width.\ &4\ :set fdc=4 + an 40.340.310.50 &Tools.&Folding.Fold\ Col&umn\ Width.\ &5\ :set fdc=5 + an 40.340.310.60 &Tools.&Folding.Fold\ Col&umn\ Width.\ &6\ :set fdc=6 + an 40.340.310.70 &Tools.&Folding.Fold\ Col&umn\ Width.\ &7\ :set fdc=7 + an 40.340.310.80 &Tools.&Folding.Fold\ Col&umn\ Width.\ &8\ :set fdc=8 endif " has folding if has("diff") @@ -531,7 +531,7 @@ an 40.430.70 &Tools.Error\ &Window.&Close:cclose :cclose an 40.520 &Tools.-SEP3- an 40.530 &Tools.&Convert\ to\ HEX:%!xxd \ :call XxdConv() -an 40.540 &Tools.Conve&rt\ back:%!xxd\ -r +an 40.540 &Tools.Conve&rt\ Back:%!xxd\ -r \ :call XxdBack() " Use a function to do the conversion, so that it also works with 'insertmode' @@ -588,7 +588,7 @@ while strlen(s:n) > 0 endif " Ignore case for VMS and windows let s:name = substitute(s:name, '\c.*[/\\:\]]\([^/\\:]*\)\.vim', '\1', '') - exe "an 30.440." . s:idx . ' &Tools.Se&T\ Compiler.' . s:name . " :compiler " . s:name . "" + exe "an 30.440." . s:idx . ' &Tools.Se&t\ Compiler.' . s:name . " :compiler " . s:name . "" unlet s:name unlet s:i let s:idx = s:idx + 10 @@ -829,8 +829,8 @@ an 70.345 &Window.Close\ &Other(s)^Wo :confirm only an 70.350 &Window.-SEP2- an 70.355 &Window.Move\ &To.&Top^WK K an 70.355 &Window.Move\ &To.&Bottom^WJ J -an 70.355 &Window.Move\ &To.&Left\ side^WH H -an 70.355 &Window.Move\ &To.&Right\ side^WL L +an 70.355 &Window.Move\ &To.&Left\ Side^WH H +an 70.355 &Window.Move\ &To.&Right\ Side^WL L an 70.360 &Window.Rotate\ &Up^WR R an 70.362 &Window.Rotate\ &Down^Wr r an 70.365 &Window.-SEP3- @@ -913,7 +913,7 @@ if has("spell") let s:suglist = spellsuggest(w, 10) endif if len(s:suglist) > 0 - let s:changeitem = 'change\ "' . escape(w, ' .'). '"\ to' + let s:changeitem = 'Change\ "' . escape(w, ' .'). '"\ to' let s:fromword = w let pri = 1 " set 'cpo' to include the @@ -925,10 +925,10 @@ if has("spell") let pri += 1 endfor - let s:additem = 'add\ "' . escape(w, ' .') . '"\ to\ word\ list' + let s:additem = 'Add\ "' . escape(w, ' .') . '"\ to\ Word\ List' exe 'anoremenu 1.6 PopUp.' . s:additem . ' :spellgood ' . w . '' - let s:ignoreitem = 'ignore\ "' . escape(w, ' .') . '"' + let s:ignoreitem = 'Ignore\ "' . escape(w, ' .') . '"' exe 'anoremenu 1.7 PopUp.' . s:ignoreitem . ' :spellgood! ' . w . '' anoremenu 1.8 PopUp.-SpellSep- : @@ -1067,7 +1067,7 @@ endif " !exists("did_install_default_menus") if !exists("did_install_syntax_menu") an 50.212 &Syntax.&Manual :syn manual an 50.214 &Syntax.A&utomatic :syn on - an 50.216 &Syntax.on/off\ for\ &This\ file :call SynOnOff() + an 50.216 &Syntax.On/Off\ for\ &This\ File :call SynOnOff() if !exists("*s:SynOnOff") fun s:SynOnOff() if has("syntax_items") @@ -1095,14 +1095,14 @@ if (exists("did_load_filetypes") || exists("syntax_on")) if exists("do_syntax_sel_menu") runtime! synmenu.vim else - an 50.10 &Syntax.&Show\ filetypes\ in\ menu :let do_syntax_sel_menu = 1runtime! synmenu.vimaunmenu &Syntax.&Show\ filetypes\ in\ menu + an 50.10 &Syntax.&Show\ File\ Types\ in\ Menu :let do_syntax_sel_menu = 1runtime! synmenu.vimaunmenu &Syntax.&Show\ File\ Types\ in\ Menu an 50.195 &Syntax.-SEP1- endif an 50.210 &Syntax.&Off :syn off an 50.700 &Syntax.-SEP3- -an 50.710 &Syntax.Co&lor\ test :sp $VIMRUNTIME/syntax/colortest.vimso % -an 50.720 &Syntax.&Highlight\ test :runtime syntax/hitest.vim +an 50.710 &Syntax.Co&lor\ Test :sp $VIMRUNTIME/syntax/colortest.vimso % +an 50.720 &Syntax.&Highlight\ Test :runtime syntax/hitest.vim an 50.730 &Syntax.&Convert\ to\ HTML :runtime syntax/2html.vim endif " !exists("did_install_syntax_menu") diff --git a/runtime/mswin.vim b/runtime/mswin.vim index ca280d2..6dff7e7 100644 --- a/runtime/mswin.vim +++ b/runtime/mswin.vim @@ -1,7 +1,7 @@ " Set options and add mapping such that Vim behaves a lot like MS-Windows " " Maintainer: Bram Moolenaar -" Last change: 2012 Jul 25 +" Last change: 2017 Feb 09 " bail out if this isn't wanted (mrsvim.vim uses this). if exists("g:skip_loading_mswin") && g:skip_loading_mswin @@ -23,20 +23,22 @@ set backspace=indent,eol,start whichwrap+=<,>,[,] " backspace in Visual mode deletes selection vnoremap d -" CTRL-X and SHIFT-Del are Cut -vnoremap "+x -vnoremap "+x +if has("clipboard") + " CTRL-X and SHIFT-Del are Cut + vnoremap "+x + vnoremap "+x -" CTRL-C and CTRL-Insert are Copy -vnoremap "+y -vnoremap "+y + " CTRL-C and CTRL-Insert are Copy + vnoremap "+y + vnoremap "+y -" CTRL-V and SHIFT-Insert are Paste -map "+gP -map "+gP + " CTRL-V and SHIFT-Insert are Paste + map "+gP + map "+gP -cmap + -cmap + + cmap + + cmap + +endif " Pasting blockwise and linewise selections is not possible in Insert and " Visual mode without the +virtualedit feature. They are pasted as if they @@ -44,8 +46,10 @@ cmap + " Uses the paste.vim autoload script. " Use CTRL-G u to have CTRL-Z only undo the paste. -exe 'inoremap