diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/diff.txt | 3 | ||||
-rw-r--r-- | runtime/doc/gui.txt | 5 | ||||
-rw-r--r-- | runtime/doc/map.txt | 2 | ||||
-rw-r--r-- | runtime/doc/options.txt | 2 | ||||
-rw-r--r-- | runtime/doc/visual.txt | 1 | ||||
-rw-r--r-- | runtime/menu.vim | 10 | ||||
-rw-r--r-- | runtime/plugin/netrwPlugin.vim | 2 | ||||
-rw-r--r-- | runtime/syntax/erlang.vim | 11 | ||||
-rw-r--r-- | runtime/syntax/vim.vim | 3 |
9 files changed, 27 insertions, 12 deletions
diff --git a/runtime/doc/diff.txt b/runtime/doc/diff.txt index 3544882ceb..a9e2a0d522 100644 --- a/runtime/doc/diff.txt +++ b/runtime/doc/diff.txt @@ -57,11 +57,12 @@ reset to the global value. The options can still be overruled from a modeline when re-editing the file. However, 'foldmethod' and 'wrap' won't be set from a modeline when 'diff' is set. +See `:diffoff` for an easy way to revert the options. The differences shown are actually the differences in the buffer. Thus if you make changes after loading a file, these will be included in the displayed diffs. You might have to do ":diffupdate" now and then, not all changes are -immediately taken into account. +immediately taken into account, especially when using an external diff command. In your vimrc file you could do something special when Vim was started in diff mode. You could use a construct like this: > diff --git a/runtime/doc/gui.txt b/runtime/doc/gui.txt index 0df776010b..227ad88872 100644 --- a/runtime/doc/gui.txt +++ b/runtime/doc/gui.txt @@ -191,8 +191,9 @@ Creating New Menus *creating-menus* *E330* *E327* *E331* *E336* *E333* *E328* *E329* *E337* *E792* To create a new menu item, use the ":menu" commands. They are mostly like -the ":map" set of commands but the first argument is a menu item name, given -as a path of menus and submenus with a '.' between them, e.g.: > +the ":map" set of commands (see |map-modes|), but the first argument is a menu +item name, given as a path of menus and submenus with a '.' between them, +e.g.: > :menu File.Save :w<CR> :inoremenu File.Save <C-O>:w<CR> diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index 73ac3763d0..a7cec66111 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -382,6 +382,8 @@ Some commands work both in Insert mode and Command-line mode, some not: :cmap :cnoremap :cunmap :cmapclear - yes - :lmap :lnoremap :lunmap :lmapclear yes* yes* yes* +* If 'iminsert' is 1, see |language-mapping| below. + The original Vi did not have separate mappings for Normal/Visual/Operator-pending mode and for Insert/Command-line mode. Therefore the ":map" and ":map!" commands enter and display mappings for diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 5dfe8d595d..7803d48700 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -5177,7 +5177,7 @@ A jump table for the options with a short description can be found at |Q_op|. Environment variables are expanded |:set_env|. If the name of the shell contains a space, you need to enclose it in - quotes. Example: > + quotes. Example with quotes: > :set shell=\"c:\program\ files\unix\sh.exe\"\ -f < Note the backslash before each quote (to avoid starting a comment) and each space (to avoid ending the option value), so better use |:let-&| diff --git a/runtime/doc/visual.txt b/runtime/doc/visual.txt index fd3d93ed98..2fefdb5222 100644 --- a/runtime/doc/visual.txt +++ b/runtime/doc/visual.txt @@ -103,6 +103,7 @@ gn Search forward for the last used search pattern, like E.g., "dgn" deletes the text of the next match. If Visual mode is active, extends the selection until the end of the next match. + 'wrapscan' applies Note: Unlike `n` the search direction does not depend on the previous search command. diff --git a/runtime/menu.vim b/runtime/menu.vim index 3d0a873973..40a397b73d 100644 --- a/runtime/menu.vim +++ b/runtime/menu.vim @@ -159,6 +159,9 @@ an 20.335 &Edit.-SEP1- <Nop> vnoremenu 20.340 &Edit.Cu&t<Tab>"+x "+x vnoremenu 20.350 &Edit.&Copy<Tab>"+y "+y cnoremenu 20.350 &Edit.&Copy<Tab>"+y <C-Y> +if exists(':tlmenu') + tlnoremenu 20.350 &Edit.&Copy<Tab>"+y <C-W>:<C-Y><CR> +endif nnoremenu 20.360 &Edit.&Paste<Tab>"+gP "+gP cnoremenu &Edit.&Paste<Tab>"+gP <C-R>+ exe 'vnoremenu <script> &Edit.&Paste<Tab>"+gP ' . paste#paste_cmd['v'] @@ -566,7 +569,7 @@ func! s:XxdConv() %!mc vim:xxd else call s:XxdFind() - exe '%!"' . g:xxdprogram . '"' + exe '%!' . g:xxdprogram endif if getline(1) =~ "^0000000:" " only if it worked set ft=xxd @@ -580,7 +583,7 @@ func! s:XxdBack() %!mc vim:xxd -r else call s:XxdFind() - exe '%!"' . g:xxdprogram . '" -r' + exe '%!' . g:xxdprogram . ' -r' endif set ft= doautocmd filetypedetect BufReadPost @@ -592,6 +595,9 @@ func! s:XxdFind() " On the PC xxd may not be in the path but in the install directory if has("win32") && !executable("xxd") let g:xxdprogram = $VIMRUNTIME . (&shellslash ? '/' : '\') . "xxd.exe" + if g:xxdprogram =~ ' ' + let g:xxdprogram = '"' .. g:xxdprogram .. '"' + endif else let g:xxdprogram = "xxd" endif diff --git a/runtime/plugin/netrwPlugin.vim b/runtime/plugin/netrwPlugin.vim index b0d5044836..87302cf23b 100644 --- a/runtime/plugin/netrwPlugin.vim +++ b/runtime/plugin/netrwPlugin.vim @@ -81,7 +81,7 @@ if !exists("g:netrw_nogx") if !hasmapto('<Plug>NetrwBrowseX') nmap <unique> gx <Plug>NetrwBrowseX endif - nno <silent> <Plug>NetrwBrowseX :call netrw#BrowseX(expand((exists("g:netrw_gx")? g:netrw_gx : '<cfile>')),netrw#CheckIfRemote())<cr> + nno <silent> <Plug>NetrwBrowseX :call netrw#BrowseX(netrw#GX(),netrw#CheckIfRemote(netrw#GX()))<cr> endif if maparg('gx','v') == "" if !hasmapto('<Plug>NetrwBrowseXVis') diff --git a/runtime/syntax/erlang.vim b/runtime/syntax/erlang.vim index 870fcca106..c65ebf3dfd 100644 --- a/runtime/syntax/erlang.vim +++ b/runtime/syntax/erlang.vim @@ -2,7 +2,7 @@ " Language: Erlang (http://www.erlang.org) " Maintainer: Csaba Hoch <csaba.hoch@gmail.com> " Contributor: Adam Rutkowski <hq@mtod.org> -" Last Update: 2017-Mar-05 +" Last Update: 2019-Jun-18 " License: Vim license " URL: https://github.com/vim-erlang/vim-erlang-runtime @@ -79,6 +79,7 @@ syn match erlangGlobalFuncRef '\<\%(\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*\.\%(\s\ syn match erlangVariable '\<[A-Z_][[:alnum:]_@]*' syn match erlangMacro '??\=[[:alnum:]_@]\+' syn match erlangMacro '\%(-define(\)\@<=[[:alnum:]_@]\+' +syn region erlangQuotedMacro start=/??\=\s*'/ end=/'/ contains=erlangQuotedAtomModifier syn match erlangMap '#' syn match erlangRecord '#\s*\l[[:alnum:]_@]*' syn region erlangQuotedRecord start=/#\s*'/ end=/'/ contains=erlangQuotedAtomModifier @@ -116,14 +117,14 @@ syn keyword erlangBIF garbage_collect get get_keys group_leader contained syn keyword erlangBIF halt hd integer_to_binary integer_to_list contained syn keyword erlangBIF iolist_to_binary iolist_size is_alive contained syn keyword erlangBIF is_atom is_binary is_bitstring is_boolean contained -syn keyword erlangBIF is_float is_function is_integer is_list contained +syn keyword erlangBIF is_float is_function is_integer is_list is_map is_map_key contained syn keyword erlangBIF is_number is_pid is_port is_process_alive contained syn keyword erlangBIF is_record is_reference is_tuple length link contained syn keyword erlangBIF list_to_atom list_to_binary contained syn keyword erlangBIF list_to_bitstring list_to_existing_atom contained syn keyword erlangBIF list_to_float list_to_integer list_to_pid contained -syn keyword erlangBIF list_to_tuple load_module make_ref max min contained -syn keyword erlangBIF module_loaded monitor monitor_node node contained +syn keyword erlangBIF list_to_tuple load_module make_ref map_size max contained +syn keyword erlangBIF min module_loaded monitor monitor_node node contained syn keyword erlangBIF nodes now open_port pid_to_list port_close contained syn keyword erlangBIF port_command port_connect pre_loaded contained syn keyword erlangBIF process_flag process_flag process_info contained @@ -191,6 +192,7 @@ hi def link erlangGlobalFuncCall Function hi def link erlangGlobalFuncRef Function hi def link erlangVariable Normal hi def link erlangMacro Normal +hi def link erlangQuotedMacro Normal hi def link erlangRecord Normal hi def link erlangQuotedRecord Normal hi def link erlangMap Normal @@ -202,6 +204,7 @@ hi def link erlangGlobalFuncCall Normal hi def link erlangGlobalFuncRef Normal hi def link erlangVariable Identifier hi def link erlangMacro Macro +hi def link erlangQuotedMacro Macro hi def link erlangRecord Structure hi def link erlangQuotedRecord Structure hi def link erlangMap Structure diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 7fb075c229..5b1d61bd26 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -352,7 +352,8 @@ syn match vimSetMod contained "&vim\=\|[!&?<]\|all&" " Let: {{{2 " === syn keyword vimLet let unl[et] skipwhite nextgroup=vimVar,vimFuncVar,vimLetHereDoc -VimFoldh syn region vimLetHereDoc matchgroup=vimLetHereDocStart start='=<<\s\+\%(trim\>\)\=\s*\z(\h\w*\)' matchgroup=vimLetHereDocStop end='^\s*\z1\s*$' contains=vimComment +VimFoldh syn region vimLetHereDoc matchgroup=vimLetHereDocStart start='=<<\s\+\%(trim\>\)\=\s*\z([^a-z]\S*\)' matchgroup=vimLetHereDocStop end='^\s*\z1\s*$' contains=vimComment +syn cluster vimFuncBodyList add=vimLetHereDoc " Abbreviations: {{{2 " ============= |