# HG changeset patch # User Bram Moolenaar # Date 1547738108 -3600 # Node ID f0f06837a69977f469237748542ae715db3092c8 # Parent f41122780189022f26992e2b2a0a17e553755282 Update runtime files. commit https://github.com/vim/vim/commit/d09091d4955c5f41de69928f2db85611ed54ed23 Author: Bram Moolenaar Date: Thu Jan 17 16:07:22 2019 +0100 Update runtime files. diff --git a/nsis/lang/danish.nsi b/nsis/lang/danish.nsi --- a/nsis/lang/danish.nsi +++ b/nsis/lang/danish.nsi @@ -10,7 +10,7 @@ # Overwrite the default translation. -# These string should be always English. Otherwise dosinst.c fails. +# These strings should be always English. Otherwise dosinst.c fails. LangString ^SetupCaption ${LANG_DANISH} "$(^Name) Setup" LangString ^UninstallCaption ${LANG_DANISH} "$(^Name) Uninstall" diff --git a/nsis/lang/dutch.nsi b/nsis/lang/dutch.nsi --- a/nsis/lang/dutch.nsi +++ b/nsis/lang/dutch.nsi @@ -11,7 +11,7 @@ # Overwrite the default translation. -# These string should be always English. Otherwise dosinst.c fails. +# These strings should be always English. Otherwise dosinst.c fails. LangString ^SetupCaption ${LANG_DUTCH} \ "$(^Name) Setup" LangString ^UninstallCaption ${LANG_DUTCH} \ diff --git a/nsis/lang/english.nsi b/nsis/lang/english.nsi --- a/nsis/lang/english.nsi +++ b/nsis/lang/english.nsi @@ -10,7 +10,7 @@ # Overwrite the default translation. -# These string should be always English. Otherwise dosinst.c fails. +# These strings should be always English. Otherwise dosinst.c fails. LangString ^SetupCaption ${LANG_ENGLISH} \ "$(^Name) Setup" LangString ^UninstallCaption ${LANG_ENGLISH} \ diff --git a/nsis/lang/german.nsi b/nsis/lang/german.nsi --- a/nsis/lang/german.nsi +++ b/nsis/lang/german.nsi @@ -10,7 +10,7 @@ # Overwrite the default translation. -# These string should be always English. Otherwise dosinst.c fails. +# These strings should be always English. Otherwise dosinst.c fails. LangString ^SetupCaption ${LANG_GERMAN} \ "$(^Name) Setup" LangString ^UninstallCaption ${LANG_GERMAN} \ diff --git a/nsis/lang/italian.nsi b/nsis/lang/italian.nsi --- a/nsis/lang/italian.nsi +++ b/nsis/lang/italian.nsi @@ -4,14 +4,14 @@ # # Locale ID : 1040 # Locale Name : it -# fileencoding : latin1 +# fileencoding : UTF-8 # Author : Antonio Colombo !insertmacro MUI_LANGUAGE "Italian" # Overwrite the default translation. -# These string should be always English. Otherwise dosinst.c fails. +# These strings should be always English. Otherwise dosinst.c fails. LangString ^SetupCaption ${LANG_ITALIAN} \ "$(^Name) Setup" LangString ^UninstallCaption ${LANG_ITALIAN} \ @@ -48,7 +48,7 @@ LangString str_desc_old_ver ${LA "Disinstalla versione/i esistente/i di Vim dal vostro sistema." LangString str_section_exe ${LANG_ITALIAN} \ - "Vim GUI (gvim.exe per Windows)" + "Vim GUI e file di supporto" LangString str_desc_exe ${LANG_ITALIAN} \ "Vim GUI programmi e file di supporto. Questa componente è indispensabile." @@ -61,7 +61,7 @@ LangString str_section_batch ${LA "Crea file di invocazione (MS-DOS) .bat" LangString str_desc_batch ${LANG_ITALIAN} \ "Crea file di invocazione .bat per varianti di Vim nella directory \ - di Windows, da utilizzare da linea di comando (MS-DOS)." + di Windows, per utilizzo da linea di comando (MS-DOS)." LangString str_group_icons ${LANG_ITALIAN} \ "Crea icone per Vim" @@ -71,13 +71,12 @@ LangString str_desc_icons ${LA LangString str_section_desktop ${LANG_ITALIAN} \ "Sul Desktop" LangString str_desc_desktop ${LANG_ITALIAN} \ - "Crea icone per programma gvim sul desktop." + "Crea icone per programma gVim sul desktop." LangString str_section_start_menu ${LANG_ITALIAN} \ "Nella cartella del menù START" LangString str_desc_start_menu ${LANG_ITALIAN} \ - "Aggiungi Vim alle cartelle del menù START. \ - Disponibile solo da Windows 95 in avanti." + "Aggiungi Vim alle cartelle del menù START." #LangString str_section_quick_launch ${LANG_ITALIAN} \ # "Nella barra di Avvio Veloce" @@ -102,26 +101,26 @@ LangString str_desc_edit_with ${LA # per applicazioni a 64-bit." LangString str_section_vim_rc ${LANG_ITALIAN} \ - "Crea Configurazione di default" + "Crea configurazione di default" LangString str_desc_vim_rc ${LANG_ITALIAN} \ - "Crea file configurazione di default (_vimrc) se non ne \ - esiste già uno." + "Crea un file configurazione di default (_vimrc) se non \ + ne esiste già uno." LangString str_group_plugin ${LANG_ITALIAN} \ - "Crea Directory per Plugin" + "Crea directory per plugin" LangString str_desc_plugin ${LANG_ITALIAN} \ - "Crea Directory per Plugin. Servono per aggiungere funzionalità \ - a Vim aggiungendo file a una di queste directory." + "Crea directory per plugin. Consentono di aggiungere funzionalità \ + a Vim mettendo file in una di queste directory." LangString str_section_plugin_home ${LANG_ITALIAN} \ - "Privato" + "Private" LangString str_desc_plugin_home ${LANG_ITALIAN} \ - "Create plugin directories in HOME directory." + "Crea directory per plugin nella directory HOME." LangString str_section_plugin_vim ${LANG_ITALIAN} \ - "Condiviso" + "Condivise" LangString str_desc_plugin_vim ${LANG_ITALIAN} \ - "Crea Directory Plugin nella directory di installazione di Vim \ + "Crea directory per plugin nella directory di installazione di Vim \ per uso da parte di tutti gli utenti di questo sistema." LangString str_section_vis_vim ${LANG_ITALIAN} \ @@ -140,35 +139,29 @@ LangString str_desc_unregister ${LA "Togli Vim dal Registry di configurazione sistema." LangString str_unsection_exe ${LANG_ITALIAN} \ - "Cancella programmi/file_ausiliari Vim" + "Cancella programmi/file di supporto Vim" LangString str_desc_rm_exe ${LANG_ITALIAN} \ - "Cancella tutti i programmi/file_ausiliari di Vim." - -LangString str_unsection_rc ${LANG_ITALIAN} \ - "Cancella file di configurazione di Vim" -LangString str_desc_rm_rc ${LANG_ITALIAN} \ - "Cancella file di configurazione di Vim $vim_install_root\_vimrc. \ - Da saltare se avete personalizzato il file di configurazione." + "Cancella tutti i programmi/file di supporto di Vim." LangString str_ungroup_plugin ${LANG_ITALIAN} \ - "Remove plugin directories" + "Cancella le directory per plugin" LangString str_desc_rm_plugin ${LANG_ITALIAN} \ - "Remove the plugin directories if they are empty." + "Cancella le directory per plugin se sono vuote." LangString str_unsection_plugin_home ${LANG_ITALIAN} \ - "Privato" + "Private" LangString str_desc_rm_plugin_home ${LANG_ITALIAN} \ - "Remove the plugin directories from HOME directory." + "Cancella le directory per plugin dalla directory HOME." LangString str_unsection_plugin_vim ${LANG_ITALIAN} \ - "Condiviso" + "Condivise" LangString str_desc_rm_plugin_vim ${LANG_ITALIAN} \ - "Remove the plugin directories from Vim install directory." + "Cancella le directory per plugin dalla directory di installazione di Vim." LangString str_unsection_rootdir ${LANG_ITALIAN} \ - "Remove the Vim root directory" + "Cancella la directory di installazione di Vim" LangString str_desc_rm_rootdir ${LANG_ITALIAN} \ - "Remove the Vim root directory. It contains your Vim configuration files!" + "Cancella la directory di installazione di Vim. Contiene i vostri file di configurazione!" ############################################################################## @@ -177,8 +170,8 @@ LangString str_desc_rm_rootdir ${LA #LangString str_msg_too_many_ver ${LANG_ITALIAN} \ # "Trovate $vim_old_ver_count versioni di Vim sul vostro sistema.$\r$\n\ -# Questo programma di installazione può gestirne solo \ -# ${VIM_MAX_OLD_VER}.$\r$\n\ +# Questo programma di installazione può gestire solo \ +# ${VIM_MAX_OLD_VER} versioni.$\r$\n\ # Disinstallate qualche versione precedente e ricominciate." #LangString str_msg_invalid_root ${LANG_ITALIAN} \ @@ -186,7 +179,7 @@ LangString str_desc_rm_rootdir ${LA # Dovrebbe terminare con $\"vim$\"." #LangString str_msg_bin_mismatch ${LANG_ITALIAN} \ -# "Incongruenza di installazione!$\r$\n$\r$\n\ +# "Conflitto nella directory di installazione!$\r$\n$\r$\n\ # Cartella di installazione dev'essere $\"$vim_bin_path$\",$\r$\n\ # ma il sistema segnala invece $\"$INSTDIR$\"." @@ -196,14 +189,14 @@ LangString str_desc_rm_rootdir ${LA #LangString str_msg_register_ole ${LANG_ITALIAN} \ # "Tentativo di registrazione di Vim con OLE. \ -# Non ci sono messaggi che indicano se ha funzionato o no." +# Non c'è messaggio che indica se è riuscito o no." #LangString str_msg_unreg_ole ${LANG_ITALIAN} \ -# "Tentativo di togliere da Registry Vim con OLE. \ -# Non ci sono messaggi che indicano se ha funzionato o no." +# "Tentativo di togliere dal Registry Vim con OLE. \ +# Non c'è messaggio che indica se è riuscito o no." #LangString str_msg_rm_start ${LANG_ITALIAN} \ -# "Disinstallazione delle seguenti versioni:" +# "Disinstallazione della seguente versione:" #LangString str_msg_rm_fail ${LANG_ITALIAN} \ # "Disinstallazione non riuscita per la seguente versione:" @@ -215,7 +208,7 @@ LangString str_desc_rm_rootdir ${LA # "Non riesco a trovare programma disinstallazione nel Registry." #LangString str_msg_no_rm_exe ${LANG_ITALIAN} \ -# "Non riesco a utilizzare programma disinstallazione." +# "Non riesco a trovare programma disinstallazione." #LangString str_msg_rm_copy_fail ${LANG_ITALIAN} \ # "Non riesco a copiare programma disinstallazione a una \ @@ -238,13 +231,13 @@ LangString str_msg_rm_exe_fail ${LANG_ # "AVVISO: Non posso cancellare $\"$vim_install_root$\", non è vuota!" LangString str_msg_uninstalling ${LANG_ITALIAN} \ - "Uninstalling the old version..." + "Sto disinstallando la vecchia versione..." LangString str_msg_registering ${LANG_ITALIAN} \ - "Registering..." + "Sto aggiungendo Vim al Registry..." LangString str_msg_unregistering ${LANG_ITALIAN} \ - "Unregistering..." + "Sto togliendo Vim dal Registry..." ############################################################################## @@ -252,39 +245,39 @@ LangString str_msg_unregistering ${LANG_ ############################################################################## LangString str_vimrc_page_title ${LANG_ITALIAN} \ - "Choose _vimrc settings" + "Scelta impostazioni _vimrc" LangString str_vimrc_page_subtitle ${LANG_ITALIAN} \ - "Choose the settings for enhancement, keyboard and mouse." + "Scelta impostazioni per funzionalità ulteriori, tastiera e mouse." LangString str_msg_compat_title ${LANG_ITALIAN} \ - " Vi / Vim behavior " + " comportamento come Vi / Vim " LangString str_msg_compat_desc ${LANG_ITALIAN} \ - "&Compatibility and enhancements" + "&Compatibilità e funzionalità ulteriori" LangString str_msg_compat_vi ${LANG_ITALIAN} \ - "Vi compatible" + "Compatibile con Vi" LangString str_msg_compat_vim ${LANG_ITALIAN} \ - "Vim original" + "Vim originale" LangString str_msg_compat_defaults ${LANG_ITALIAN} \ - "Vim with some enhancements (load defaults.vim)" + "Vim con alcune funzionalità ulteriori (esecuzione defaults.vim)" LangString str_msg_compat_all ${LANG_ITALIAN} \ - "Vim with all enhancements (load vimrc_example.vim) (Default)" + "Vim con tutte le funzionalità ulteriori (esecuzione vimrc_example.vim) (Default)" LangString str_msg_keymap_title ${LANG_ITALIAN} \ - " Mappings " + " Mappature " LangString str_msg_keymap_desc ${LANG_ITALIAN} \ - "&Remap a few keys for Windows (Ctrl-V, Ctrl-C, Ctrl-A, Ctrl-S, Ctrl-F, etc)" + "&Rimappatura di alcuni tasti per Windows (Ctrl-V, Ctrl-C, Ctrl-A, Ctrl-S, Ctrl-F, etc.)" LangString str_msg_keymap_default ${LANG_ITALIAN} \ - "Do not remap keys (Default)" + "Non effettuare rimappature di tasti (Default)" LangString str_msg_keymap_windows ${LANG_ITALIAN} \ - "Remap a few keys" + "Rimappare solo alcuni tasti" LangString str_msg_mouse_title ${LANG_ITALIAN} \ " Mouse " LangString str_msg_mouse_desc ${LANG_ITALIAN} \ - "&Behavior of right and left buttons" + "&Comportamento dei pulsanti destro e sinistro" LangString str_msg_mouse_default ${LANG_ITALIAN} \ - "Right: popup menu, Left: visual mode (Default)" + "Destro: popup menu, Sinistro: modalità visuale (Default)" LangString str_msg_mouse_windows ${LANG_ITALIAN} \ - "Right: popup menu, Left: select mode (Windows)" + "Destro: popup menu, Sinistro: seleziona modalità (Windows)" LangString str_msg_mouse_unix ${LANG_ITALIAN} \ - "Right: extends selection, Left: visual mode (Unix)" + "Destro: estende selezione, Sinistro: modalità visuale (Unix)" diff --git a/nsis/lang/japanese.nsi b/nsis/lang/japanese.nsi --- a/nsis/lang/japanese.nsi +++ b/nsis/lang/japanese.nsi @@ -10,7 +10,7 @@ # Overwrite the default translation. -# These string should be always English. Otherwise dosinst.c fails. +# These strings should be always English. Otherwise dosinst.c fails. LangString ^SetupCaption ${LANG_JAPANESE} \ "$(^Name) Setup" LangString ^UninstallCaption ${LANG_JAPANESE} \ diff --git a/nsis/lang/simpchinese.nsi b/nsis/lang/simpchinese.nsi --- a/nsis/lang/simpchinese.nsi +++ b/nsis/lang/simpchinese.nsi @@ -11,7 +11,7 @@ # Overwrite the default translation. -# These string should be always English. Otherwise dosinst.c fails. +# These strings should be always English. Otherwise dosinst.c fails. LangString ^SetupCaption ${LANG_SIMPCHINESE} \ "$(^Name) Setup" LangString ^UninstallCaption ${LANG_SIMPCHINESE} \ diff --git a/nsis/lang/tradchinese.nsi b/nsis/lang/tradchinese.nsi --- a/nsis/lang/tradchinese.nsi +++ b/nsis/lang/tradchinese.nsi @@ -11,7 +11,7 @@ # Overwrite the default translation. -# These string should be always English. Otherwise dosinst.c fails. +# These strings should be always English. Otherwise dosinst.c fails. LangString ^SetupCaption ${LANG_TRADCHINESE} \ "$(^Name) Setup" LangString ^UninstallCaption ${LANG_TRADCHINESE} \ diff --git a/runtime/autoload/rubycomplete.vim b/runtime/autoload/rubycomplete.vim --- a/runtime/autoload/rubycomplete.vim +++ b/runtime/autoload/rubycomplete.vim @@ -1,9 +1,9 @@ " Vim completion script -" Language: Ruby -" Maintainer: Mark Guzman -" URL: https://github.com/vim-ruby/vim-ruby -" Release Coordinator: Doug Kearns -" Maintainer Version: 0.8.1 +" Language: Ruby +" Maintainer: Mark Guzman +" URL: https://github.com/vim-ruby/vim-ruby +" Release Coordinator: Doug Kearns +" Last Change: 2019 Jan 06 " ---------------------------------------------------------------------------- " " Ruby IRB/Complete author: Keiju ISHITSUKA(keiju@ishitsuka.com) @@ -103,7 +103,7 @@ function! s:GetBufferRubyEntity( name, t endif let curpos = getpos(".") - let [enum,ecol] = searchpairpos( crex, '', '\(end\|}\)', 'wr' ) + let [enum,ecol] = searchpairpos( crex, '', '\(end\|}\)', 'W' ) call cursor(lastpos[1], lastpos[2]) if lnum > enum @@ -253,15 +253,27 @@ class VimRubyCompletion # {{{ buffer analysis magic def load_requires + + custom_paths = VIM::evaluate("get(g:, 'rubycomplete_load_paths', [])") + + if !custom_paths.empty? + $LOAD_PATH.concat(custom_paths).uniq! + end + buf = VIM::Buffer.current enum = buf.line_number nums = Range.new( 1, enum ) nums.each do |x| + ln = buf[x] begin - eval( "require %s" % $1 ) if /.*require\s*(.*)$/.match( ln ) - rescue Exception - #ignore? + if /.*require_relative\s*(.*)$/.match( ln ) + eval( "require %s" % File.expand_path($1) ) + elsif /.*require\s*(["'].*?["'])/.match( ln ) + eval( "require %s" % $1 ) + end + rescue Exception => e + dprint e.inspect end end end @@ -344,8 +356,13 @@ class VimRubyCompletion if x != cur_line next if x == 0 ln = buf[x] - if /^\s*(module|class|def|include)\s+/.match(ln) - clscnt += 1 if $1 == "class" + is_const = false + if /^\s*(module|class|def|include)\s+/.match(ln) || is_const = /^\s*?[A-Z]([A-z]|[1-9])*\s*?[|]{0,2}=\s*?.+\s*?/.match(ln) + clscnt += 1 if /class|module/.match($1) + # We must make sure to load each constant only once to avoid errors + if is_const + ln.gsub!(/\s*?[|]{0,2}=\s*?/, '||=') + end #dprint "\$1$1 classdef += "%s\n" % ln classdef += "end\n" if /def\s+/.match(ln) @@ -423,7 +440,6 @@ class VimRubyCompletion return get_buffer_entity_list( "class" ) end - def load_rails allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails") return if allow_rails.to_i.zero? @@ -529,7 +545,6 @@ class VimRubyCompletion ret += ActiveRecord::ConnectionAdapters::SchemaStatements.methods end - return ret end @@ -587,11 +602,13 @@ class VimRubyCompletion # {{{ main completion code def self.preload_rails a = VimRubyCompletion.new - require 'Thread' - Thread.new(a) do |b| - begin - b.load_rails - rescue + if VIM::evaluate("has('nvim')") == 0 + require 'thread' + Thread.new(a) do |b| + begin + b.load_rails + rescue + end end end a.load_rails @@ -612,7 +629,6 @@ class VimRubyCompletion want_gems = VIM::evaluate("get(g:, 'rubycomplete_load_gemfile')") load_gems unless want_gems.to_i.zero? - input = VIM::Buffer.current.line cpos = VIM::Window.current.cursor[1] - 1 @@ -666,6 +682,7 @@ class VimRubyCompletion message = Regexp.quote($4) dprint "const or cls 2 [recv: \'%s\', msg: \'%s\']" % [ receiver, message ] load_buffer_class( receiver ) + load_buffer_module( receiver ) begin classes = eval("#{receiver}.constants") #methods = eval("#{receiver}.methods") @@ -786,7 +803,6 @@ class VimRubyCompletion methods += Kernel.public_methods end - include_object = VIM::evaluate("exists('g:rubycomplete_include_object') && g:rubycomplete_include_object") methods = clean_sel( methods, message ) methods = (methods-Object.instance_methods) if include_object == "0" @@ -829,5 +845,4 @@ let s:rubycomplete_rails_loaded = 0 call s:DefRuby() "}}} ruby-side code - " vim:tw=78:sw=4:ts=8:et:fdm=marker:ft=vim:norl: diff --git a/runtime/compiler/eruby.vim b/runtime/compiler/eruby.vim --- a/runtime/compiler/eruby.vim +++ b/runtime/compiler/eruby.vim @@ -3,6 +3,7 @@ " Maintainer: Doug Kearns " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns +" Last Change: 2018 Jan 25 if exists("current_compiler") finish @@ -28,8 +29,8 @@ CompilerSet errorformat= \%W%f:%l:\ warning:\ %m, \%E%f:%l:in\ %*[^:]:\ %m, \%E%f:%l:\ %m, - \%-C%\tfrom\ %f:%l:in\ %.%#, - \%-Z%\tfrom\ %f:%l, + \%-C%\t%\\d%#:%#\ %#from\ %f:%l:in\ %.%#, + \%-Z%\t%\\d%#:%#\ %#from\ %f:%l, \%-Z%p^, \%-G%.%# diff --git a/runtime/compiler/rake.vim b/runtime/compiler/rake.vim --- a/runtime/compiler/rake.vim +++ b/runtime/compiler/rake.vim @@ -3,6 +3,7 @@ " Maintainer: Tim Pope " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns +" Last Change: 2018 Mar 02 if exists("current_compiler") finish @@ -20,12 +21,12 @@ CompilerSet makeprg=rake CompilerSet errorformat= \%D(in\ %f), - \%\\s%#from\ %f:%l:%m, - \%\\s%#from\ %f:%l:, - \%\\s%##\ %f:%l:%m, - \%\\s%##\ %f:%l, - \%\\s%#[%f:%l:\ %#%m, - \%\\s%#%f:%l:\ %#%m, + \%\\s%#%\\d%#:%#\ %#from\ %f:%l:%m, + \%\\s%#%\\d%#:%#\ %#from\ %f:%l:, + \%\\s%##\ %f:%l:%m%\\&%.%#%\\D:%\\d%\\+:%.%#, + \%\\s%##\ %f:%l%\\&%.%#%\\D:%\\d%\\+, + \%\\s%#[%f:%l:\ %#%m%\\&%.%#%\\D:%\\d%\\+:%.%#, + \%\\s%#%f:%l:\ %#%m%\\&%.%#%\\D:%\\d%\\+:%.%#, \%\\s%#%f:%l:, \%m\ [%f:%l]:, \%+Erake\ aborted!, diff --git a/runtime/compiler/rspec.vim b/runtime/compiler/rspec.vim --- a/runtime/compiler/rspec.vim +++ b/runtime/compiler/rspec.vim @@ -3,6 +3,7 @@ " Maintainer: Tim Pope " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns +" Last Change: 2018 Aug 07 if exists("current_compiler") finish @@ -23,7 +24,8 @@ CompilerSet errorformat= \%E%.%#:in\ `load':\ %f:%l:%m, \%E%f:%l:in\ `%*[^']':\ %m, \%-Z\ \ \ \ \ %\\+\#\ %f:%l:%.%#, - \%E\ \ %\\d%\\+)%.%#, + \%E\ \ \ \ \ Failure/Error:\ %m, + \%E\ \ \ \ \ Failure/Error:, \%C\ \ \ \ \ %m, \%C%\\s%#, \%-G%.%# diff --git a/runtime/compiler/ruby.vim b/runtime/compiler/ruby.vim --- a/runtime/compiler/ruby.vim +++ b/runtime/compiler/ruby.vim @@ -4,7 +4,7 @@ " Maintainer: Tim Pope " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns -" ---------------------------------------------------------------------------- +" Last Change: 2019 Jan 06 if exists("current_compiler") finish @@ -21,21 +21,21 @@ set cpo-=C " default settings runs script normally " add '-c' switch to run syntax check only: " -" CompilerSet makeprg=ruby\ -wc\ $* +" CompilerSet makeprg=ruby\ -c " " or add '-c' at :make command line: " " :make -c % " -CompilerSet makeprg=ruby\ -w\ $* +CompilerSet makeprg=ruby CompilerSet errorformat= \%+E%f:%l:\ parse\ error, \%W%f:%l:\ warning:\ %m, \%E%f:%l:in\ %*[^:]:\ %m, \%E%f:%l:\ %m, - \%-C%\tfrom\ %f:%l:in\ %.%#, - \%-Z%\tfrom\ %f:%l, + \%-C%\t%\\d%#:%#\ %#from\ %f:%l:in\ %.%#, + \%-Z%\t%\\d%#:%#\ %#from\ %f:%l, \%-Z%p^, \%-G%.%# diff --git a/runtime/compiler/rubyunit.vim b/runtime/compiler/rubyunit.vim --- a/runtime/compiler/rubyunit.vim +++ b/runtime/compiler/rubyunit.vim @@ -3,6 +3,7 @@ " Maintainer: Doug Kearns " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns +" Last Change: 2014 Mar 23 if exists("current_compiler") finish diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim version 8.1. Last change: 2018 Dec 28 +*autocmd.txt* For Vim version 8.1. Last change: 2019 Jan 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1017,8 +1017,10 @@ TermResponse After the response to |t_ anything else that takes time is involved. *TextChanged* TextChanged After a change was made to the text in the - current buffer in Normal mode. That is when - |b:changedtick| has changed. + current buffer in Normal mode. That is after + |b:changedtick| has changed (also when that + happened before the TextChanged autocommand + was defined). Not triggered when there is typeahead or when an operator is pending. Careful: This is triggered very often, don't diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 8.1. Last change: 2019 Jan 15 +*eval.txt* For Vim version 8.1. Last change: 2019 Jan 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -107,7 +107,7 @@ To force conversion from String to Numbe To avoid a leading zero to cause octal conversion, or for using a different base, use |str2nr()|. - *TRUE* *FALSE* + *TRUE* *FALSE* *Boolean* For boolean operators Numbers are used. Zero is FALSE, non-zero is TRUE. You can also use |v:false| and |v:true|. When TRUE is returned from a function it is the Number one, FALSE is the number zero. @@ -131,8 +131,8 @@ A List, Dictionary or Float is not a Num *E745* *E728* *E703* *E729* *E730* *E731* *E908* *E910* *E913* *E974* *E975* *E976* -List, Dictionary, Funcref, Job, Channel and Blob types are not automatically -converted. +|List|, |Dictionary|, |Funcref|, |Job|, |Channel| and |Blob| types are not +automatically converted. *E805* *E806* *E808* When mixing Number and Float the Number is converted to Float. Otherwise @@ -673,6 +673,7 @@ Part of a blob ~ A part of the Blob can be obtained by specifying the first and last index, separated by a colon in square brackets: > :let myblob = 0z00112233 + :let shortblob = myblob[1:2] " get 0z1122 :let shortblob = myblob[2:-1] " get 0z2233 Omitting the first index is similar to zero. Omitting the last index is @@ -681,7 +682,7 @@ similar to -1. > :let shortblob = myblob[2:2] " Blob with one byte: 0z22 :let otherblob = myblob[:] " make a copy of the Blob -If the first index is beyond the last byte of the Blob or the second byte is +If the first index is beyond the last byte of the Blob or the second index is before the first byte, the result is an empty list. There is no error message. @@ -700,12 +701,12 @@ higher index is an error. To change a sequence of bytes the [:] notation can be used: > let blob[1:3] = 0z445566 -The length of the replaced bytes much be exactly the same as the value +The length of the replaced bytes must be exactly the same as the value provided. *E972* To change part of a blob you can specify the first and last byte to be -modified. The value must at least have the number of bytes in the range: > - :let blob[3:5] = [3, 4, 5] +modified. The value must have the same number of bytes in the range: > + :let blob[3:5] = 0z334455 You can also use the functions |add()|, |remove()| and |insert()|. @@ -734,7 +735,7 @@ identity is different: > :echo blob is blob3 < 0 -Making a copy of a list is done with the |copy()| function. Using [:] also +Making a copy of a Blob is done with the |copy()| function. Using [:] also works, as explained above. @@ -793,7 +794,7 @@ Expression syntax summary, from least to expr5 isnot expr5 different |List| instance |expr5| expr6 - expr6 + expr6 .. number addition or list concatenation + expr6 + expr6 .. number addition, list or blob concatenation expr6 - expr6 .. number subtraction expr6 . expr6 .. string concatenation @@ -1143,7 +1144,7 @@ If expr8 is a |Blob| this results in a n indexes expr1a and expr1b, inclusive. Examples: > :let b = 0zDEADBEEF :let bs = b[1:2] " 0zADBE - :let bs = b[] " copy ov 0zDEADBEEF + :let bs = b[:] " copy of 0zDEADBEEF Using expr8[expr1] or expr8[expr1a : expr1b] on a |Funcref| results in an error. @@ -1871,7 +1872,7 @@ v:mouse_col Column number for a mouse cl This is the screen column number, like with |virtcol()|. The value is zero when there was no mouse button click. - *v:none* *none-variable* + *v:none* *none-variable* *None* v:none An empty String. Used to put an empty item in JSON. See |json_encode()|. When used as a number this evaluates to zero. @@ -2028,27 +2029,27 @@ v:swapcommand Normal mode command to be For ":edit +cmd file" the value is ":cmd\r". *v:t_TYPE* *v:t_bool* *t_bool-variable* -v:t_bool Value of Boolean type. Read-only. See: |type()| +v:t_bool Value of |Boolean| type. Read-only. See: |type()| *v:t_channel* *t_channel-variable* -v:t_channel Value of Channel type. Read-only. See: |type()| +v:t_channel Value of |Channel| type. Read-only. See: |type()| *v:t_dict* *t_dict-variable* -v:t_dict Value of Dictionary type. Read-only. See: |type()| +v:t_dict Value of |Dictionary| type. Read-only. See: |type()| *v:t_float* *t_float-variable* -v:t_float Value of Float type. Read-only. See: |type()| +v:t_float Value of |Float| type. Read-only. See: |type()| *v:t_func* *t_func-variable* -v:t_func Value of Funcref type. Read-only. See: |type()| +v:t_func Value of |Funcref| type. Read-only. See: |type()| *v:t_job* *t_job-variable* -v:t_job Value of Job type. Read-only. See: |type()| +v:t_job Value of |Job| type. Read-only. See: |type()| *v:t_list* *t_list-variable* -v:t_list Value of List type. Read-only. See: |type()| +v:t_list Value of |List| type. Read-only. See: |type()| *v:t_none* *t_none-variable* -v:t_none Value of None type. Read-only. See: |type()| +v:t_none Value of |None| type. Read-only. See: |type()| *v:t_number* *t_number-variable* -v:t_number Value of Number type. Read-only. See: |type()| +v:t_number Value of |Number| type. Read-only. See: |type()| *v:t_string* *t_string-variable* -v:t_string Value of String type. Read-only. See: |type()| +v:t_string Value of |String| type. Read-only. See: |type()| *v:t_blob* *t_blob-variable* -v:t_blob Value of Blob type. Read-only. See: |type()| +v:t_blob Value of |Blob| type. Read-only. See: |type()| *v:termresponse* *termresponse-variable* v:termresponse The escape sequence returned by the terminal for the |t_RV| @@ -3342,7 +3343,7 @@ ch_read({handle} [, {options}]) *ch_ {only available when compiled with the |+channel| feature} ch_readblob({handle} [, {options}]) *ch_readblob()* - Like ch_read() but reads binary data and returns a Blob. + Like ch_read() but reads binary data and returns a |Blob|. See |channel-more|. {only available when compiled with the |+channel| feature} @@ -3363,7 +3364,7 @@ ch_sendexpr({handle}, {expr} [, {options {only available when compiled with the |+channel| feature} ch_sendraw({handle}, {expr} [, {options}]) *ch_sendraw()* - Send string or Blob {expr} over {handle}. + Send |String| or |Blob| {expr} over {handle}. Works like |ch_sendexpr()|, but does not encode the request or decode the response. The caller is responsible for the correct contents. Also does not add a newline for a channel @@ -3788,7 +3789,7 @@ empty({expr}) *empty()* - |v:false|, |v:none| and |v:null| are empty, |v:true| is not. - A |Job| is empty when it failed to start. - A |Channel| is empty when it is closed. - - A Blob is empty when its length is zero. + - A |Blob| is empty when its length is zero. For a long |List| this is much faster than comparing the length with zero. @@ -5883,6 +5884,8 @@ json_decode({string}) *json_decode() The decoding is permissive: - A trailing comma in an array and object is ignored, e.g. "[1, 2, ]" is the same as "[1, 2]". + - Integer keys are accepted in objects, e.g. {1:2} is the + same as {'1':2}. - More floating point numbers are recognized, e.g. "1." for "1.0", or "001.2" for "1.2". Special floating point values "Infinity", "-Infinity" and "NaN" (capitalization ignored) @@ -5911,18 +5914,18 @@ json_encode({expr}) *json_encode()* The encoding is specified in: https://tools.ietf.org/html/rfc7159.html Vim values are converted as follows: - Number decimal number - Float floating point number + |Number| decimal number + |Float| floating point number Float nan "NaN" Float inf "Infinity" Float -inf "-Infinity" - String in double quotes (possibly null) - Funcref not possible, error - List as an array (possibly null); when + |String| in double quotes (possibly null) + |Funcref| not possible, error + |List| as an array (possibly null); when used recursively: [] - Dict as an object (possibly null); when + |Dict| as an object (possibly null); when used recursively: {} - Blob as an array of the individual bytes + |Blob| as an array of the individual bytes v:false "false" v:true "true" v:none "null" @@ -5941,6 +5944,7 @@ len({expr}) The result is a Number, whic used, as with |strlen()|. When {expr} is a |List| the number of items in the |List| is returned. + When {expr} is a |Blob| the number of bytes is returned. When {expr} is a |Dictionary| the number of entries in the |Dictionary| is returned. Otherwise an error is given. @@ -10247,7 +10251,7 @@ spell Compiled with spell checking sup startuptime Compiled with |--startuptime| support. statusline Compiled with support for 'statusline', 'rulerformat' and special formats of 'titlestring' and 'iconstring'. -sun_workshop Compiled with support for Sun |workshop|. +sun_workshop Support for Sun |workshop| has been removed. syntax Compiled with syntax highlighting support |syntax|. syntax_items There are active syntax highlighting items for the current buffer. diff --git a/runtime/doc/help.txt b/runtime/doc/help.txt --- a/runtime/doc/help.txt +++ b/runtime/doc/help.txt @@ -1,4 +1,4 @@ -*help.txt* For Vim version 8.1. Last change: 2019 Jan 01 +*help.txt* For Vim version 8.1. Last change: 2019 Jan 17 VIM - main help file k diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -1,4 +1,4 @@ -*index.txt* For Vim version 8.1. Last change: 2018 Apr 19 +*index.txt* For Vim version 8.1. Last change: 2019 Jan 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1457,8 +1457,9 @@ tag command action ~ |:recover| :rec[over] recover a file from a swap file |:redo| :red[o] redo one undone change |:redir| :redi[r] redirect messages to a file or register -|:redraw| :redr[aw] force a redraw of the display -|:redrawstatus| :redraws[tatus] force a redraw of the status line(s) +|:redraw| :redr[aw] force a redraw of the display +|:redrawstatus| :redraws[tatus] force a redraw of the status line(s) +|:redrawtabline| :redrawt[abline] force a redraw of the tabline |:registers| :reg[isters] display the contents of registers |:resize| :res[ize] change current window height |:retab| :ret[ab] change tab size @@ -1643,7 +1644,6 @@ tag command action ~ argument list |:wq| :wq write to a file and quit window or Vim |:wqall| :wqa[ll] write all changed buffers and quit Vim -|:wsverb| :ws[verb] pass the verb to workshop over IPC |:wundo| :wu[ndo] write undo information to a file |:wviminfo| :wv[iminfo] write to viminfo file |:xit| :x[it] write if buffer changed and quit window or Vim diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt --- a/runtime/doc/insert.txt +++ b/runtime/doc/insert.txt @@ -1,4 +1,4 @@ -*insert.txt* For Vim version 8.1. Last change: 2018 Feb 10 +*insert.txt* For Vim version 8.1. Last change: 2019 Jan 11 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/intro.txt b/runtime/doc/intro.txt --- a/runtime/doc/intro.txt +++ b/runtime/doc/intro.txt @@ -1,4 +1,4 @@ -*intro.txt* For Vim version 8.1. Last change: 2019 Jan 01 +*intro.txt* For Vim version 8.1. Last change: 2019 Jan 07 VIM REFERENCE MANUAL by Bram Moolenaar @@ -268,9 +268,9 @@ In this documentation there are several Vi "the original". Without further remarks this is the version of Vi that appeared in Sun OS 4.x. ":version" returns "Version 3.7, 6/7/85". Sometimes other versions are referred - to. Only runs under Unix. Source code only available with a - license. More information on Vi can be found through: - http://vi-editor.org [doesn't currently work...] + to. Only runs under Unix. Source code is now available under a + BSD-style license. More information on Vi can be found through: + http://ex-vi.sourceforge.net/ *Posix* Posix From the IEEE standard 1003.2, Part 2: Shell and utilities. Generally known as "Posix". This is a textual description of @@ -285,11 +285,10 @@ Nvi The "New" Vi. The version of Vi tha Source code is freely available. *Elvis* Elvis Another Vi clone, made by Steve Kirkendall. Very compact but isn't - as flexible as Vim. - The version used is 2.1. It is still being developed. Source code is - freely available. - *NeoVim* -NeoVim A Vim clone. Forked the Vim source in 2014 and went a different way. + as flexible as Vim. Development has stalled, Elvis has left the + building! Source code is freely available. + *Neovim* +Neovim A Vim clone. Forked the Vim source in 2014 and went a different way. Very much bound to github and has many more dependencies, making development more complex and limiting portability. Code has been refactored, resulting in patches not being exchangeable with Vim. diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 8.1. Last change: 2018 Dec 27 +*options.txt* For Vim version 8.1. Last change: 2019 Jan 16 VIM REFERENCE MANUAL by Bram Moolenaar @@ -2273,7 +2273,10 @@ A jump table for the options with a shor deleted only once. Also when repeating "R" with "." and a count. *cpo-y* - y A yank command can be redone with ".". + y A yank command can be redone with ".". Think twice if + you really want to use this, it may break some + plugins, since most people expect "." to only repeat a + change. *cpo-Z* Z When using "w!" while the 'readonly' option is set, don't reset 'readonly'. diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1,4 +1,4 @@ -*quickfix.txt* For Vim version 8.1. Last change: 2019 Jan 09 +*quickfix.txt* For Vim version 8.1. Last change: 2019 Jan 13 VIM REFERENCE MANUAL by Bram Moolenaar @@ -111,14 +111,14 @@ processing a quickfix or location list c :[count]lne[xt][!] Same as ":cnext", except the location list for the current window is used instead of the quickfix list. -:[count]cN[ext][!] *:cp* *:cprevious* *:cN* *:cNext* +:[count]cN[ext][!] *:cp* *:cprevious* *:cprev* *:cN* *:cNext* :[count]cp[revious][!] Display the [count] previous error in the list that includes a file name. If there are no file names at all, go to the [count] previous error. See |:cc| for [!] and 'switchbuf'. -:[count]lN[ext][!] *:lp* *:lprevious* *:lN* *:lNext* +:[count]lN[ext][!] *:lp* *:lprevious* *:lprev* *:lN* *:lNext* :[count]lp[revious][!] Same as ":cNext" and ":cprevious", except the location list for the current window is used instead of the quickfix list. @@ -367,8 +367,8 @@ modify the title of a quickfix and locat < *quickfix-index* When you jump to a quickfix/location list entry using any of the quickfix -commands (e.g. |cc|, |cnext|, |cprev|, etc.), that entry becomes the currently -selected entry. The index of the currently selected entry in a +commands (e.g. |:cc|, |:cnext|, |:cprev|, etc.), that entry becomes the +currently selected entry. The index of the currently selected entry in a quickfix/location list can be obtained using the getqflist()/getloclist() functions. Examples: > echo getqflist({'idx' : 0}).idx diff --git a/runtime/doc/sign.txt b/runtime/doc/sign.txt --- a/runtime/doc/sign.txt +++ b/runtime/doc/sign.txt @@ -1,4 +1,4 @@ -*sign.txt* For Vim version 8.1. Last change: 2019 Jan 06 +*sign.txt* For Vim version 8.1. Last change: 2019 Jan 17 VIM REFERENCE MANUAL by Gordon Prieur @@ -31,7 +31,7 @@ terminal emulator. Signs and highlights are not useful just for debuggers. Sun's Visual WorkShop uses signs and highlights to mark build errors and SourceBrowser hits. Additionally, the debugger supports 8 to 10 different signs and -highlight colors. |workshop| Same for Netbeans |netbeans|. +highlight colors, see |NetBeans|. There are two steps in using signs: @@ -43,6 +43,7 @@ 2. Place the sign. This specifies the f displayed. A defined sign can be placed several times in different lines and files. + *sign-column* When signs are defined for a file, Vim will automatically add a column of two characters to display them in. When the last sign is unplaced the column disappears again. This behavior can be changed with the 'signcolumn' option. @@ -55,7 +56,7 @@ Example to set the color: > *sign-identifier* Each placed sign is identified by a number called the sign identifier. This identifier is used to jump to the sign or to remove the sign. The identifier -is assigned when placing the sign using the |sign-place| command or the +is assigned when placing the sign using the |:sign-place| command or the |sign_place()| function. Each sign identifier should be a unique number. If multiple placed signs use the same identifier, then jumping to or removing a sign becomes unpredictable. To avoid overlapping identifiers, sign groups can @@ -76,6 +77,10 @@ on the same line, the attributes of the independent of the sign group. The default priority for a sign is 10. The priority is assigned at the time of placing a sign. +When the line on which the sign is placed is deleted, the sign is moved to the +next line (or the last line of the buffer, if there is no next line). When +the delete is undone the sign does not move back. + ============================================================================== 2. Commands *sign-commands* *:sig* *:sign* diff --git a/runtime/doc/spell.txt b/runtime/doc/spell.txt --- a/runtime/doc/spell.txt +++ b/runtime/doc/spell.txt @@ -1,4 +1,4 @@ -*spell.txt* For Vim version 8.1. Last change: 2018 Mar 29 +*spell.txt* For Vim version 8.1. Last change: 2019 Jan 09 VIM REFERENCE MANUAL by Bram Moolenaar @@ -577,7 +577,7 @@ 2. Use Vimdiff to see what changed: > vimdiff xx_YY.orig.dic xx_YY.new.dic 3. Take over the changes you like in xx_YY.dic. You may also need to change xx_YY.aff. -4. Rename xx_YY.new.dic to xx_YY.orig.dic and xx_YY.new.aff to xx_YY.new.aff. +4. Rename xx_YY.new.dic to xx_YY.orig.dic and xx_YY.new.aff to xx_YY.orig.aff. SPELL FILE VERSIONS *E770* *E771* *E772* diff --git a/runtime/doc/tags b/runtime/doc/tags --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -2238,6 +2238,7 @@ 90.5 usr_90.txt /*90.5* :cp quickfix.txt /*:cp* :cpf quickfix.txt /*:cpf* :cpfile quickfix.txt /*:cpfile* +:cprev quickfix.txt /*:cprev* :cprevious quickfix.txt /*:cprevious* :cq quickfix.txt /*:cq* :cquit quickfix.txt /*:cquit* @@ -2584,6 +2585,7 @@ 90.5 usr_90.txt /*90.5* :lp quickfix.txt /*:lp* :lpf quickfix.txt /*:lpf* :lpfile quickfix.txt /*:lpfile* +:lprev quickfix.txt /*:lprev* :lprevious quickfix.txt /*:lprevious* :lr quickfix.txt /*:lr* :lrewind quickfix.txt /*:lrewind* @@ -2838,6 +2840,8 @@ 90.5 usr_90.txt /*90.5* :redraw various.txt /*:redraw* :redraws various.txt /*:redraws* :redrawstatus various.txt /*:redrawstatus* +:redrawt various.txt /*:redrawt* +:redrawtabline various.txt /*:redrawtabline* :reg change.txt /*:reg* :registers change.txt /*:registers* :res windows.txt /*:res* @@ -3315,8 +3319,6 @@ 90.5 usr_90.txt /*90.5* :write_a editing.txt /*:write_a* :write_c editing.txt /*:write_c* :write_f editing.txt /*:write_f* -:ws workshop.txt /*:ws* -:wsverb workshop.txt /*:wsverb* :wundo undo.txt /*:wundo* :wv starting.txt /*:wv* :wviminfo starting.txt /*:wviminfo* @@ -3576,6 +3578,9 @@ Athena gui_x11.txt /*Athena* B motion.txt /*B* BeBox os_beos.txt /*BeBox* BeOS os_beos.txt /*BeOS* +Blob eval.txt /*Blob* +Blobs eval.txt /*Blobs* +Boolean eval.txt /*Boolean* Bram intro.txt /*Bram* BufAdd autocmd.txt /*BufAdd* BufCreate autocmd.txt /*BufCreate* @@ -3748,6 +3753,7 @@ D change.txt /*D* DOS os_dos.txt /*DOS* DOS-format editing.txt /*DOS-format* DOS-format-write editing.txt /*DOS-format-write* +Dict eval.txt /*Dict* Dictionaries eval.txt /*Dictionaries* Dictionary eval.txt /*Dictionary* Dictionary-function eval.txt /*Dictionary-function* @@ -4665,6 +4671,14 @@ E969 eval.txt /*E969* E97 diff.txt /*E97* E970 eval.txt /*E970* E971 textprop.txt /*E971* +E972 eval.txt /*E972* +E973 eval.txt /*E973* +E974 eval.txt /*E974* +E975 eval.txt /*E975* +E976 eval.txt /*E976* +E977 eval.txt /*E977* +E978 eval.txt /*E978* +E979 eval.txt /*E979* E98 diff.txt /*E98* E99 diff.txt /*E99* EX intro.txt /*EX* @@ -4769,9 +4783,11 @@ N: cmdline.txt /*N:* N various.txt /*N* NFA pattern.txt /*NFA* NL-used-for-Nul pattern.txt /*NL-used-for-Nul* -NeoVim intro.txt /*NeoVim* +Neovim intro.txt /*Neovim* NetBSD-backspace options.txt /*NetBSD-backspace* +NetBeans netbeans.txt /*NetBeans* NetUserPass() pi_netrw.txt /*NetUserPass()* +None eval.txt /*None* Normal intro.txt /*Normal* Normal-mode intro.txt /*Normal-mode* Number eval.txt /*Number* @@ -4879,6 +4895,7 @@ SessionLoadPost autocmd.txt /*SessionLoa ShellCmdPost autocmd.txt /*ShellCmdPost* ShellFilterPost autocmd.txt /*ShellFilterPost* SourceCmd autocmd.txt /*SourceCmd* +SourcePost autocmd.txt /*SourcePost* SourcePre autocmd.txt /*SourcePre* Special eval.txt /*Special* SpellFileMissing autocmd.txt /*SpellFileMissing* @@ -5281,6 +5298,11 @@ beval_winid-variable eval.txt /*beval_wi beval_winnr-variable eval.txt /*beval_winnr-variable* binary-number eval.txt /*binary-number* bitwise-function usr_41.txt /*bitwise-function* +blob eval.txt /*blob* +blob-identity eval.txt /*blob-identity* +blob-index eval.txt /*blob-index* +blob-literal eval.txt /*blob-literal* +blob-modification eval.txt /*blob-modification* blockwise-examples visual.txt /*blockwise-examples* blockwise-operators visual.txt /*blockwise-operators* blockwise-register change.txt /*blockwise-register* @@ -5461,6 +5483,7 @@ ch_log() eval.txt /*ch_log()* ch_logfile() eval.txt /*ch_logfile()* ch_open() eval.txt /*ch_open()* ch_read() eval.txt /*ch_read()* +ch_readblob() eval.txt /*ch_readblob()* ch_readraw() eval.txt /*ch_readraw()* ch_sendexpr() eval.txt /*ch_sendexpr()* ch_sendraw() eval.txt /*ch_sendraw()* @@ -7341,6 +7364,7 @@ locale mbyte.txt /*locale* locale-name mbyte.txt /*locale-name* localtime() eval.txt /*localtime()* location-list quickfix.txt /*location-list* +location-list-file-window quickfix.txt /*location-list-file-window* location-list-window quickfix.txt /*location-list-window* log() eval.txt /*log()* log10() eval.txt /*log10()* @@ -7586,6 +7610,7 @@ netbeans-protocol netbeans.txt /*netbean netbeans-run netbeans.txt /*netbeans-run* netbeans-setup netbeans.txt /*netbeans-setup* netbeans-support netbeans.txt /*netbeans-support* +netbeans-xpm netbeans.txt /*netbeans-xpm* netbeans.txt netbeans.txt /*netbeans.txt* netreadfixup pi_netrw.txt /*netreadfixup* netrw pi_netrw.txt /*netrw* @@ -8019,6 +8044,7 @@ peace intro.txt /*peace* penc-option print.txt /*penc-option* perl if_perl.txt /*perl* perl-Append if_perl.txt /*perl-Append* +perl-Blob if_perl.txt /*perl-Blob* perl-Buffer if_perl.txt /*perl-Buffer* perl-Buffers if_perl.txt /*perl-Buffers* perl-Count if_perl.txt /*perl-Count* @@ -8213,6 +8239,7 @@ quickfix-directory-stack quickfix.txt /* quickfix-error-lists quickfix.txt /*quickfix-error-lists* quickfix-functions usr_41.txt /*quickfix-functions* quickfix-gcc quickfix.txt /*quickfix-gcc* +quickfix-index quickfix.txt /*quickfix-index* quickfix-manx quickfix.txt /*quickfix-manx* quickfix-parse quickfix.txt /*quickfix-parse* quickfix-perl quickfix.txt /*quickfix-perl* @@ -8332,6 +8359,7 @@ rrst.vim syntax.txt /*rrst.vim* rst.vim syntax.txt /*rst.vim* rsync pi_netrw.txt /*rsync* ruby if_ruby.txt /*ruby* +ruby-blob if_ruby.txt /*ruby-blob* ruby-buffer if_ruby.txt /*ruby-buffer* ruby-command if_ruby.txt /*ruby-command* ruby-commands if_ruby.txt /*ruby-commands* @@ -8482,9 +8510,11 @@ shift-left-right change.txt /*shift-left shiftwidth() eval.txt /*shiftwidth()* short-name-changed version4.txt /*short-name-changed* showing-menus gui.txt /*showing-menus* +sign-column sign.txt /*sign-column* sign-commands sign.txt /*sign-commands* sign-functions usr_41.txt /*sign-functions* sign-group sign.txt /*sign-group* +sign-identifier sign.txt /*sign-identifier* sign-intro sign.txt /*sign-intro* sign-priority sign.txt /*sign-priority* sign-support sign.txt /*sign-support* @@ -8492,6 +8522,7 @@ sign.txt sign.txt /*sign.txt* sign_define() eval.txt /*sign_define()* sign_getdefined() eval.txt /*sign_getdefined()* sign_getplaced() eval.txt /*sign_getplaced()* +sign_jump() eval.txt /*sign_jump()* sign_place() eval.txt /*sign_place()* sign_undefine() eval.txt /*sign_undefine()* sign_unplace() eval.txt /*sign_unplace()* @@ -8843,6 +8874,7 @@ t_ZH term.txt /*t_ZH* t_ZR term.txt /*t_ZR* t_al term.txt /*t_al* t_bc term.txt /*t_bc* +t_blob-variable eval.txt /*t_blob-variable* t_bool-variable eval.txt /*t_bool-variable* t_cd term.txt /*t_cd* t_cdl version4.txt /*t_cdl* @@ -9134,6 +9166,7 @@ test_autochdir() eval.txt /*test_autochd test_feedinput() eval.txt /*test_feedinput()* test_garbagecollect_now() eval.txt /*test_garbagecollect_now()* test_ignore_error() eval.txt /*test_ignore_error()* +test_null_blob() eval.txt /*test_null_blob()* test_null_channel() eval.txt /*test_null_channel()* test_null_dict() eval.txt /*test_null_dict()* test_null_job() eval.txt /*test_null_job()* @@ -9166,6 +9199,7 @@ tex.vim syntax.txt /*tex.vim* text-functions usr_41.txt /*text-functions* text-objects motion.txt /*text-objects* text-objects-changed version5.txt /*text-objects-changed* +text-prop-changes textprop.txt /*text-prop-changes* text-prop-functions textprop.txt /*text-prop-functions* text-prop-intro textprop.txt /*text-prop-intro* text-properties textprop.txt /*text-properties* @@ -9356,6 +9390,7 @@ v:swapchoice eval.txt /*v:swapchoice* v:swapcommand eval.txt /*v:swapcommand* v:swapname eval.txt /*v:swapname* v:t_TYPE eval.txt /*v:t_TYPE* +v:t_blob eval.txt /*v:t_blob* v:t_bool eval.txt /*v:t_bool* v:t_channel eval.txt /*v:t_channel* v:t_dict eval.txt /*v:t_dict* @@ -9726,12 +9761,7 @@ word-motions motion.txt /*word-motions* wordcount() eval.txt /*wordcount()* workbench starting.txt /*workbench* workshop workshop.txt /*workshop* -workshop-commands workshop.txt /*workshop-commands* -workshop-compiling workshop.txt /*workshop-compiling* -workshop-configure workshop.txt /*workshop-configure* -workshop-intro workshop.txt /*workshop-intro* workshop-support workshop.txt /*workshop-support* -workshop-xpm workshop.txt /*workshop-xpm* workshop.txt workshop.txt /*workshop.txt* wrap-off intro.txt /*wrap-off* write-compiler-plugin usr_41.txt /*write-compiler-plugin* diff --git a/runtime/doc/textprop.txt b/runtime/doc/textprop.txt --- a/runtime/doc/textprop.txt +++ b/runtime/doc/textprop.txt @@ -1,4 +1,4 @@ -*textprop.txt* For Vim version 8.1. Last change: 2018 Dec 30 +*textprop.txt* For Vim version 8.1. Last change: 2019 Jan 08 VIM REFERENCE MANUAL by Bram Moolenaar @@ -17,6 +17,7 @@ What is not working yet: 1. Introduction |text-prop-intro| 2. Functions |text-prop-functions| +3. When text changes |text-prop-changes| {Vi does not have text properties} @@ -113,5 +114,25 @@ prop_list({lnum} [, {props}) text pro prop_remove({props} [, {lnum} [, {lnum-end}]]) remove a text property +============================================================================== +3. When text changes *text-prop-changes* + +Vim will do its best to keep the text properties on the text where it was +attached. When inserting or deleting text the properties after the change +will move accordingly. + +When text is deleted and a text property no longer includes any text, it is +deleted. However, a text property that was defined as zero-width will remain, +unless the whole line is deleted. + +When using replace mode, the text properties stay on the same character +positions, even though the characters themselves change. + + +When text property columns are not updated ~ + +- When setting the line with |setline()| or through an interface, such as Lua, + Tcl or Python. + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 8.1. Last change: 2019 Jan 01 +*todo.txt* For Vim version 8.1. Last change: 2019 Jan 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -38,12 +38,13 @@ browser use: https://github.com/vim/vim/ *known-bugs* -------------------- Known bugs and current work ----------------------- -Valgrind error in old regexp engine when using TOhtml. -(Dominique, 2018 Dec 31, #3749) - -Possible errors reported from fuzzer. Shadowblade #3716 -a) using get_regline() without checking for NULL -b) using getcell() in libvterm without checking for NULL +Blob: the string form can't be parsed back. Use 0z00112233.44556677 ? + +Make msg() and msg_attr() also use "char *" intead of "char_u *"? + +Feature to possibly graduate: FEAT_MBYTE + Integrate EBCDIC feature, use 'encoding' == "ebcdic" ? + Or drop EBCDIC? 'incsearch' with :s: (#3321) - :s/foo using CTRL-G moves to another line, should not happen, or use the @@ -76,8 +77,11 @@ Terminal debugger: with another Vim instance. Terminal emulator window: +- When Vim runs in the terminal and changes the title, the statusline needs to + be redrawn. - GUI: When using ":set go+=!" a system() call causes the hit-enter prompt. (#3327) +- Terminal API: Add more functionality? (Ozaki Kiichi 2018 May 13, #2907) - GUI: hang until key typed. (#3530) - When the job in the terminal doesn't use mouse events, let the scroll wheel scroll the scrollback, like a terminal does at the shell prompt. #2490 @@ -96,7 +100,6 @@ Terminal emulator window: - Win32: Redirecting output works but includes escape sequences. - Win32: Make terminal used for :!cmd in the GUI work better. Allow for redirection. -- Terminal API: Add more functionality? (Ozaki Kiichi 2018 May 13, #2907) - When the job only outputs lines, we could handle resizing the terminal better: store lines separated by line breaks, instead of screen lines, then when the window is resized redraw those lines. @@ -106,8 +109,7 @@ Terminal emulator window: - When 'encoding' is not utf-8, or the job is using another encoding, setup conversions. -":function" can now silently overwrite the function from the same script. -Do the same for ":command" ? +Patch with updates for VMS. (Zoltan Arpadffy, 2019 Jan 14) Update for German spell files: https://github.com/chrisbra/vim/compare/5e021c990f8817a50d3264782a5...3b27c92f297540761ebbd92d04fb3 (Christian Brabandt, 2018 Nov 4) @@ -116,35 +118,44 @@ Problem with Visual yank when 'linebreak Patch with tests, but it's not clear how it is supposed to work. (tommm, 2018 Nov 17) Asked about this, Dec 22. Christian will have a look. +Patch to deal with signs at the end of the buffer when lines are deleted. +(Yegappan Lakshmanan, #3798) + Key mapping times out when using a timer in Gvim. (Michael Henry, 2018 Sep 9, #3417) - -Add v:motion_force. (Kana Natsuno, 2008 Dec 6) -Maybe call it v:motiontype. Update in #3490. -Alternative: add the force flag to mode(), after "no". -Patch ready to include? +Another report, with reproduction steps. (#3799) +Is this fixed by 8.1.0761? Does not build with MinGW out of the box: - _stat64 is not defined, need to use "struct stat" in vim.h - WINVER conflict, should use 0x0600 by default? +Patch to remove flicker from popup menu. (Yasuhiro Matsumoto, 2013 Aug 15) +When redrawing for updating the popup menu, don't redraw the part when the new +popup menu will be displayed? + +js_decode() does not handle infinity properly. (Dominique Pelle, 2019 Jan 10, +#3788) + Signs: +- screen not redrawn correctly. (Dominique Pelle, 2019 Jan 14, #3803) - Use a sign group in the Termdebug plugin. - Avoid that "sign unplace id" does a redraw right away, esp. when there is a sequence of these commands. (Andy Stewart, 2018 Mar 16) -- Patch to right-align signs. (James Kolb (email james), 2013 Sep 23) -- Patch from Christian Brabandt to make the "buffer" argument for ":sign - place" optional. (2013 Jul 12) Crash when mixing matchadd and substitute()? (Max Christian Pohle, 2018 May 13, #2910) Can't reproduce? -Patch to add blob type support. (Yasuhiro Matsumoto, 2018 Nov 26, #3638) -Should be ready to include. +Merge checking for 'cursorline' and 'concealcursor', see neovim #9492. + +Patch to not call setActiveWindow. Yasuhiro Matsumoto, 2019 Jan 8, #3778) Errors found with random data: heap-buffer-overflow in alist_add (#2472) +Patch for xxd to make it work with 64 bit numbers. (Christer Jense, 2019 Jan +11, #3791) + Win32 key codes are messy. Mike Williams tried to fix that, but now old mappings no longer work. Create a new terminal for the better solution? @@ -152,9 +163,6 @@ Improve fallback for menu translations, files that source the actual file. E.g. menu_da_de -> menu_da Include part of #3242? -Patch to add 'p' flag to 'formatoptions'. (Tom Ryder, 2018 Dec 28) -Wait a few days for feedback. - When a terminal exit_cb closes the window, a following typed key is lost, if it's in a mapping. (2018 Oct 6, #2302, #3522) @@ -169,6 +177,10 @@ Williams, 2018 Oct 30) Problem with :tlmenu: Detach item added with all modes? Issue #3563. +When using a timer callback vgetc_busy is reset, allowing for using input(). +But in a channel callback this does not happen. We need to do something +similar to check_due_timer(). Also see #3809. + C syntax: {} inside () causes following {} to be highlighted as error. (Michalis Giannakidis, 2006 Jun 1) @@ -178,10 +190,27 @@ Patch on #3690 to fix that "wincmd p" do Patch: When using %v in 'errorformat', assume the number is the screen column not bytes, also handle multi-byte charactes. (Yegappan Lakshmanan, #3700) +Make balloon_show() work outside of 'balloonexpr'? Users expect it to work: +#2948. (related to #1512?) +On Win32 it stops showing, because showState is already ShS_SHOWING. +balloon_show() does not work properly in the terminal. (Ben Jackson, 2017 Dec +20, #2481) +Also see #2352, want better control over balloon, perhaps set the position. +Should also be possible to add highlighting, like in the status line? +balloonexpr() on MS-Windows GUI doesn't handle accented chars? (nivaemail, +2018 Sep 14) +Another request: #3811. + Patch to add FOR_ALL_FRAMES. (Yegappan, 2018 Dec 11, #3686) Patch for MinGW build with static libraries. (Ken Takata, 2018 Dec 16) +Patch to add new regexp classes :ident:, :keyword:, :fname:. +(ichizok, 2016 Jan 12, #1373) + +Patch to add "termsig" - signal that caused job to end. (Ozaki Kiichi, 2019 +Jan 10, #3786) + More warnings from static analysis: https://lgtm.com/projects/g/vim/vim/alerts/?mode=list @@ -191,7 +220,8 @@ 7 Make 'scrolloff' a global-local opti quickfix window, for example. (Gary Holloway) Also do 'sidescrolloff'. -Patch for ConPTY support, #3474: What is the status? +Patch for ConPTY support, new one: #3794 Does this work now? +(Nobuhiro Takasaki) Issue #3649: Retrying the X server connection once may be insufficient. Since patch 8.1.0615 we try reconnecting five times. Does it work? @@ -229,9 +259,6 @@ When 'sidescrolloff' is set, using "zl" scrolls back. Should allow for this scrolling, like 'scrolloff' does when using CTRL-E. (Yee Cheng Chin, #3721) -We have a SourcePre autocommand event, but not SourcePost. Useful for doing -some thing after a plugin was loaded. (#3739) - Invalid memory access with old regexp engine. (Dominique Pelle, 2018 Sep 3, #3405) Introduced by 8.0.1517, which was fixing another memory access error. (Sep 8) @@ -244,9 +271,6 @@ Patch to implement 'diffref' option. (#3 Patch to fix that bracketed paste remains after Vim exits. (2018 Oct 30, #3579) -Patch to add support for changing the current quickfix/location list indes. -(Yegappan Lakshmanan, 2018 Dec 18, #3701) - Make ":interactive !cmd" stop termcap mode, also when used in an autocommand. (#3692) @@ -296,6 +320,9 @@ Adjust windows installer explanation of Set g:actual_curbuf when evaluating 'statusline', not just with an expression. (Daniel Hahler, 2018 Aug 8, #3299) +Update for xim-input-style help (Tony Mechelynck, 2019 Jan 10). +Feedback from someone who uses this? + ml_get error. (Dominique Pelle, 2018 Sep 14, #3434) Patch to use forward slash for completion even when 'shellslash' is set. @@ -379,16 +406,6 @@ Update Sep 7. Update by Christian Braba Patch to be able to disable default digraphs (incomplete) (Eric Pruitt, 2018 Nov 22). -Make balloon_show() work outside of 'balloonexpr'? Users expect it to work: -#2948. (related to #1512?) -On Win32 it stops showing, because showState is already ShS_SHOWING. -balloon_show() does not work properly in the terminal. (Ben Jackson, 2017 Dec -20, #2481) -Also see #2352, want better control over balloon, perhaps set the position. -Should also be possible to add highlighting, like in the status line? -balloonexpr() on MS-Windows GUI doesn't handle accented chars? (nivaemail, -2018 Sep 14) - Try out background make plugin: https://github.com/AndrewVos/vim-make-background or asyncmake: @@ -444,19 +461,6 @@ deleting autocmds, not when adding them. Quickfix window height is not kept with a vertical split. (Lifepillar, 2018 Jun 10, #2998) -Improve the installer for MS-Windows. There are a few alternatives: -- mui2 installer improved by Ken Takata (2018 Sep 29) -- Installer from Cream (Steve Hall). -- Modern UI 2.0 for the Nsis installer. (Guopeng Wen) - https://github.com/gpwen/vim-installer-mui2 -- make it possible to do a silent install, see - http://nsis.sourceforge.net/Docs/Chapter4.html#4.12 - Version from Guopeng Wen does this. -- MSI installer: https://github.com/petrkle/vim-msi/ -- The one on Issue 279. -Problem: they all work slightly different (e.g. don't install vimrun.exe). -How to test that it works well for all Vim users? - Alternative manpager.vim. (Enno, 2018 Jan 5, #2529) Delete all the specific stuff for the Borland compiler? (#3374) @@ -538,7 +542,7 @@ option_save({list}) *option_save()* Alternatively: save and restore ALL options. Implementation needs to use copy-on-write. Return an ID from option_save(), when option_restore(ID) is called give an error if another option_save() - was called in the mean time, they must be balanced. + was called in the meantime, they must be balanced. "gvim --remote" from a directory with non-word characters changes the current directory (Paulo Marcel Coelho Arabic, 2017 Oct 30, #2266) @@ -562,8 +566,6 @@ Add script number to profile? (#3330 br A function defined locally and lambda's are not easily recognized. Mention where they were defined somewhere. -CTRL-X on zero gets stuck on 0xfffffffffffffffe. (Hengyang Zhao, #2746) - Invalid range error when using BufWinLeave for closing terminal. (Gabriel Barta, 2017 Nov 15, #2339) @@ -590,9 +592,6 @@ In an optional package the "after" direc Patch for Neovim concerning restoring when closing help window. (glacambre neovim #7431) -Default install on MS-Windows should source defaults.vim. -Ask whether to use Windows or Vim key behavior? - Patch for improving detecting Ruby on Mac in configure. (Ilya Mikhaltsou, 2017 Nov 21) @@ -1570,9 +1569,6 @@ Updated spec ftplugin. (Matěj Cepl, 2013 Oct 16) 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. - 7 Windows XP: When using "ClearType" for text smoothing, a column of yellow pixels remains when typing spaces in front of a "D" ('guifont' set to "lucida_console:h8"). @@ -1659,8 +1655,6 @@ Or use expand('')? Patch to make confirm() display colors. (Christian Brabandt, 2012 Nov 9) -Patch to remove flicker from popup menu. (Yasuhiro Matsumoto, 2013 Aug 15) - Problem with refresh:always in completion. (Tyler Wade, 2013 Mar 17) b:undo_ftplugin cannot call a script-local function. (Boris Danilov, 2013 Jan @@ -1679,9 +1673,6 @@ 2012 Aug 4) 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? diff --git a/runtime/doc/undo.txt b/runtime/doc/undo.txt --- a/runtime/doc/undo.txt +++ b/runtime/doc/undo.txt @@ -1,4 +1,4 @@ -*undo.txt* For Vim version 8.1. Last change: 2014 May 24 +*undo.txt* For Vim version 8.1. Last change: 2019 Jan 04 VIM REFERENCE MANUAL by Bram Moolenaar @@ -259,6 +259,12 @@ changed with the 'undodir' option. When the file is encrypted, the text in the undo file is also crypted. The same key and method is used. |encryption| +Note that text properties are not stored in the undo file. You can restore +text properties so long as a buffer is loaded, but you cannot restore them +from an undo file. Rationale: It would require the associated text property +types to be defined in exactly the same was as before, which cannot be +guaranteed. + You can also save and restore undo histories by using ":wundo" and ":rundo" respectively: *:wundo* *:rundo* diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -1,4 +1,4 @@ -*usr_41.txt* For Vim version 8.1. Last change: 2018 Dec 18 +*usr_41.txt* For Vim version 8.1. Last change: 2019 Jan 12 VIM USER MANUAL - by Bram Moolenaar @@ -958,6 +958,7 @@ Inter-process communication: *chann ch_close() close a channel ch_close_in() close the in part of a channel ch_read() read a message from a channel + ch_readblob() read a Blob from a channel ch_readraw() read a raw message from a channel ch_sendexpr() send a JSON message over a channel ch_sendraw() send a raw message over a channel diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -1,4 +1,4 @@ -*various.txt* For Vim version 8.1. Last change: 2019 Jan 08 +*various.txt* For Vim version 8.1. Last change: 2019 Jan 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -440,7 +440,7 @@ N *+smartindent* |'smartindent'| N *+startuptime* |--startuptime| argument N *+statusline* Options 'statusline', 'rulerformat' and special formats of 'titlestring' and 'iconstring' -m *+sun_workshop* |workshop| +m *+sun_workshop* |workshop|; no longer supported N *+syntax* Syntax highlighting |syntax| *+system()* Unix only: opposite of |+fork| T *+tag_binary* binary searching in tags file |tag-binary-search| diff --git a/runtime/doc/version6.txt b/runtime/doc/version6.txt --- a/runtime/doc/version6.txt +++ b/runtime/doc/version6.txt @@ -1,4 +1,4 @@ -*version6.txt* For Vim version 8.1. Last change: 2018 Mar 18 +*version6.txt* For Vim version 8.1. Last change: 2019 Jan 17 VIM REFERENCE MANUAL by Bram Moolenaar @@ -943,7 +943,7 @@ Added the ":sign" command to define and with two ASCII characters or an icon. The line after it can be highlighted. Useful to display breakpoints and the current PC position. -Added the |:wsverb| command to execute debugger commands. +Added the :wsverb command to execute debugger commands. Added balloon stuff: 'balloondelay' and 'ballooneval' options. diff --git a/runtime/doc/visual.txt b/runtime/doc/visual.txt --- a/runtime/doc/visual.txt +++ b/runtime/doc/visual.txt @@ -1,4 +1,4 @@ -*visual.txt* For Vim version 8.1. Last change: 2017 Sep 02 +*visual.txt* For Vim version 8.1. Last change: 2019 Jan 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -305,8 +305,6 @@ mode. ============================================================================== 5. Blockwise operators *blockwise-operators* -{not available when compiled without the |+visualextra| feature} - Reminder: Use 'virtualedit' to be able to select blocks that start or end after the end of a line or halfway a tab. diff --git a/runtime/ftplugin/bash.vim b/runtime/ftplugin/bash.vim new file mode 100644 --- /dev/null +++ b/runtime/ftplugin/bash.vim @@ -0,0 +1,31 @@ +" Vim filetype plugin file +" Language: bash +" Maintainer: Bram Moolenaar +" Last Changed: 2019 Jan 12 +" +" This is not a real filetype plugin. It allows for someone to set 'filetype' +" to "bash" in the modeline, and gets the effect of filetype "sh" with +" b:is_bash set. Idea from Mahmode Al-Qudsi. + +if exists("b:did_ftplugin") + finish +endif + +let b:is_bash = 1 +if exists("b:is_sh") + unlet b:is_sh +endif +if exists("b:is_kornshell") + unlet b:is_kornshell +endif + +" Setting 'filetype' here directly won't work, since we are being invoked +" through an autocommand. Do it later, on the BufWinEnter event. +augroup bash_filetype + au BufWinEnter * call SetBashFt() +augroup END + +func SetBashFt() + au! bash_filetype + set ft=sh +endfunc diff --git a/runtime/ftplugin/eruby.vim b/runtime/ftplugin/eruby.vim --- a/runtime/ftplugin/eruby.vim +++ b/runtime/ftplugin/eruby.vim @@ -3,6 +3,7 @@ " Maintainer: Tim Pope " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns +" Last Change: 2019 Jan 06 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -27,7 +28,7 @@ elseif !exists("b:eruby_subtype") let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$") let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+') if b:eruby_subtype == '' - let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\)\+$','',''),'\.\zs\w\+\%(\ze+\w\+\)\=$') + let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\|\.example\)\+$','',''),'\.\zs\w\+\%(\ze+\w\+\)\=$') endif if b:eruby_subtype == 'rhtml' let b:eruby_subtype = 'html' @@ -45,7 +46,7 @@ elseif !exists("b:eruby_subtype") endif endif -if exists("b:eruby_subtype") && b:eruby_subtype != '' +if exists("b:eruby_subtype") && b:eruby_subtype != '' && b:eruby_subtype !=? 'eruby' exe "runtime! ftplugin/".b:eruby_subtype.".vim ftplugin/".b:eruby_subtype."_*.vim ftplugin/".b:eruby_subtype."/*.vim" else runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim @@ -66,6 +67,21 @@ if exists("b:match_words") unlet b:match_words endif +let s:cfilemap = v:version >= 704 ? maparg('', 'c', 0, 1) : {} +if !get(s:cfilemap, 'buffer') || !s:cfilemap.expr || s:cfilemap.rhs =~# 'ErubyAtCursor()' + let s:cfilemap = {} +endif +if !has_key(s:cfilemap, 'rhs') + let s:cfilemap.rhs = "substitute(&l:inex =~# '\\' && len(expand('')) ? eval(substitute(&l:inex, '\\', '\\=string(expand(\"\"))', 'g')) : '', '^$', \"\\022\\006\",'')" +endif +let s:ctagmap = v:version >= 704 ? maparg('', 'c', 0, 1) : {} +if !get(s:ctagmap, 'buffer') || !s:ctagmap.expr || s:ctagmap.rhs =~# 'ErubyAtCursor()' + let s:ctagmap = {} +endif +let s:include = &l:include +let s:path = &l:path +let s:suffixesadd = &l:suffixesadd + runtime! ftplugin/ruby.vim ftplugin/ruby_*.vim ftplugin/ruby/*.vim let b:did_ftplugin = 1 @@ -80,6 +96,15 @@ if exists("b:match_words") let s:match_words = b:match_words . ',' . s:match_words endif +if len(s:include) + let &l:include = s:include +endif +let &l:path = s:path . (s:path =~# ',$\|^$' ? '' : ',') . &l:path +let &l:suffixesadd = s:suffixesadd . (s:suffixesadd =~# ',$\|^$' ? '' : ',') . &l:suffixesadd +exe 'cmap