diff options
Diffstat (limited to 'runtime/autoload')
-rw-r--r-- | runtime/autoload/ada.vim | 6 | ||||
-rw-r--r-- | runtime/autoload/adacomplete.vim | 2 | ||||
-rw-r--r-- | runtime/autoload/csscomplete.vim | 8 | ||||
-rw-r--r-- | runtime/autoload/decada.vim | 2 | ||||
-rw-r--r-- | runtime/autoload/dist/ft.vim | 19 | ||||
-rw-r--r-- | runtime/autoload/haskellcomplete.vim | 6 | ||||
-rw-r--r-- | runtime/autoload/health/lsp.vim | 5 | ||||
-rw-r--r-- | runtime/autoload/htmlcomplete.vim | 2 | ||||
-rw-r--r-- | runtime/autoload/man.vim | 19 | ||||
-rw-r--r-- | runtime/autoload/netrw.vim | 274 | ||||
-rw-r--r-- | runtime/autoload/netrwSettings.vim | 8 | ||||
-rw-r--r-- | runtime/autoload/phpcomplete.vim | 40 | ||||
-rw-r--r-- | runtime/autoload/provider/clipboard.vim | 4 | ||||
-rw-r--r-- | runtime/autoload/python3complete.vim | 2 | ||||
-rw-r--r-- | runtime/autoload/pythoncomplete.vim | 2 | ||||
-rw-r--r-- | runtime/autoload/remote/host.vim | 2 | ||||
-rw-r--r-- | runtime/autoload/rubycomplete.vim | 11 | ||||
-rw-r--r-- | runtime/autoload/sqlcomplete.vim | 10 | ||||
-rw-r--r-- | runtime/autoload/tar.vim | 2 | ||||
-rw-r--r-- | runtime/autoload/tohtml.vim | 2 | ||||
-rw-r--r-- | runtime/autoload/vimexpect.vim | 2 | ||||
-rw-r--r-- | runtime/autoload/xmlcomplete.vim | 2 | ||||
-rw-r--r-- | runtime/autoload/zip.vim | 2 |
23 files changed, 294 insertions, 138 deletions
diff --git a/runtime/autoload/ada.vim b/runtime/autoload/ada.vim index d04feb9250..3f1b40398f 100644 --- a/runtime/autoload/ada.vim +++ b/runtime/autoload/ada.vim @@ -67,13 +67,13 @@ if exists ('g:ada_with_gnat_project_files') endfor endif -" Section: add standart exception {{{2 +" Section: add standard exception {{{2 " for Item in ['Constraint_Error', 'Program_Error', 'Storage_Error', 'Tasking_Error', 'Status_Error', 'Mode_Error', 'Name_Error', 'Use_Error', 'Device_Error', 'End_Error', 'Data_Error', 'Layout_Error', 'Length_Error', 'Pattern_Error', 'Index_Error', 'Translation_Error', 'Time_Error', 'Argument_Error', 'Tag_Error', 'Picture_Error', 'Terminator_Error', 'Conversion_Error', 'Pointer_Error', 'Dereference_Error', 'Update_Error'] let g:ada#Keywords += [{ \ 'word': Item, \ 'menu': 'exception', - \ 'info': 'Ada standart exception.', + \ 'info': 'Ada standard exception.', \ 'kind': 'x', \ 'icase': 1}] endfor @@ -210,7 +210,7 @@ function ada#Word (...) let l:Line = substitute (getline (l:Line_Nr), g:ada#Comment, '', '' ) " Cope with tag searching for items in comments; if we are, don't loop - " backards looking for previous lines + " backwards looking for previous lines if l:Column_Nr > strlen(l:Line) " We were in a comment let l:Line = getline(l:Line_Nr) diff --git a/runtime/autoload/adacomplete.vim b/runtime/autoload/adacomplete.vim index 2659f51d5c..d7bba93d12 100644 --- a/runtime/autoload/adacomplete.vim +++ b/runtime/autoload/adacomplete.vim @@ -14,7 +14,7 @@ " 15.10.2006 MK Bram's suggestion for runtime integration " 05.11.2006 MK Bram suggested not to use include protection for " autoload -" 05.11.2006 MK Bram suggested agaist using setlocal omnifunc +" 05.11.2006 MK Bram suggested against using setlocal omnifunc " 05.11.2006 MK Bram suggested to save on spaces " Help Page: ft-ada-omni "------------------------------------------------------------------------------ diff --git a/runtime/autoload/csscomplete.vim b/runtime/autoload/csscomplete.vim index f6c5a6c391..4b673ac9b8 100644 --- a/runtime/autoload/csscomplete.vim +++ b/runtime/autoload/csscomplete.vim @@ -4,7 +4,7 @@ " plus CSS Speech Module <http://www.w3.org/TR/css3-speech/> " Maintainer: Kao, Wei-Ko(othree) ( othree AT gmail DOT com ) " Original Author: Mikolaj Machowski ( mikmach AT wp DOT pl ) -" Last Change: 2018 Jul 02 +" Last Change: 2021 Sep 21 let s:values = split("all additive-symbols align-content align-items align-self animation animation-delay animation-direction animation-duration animation-fill-mode animation-iteration-count animation-name animation-play-state animation-timing-function backface-visibility background background-attachment background-blend-mode background-clip background-color background-image background-origin background-position background-repeat background-size block-size border border-block-end border-block-end-color border-block-end-style border-block-end-width border-block-start border-block-start-color border-block-start-style border-block-start-width border-bottom border-bottom-color border-bottom-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border-collapse border-color border-image border-image-outset border-image-repeat border-image-slice border-image-source border-image-width border-inline-end border-inline-end-color border-inline-end-style border-inline-end-width border-inline-start border-inline-start-color border-inline-start-style border-inline-start-width border-left border-left-color border-left-style border-left-width border-radius border-right border-right-color border-right-style border-right-width border-spacing border-style border-top border-top-color border-top-left-radius border-top-right-radius border-top-style border-top-width border-width bottom box-decoration-break box-shadow box-sizing break-after break-before break-inside caption-side clear clip clip-path color columns column-count column-fill column-gap column-rule column-rule-color column-rule-style column-rule-width column-span column-width content counter-increment counter-reset cue cue-before cue-after cursor direction display empty-cells fallback filter flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap float font font-family font-feature-settings font-kerning font-language-override font-size font-size-adjust font-stretch font-style font-synthesis font-variant font-variant-alternates font-variant-caps font-variant-east-asian font-variant-ligatures font-variant-numeric font-variant-position font-weight grid grid-area grid-auto-columns grid-auto-flow grid-auto-position grid-auto-rows grid-column grid-column-start grid-column-end grid-row grid-row-start grid-row-end grid-template grid-template-areas grid-template-rows grid-template-columns height hyphens image-rendering image-resolution image-orientation ime-mode inline-size isolation justify-content left letter-spacing line-break line-height list-style list-style-image list-style-position list-style-type margin margin-block-end margin-block-start margin-bottom margin-inline-end margin-inline-start margin-left margin-right margin-top marks mask mask-type max-block-size max-height max-inline-size max-width max-zoom min-block-size min-height min-inline-size min-width min-zoom mix-blend-mode negative object-fit object-position offset-block-end offset-block-start offset-inline-end offset-inline-start opacity order orientation orphans outline outline-color outline-offset outline-style outline-width overflow overflow-wrap overflow-x overflow-y pad padding padding-block-end padding-block-start padding-bottom padding-inline-end padding-inline-start padding-left padding-right padding-top page-break-after page-break-before page-break-inside pause-before pause-after pause perspective perspective-origin pointer-events position prefix quotes range resize rest rest-before rest-after right ruby-align ruby-merge ruby-position scroll-behavior scroll-snap-coordinate scroll-snap-destination scroll-snap-points-x scroll-snap-points-y scroll-snap-type scroll-snap-type-x scroll-snap-type-y shape-image-threshold shape-margin shape-outside speak speak-as suffix symbols system table-layout tab-size text-align text-align-last text-combine-upright text-decoration text-decoration-color text-decoration-line text-emphasis text-emphasis-color text-emphasis-position text-emphasis-style text-indent text-orientation text-overflow text-rendering text-shadow text-transform text-underline-position top touch-action transform transform-box transform-origin transform-style transition transition-delay transition-duration transition-property transition-timing-function unicode-bidi unicode-range user-zoom vertical-align visibility voice-balance voice-duration voice-family voice-pitch voice-rate voice-range voice-stress voice-volume white-space widows width will-change word-break word-spacing word-wrap writing-mode z-index zoom") @@ -38,12 +38,12 @@ function! csscomplete#CompleteCSS(findstart, base) if exists("b:compl_context") let line = getline('.') let compl_begin = col('.') - 2 - let after = line[compl_begin:] + let b:after = line[compl_begin:] let line = b:compl_context unlet! b:compl_context else let line = a:base - let after = '' + let b:after = '' endif let res = [] @@ -311,7 +311,7 @@ function! csscomplete#CompleteCSS(findstart, base) let values = ["normal", "italic", "oblique", "small-caps", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900", "xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "larger", "smaller", "sans-serif", "serif", "monospace", "cursive", "fantasy", "caption", "icon", "menu", "message-box", "small-caption", "status-bar"] elseif prop =~ '^\%(height\|width\)$' let values = ["auto", "border-box", "content-box", "max-content", "min-content", "available", "fit-content"] - elseif prop =~ '^\%(left\|rigth\)$' + elseif prop =~ '^\%(left\|right\)$' let values = ["auto"] elseif prop == 'image-rendering' let values = ["auto", "crisp-edges", "pixelated"] diff --git a/runtime/autoload/decada.vim b/runtime/autoload/decada.vim index 5124429a75..fda2b76dac 100644 --- a/runtime/autoload/decada.vim +++ b/runtime/autoload/decada.vim @@ -23,7 +23,7 @@ endif function decada#Unit_Name () dict " {{{1 " Convert filename into acs unit: - " 1: remove the file extenstion. + " 1: remove the file extension. " 2: replace all double '_' or '-' with an dot (which denotes a separate) " 3: remove a trailing '_' (which denotes a specification) return substitute (substitute (expand ("%:t:r"), '__\|-', ".", "g"), '_$', "", '') diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim index ac80659113..7484149a26 100644 --- a/runtime/autoload/dist/ft.vim +++ b/runtime/autoload/dist/ft.vim @@ -264,6 +264,14 @@ func dist#ft#ProtoCheck(default) endfunc func dist#ft#FTm() + if exists("g:filetype_m") + exe "setf " . g:filetype_m + return + endif + + " excluding end(for|function|if|switch|while) common to Murphi + let octave_block_terminators = '\<end\%(_try_catch\|classdef\|enumeration\|events\|methods\|parfor\|properties\)\>' + let n = 1 let saw_comment = 0 " Whether we've seen a multiline comment leader. while n < 100 @@ -278,6 +286,12 @@ func dist#ft#FTm() setf objc return endif + if line =~ '^\s*\%(#\|%!\)' || line =~ '^\s*unwind_protect\>' || + \ line =~ '\%(^\|;\)\s*' .. octave_block_terminators + setf octave + return + endif + " TODO: could be Matlab or Octave if line =~ '^\s*%' setf matlab return @@ -298,11 +312,8 @@ func dist#ft#FTm() " or Murphi based on the comment leader. Assume the former as it is more " common. setf objc - elseif exists("g:filetype_m") - " Use user specified default filetype for .m - exe "setf " . g:filetype_m else - " Default is matlab + " Default is Matlab setf matlab endif endfunc diff --git a/runtime/autoload/haskellcomplete.vim b/runtime/autoload/haskellcomplete.vim index 48fbac7f9f..759ff8741a 100644 --- a/runtime/autoload/haskellcomplete.vim +++ b/runtime/autoload/haskellcomplete.vim @@ -54,7 +54,7 @@ function! haskellcomplete#Complete(findstart, base) if b:completingLangExtension if a:base ==? "" - " Return all posible Lang extensions + " Return all possible Lang extensions return s:langExtensions else let l:matches = [] @@ -70,7 +70,7 @@ function! haskellcomplete#Complete(findstart, base) elseif b:completingOptionsGHC if a:base ==? "" - " Return all posible GHC options + " Return all possible GHC options return s:optionsGHC else let l:matches = [] @@ -86,7 +86,7 @@ function! haskellcomplete#Complete(findstart, base) elseif b:completingModule if a:base ==? "" - " Return all posible modules + " Return all possible modules return s:commonModules else let l:matches = [] diff --git a/runtime/autoload/health/lsp.vim b/runtime/autoload/health/lsp.vim new file mode 100644 index 0000000000..2d2ba91cdf --- /dev/null +++ b/runtime/autoload/health/lsp.vim @@ -0,0 +1,5 @@ +function! health#lsp#check() abort + call health#report_start('Checking language server client configuration') + lua require 'vim.lsp.health'.check_health() +endfunction + diff --git a/runtime/autoload/htmlcomplete.vim b/runtime/autoload/htmlcomplete.vim index 6b9d49a469..267889d97f 100644 --- a/runtime/autoload/htmlcomplete.vim +++ b/runtime/autoload/htmlcomplete.vim @@ -486,7 +486,7 @@ function! htmlcomplete#CompleteTags(findstart, base) endif endif " Value of attribute completion {{{ - " If attr contains =\s*[\"'] we catched value of attribute + " If attr contains =\s*[\"'] we match value of attribute if attr =~ "=\s*[\"']" || attr =~ "=\s*$" " Let do attribute specific completion let attrname = matchstr(attr, '.*\ze\s*=') diff --git a/runtime/autoload/man.vim b/runtime/autoload/man.vim index 4f556e6e87..4f132b6121 100644 --- a/runtime/autoload/man.vim +++ b/runtime/autoload/man.vim @@ -58,6 +58,7 @@ function! man#open_page(count, mods, ...) abort else execute 'silent keepalt' a:mods 'stag' l:target endif + call s:set_options(v:false) finally call setbufvar(l:buf, '&tagfunc', l:save_tfu) endtry @@ -65,6 +66,7 @@ function! man#open_page(count, mods, ...) abort let b:man_sect = sect endfunction +" Called when a man:// buffer is opened. function! man#read_page(ref) abort try let [sect, name] = s:extract_sect_and_name_ref(a:ref) @@ -121,6 +123,15 @@ function! s:system(cmd, ...) abort return opts.stdout endfunction +function! s:set_options(pager) abort + setlocal filetype=man + setlocal noswapfile buftype=nofile bufhidden=hide + setlocal nomodified readonly nomodifiable + if a:pager + nnoremap <silent> <buffer> <nowait> q :lclose<CR>:q<CR> + endif +endfunction + function! s:get_page(path) abort " Disable hard-wrap by using a big $MANWIDTH (max 1000 on some systems #9065). " Soft-wrap: ftplugin/man.vim sets wrap/breakindent/…. @@ -134,9 +145,7 @@ function! s:get_page(path) abort endfunction function! s:put_page(page) abort - setlocal modifiable - setlocal noreadonly - setlocal noswapfile + setlocal modifiable noreadonly noswapfile silent keepjumps %delete _ silent put =a:page while getline(1) =~# '^\s*$' @@ -148,7 +157,7 @@ function! s:put_page(page) abort silent! keeppatterns keepjumps %s/\s\{199,}/\=repeat(' ', 10)/g 1 lua require("man").highlight_man_page() - setlocal filetype=man + call s:set_options(v:false) endfunction function! man#show_toc() abort @@ -397,6 +406,7 @@ function! s:format_candidate(path, psect) abort endif endfunction +" Called when Nvim is invoked as $MANPAGER. function! man#init_pager() abort " https://github.com/neovim/neovim/issues/6828 let og_modifiable = &modifiable @@ -420,6 +430,7 @@ function! man#init_pager() abort execute 'silent file man://'.tolower(fnameescape(ref)) endif + call s:set_options(v:true) let &l:modifiable = og_modifiable endfunction diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim index 74ceab35d4..b6edc4c4d8 100644 --- a/runtime/autoload/netrw.vim +++ b/runtime/autoload/netrw.vim @@ -1,7 +1,7 @@ " netrw.vim: Handles file transfer and remote directory listing across " AUTOLOAD SECTION -" Date: Sep 18, 2020 -" Version: 170 +" Date: Aug 16, 2021 +" Version: 171 " Maintainer: Charles E Campbell <NcampObell@SdrPchip.AorgM-NOSPAM> " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim " Copyright: Copyright (C) 2016 Charles E. Campbell {{{1 @@ -43,7 +43,7 @@ if exists("s:needspatches") endfor endif -let g:loaded_netrw = "v170" +let g:loaded_netrw = "v171" if !exists("s:NOTE") let s:NOTE = 0 let s:WARNING = 1 @@ -93,7 +93,7 @@ fun! netrw#ErrorMsg(level,msg,errnum) else let msg= level.a:msg endif - let s:popuperr_id = popup_beval(msg,{}) + let s:popuperr_id = popup_atcursor(msg,{}) let s:popuperr_text= "" elseif g:netrw_use_errorwindow " (default) netrw creates a one-line window to show error/warning @@ -322,6 +322,7 @@ call s:NetrwInit("g:netrw_banner" , 1) call s:NetrwInit("g:netrw_browse_split", 0) call s:NetrwInit("g:netrw_bufsettings" , "noma nomod nonu nobl nowrap ro nornu") call s:NetrwInit("g:netrw_chgwin" , -1) +call s:NetrwInit("g:netrw_clipboard" , 1) call s:NetrwInit("g:netrw_compress" , "gzip") call s:NetrwInit("g:netrw_ctags" , "ctags") if exists("g:netrw_cursorline") && !exists("g:netrw_cursor") @@ -331,6 +332,7 @@ endif call s:NetrwInit("g:netrw_cursor" , 2) let s:netrw_usercul = &cursorline let s:netrw_usercuc = &cursorcolumn +"call Decho("(netrw) COMBAK: cuc=".&l:cuc." cul=".&l:cul." initialization of s:netrw_cu[cl]") call s:NetrwInit("g:netrw_cygdrive","/cygdrive") " Default values - d-g ---------- {{{3 call s:NetrwInit("s:didstarstar",0) @@ -1606,7 +1608,8 @@ endfun fun! s:NetrwOptionsSave(vt) " call Dfunc("s:NetrwOptionsSave(vt<".a:vt.">) win#".winnr()." buf#".bufnr("%")."<".bufname(bufnr("%")).">"." winnr($)=".winnr("$")." mod=".&mod." ma=".&ma) " call Decho(a:vt."netrw_optionsave".(exists("{a:vt}netrw_optionsave")? ("=".{a:vt}netrw_optionsave) : " doesn't exist"),'~'.expand("<slnum>")) -" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("<slnum>")) +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt." hid=".&hid,'~'.expand("<slnum>")) +" call Decho("(s:NetrwOptionsSave) lines=".&lines) if !exists("{a:vt}netrw_optionsave") let {a:vt}netrw_optionsave= 1 @@ -1632,6 +1635,9 @@ fun! s:NetrwOptionsSave(vt) let {a:vt}netrw_cinokeep = &l:cino let {a:vt}netrw_comkeep = &l:com let {a:vt}netrw_cpokeep = &l:cpo + let {a:vt}netrw_cuckeep = &l:cuc + let {a:vt}netrw_culkeep = &l:cul +" call Decho("(s:NetrwOptionsSave) COMBAK: cuc=".&l:cuc." cul=".&l:cul) let {a:vt}netrw_diffkeep = &l:diff let {a:vt}netrw_fenkeep = &l:fen if !exists("g:netrw_ffkeep") || g:netrw_ffkeep @@ -1639,9 +1645,11 @@ fun! s:NetrwOptionsSave(vt) endif let {a:vt}netrw_fokeep = &l:fo " formatoptions let {a:vt}netrw_gdkeep = &l:gd " gdefault + let {a:vt}netrw_gokeep = &l:go " guioptions let {a:vt}netrw_hidkeep = &l:hidden let {a:vt}netrw_imkeep = &l:im let {a:vt}netrw_iskkeep = &l:isk + let {a:vt}netrw_lines = &lines let {a:vt}netrw_lskeep = &l:ls let {a:vt}netrw_makeep = &l:ma let {a:vt}netrw_magickeep = &l:magic @@ -1693,12 +1701,17 @@ fun! s:NetrwOptionsSafe(islocal) endif call s:NetrwSetSafeSetting("&l:ci",0) call s:NetrwSetSafeSetting("&l:cin",0) - call s:NetrwSetSafeSetting("&l:bh","hide") + if g:netrw_fastbrowse > a:islocal + call s:NetrwSetSafeSetting("&l:bh","hide") + else + call s:NetrwSetSafeSetting("&l:bh","delete") + endif call s:NetrwSetSafeSetting("&l:cino","") call s:NetrwSetSafeSetting("&l:com","") if &cpo =~ 'a' | call s:NetrwSetSafeSetting("&cpo",substitute(&cpo,'a','','g')) | endif if &cpo =~ 'A' | call s:NetrwSetSafeSetting("&cpo",substitute(&cpo,'A','','g')) | endif setl fo=nroql2 + call s:NetrwSetSafeSetting("&go","begmr") call s:NetrwSetSafeSetting("&l:hid",0) call s:NetrwSetSafeSetting("&l:im",0) setl isk+=@ isk+=* isk+=/ @@ -1712,7 +1725,10 @@ fun! s:NetrwOptionsSafe(islocal) call s:NetrwSetSafeSetting("&l:tw",0) call s:NetrwSetSafeSetting("&l:wig","") setl cedit& - call s:NetrwCursor() + + " set up cuc and cul based on g:netrw_cursor and listing style + " COMBAK -- cuc cul related + call s:NetrwCursor(0) " allow the user to override safe options " call Decho("ft<".&ft."> ei=".&ei,'~'.expand("<slnum>")) @@ -1730,11 +1746,14 @@ endfun " s:NetrwOptionsRestore: restore options (based on prior s:NetrwOptionsSave) {{{2 fun! s:NetrwOptionsRestore(vt) " call Dfunc("s:NetrwOptionsRestore(vt<".a:vt.">) win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> winnr($)=".winnr("$")) +" call Decho("(s:NetrwOptionsRestore) lines=".&lines) " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("<slnum>")) if !exists("{a:vt}netrw_optionsave") " call Decho("case ".a:vt."netrw_optionsave : doesn't exist",'~'.expand("<slnum>")) -" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("<slnum>")) -" call Decho("ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>")) +" call Decho("..doing filetype detect anyway") + filetype detect +" call Decho("..settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("<slnum>")) +" call Decho("..ro=".&l:ro." ma=".&l:ma." mod=".&l:mod." wrap=".&l:wrap." (filename<".expand("%")."> win#".winnr()." ft<".&ft.">)",'~'.expand("<slnum>")) " call Dret("s:NetrwOptionsRestore : ".a:vt."netrw_optionsave doesn't exist") return endif @@ -1751,41 +1770,53 @@ fun! s:NetrwOptionsRestore(vt) endif endif endif +" call Decho("(s:NetrwOptionsRestore) #1 lines=".&lines) call s:NetrwRestoreSetting(a:vt."netrw_aikeep","&l:ai") call s:NetrwRestoreSetting(a:vt."netrw_awkeep","&l:aw") call s:NetrwRestoreSetting(a:vt."netrw_blkeep","&l:bl") call s:NetrwRestoreSetting(a:vt."netrw_btkeep","&l:bt") call s:NetrwRestoreSetting(a:vt."netrw_bombkeep","&l:bomb") +" call Decho("(s:NetrwOptionsRestore) #2 lines=".&lines) call s:NetrwRestoreSetting(a:vt."netrw_cedit","&cedit") call s:NetrwRestoreSetting(a:vt."netrw_cikeep","&l:ci") call s:NetrwRestoreSetting(a:vt."netrw_cinkeep","&l:cin") call s:NetrwRestoreSetting(a:vt."netrw_cinokeep","&l:cino") call s:NetrwRestoreSetting(a:vt."netrw_comkeep","&l:com") +" call Decho("(s:NetrwOptionsRestore) #3 lines=".&lines) call s:NetrwRestoreSetting(a:vt."netrw_cpokeep","&l:cpo") call s:NetrwRestoreSetting(a:vt."netrw_diffkeep","&l:diff") call s:NetrwRestoreSetting(a:vt."netrw_fenkeep","&l:fen") if exists("g:netrw_ffkeep") && g:netrw_ffkeep call s:NetrwRestoreSetting(a:vt."netrw_ffkeep")","&l:ff") endif - call s:NetrwRestoreSetting(a:vt."netrw_fokeep","&l:fo") - call s:NetrwRestoreSetting(a:vt."netrw_gdkeep","&l:gd") - call s:NetrwRestoreSetting(a:vt."netrw_hidkeep","&l:hidden") - call s:NetrwRestoreSetting(a:vt."netrw_imkeep","&l:im") - call s:NetrwRestoreSetting(a:vt."netrw_iskkeep","&l:isk") - call s:NetrwRestoreSetting(a:vt."netrw_lskeep","&l:ls") - call s:NetrwRestoreSetting(a:vt."netrw_makeep","&l:ma") +" call Decho("(s:NetrwOptionsRestore) #4 lines=".&lines) + call s:NetrwRestoreSetting(a:vt."netrw_fokeep" ,"&l:fo") + call s:NetrwRestoreSetting(a:vt."netrw_gdkeep" ,"&l:gd") + call s:NetrwRestoreSetting(a:vt."netrw_gokeep" ,"&l:go") + call s:NetrwRestoreSetting(a:vt."netrw_hidkeep" ,"&l:hidden") +" call Decho("(s:NetrwOptionsRestore) #5 lines=".&lines) + call s:NetrwRestoreSetting(a:vt."netrw_imkeep" ,"&l:im") + call s:NetrwRestoreSetting(a:vt."netrw_iskkeep" ,"&l:isk") +" call Decho("(s:NetrwOptionsRestore) #6 lines=".&lines) + call s:NetrwRestoreSetting(a:vt."netrw_lines" ,"&lines") +" call Decho("(s:NetrwOptionsRestore) #7 lines=".&lines) + call s:NetrwRestoreSetting(a:vt."netrw_lskeep" ,"&l:ls") + call s:NetrwRestoreSetting(a:vt."netrw_makeep" ,"&l:ma") call s:NetrwRestoreSetting(a:vt."netrw_magickeep","&l:magic") - call s:NetrwRestoreSetting(a:vt."netrw_modkeep","&l:mod") - call s:NetrwRestoreSetting(a:vt."netrw_nukeep","&l:nu") - call s:NetrwRestoreSetting(a:vt."netrw_rnukeep","&l:rnu") - call s:NetrwRestoreSetting(a:vt."netrw_repkeep","&l:report") - call s:NetrwRestoreSetting(a:vt."netrw_rokeep","&l:ro") - call s:NetrwRestoreSetting(a:vt."netrw_selkeep","&l:sel") + call s:NetrwRestoreSetting(a:vt."netrw_modkeep" ,"&l:mod") + call s:NetrwRestoreSetting(a:vt."netrw_nukeep" ,"&l:nu") +" call Decho("(s:NetrwOptionsRestore) #8 lines=".&lines) + call s:NetrwRestoreSetting(a:vt."netrw_rnukeep" ,"&l:rnu") + call s:NetrwRestoreSetting(a:vt."netrw_repkeep" ,"&l:report") + call s:NetrwRestoreSetting(a:vt."netrw_rokeep" ,"&l:ro") + call s:NetrwRestoreSetting(a:vt."netrw_selkeep" ,"&l:sel") +" call Decho("(s:NetrwOptionsRestore) #9 lines=".&lines) call s:NetrwRestoreSetting(a:vt."netrw_spellkeep","&l:spell") - call s:NetrwRestoreSetting(a:vt."netrw_twkeep","&l:tw") - call s:NetrwRestoreSetting(a:vt."netrw_wigkeep","&l:wig") - call s:NetrwRestoreSetting(a:vt."netrw_wrapkeep","&l:wrap") + call s:NetrwRestoreSetting(a:vt."netrw_twkeep" ,"&l:tw") + call s:NetrwRestoreSetting(a:vt."netrw_wigkeep" ,"&l:wig") + call s:NetrwRestoreSetting(a:vt."netrw_wrapkeep" ,"&l:wrap") call s:NetrwRestoreSetting(a:vt."netrw_writekeep","&l:write") +" call Decho("(s:NetrwOptionsRestore) #10 lines=".&lines) call s:NetrwRestoreSetting("s:yykeep","@@") " former problem: start with liststyle=0; press <i> : result, following line resets l:ts. " Fixed; in s:PerformListing, when w:netrw_liststyle is s:LONGLIST, will use a printf to pad filename with spaces @@ -1827,9 +1858,11 @@ fun! s:NetrwOptionsRestore(vt) " were having their filetype detect-generated settings overwritten by " NetrwOptionRestore. if &ft != "netrw" -" call Decho("filetype detect (ft=".&ft.")",'~'.expand("<slnum>")) +" call Decho("before: filetype detect (ft=".&ft.")",'~'.expand("<slnum>")) filetype detect +" call Decho("after : filetype detect (ft=".&ft.")",'~'.expand("<slnum>")) endif +" call Decho("(s:NetrwOptionsRestore) lines=".&lines) " call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." a:vt=".a:vt,'~'.expand("<slnum>")) " call Dret("s:NetrwOptionsRestore : tab#".tabpagenr()." win#".winnr()." buf#".bufnr("%")."<".bufname("%")."> modified=".&modified." modifiable=".&modifiable." readonly=".&readonly) endfun @@ -1879,7 +1912,7 @@ fun! s:NetrwRestoreSetting(keepvar,setting) " typically called from s:NetrwOptionsRestore " call s:NetrwRestoreSettings(keep-option-variable-name,'associated-option') " ex. call s:NetrwRestoreSetting(a:vt."netrw_selkeep","&l:sel") - " Restores option (if different) from a keepvar + " Restores option (but only if different) from a:keepvar if exists(a:keepvar) exe "let keepvarval= ".a:keepvar exe "let setting= ".a:setting @@ -2801,14 +2834,16 @@ fun! netrw#SetTreetop(iscmd,...) " call Decho("inittreetop<".(exists("inittreetop")? inittreetop : "n/a").">") if (a:iscmd == 0 || a:1 == "") && exists("inittreetop") - let treedir= s:NetrwTreePath(inittreetop) + let treedir = s:NetrwTreePath(inittreetop) " call Decho("treedir<".treedir.">",'~'.expand("<slnum>")) else if isdirectory(s:NetrwFile(a:1)) " call Decho("a:1<".a:1."> is a directory",'~'.expand("<slnum>")) - let treedir= a:1 + let treedir = a:1 + let s:netrw_treetop = treedir elseif exists("b:netrw_curdir") && (isdirectory(s:NetrwFile(b:netrw_curdir."/".a:1)) || a:1 =~ '^\a\{3,}://') - let treedir= b:netrw_curdir."/".a:1 + let treedir = b:netrw_curdir."/".a:1 + let s:netrw_treetop = treedir " call Decho("a:1<".a:1."> is NOT a directory, using treedir<".treedir.">",'~'.expand("<slnum>")) else " normally the cursor is left in the message window. @@ -2816,7 +2851,8 @@ fun! netrw#SetTreetop(iscmd,...) let netrwbuf= bufnr("%") call netrw#ErrorMsg(s:ERROR,"sorry, ".a:1." doesn't seem to be a directory!",95) exe bufwinnr(netrwbuf)."wincmd w" - let treedir= "." + let treedir = "." + let s:netrw_treetop = getcwd() endif endif " call Decho("treedir<".treedir.">",'~'.expand("<slnum>")) @@ -4071,6 +4107,7 @@ fun! s:NetrwFileInfo(islocal,fname) elseif g:netrw_sizestyle =~# 'h' let lsopt= "-lsadh --si" endif +" call Decho("(s:NetrwFileInfo) lsopt<".lsopt.">") if (has("unix") || has("macunix")) && executable("/bin/ls") if getline(".") == "../" @@ -4132,9 +4169,10 @@ endfun " s:NetrwGetBuffer: [get a new|find an old netrw] buffer for a netrw listing {{{2 " returns 0=cleared buffer " 1=re-used buffer (buffer not cleared) +" Nov 09, 2020: tst952 shows that when user does :set hidden that NetrwGetBuffer will come up with a [No Name] buffer (hid fix) fun! s:NetrwGetBuffer(islocal,dirname) " call Dfunc("s:NetrwGetBuffer(islocal=".a:islocal." dirname<".a:dirname.">) liststyle=".g:netrw_liststyle) -" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo,'~'.expand("<slnum>")) +" call Decho("settings buf#".bufnr("%")."<".bufname("%").">: ".((&l:ma == 0)? "no" : "")."ma ".((&l:mod == 0)? "no" : "")."mod ".((&l:bl == 0)? "no" : "")."bl ".((&l:ro == 0)? "no" : "")."ro fo=".&l:fo." hid=".&hid,'~'.expand("<slnum>")) " call Decho("netrwbuf dictionary=".(exists("s:netrwbuf")? string(s:netrwbuf) : 'n/a'),'~'.expand("<slnum>")) " call Dredir("ls!","s:NetrwGetBuffer") let dirname= a:dirname @@ -4184,17 +4222,26 @@ fun! s:NetrwGetBuffer(islocal,dirname) endif " call Decho(" bufnum#".bufnum,'~'.expand("<slnum>")) - " highjack the current buffer if - " it has the desired name - " it is empty -" call Decho("deciding if I can highjack the current buffer#".bufnr("%"),'~'.expand("<slnum>")) -" call Decho("..dirname<".dirname.">",'~'.expand("<slnum>")) -" call Decho("..bufname<".bufname("%").">",'~'.expand("<slnum>")) -" call Decho("..getline($)<".getline("$").">",'~'.expand("<slnum>")) - if dirname == bufname("%") && line("$") == 1 && getline("%") == "" + " hijack the current buffer + " IF the buffer already has the desired name + " AND it is empty + let curbuf = bufname("%") + if curbuf == '.' + let curbuf = getcwd() + endif +" call Dredir("ls!","NetrwGetFile (renamed buffer back to remote filename<".rfile."> : expand(%)<".expand("%").">)") +" call Decho("deciding if netrw may hijack the current buffer#".bufnr("%")."<".curbuf.">",'~'.expand("<slnum>")) +" call Decho("..dirname<".dirname."> IF dirname == bufname",'~'.expand("<slnum>")) +" call Decho("..curbuf<".curbuf.">",'~'.expand("<slnum>")) +" call Decho("..line($)=".line("$")." AND this is 1",'~'.expand("<slnum>")) +" call Decho("..getline(%)<".getline("%")."> AND this line is empty",'~'.expand("<slnum>")) + if dirname == curbuf && line("$") == 1 && getline("%") == "" " call Dret("s:NetrwGetBuffer 0<cleared buffer> : highjacking buffer#".bufnr("%")) return 0 + else " DEBUG +" call Decho("..did NOT hijack buffer",'~'.expand("<slnum>")) endif + " Aug 14, 2021: was thinking about looking for a [No Name] buffer here and using it, but that might cause problems " get enew buffer and name it -or- re-use buffer {{{3 if bufnum < 0 " get enew buffer and name it @@ -4519,7 +4566,7 @@ fun! s:NetrwListStyle(islocal) " refresh the listing " call Decho("refresh the listing",'~'.expand("<slnum>")) NetrwKeepj call s:NetrwRefresh(a:islocal,s:NetrwBrowseChgDir(a:islocal,'./')) - NetrwKeepj call s:NetrwCursor() + NetrwKeepj call s:NetrwCursor(0) " repoint t:netrw_lexbufnr if appropriate if exists("repointlexbufnr") @@ -4725,7 +4772,7 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...) endif " call Decho("b:netrw_curdir<".b:netrw_curdir.">") - " NetrwBrowseChgDir: save options and initialize {{{3 + " NetrwBrowseChgDir; save options and initialize {{{3 " call Decho("saving options",'~'.expand("<slnum>")) call s:SavePosn(s:netrw_posn) NetrwKeepj call s:NetrwOptionsSave("s:") @@ -4793,6 +4840,8 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...) if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST && exists("w:netrw_treedict") && newdir !~ '^\(/\|\a:\)' " call Decho("edit-a-file: handle tree listing: w:netrw_treedict<".(exists("w:netrw_treedict")? string(w:netrw_treedict) : 'n/a').">",'~'.expand("<slnum>")) " call Decho("edit-a-file: newdir<".newdir.">",'~'.expand("<slnum>")) +" let newdir = s:NetrwTreePath(s:netrw_treetop) +" call Decho("edit-a-file: COMBAK why doesn't this recognize file1's directory???") let dirname= s:NetrwTreeDir(a:islocal) "COMBAK : not working for a symlink -- but what about a regular file? a directory? " call Decho("COMBAK : not working for a symlink -- but what about a regular file? a directory?") @@ -4906,7 +4955,8 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...) exe "NetrwKeepj e ".fnameescape(dirname) endif " call Decho("edit-a-file: after e! ".dirname.": hidden=".&hidden." bufhidden<".&bufhidden."> mod=".&mod,'~'.expand("<slnum>")) - call s:NetrwCursor() + " COMBAK -- cuc cul related + call s:NetrwCursor(1) if &hidden || &bufhidden == "hide" " file came from vim's hidden storage. Don't "restore" options with it. let dorestore= 0 @@ -4927,8 +4977,8 @@ fun! s:NetrwBrowseChgDir(islocal,newdir,...) elseif type(g:Netrw_funcref) == 3 " call Decho("edit-a-file: handling a list of g:Netrw_funcrefs",'~'.expand("<slnum>")) for Fncref in g:Netrw_funcref - if type(FncRef) == 2 - NetrwKeepj call FncRef() + if type(Fncref) == 2 + NetrwKeepj call Fncref() endif endfor endif @@ -5220,6 +5270,12 @@ fun! netrw#BrowseX(fname,remote) endif " call Decho("not a local file nor a webpage request",'~'.expand("<slnum>")) + if exists("g:netrw_browsex_viewer") && exists("g:netrw_browsex_support_remote") && !g:netrw_browsex_support_remote + let remote = a:remote + else + let remote = 0 + endif + let ykeep = @@ let screenposn = winsaveview() " call Decho("saving posn to screenposn<".string(screenposn).">",'~'.expand("<slnum>")) @@ -5264,9 +5320,9 @@ fun! netrw#BrowseX(fname,remote) endif " call Decho("exten<".exten.">",'~'.expand("<slnum>")) - if a:remote == 1 + if remote == 1 " create a local copy -" call Decho("remote: a:remote=".a:remote.": create a local copy of <".a:fname.">",'~'.expand("<slnum>")) +" call Decho("remote: remote=".remote.": create a local copy of <".a:fname.">",'~'.expand("<slnum>")) setl bh=delete call netrw#NetRead(3,a:fname) " attempt to rename tempfile @@ -5288,7 +5344,7 @@ fun! netrw#BrowseX(fname,remote) let fname= s:netrw_tmpfile endif else -" call Decho("local: a:remote=".a:remote.": handling local copy of <".a:fname.">",'~'.expand("<slnum>")) +" call Decho("local: remote=".remote.": handling local copy of <".a:fname.">",'~'.expand("<slnum>")) let fname= a:fname " special ~ handler for local if fname =~ '^\~' && expand("$HOME") != "" @@ -5382,8 +5438,8 @@ fun! netrw#BrowseX(fname,remote) if a:fname =~ '^https\=://' " atril does not appear to understand how to handle html -- so use gvim to edit the document let use_ctrlo= 0 -" call Decho("(COMBAK) fname<".fname.">") -" call Decho("(COMBAK) a:fname<".a:fname.">") +" call Decho("fname<".fname.">") +" call Decho("a:fname<".a:fname.">") call s:NetrwExe("sil! !gvim ".fname.' -c "keepj keepalt file '.fnameescape(a:fname).'"') else @@ -5431,12 +5487,12 @@ fun! netrw#BrowseX(fname,remote) " return to prior buffer (directory listing) " Feb 12, 2008: had to de-activiate removal of " temporary file because it wasn't getting seen. -" if a:remote == 1 && fname != a:fname +" if remote == 1 && fname != a:fname "" call Decho("deleting temporary file<".fname.">",'~'.expand("<slnum>")) " call s:NetrwDelete(fname) " endif - if a:remote == 1 + if remote == 1 setl bh=delete bt=nofile if g:netrw_use_noswf setl noswf @@ -5495,7 +5551,7 @@ fun! s:NetrwBufRename(newname) let b:junk= 1 " call Decho("rename buffer: sil! keepj keepalt file ".fnameescape(a:newname),'~'.expand("<slnum>")) exe 'sil! keepj keepalt file '.fnameescape(a:newname) -" call Dredir("ls!","s:NetrwBufRename (before bwipe)") +" call Dredir("ls!","s:NetrwBufRename (before bwipe)~".expand("<slnum>")) let oldbufnr= bufnr(oldbufname) " call Decho("oldbufname<".oldbufname."> oldbufnr#".oldbufnr,'~'.expand("<slnum>")) " call Decho("bufnr(%)=".bufnr("%"),'~'.expand("<slnum>")) @@ -5504,6 +5560,9 @@ fun! s:NetrwBufRename(newname) exe "bwipe! ".oldbufnr " else " Decho " call Decho("did *not* bwipe buf#".oldbufnr,'~'.expand("<slnum>")) +" call Decho("..reason: if oldbufname<".oldbufname."> is empty",'~'.expand("<slnum>"))" +" call Decho("..reason: if oldbufnr#".oldbufnr." is -1",'~'.expand("<slnum>"))" +" call Decho("..reason: if oldbufnr#".oldbufnr." != bufnr(%)#".bufnr("%"),'~'.expand("<slnum>"))" endif " call Dredir("ls!","s:NetrwBufRename (after rename)") " else " Decho @@ -6482,7 +6541,7 @@ fun! s:NetrwMaps(islocal) if !hasmapto('<Plug>NetrwRefresh') nmap <buffer> <unique> <c-l> <Plug>NetrwRefresh endif - nnoremap <buffer> <silent> <Plug>NetrwRefresh <c-l>:call <SID>NetrwRefresh(1,<SID>NetrwBrowseChgDir(1,(w:netrw_liststyle == 3)? w:netrw_treetop : './'))<cr> + nnoremap <buffer> <silent> <Plug>NetrwRefresh <c-l>:call <SID>NetrwRefresh(1,<SID>NetrwBrowseChgDir(1,(exists("w:netrw_liststyle") && exists("w:netrw_treetop") && w:netrw_liststyle == 3)? w:netrw_treetop : './'))<cr> if s:didstarstar || !mapcheck("<s-down>","n") nnoremap <buffer> <silent> <s-down> :Nexplore<cr> endif @@ -6731,7 +6790,7 @@ fun! s:NetrwMarkFile(islocal,fname) " sanity check if empty(a:fname) -" call Dret("s:NetrwMarkFile : emtpy fname") +" call Dret("s:NetrwMarkFile : empty fname") return endif let curdir = s:NetrwGetCurdir(a:islocal) @@ -8110,6 +8169,23 @@ fun! s:NetrwOpenFile(islocal) call inputsave() let fname= input("Enter filename: ") call inputrestore() +" call Decho("(s:NetrwOpenFile) fname<".fname.">",'~'.expand("<slnum>")) + + " determine if Lexplore is in use + if exists("t:netrw_lexbufnr") + " check if t:netrw_lexbufnr refers to a netrw window +" call Decho("(s:netrwOpenFile) ..t:netrw_lexbufnr=".t:netrw_lexbufnr,'~'.expand("<slnum>")) + let lexwinnr = bufwinnr(t:netrw_lexbufnr) + if lexwinnr != -1 && exists("g:netrw_chgwin") && g:netrw_chgwin != -1 +" call Decho("(s:netrwOpenFile) ..Lexplore in use",'~'.expand("<slnum>")) + exe "NetrwKeepj keepalt ".g:netrw_chgwin."wincmd w" + exe "NetrwKeepj e ".fnameescape(fname) + let @@= ykeep +" call Dret("s:NetrwOpenFile : creating a file with Lexplore mode") + endif + endif + + " Does the filename contain a path? if fname !~ '[/\\]' if exists("b:netrw_curdir") if exists("g:netrw_quiet") @@ -8448,6 +8524,7 @@ fun! s:NetrwPrevWinOpen(islocal) let lastwinnr = winnr("$") let curword = s:NetrwGetWord() let choice = 0 + let s:prevwinopen= 1 " lets s:NetrwTreeDir() know that NetrwPrevWinOpen called it let s:treedir = s:NetrwTreeDir(a:islocal) let curdir = s:treedir " call Decho("winnr($)#".lastwinnr." curword<".curword.">",'~'.expand("<slnum>")) @@ -8775,7 +8852,7 @@ fun! s:NetrwPreview(path) range " 0 : 1: top -- preview window is horizontally split off and on the top " 0 : 0: bot -- preview window is horizontally split off and on the bottom " - " Note that the file being previewed is already known to not be a directory, hence we can avoid doing a LocalBrowse() check via + " Note that the file being previewed is already known to not be a directory, hence we can avoid doing a LocalBrowseCheck() check via " the BufEnter event set up in netrwPlugin.vim " call Decho("exe ".(g:netrw_alto? "top " : "bot ").(g:netrw_preview? "vert " : "")."pedit ".fnameescape(a:path),'~'.expand("<slnum>")) let eikeep = &ei @@ -9210,14 +9287,20 @@ fun! s:NetrwTreeDir(islocal) " call Decho("g:netrw_keepdir =".(exists("g:netrw_keepdir")? g:netrw_keepdir : 'n/a'),'~'.expand("<slnum>")) " call Decho("w:netrw_liststyle=".(exists("w:netrw_liststyle")? w:netrw_liststyle : 'n/a'),'~'.expand("<slnum>")) " call Decho("w:netrw_treetop =".(exists("w:netrw_treetop")? w:netrw_treetop : 'n/a'),'~'.expand("<slnum>")) +" call Decho("current line<".getline(".").">") - if exists("s:treedir") + if exists("s:treedir") && exists("s:prevwinopen") " s:NetrwPrevWinOpen opens a "previous" window -- and thus needs to and does call s:NetrwTreeDir early +" call Decho('s:NetrwPrevWinOpen opens a "previous" window -- and thus needs to and does call s:NetrwTreeDir early') let treedir= s:treedir unlet s:treedir -" call Dret("s:NetrwTreeDir ".treedir) + unlet s:prevwinopen +" call Dret("s:NetrwTreeDir ".treedir.": early return since s:treedir existed previously") return treedir endif + if exists("s:prevwinopen") + unlet s:prevwinopen + endif if !exists("b:netrw_curdir") || b:netrw_curdir == "" let b:netrw_curdir= getcwd() @@ -9424,20 +9507,29 @@ endfun " Called by s:PerformListing() fun! s:NetrwTreeListing(dirname) if exists("w:netrw_liststyle") && w:netrw_liststyle == s:TREELIST -" call Dfunc("NetrwTreeListing() bufname<".expand("%").">") +" call Dfunc("s:NetrwTreeListing() bufname<".expand("%").">") " call Decho("curdir<".a:dirname.">",'~'.expand("<slnum>")) " call Decho("win#".winnr().": w:netrw_treetop ".(exists("w:netrw_treetop")? "exists" : "doesn't exist")." w:netrw_treedict ".(exists("w:netrw_treedict")? "exists" : "doesn't exit"),'~'.expand("<slnum>")) " call Decho("g:netrw_banner=".g:netrw_banner.": banner ".(g:netrw_banner? "enabled" : "suppressed").": (line($)=".line("$")." byte2line(1)=".byte2line(1)." bannercnt=".w:netrw_bannercnt.")",'~'.expand("<slnum>")) " update the treetop -" call Decho("update the treetop",'~'.expand("<slnum>")) if !exists("w:netrw_treetop") +" call Decho("update the treetop (w:netrw_treetop doesn't exist yet)",'~'.expand("<slnum>")) let w:netrw_treetop= a:dirname + let s:netrw_treetop= w:netrw_treetop " call Decho("w:netrw_treetop<".w:netrw_treetop."> (reusing)",'~'.expand("<slnum>")) elseif (w:netrw_treetop =~ ('^'.a:dirname) && s:Strlen(a:dirname) < s:Strlen(w:netrw_treetop)) || a:dirname !~ ('^'.w:netrw_treetop) +" call Decho("update the treetop (override w:netrw_treetop with a:dirname<".a:dirname.">)",'~'.expand("<slnum>")) let w:netrw_treetop= a:dirname + let s:netrw_treetop= w:netrw_treetop " call Decho("w:netrw_treetop<".w:netrw_treetop."> (went up)",'~'.expand("<slnum>")) endif + if exists("w:netrw_treetop") + let s:netrw_treetop= w:netrw_treetop + else + let w:netrw_treetop= getcwd() + let s:netrw_treetop= w:netrw_treetop + endif if !exists("w:netrw_treedict") " insure that we have a treedict, albeit empty @@ -9475,7 +9567,7 @@ fun! s:NetrwTreeListing(dirname) exe "setl ".g:netrw_bufsettings -" call Dret("NetrwTreeListing : bufname<".expand("%").">") +" call Dret("s:NetrwTreeListing : bufname<".expand("%").">") return endif endfun @@ -10619,7 +10711,7 @@ endfun " --------------------------------------------------------------------- " netrw#LocalBrowseCheck: {{{2 fun! netrw#LocalBrowseCheck(dirname) - " This function is called by netrwPlugin.vim's s:LocalBrowse(), s:NetrwRexplore(), + " This function is called by netrwPlugin.vim's s:LocalBrowseCheck(), s:NetrwRexplore(), " and by <cr> when atop a listed file/directory (via a buffer-local map) " " unfortunate interaction -- split window debugging can't be used here, must use @@ -10770,7 +10862,7 @@ endfun " Hiding a buffer means that it will be re-used when examined, hence "fast". " (re-using a buffer may not be as accurate) " -" s:netrw_events : doesn't exist, s:LocalFastBrowser() will install autocmds whena med or fast browsing +" s:netrw_events : doesn't exist, s:LocalFastBrowser() will install autocmds with medium-speed or fast browsing " =1: autocmds installed, but ignore next FocusGained event to avoid initial double-refresh of listing. " BufEnter may be first event, then a FocusGained event. Ignore the first FocusGained event. " If :Explore used: it sets s:netrw_events to 2, so no FocusGained events are ignored. @@ -10932,13 +11024,14 @@ fun! s:LocalListing() let sz= s:NetrwHumanReadable(sz) endif let longfile= printf("%-".(g:netrw_maxfilenamelen+1)."s",pfile) - let pfile = longfile.fsz." ".strftime(g:netrw_timefmt,getftime(filename)) + let pfile = longfile.sz." ".strftime(g:netrw_timefmt,getftime(filename)) " call Decho("longlist support: sz=".sz." fsz=".fsz,'~'.expand("<slnum>")) endif if g:netrw_sort_by =~# "^t" " sort by time (handles time up to 1 quintillion seconds, US) " Decorate listing by prepending a timestamp/ . Sorting will then be done based on time. +" call Decho("implementing g:netrw_sort_by=".g:netrw_sort_by." (time)") " call Decho("getftime(".filename.")=".getftime(filename),'~'.expand("<slnum>")) let t = getftime(filename) let ft = strpart("000000000000000000",1,18-strlen(t)).t @@ -10948,6 +11041,7 @@ fun! s:LocalListing() elseif g:netrw_sort_by =~ "^s" " sort by size (handles file sizes up to 1 quintillion bytes, US) +" call Decho("implementing g:netrw_sort_by=".g:netrw_sort_by." (size)") " call Decho("getfsize(".filename.")=".getfsize(filename),'~'.expand("<slnum>")) let sz = getfsize(filename) if g:netrw_sizestyle =~# "[hH]" @@ -10960,6 +11054,7 @@ fun! s:LocalListing() else " sort by name +" call Decho("implementing g:netrw_sort_by=".g:netrw_sort_by." (name)") " call Decho("exe NetrwKeepj put ='".pfile."'",'~'.expand("<slnum>")) sil! NetrwKeepj put=pfile endif @@ -11682,19 +11777,32 @@ endfun " --------------------------------------------------------------------- " s:NetrwCursor: responsible for setting cursorline/cursorcolumn based upon g:netrw_cursor {{{2 -fun! s:NetrwCursor() +fun! s:NetrwCursor(editfile) if !exists("w:netrw_liststyle") let w:netrw_liststyle= g:netrw_liststyle endif " call Dfunc("s:NetrwCursor() ft<".&ft."> liststyle=".w:netrw_liststyle." g:netrw_cursor=".g:netrw_cursor." s:netrw_usercuc=".s:netrw_usercuc." s:netrw_usercul=".s:netrw_usercul) +" call Decho("(s:NetrwCursor) COMBAK: cuc=".&l:cuc." cul=".&l:cul) + if &ft != "netrw" " if the current window isn't a netrw directory listing window, then use user cursorline/column " settings. Affects when netrw is used to read/write a file using scp/ftp/etc. " call Decho("case ft!=netrw: use user cul,cuc",'~'.expand("<slnum>")) - let &l:cursorline = s:netrw_usercul - let &l:cursorcolumn = s:netrw_usercuc + elseif g:netrw_cursor == 8 + if w:netrw_liststyle == s:WIDELIST + setl cursorline + setl cursorcolumn + else + setl cursorline + endif + elseif g:netrw_cursor == 7 + setl cursorline + elseif g:netrw_cursor == 6 + if w:netrw_liststyle == s:WIDELIST + setl cursorline + endif elseif g:netrw_cursor == 4 " all styles: cursorline, cursorcolumn " call Decho("case g:netrw_cursor==4: setl cul cuc",'~'.expand("<slnum>")) @@ -11711,26 +11819,22 @@ fun! s:NetrwCursor() else " call Decho("case g:netrw_cursor==3 and not wide: setl cul (use user's cuc)",'~'.expand("<slnum>")) setl cursorline - let &l:cursorcolumn = s:netrw_usercuc endif elseif g:netrw_cursor == 2 " thin-long-tree: cursorline, user's cursorcolumn " wide : cursorline, user's cursorcolumn " call Decho("case g:netrw_cursor==2: setl cuc (use user's cul)",'~'.expand("<slnum>")) - let &l:cursorcolumn = s:netrw_usercuc setl cursorline elseif g:netrw_cursor == 1 " thin-long-tree: user's cursorline, user's cursorcolumn " wide : cursorline, user's cursorcolumn - let &l:cursorcolumn = s:netrw_usercuc if w:netrw_liststyle == s:WIDELIST " call Decho("case g:netrw_cursor==2 and wide: setl cul (use user's cuc)",'~'.expand("<slnum>")) setl cursorline else " call Decho("case g:netrw_cursor==2 and not wide: (use user's cul,cuc)",'~'.expand("<slnum>")) - let &l:cursorline = s:netrw_usercul endif else @@ -11740,6 +11844,7 @@ fun! s:NetrwCursor() let &l:cursorcolumn = s:netrw_usercuc endif +" call Decho("(s:NetrwCursor) COMBAK: cuc=".&l:cuc." cul=".&l:cul) " call Dret("s:NetrwCursor : l:cursorline=".&l:cursorline." l:cursorcolumn=".&l:cursorcolumn) endfun @@ -11753,6 +11858,7 @@ fun! s:RestoreCursorline() if exists("s:netrw_usercuc") let &l:cursorcolumn = s:netrw_usercuc endif +" call Decho("(s:RestoreCursorline) COMBAK: cuc=".&l:cuc." cul=".&l:cul) " call Dret("s:RestoreCursorline : restored cul=".&l:cursorline." cuc=".&l:cursorcolumn) endfun @@ -11788,11 +11894,37 @@ fun! s:NetrwDelete(path) endfun " --------------------------------------------------------------------- +" s:NetrwBufRemover: removes a buffer that: {{{2s +" has buffer-id > 1 +" is unlisted +" is unnamed +" does not appear in any window +fun! s:NetrwBufRemover(bufid) +" call Dfunc("s:NetrwBufRemover(".a:bufid.")") +" call Decho("buf#".a:bufid." ".((a:bufid > 1)? ">" : "≯")." must be >1 for removal","~".expand("<slnum>")) +" call Decho("buf#".a:bufid." is ".(buflisted(a:bufid)? "listed" : "unlisted"),"~".expand("<slnum>")) +" call Decho("buf#".a:bufid." has name <".bufname(a:bufid).">","~".expand("<slnum>")) +" call Decho("buf#".a:bufid." has winid#".bufwinid(a:bufid),"~".expand("<slnum>")) + + if a:bufid > 1 && !buflisted(a:bufid) && bufname(a:bufid) == "" && bufwinid(a:bufid) == -1 +" call Decho("(s:NetrwBufRemover) removing buffer#".a:bufid,"~".expand("<slnum>")) + exe "bd! ".a:bufid + endif + +" call Dret("s:NetrwBufRemover") +endfun + +" --------------------------------------------------------------------- " s:NetrwEnew: opens a new buffer, passes netrw buffer variables through {{{2 fun! s:NetrwEnew(...) " call Dfunc("s:NetrwEnew() a:0=".a:0." win#".winnr()." winnr($)=".winnr("$")." bufnr($)=".bufnr("$")." expand(%)<".expand("%").">") " call Decho("curdir<".((a:0>0)? a:1 : "")."> buf#".bufnr("%")."<".bufname("%").">",'~'.expand("<slnum>")) + " Clean out the last buffer: + " Check if the last buffer has # > 1, is unlisted, is unnamed, and does not appear in a window + " If so, delete it. + call s:NetrwBufRemover(bufnr("$")) + " grab a function-local-variable copy of buffer variables " call Decho("make function-local copy of netrw variables",'~'.expand("<slnum>")) if exists("b:netrw_bannercnt") |let netrw_bannercnt = b:netrw_bannercnt |endif diff --git a/runtime/autoload/netrwSettings.vim b/runtime/autoload/netrwSettings.vim index bed5cfc455..61c0ef739e 100644 --- a/runtime/autoload/netrwSettings.vim +++ b/runtime/autoload/netrwSettings.vim @@ -1,7 +1,7 @@ " netrwSettings.vim: makes netrw settings simpler -" Date: Nov 09, 2016 +" Date: Aug 12, 2021 " Maintainer: Charles E Campbell <NcampObell@SdrPchip.AorgM-NOSPAM> -" Version: 16 +" Version: 17 ASTRO-ONLY " Copyright: Copyright (C) 1999-2007 Charles E. Campbell {{{1 " Permission is hereby granted to use and distribute this code, " with or without modifications, provided that this copyright @@ -19,7 +19,7 @@ if exists("g:loaded_netrwSettings") || &cp finish endif -let g:loaded_netrwSettings = "v16" +let g:loaded_netrwSettings = "v17" if v:version < 700 echohl WarningMsg echo "***warning*** this version of netrwSettings needs vim 7.0" @@ -31,7 +31,7 @@ endif " NetrwSettings: {{{1 fun! netrwSettings#NetrwSettings() " this call is here largely just to insure that netrw has been loaded - call netrw#SavePosn() + call netrw#WinPath("") if !exists("g:loaded_netrw") echohl WarningMsg | echomsg "***sorry*** netrw needs to be loaded prior to using NetrwSettings" | echohl None return diff --git a/runtime/autoload/phpcomplete.vim b/runtime/autoload/phpcomplete.vim index 377baa8432..f9aa15c827 100644 --- a/runtime/autoload/phpcomplete.vim +++ b/runtime/autoload/phpcomplete.vim @@ -9,7 +9,7 @@ " " let g:phpcomplete_relax_static_constraint = 1/0 [default 0] " Enables completion for non-static methods when completing for static context (::). -" This generates E_STRICT level warning, but php calls these methods nontheless. +" This generates E_STRICT level warning, but php calls these methods nonetheless. " " let g:phpcomplete_complete_for_unknown_classes = 1/0 [default 0] " Enables completion of variables and functions in "everything under the sun" fashion @@ -28,7 +28,7 @@ " This option controls the number of characters the user needs to type before " the tags will be searched for namespaces and classes in typed out namespaces in " "use ..." context. Setting this to 0 is not recommended because that means the code -" have to scan every tag, and vim's taglist() function runs extremly slow with a +" have to scan every tag, and vim's taglist() function runs extremely slow with a " "match everything" pattern. " " let g:phpcomplete_parse_docblock_comments = 1/0 [default 0] @@ -268,7 +268,7 @@ function! phpcomplete#CompleteUse(base) " {{{ call add(no_namespace_matches, {'word': namespace_for_class.'\'.tag.name, 'kind': tag.kind, 'menu': tag.filename, 'info': tag.filename }) endif endfor - " if it seems that the tags file have namespace informations we can safely throw + " if it seems that the tags file have namespace information we can safely throw " away namespaceless tag matches since we can be sure they are invalid if patched_ctags_detected no_namespace_matches = [] @@ -810,7 +810,7 @@ function! phpcomplete#CompleteClassName(base, kinds, current_namespace, imports) endif endfor - " resolve the typed in part with namespaces (if theres a \ in it) + " resolve the typed in part with namespaces (if there's a \ in it) let [tag_match_pattern, namespace_for_class] = phpcomplete#ExpandClassName(a:base, a:current_namespace, a:imports) let tags = [] @@ -926,11 +926,11 @@ function! s:getNextCharWithPos(filelines, current_pos) " {{{ endfunction " }}} function! phpcomplete#EvaluateModifiers(modifiers, required_modifiers, prohibited_modifiers) " {{{ - " if theres no modifier, and no modifier is allowed and no modifier is required + " if there's no modifier, and no modifier is allowed and no modifier is required if len(a:modifiers) == 0 && len(a:required_modifiers) == 0 return 1 else - " check if every requred modifier is present + " check if every required modifier is present for required_modifier in a:required_modifiers if index(a:modifiers, required_modifier) == -1 return 0 @@ -1258,7 +1258,7 @@ function! phpcomplete#GetCurrentInstruction(line_number, col_number, phpbegin) " endif endif - " save the coma position for later use if theres a "naked" , possibly separating a parameter and it is not in a parented part + " save the coma position for later use if there's a "naked" , possibly separating a parameter and it is not in a parented part if first_coma_break_pos == -1 && current_char == ',' let first_coma_break_pos = len(instruction) endif @@ -1304,7 +1304,7 @@ function! phpcomplete#GetCurrentInstruction(line_number, col_number, phpbegin) " " there were a "naked" coma in the instruction if first_coma_break_pos != -1 - if instruction !~? '^use' && instruction !~? '^class' " use ... statements and class delcarations should not be broken up by comas + if instruction !~? '^use' && instruction !~? '^class' " use ... statements and class declarations should not be broken up by comas let pos = (-1 * first_coma_break_pos) + 1 let instruction = instruction[pos :] endif @@ -1316,7 +1316,7 @@ function! phpcomplete#GetCurrentInstruction(line_number, col_number, phpbegin) " " clear everything up until the first ( let instruction = substitute(instruction, '^\(if\|while\|foreach\|for\)\s*(\s*', '', '') - " lets iterate trough the instruction until we can find the pair for the opening ( + " lets iterate through the instruction until we can find the pair for the opening ( let i = 0 let depth = 1 while i < len(instruction) @@ -1424,7 +1424,7 @@ function! phpcomplete#GetCallChainReturnType(classname_candidate, class_candidat let parts = split(substitute(type, '^\\', '', ''), '\') let class_candidate_namespace = join(parts[0:-2], '\') let classname_candidate = parts[-1] - " check for renamed namepsace in imports + " check for renamed namespace in imports if has_key(classstructure.imports, class_candidate_namespace) let class_candidate_namespace = classstructure.imports[class_candidate_namespace].name endif @@ -2023,7 +2023,7 @@ function! phpcomplete#GetCachedClassContents(classlocation, class_name) " {{{ if getftime(classstructure.file) != classstructure.mtime let valid = 0 " we could break here, but the time required for checking probably worth - " the the memory we can free by checking every file in the cached hirearchy + " the memory we can free by checking every file in the cached hierarchy call phpcomplete#ClearCachedClassContents(classstructure.file) endif endfor @@ -2037,7 +2037,7 @@ function! phpcomplete#GetCachedClassContents(classlocation, class_name) " {{{ call remove(s:cache_classstructures, cache_key) call phpcomplete#ClearCachedClassContents(full_file_path) - " fall trough for the read from files path + " fall through for the read from files path endif else call phpcomplete#ClearCachedClassContents(full_file_path) @@ -2590,7 +2590,7 @@ function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{ let search_line = line let use_line = line - " add lines from the file until theres no ';' in them + " add lines from the file until there's no ';' in them while search_line !~? ';' && l > 0 " file lines are reversed so we need to go backwards let l -= 1 @@ -2622,7 +2622,7 @@ function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{ " find kind flags from tags or built in methods for the objects we extracted " they can be either classes, interfaces or namespaces, no other thing is importable in php for [key, import] in items(imports) - " if theres a \ in the name we have it's definitely not a built in thing, look for tags + " if there's a \ in the name we have it's definitely not a built in thing, look for tags if import.name =~ '\\' let patched_ctags_detected = 0 let [classname, namespace_for_classes] = phpcomplete#ExpandClassName(import.name, '\', {}) @@ -2679,10 +2679,10 @@ function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{ let import['kind'] = 'i' let import['builtin'] = 1 else - " or can be a tag with exactly matchign name + " or can be a tag with exactly matching name let tags = phpcomplete#GetTaglist('^'.import['name'].'$') for tag in tags - " search for the first matchin namespace, class, interface with no namespace + " search for the first matching namespace, class, interface with no namespace if !has_key(tag, 'namespace') && (tag.kind == 'n' || tag.kind == 'c' || tag.kind == 'i' || tag.kind == 't') call extend(import, tag) let import['builtin'] = 0 @@ -2900,7 +2900,7 @@ for [ext, data] in items(php_builtin['functions']) call extend(g:php_builtin_functions, data) endfor -" Built in classs +" Built in class let g:php_builtin_classes = {} for [ext, data] in items(php_builtin['classes']) call extend(g:php_builtin_classes, data) @@ -2918,10 +2918,10 @@ for [ext, data] in items(php_builtin['constants']) call extend(g:php_constants, data) endfor -" When the classname not found or found but the tags dosen't contain that -" class we will try to complate any method of any builtin class. To speed up +" When the classname not found or found but the tags doesn't contain that +" class we will try to complete any method of any builtin class. To speed up " that lookup we compile a 'ClassName::MethodName':'info' dictionary from the -" builtin class informations +" builtin class information let g:php_builtin_object_functions = {} " When completing for 'everyting imaginable' (no class context, not a diff --git a/runtime/autoload/provider/clipboard.vim b/runtime/autoload/provider/clipboard.vim index dea79f21f0..991bed6bbd 100644 --- a/runtime/autoload/provider/clipboard.vim +++ b/runtime/autoload/provider/clipboard.vim @@ -158,7 +158,9 @@ function! s:clipboard.get(reg) abort end let clipboard_data = s:try_cmd(s:paste[a:reg]) - if match(&clipboard, '\v(unnamed|unnamedplus)') >= 0 && get(s:selections[a:reg].data, 0, []) == clipboard_data + if match(&clipboard, '\v(unnamed|unnamedplus)') >= 0 + \ && type(clipboard_data) == v:t_list + \ && get(s:selections[a:reg].data, 0, []) ==# clipboard_data " When system clipboard return is same as our cache return the cache " as it contains regtype information return s:selections[a:reg].data diff --git a/runtime/autoload/python3complete.vim b/runtime/autoload/python3complete.vim index 1d7f5d18f5..192e9e6df8 100644 --- a/runtime/autoload/python3complete.vim +++ b/runtime/autoload/python3complete.vim @@ -173,7 +173,7 @@ class Completer(object): pass if len(arg_text) == 0: # The doc string sometimes contains the function signature - # this works for alot of C modules that are part of the + # this works for a lot of C modules that are part of the # standard library doc = func_obj.__doc__ if doc: diff --git a/runtime/autoload/pythoncomplete.vim b/runtime/autoload/pythoncomplete.vim index 575c23e6d3..e9233e1d49 100644 --- a/runtime/autoload/pythoncomplete.vim +++ b/runtime/autoload/pythoncomplete.vim @@ -191,7 +191,7 @@ class Completer(object): pass if len(arg_text) == 0: # The doc string sometimes contains the function signature - # this works for alot of C modules that are part of the + # this works for a lot of C modules that are part of the # standard library doc = func_obj.__doc__ if doc: diff --git a/runtime/autoload/remote/host.vim b/runtime/autoload/remote/host.vim index c34ff4bee7..884b478f19 100644 --- a/runtime/autoload/remote/host.vim +++ b/runtime/autoload/remote/host.vim @@ -114,7 +114,7 @@ function! s:RegistrationCommands(host) abort let host_id = a:host.'-registration-clone' call remote#host#RegisterClone(host_id, a:host) let pattern = s:plugin_patterns[a:host] - let paths = globpath(&rtp, 'rplugin/'.a:host.'/'.pattern, 1, 1) + let paths = nvim_get_runtime_file('rplugin/'.a:host.'/'.pattern, 1) let paths = map(paths, 'tr(resolve(v:val),"\\","/")') " Normalize slashes #4795 let paths = uniq(sort(paths)) if empty(paths) diff --git a/runtime/autoload/rubycomplete.vim b/runtime/autoload/rubycomplete.vim index e8a1879668..3677b25aeb 100644 --- a/runtime/autoload/rubycomplete.vim +++ b/runtime/autoload/rubycomplete.vim @@ -3,7 +3,7 @@ " Maintainer: Mark Guzman <segfault@hasno.info> " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns <dougkearns@gmail.com> -" Last Change: 2019 Feb 25 +" Last Change: 2020 Apr 12 " ---------------------------------------------------------------------------- " " Ruby IRB/Complete author: Keiju ISHITSUKA(keiju@ishitsuka.com) @@ -501,13 +501,8 @@ class VimRubyCompletion return if rails_base == nil $:.push rails_base unless $:.index( rails_base ) - rails_config = rails_base + "config/" - rails_lib = rails_base + "lib/" - $:.push rails_config unless $:.index( rails_config ) - $:.push rails_lib unless $:.index( rails_lib ) - - bootfile = rails_config + "boot.rb" - envfile = rails_config + "environment.rb" + bootfile = rails_base + "config/boot.rb" + envfile = rails_base + "config/environment.rb" if File.exists?( bootfile ) && File.exists?( envfile ) begin require bootfile diff --git a/runtime/autoload/sqlcomplete.vim b/runtime/autoload/sqlcomplete.vim index ea0d8c2de9..adbdbab894 100644 --- a/runtime/autoload/sqlcomplete.vim +++ b/runtime/autoload/sqlcomplete.vim @@ -17,7 +17,7 @@ " and complete it. " " Version 16.0 (Dec 2015) -" - NF: If reseting the cache and table, procedure or view completion +" - NF: If resetting the cache and table, procedure or view completion " had been used via dbext, have dbext delete or recreate the " dictionary so that new objects are picked up for the " next completion. @@ -554,7 +554,7 @@ function! sqlcomplete#PreCacheSyntax(...) let syn_group_arr = g:omni_sql_precache_syntax_groups endif " For each group specified in the list, precache all - " the sytnax items. + " the syntax items. if !empty(syn_group_arr) for group_name in syn_group_arr let syn_items = extend( syn_items, s:SQLCGetSyntaxList(group_name) ) @@ -577,7 +577,7 @@ function! sqlcomplete#ResetCacheSyntax(...) let syn_group_arr = g:omni_sql_precache_syntax_groups endif " For each group specified in the list, precache all - " the sytnax items. + " the syntax items. if !empty(syn_group_arr) for group_name in syn_group_arr let list_idx = index(s:syn_list, group_name, 0, &ignorecase) @@ -843,7 +843,7 @@ function! s:SQLCGetColumns(table_name, list_type) let curline = line(".") let curcol = col(".") - " Do not let searchs wrap + " Do not let searches wrap setlocal nowrapscan " If . was entered, look at the word just before the . " We are looking for something like this: @@ -863,7 +863,7 @@ function! s:SQLCGetColumns(table_name, list_type) " Search forward until one of the following: " 1. Another select/update/delete statement " 2. A ; at the end of a line (the delimiter) - " 3. The end of the file (incase no delimiter) + " 3. The end of the file (in case no delimiter) " Yank the visually selected text into the "y register. exec 'silent! normal! vl/\c\(\<select\>\|\<update\>\|\<delete\>\|;\s*$\|\%$\)'."\n".'"yy' diff --git a/runtime/autoload/tar.vim b/runtime/autoload/tar.vim index b6c4c660b8..e495e8262a 100644 --- a/runtime/autoload/tar.vim +++ b/runtime/autoload/tar.vim @@ -778,7 +778,7 @@ fun! tar#Vimuntar(...) elseif executable("gzip") silent exe "!gzip -d ".shellescape(tartail) else - echoerr "unable to decompress<".tartail."> on this sytem" + echoerr "unable to decompress<".tartail."> on this system" if simplify(curdir) != simplify(tarhome) " remove decompressed tarball, restore directory " call Decho("delete(".tartail.".tar)") diff --git a/runtime/autoload/tohtml.vim b/runtime/autoload/tohtml.vim index 76092f0f93..66f1cb46cb 100644 --- a/runtime/autoload/tohtml.vim +++ b/runtime/autoload/tohtml.vim @@ -693,7 +693,7 @@ func! tohtml#GetUserSettings() "{{{ let user_settings = {} " Define the correct option if the old option name exists and we haven't - " already defined the correct one. Maybe I'll put out a warnig message about + " already defined the correct one. Maybe I'll put out a warning message about " this sometime and remove the old option entirely at some even later time, " but for now just silently accept the old option. if exists('g:use_xhtml') && !exists("g:html_use_xhtml") diff --git a/runtime/autoload/vimexpect.vim b/runtime/autoload/vimexpect.vim index 0ed888d2a4..04c742b894 100644 --- a/runtime/autoload/vimexpect.vim +++ b/runtime/autoload/vimexpect.vim @@ -39,7 +39,7 @@ let s:Parser.LINE_BUFFER_MAX_LEN = 100 " Create a new Parser instance with the initial state and a target. The target " is a dictionary that will be the `self` of every State method call associated " with the parser, and may contain options normally passed to -" `jobstart`(on_stdout/on_stderr will be overriden). Returns the target so it +" `jobstart`(on_stdout/on_stderr will be overridden). Returns the target so it " can be called directly as the second argument of `jobstart`: " " call jobstart(prog_argv, vimexpect#Parser(initial_state, {'pty': 1})) diff --git a/runtime/autoload/xmlcomplete.vim b/runtime/autoload/xmlcomplete.vim index 4c1ac4f6b5..55fb031e68 100644 --- a/runtime/autoload/xmlcomplete.vim +++ b/runtime/autoload/xmlcomplete.vim @@ -199,7 +199,7 @@ function! xmlcomplete#CompleteTags(findstart, base) " 1. Events attributes if context =~ '\s' - " If attr contains =\s*[\"'] we catched value of attribute + " If attr contains =\s*[\"'] we catch value of attribute if attr =~ "=\s*[\"']" || attr =~ "=\s*$" " Let do attribute specific completion let attrname = matchstr(attr, '.*\ze\s*=') diff --git a/runtime/autoload/zip.vim b/runtime/autoload/zip.vim index f6b876df05..9588bbf4a2 100644 --- a/runtime/autoload/zip.vim +++ b/runtime/autoload/zip.vim @@ -81,7 +81,7 @@ fun! zip#Browse(zipfile) " sanity checks if !exists("*fnameescape") if &verbose > 1 - echoerr "the zip plugin is not available (your vim doens't support fnameescape())" + echoerr "the zip plugin is not available (your vim doesn't support fnameescape())" endif return endif |