Patch 8.0.1279

37 views
Skip to first unread message

Bram Moolenaar

unread,
Nov 9, 2017, 1:46:16 PM11/9/17
to vim...@googlegroups.com

Patch 8.0.1279
Problem: Initializing menus can be slow, especially when there are many
keymaps, color schemes, etc.
Solution: Do the globbing for runtime files lazlily. (Ken Takata)
Files: runtime/doc/gui.txt, runtime/menu.vim


*** ../vim-8.0.1278/runtime/doc/gui.txt 2017-09-23 16:33:40.853195258 +0200
--- runtime/doc/gui.txt 2017-11-09 18:51:16.027886877 +0100
***************
*** 497,503 ****
filetypes already present at startup, add: >
:let do_syntax_sel_menu = 1

! <
*console-menus*
Although this documentation is in the GUI section, you can actually use menus
in console mode too. You will have to load |menu.vim| explicitly then, it is
--- 499,520 ----
filetypes already present at startup, add: >
:let do_syntax_sel_menu = 1

! The following menuitems show all available color schemes, keymaps and compiler
! settings:
! Edit > Color Scheme ~
! Edit > Keymap ~
! Tools > Set Compiler ~
! However, they can also take a bit of time to load, because they search all
! related files from the directories in 'runtimepath'. Therefore they are
! loaded lazily (by the |CursorHold| event), or you can also load them manually.
! If you want to have all these items already present at startup, add: >
! :let do_no_lazyload_menus = 1
!
! Note that the menu.vim is sourced when `:syntax on` or `:filetype on` is
! executed or after your .vimrc file is sourced. This means that the 'encoding'
! option and the language of messages (`:language messages`) must be set before
! that (if you want to change them).
!
*console-menus*
Although this documentation is in the GUI section, you can actually use menus
in console mode too. You will have to load |menu.vim| explicitly then, it is
*** ../vim-8.0.1278/runtime/menu.vim 2016-07-27 20:57:47.000000000 +0200
--- runtime/menu.vim 2017-11-09 19:02:29.369491201 +0100
***************
*** 2,8 ****
" You can also use this as a start for your own set of menus.
"
" Maintainer: Bram Moolenaar <Br...@vim.org>
! " Last Change: 2016 Jul 27

" Note that ":an" (short for ":anoremenu") is often used to make a menu work
" in all modes and avoid side effects from mappings defined by the user.
--- 2,8 ----
" You can also use this as a start for your own set of menus.
"
" Maintainer: Bram Moolenaar <Br...@vim.org>
! " Last Change: 2017 Nov 09

" Note that ":an" (short for ":anoremenu") is often used to make a menu work
" in all modes and avoid side effects from mappings defined by the user.
***************
*** 70,76 ****
" Help menu
an 9999.10 &Help.&Overview<Tab><F1> :help<CR>
an 9999.20 &Help.&User\ Manual :help usr_toc<CR>
! an 9999.30 &Help.&How-to\ links :help how-to<CR>
an <silent> 9999.40 &Help.&Find\.\.\. :call <SID>Helpfind()<CR>
an 9999.45 &Help.-sep1- <Nop>
an 9999.50 &Help.&Credits :help credits<CR>
--- 70,76 ----
" Help menu
an 9999.10 &Help.&Overview<Tab><F1> :help<CR>
an 9999.20 &Help.&User\ Manual :help usr_toc<CR>
! an 9999.30 &Help.&How-To\ Links :help how-to<CR>
an <silent> 9999.40 &Help.&Find\.\.\. :call <SID>Helpfind()<CR>
an 9999.45 &Help.-sep1- <Nop>
an 9999.50 &Help.&Credits :help credits<CR>
***************
*** 112,118 ****

if has("diff")
an 10.400 &File.-SEP2- <Nop>
! an 10.410 &File.Split\ &Diff\ with\.\.\. :browse vert diffsplit<CR>
an 10.420 &File.Split\ Patched\ &By\.\.\. :browse vert diffpatch<CR>
endif

--- 112,118 ----

if has("diff")
an 10.400 &File.-SEP2- <Nop>
! an 10.410 &File.Split\ &Diff\ With\.\.\. :browse vert diffsplit<CR>
an 10.420 &File.Split\ Patched\ &By\.\.\. :browse vert diffpatch<CR>
endif

***************
*** 159,165 ****
inoremenu &Edit.Put\ &Before<Tab>[p <C-O>[p
nnoremenu 20.380 &Edit.Put\ &After<Tab>]p ]p
inoremenu &Edit.Put\ &After<Tab>]p <C-O>]p
! if has("win32") || has("win16")
vnoremenu 20.390 &Edit.&Delete<Tab>x x
endif
noremenu <script> <silent> 20.400 &Edit.&Select\ All<Tab>ggVG :<C-U>call <SID>SelectAll()<CR>
--- 159,165 ----
inoremenu &Edit.Put\ &Before<Tab>[p <C-O>[p
nnoremenu 20.380 &Edit.Put\ &After<Tab>]p ]p
inoremenu &Edit.Put\ &After<Tab>]p <C-O>]p
! if has("win32")
vnoremenu 20.390 &Edit.&Delete<Tab>x x
endif
noremenu <script> <silent> 20.400 &Edit.&Select\ All<Tab>ggVG :<C-U>call <SID>SelectAll()<CR>
***************
*** 167,173 ****
cnoremenu <script> <silent> 20.400 &Edit.&Select\ All<Tab>ggVG <C-U>call <SID>SelectAll()<CR>

an 20.405 &Edit.-SEP2- <Nop>
! if has("win32") || has("win16") || has("gui_gtk") || has("gui_kde") || has("gui_motif")
an 20.410 &Edit.&Find\.\.\. :promptfind<CR>
vunmenu &Edit.&Find\.\.\.
vnoremenu <silent> &Edit.&Find\.\.\. y:promptfind <C-R>=<SID>FixFText()<CR><CR>
--- 167,173 ----
cnoremenu <script> <silent> 20.400 &Edit.&Select\ All<Tab>ggVG <C-U>call <SID>SelectAll()<CR>

an 20.405 &Edit.-SEP2- <Nop>
! if has("win32") || has("gui_gtk") || has("gui_kde") || has("gui_motif")
an 20.410 &Edit.&Find\.\.\. :promptfind<CR>
vunmenu &Edit.&Find\.\.\.
vnoremenu <silent> &Edit.&Find\.\.\. y:promptfind <C-R>=<SID>FixFText()<CR><CR>
***************
*** 214,238 ****

" Edit/Global Settings
an 20.440.100 &Edit.&Global\ Settings.Toggle\ Pattern\ &Highlight<Tab>:set\ hls! :set hls! hls?<CR>
! an 20.440.110 &Edit.&Global\ Settings.Toggle\ &Ignore-case<Tab>:set\ ic! :set ic! ic?<CR>
! an 20.440.110 &Edit.&Global\ Settings.Toggle\ &Showmatch<Tab>:set\ sm! :set sm! sm?<CR>

! an 20.440.120 &Edit.&Global\ Settings.&Context\ lines.\ 1\ :set so=1<CR>
! an 20.440.120 &Edit.&Global\ Settings.&Context\ lines.\ 2\ :set so=2<CR>
! an 20.440.120 &Edit.&Global\ Settings.&Context\ lines.\ 3\ :set so=3<CR>
! an 20.440.120 &Edit.&Global\ Settings.&Context\ lines.\ 4\ :set so=4<CR>
! an 20.440.120 &Edit.&Global\ Settings.&Context\ lines.\ 5\ :set so=5<CR>
! an 20.440.120 &Edit.&Global\ Settings.&Context\ lines.\ 7\ :set so=7<CR>
! an 20.440.120 &Edit.&Global\ Settings.&Context\ lines.\ 10\ :set so=10<CR>
! an 20.440.120 &Edit.&Global\ Settings.&Context\ lines.\ 100\ :set so=100<CR>

an 20.440.130.40 &Edit.&Global\ Settings.&Virtual\ Edit.Never :set ve=<CR>
an 20.440.130.50 &Edit.&Global\ Settings.&Virtual\ Edit.Block\ Selection :set ve=block<CR>
! an 20.440.130.60 &Edit.&Global\ Settings.&Virtual\ Edit.Insert\ mode :set ve=insert<CR>
an 20.440.130.70 &Edit.&Global\ Settings.&Virtual\ Edit.Block\ and\ Insert :set ve=block,insert<CR>
an 20.440.130.80 &Edit.&Global\ Settings.&Virtual\ Edit.Always :set ve=all<CR>
an 20.440.140 &Edit.&Global\ Settings.Toggle\ Insert\ &Mode<Tab>:set\ im! :set im!<CR>
! an 20.440.145 &Edit.&Global\ Settings.Toggle\ Vi\ C&ompatible<Tab>:set\ cp! :set cp!<CR>
an <silent> 20.440.150 &Edit.&Global\ Settings.Search\ &Path\.\.\. :call <SID>SearchP()<CR>
an <silent> 20.440.160 &Edit.&Global\ Settings.Ta&g\ Files\.\.\. :call <SID>TagFiles()<CR>
"
--- 214,238 ----

" Edit/Global Settings
an 20.440.100 &Edit.&Global\ Settings.Toggle\ Pattern\ &Highlight<Tab>:set\ hls! :set hls! hls?<CR>
! an 20.440.110 &Edit.&Global\ Settings.Toggle\ &Ignoring\ Case<Tab>:set\ ic! :set ic! ic?<CR>
! an 20.440.110 &Edit.&Global\ Settings.Toggle\ &Showing\ Matched\ Pairs<Tab>:set\ sm! :set sm! sm?<CR>

! an 20.440.120 &Edit.&Global\ Settings.&Context\ Lines.\ 1\ :set so=1<CR>
! an 20.440.120 &Edit.&Global\ Settings.&Context\ Lines.\ 2\ :set so=2<CR>
! an 20.440.120 &Edit.&Global\ Settings.&Context\ Lines.\ 3\ :set so=3<CR>
! an 20.440.120 &Edit.&Global\ Settings.&Context\ Lines.\ 4\ :set so=4<CR>
! an 20.440.120 &Edit.&Global\ Settings.&Context\ Lines.\ 5\ :set so=5<CR>
! an 20.440.120 &Edit.&Global\ Settings.&Context\ Lines.\ 7\ :set so=7<CR>
! an 20.440.120 &Edit.&Global\ Settings.&Context\ Lines.\ 10\ :set so=10<CR>
! an 20.440.120 &Edit.&Global\ Settings.&Context\ Lines.\ 100\ :set so=100<CR>

an 20.440.130.40 &Edit.&Global\ Settings.&Virtual\ Edit.Never :set ve=<CR>
an 20.440.130.50 &Edit.&Global\ Settings.&Virtual\ Edit.Block\ Selection :set ve=block<CR>
! an 20.440.130.60 &Edit.&Global\ Settings.&Virtual\ Edit.Insert\ Mode :set ve=insert<CR>
an 20.440.130.70 &Edit.&Global\ Settings.&Virtual\ Edit.Block\ and\ Insert :set ve=block,insert<CR>
an 20.440.130.80 &Edit.&Global\ Settings.&Virtual\ Edit.Always :set ve=all<CR>
an 20.440.140 &Edit.&Global\ Settings.Toggle\ Insert\ &Mode<Tab>:set\ im! :set im!<CR>
! an 20.440.145 &Edit.&Global\ Settings.Toggle\ Vi\ C&ompatibility<Tab>:set\ cp! :set cp!<CR>
an <silent> 20.440.150 &Edit.&Global\ Settings.Search\ &Path\.\.\. :call <SID>SearchP()<CR>
an <silent> 20.440.160 &Edit.&Global\ Settings.Ta&g\ Files\.\.\. :call <SID>TagFiles()<CR>
"
***************
*** 276,288 ****

" Boolean options
an 20.440.100 &Edit.F&ile\ Settings.Toggle\ Line\ &Numbering<Tab>:set\ nu! :set nu! nu?<CR>
! an 20.440.105 &Edit.F&ile\ Settings.Toggle\ relati&ve\ Line\ Numbering<Tab>:set\ rnu! :set rnu! rnu?<CR>
an 20.440.110 &Edit.F&ile\ Settings.Toggle\ &List\ Mode<Tab>:set\ list! :set list! list?<CR>
! an 20.440.120 &Edit.F&ile\ Settings.Toggle\ Line\ &Wrap<Tab>:set\ wrap! :set wrap! wrap?<CR>
! an 20.440.130 &Edit.F&ile\ Settings.Toggle\ W&rap\ at\ word<Tab>:set\ lbr! :set lbr! lbr?<CR>
! an 20.440.160 &Edit.F&ile\ Settings.Toggle\ &expand-tab<Tab>:set\ et! :set et! et?<CR>
! an 20.440.170 &Edit.F&ile\ Settings.Toggle\ &auto-indent<Tab>:set\ ai! :set ai! ai?<CR>
! an 20.440.180 &Edit.F&ile\ Settings.Toggle\ &C-indenting<Tab>:set\ cin! :set cin! cin?<CR>

" other options
an 20.440.600 &Edit.F&ile\ Settings.-SEP2- <Nop>
--- 276,288 ----

" Boolean options
an 20.440.100 &Edit.F&ile\ Settings.Toggle\ Line\ &Numbering<Tab>:set\ nu! :set nu! nu?<CR>
! an 20.440.105 &Edit.F&ile\ Settings.Toggle\ Relati&ve\ Line\ Numbering<Tab>:set\ rnu! :set rnu! rnu?<CR>
an 20.440.110 &Edit.F&ile\ Settings.Toggle\ &List\ Mode<Tab>:set\ list! :set list! list?<CR>
! an 20.440.120 &Edit.F&ile\ Settings.Toggle\ Line\ &Wrapping<Tab>:set\ wrap! :set wrap! wrap?<CR>
! an 20.440.130 &Edit.F&ile\ Settings.Toggle\ W&rapping\ at\ Word<Tab>:set\ lbr! :set lbr! lbr?<CR>
! an 20.440.160 &Edit.F&ile\ Settings.Toggle\ Tab\ &Expanding<Tab>:set\ et! :set et! et?<CR>
! an 20.440.170 &Edit.F&ile\ Settings.Toggle\ &Auto\ Indenting<Tab>:set\ ai! :set ai! ai?<CR>
! an 20.440.180 &Edit.F&ile\ Settings.Toggle\ &C-Style\ Indenting<Tab>:set\ cin! :set cin! cin?<CR>

" other options
an 20.440.600 &Edit.F&ile\ Settings.-SEP2- <Nop>
***************
*** 311,317 ****
" Remove leading zeros to avoid it being used as an octal number.
" But keep a zero by itself.
let tw = substitute(n, "^0*", "", "")
! let &tw = tw == '' ? 0 : tw
endif
endfun

--- 311,317 ----
" Remove leading zeros to avoid it being used as an octal number.
" But keep a zero by itself.
let tw = substitute(n, "^0*", "", "")
! let &tw = tw == '' ? 0 : tw
endif
endfun

***************
*** 339,389 ****
endif
endfun


" Setup the Edit.Color Scheme submenu

! " get NL separated string with file names
! let s:n = globpath(&runtimepath, "colors/*.vim")

! " split at NL, Ignore case for VMS and windows, sort on name
! let s:names = sort(map(split(s:n, "\n"), 'substitute(v:val, "\\c.*[/\\\\:\\]]\\([^/\\\\:]*\\)\\.vim", "\\1", "")'), 1)

! " define all the submenu entries
! let s:idx = 100
! for s:name in s:names
! exe "an 20.450." . s:idx . ' &Edit.C&olor\ Scheme.' . s:name . " :colors " . s:name . "<CR>"
! let s:idx = s:idx + 10
! endfor
! unlet s:name s:names s:n s:idx


" Setup the Edit.Keymap submenu
if has("keymap")
! let s:n = globpath(&runtimepath, "keymap/*.vim")
! if s:n != ""
! let s:idx = 100
! an 20.460.90 &Edit.&Keymap.None :set keymap=<CR>
! while strlen(s:n) > 0
! let s:i = stridx(s:n, "\n")
! if s:i < 0
! let s:name = s:n
! let s:n = ""
! else
! let s:name = strpart(s:n, 0, s:i)
! let s:n = strpart(s:n, s:i + 1, 19999)
! endif
! " Ignore case for VMS and windows
! let s:name = substitute(s:name, '\c.*[/\\:\]]\([^/\\:_]*\)\(_[0-9a-zA-Z-]*\)\=\.vim', '\1', '')
! exe "an 20.460." . s:idx . ' &Edit.&Keymap.' . s:name . " :set keymap=" . s:name . "<CR>"
! unlet s:name
! unlet s:i
! let s:idx = s:idx + 10
! endwhile
! unlet s:idx
endif
- unlet s:n
endif
! if has("win32") || has("win16") || has("gui_motif") || has("gui_gtk") || has("gui_kde") || has("gui_photon") || has("gui_mac")
an 20.470 &Edit.Select\ Fo&nt\.\.\. :set guifont=*<CR>
endif

--- 339,403 ----
endif
endfun

+ let s:did_setup_color_schemes = 0

" Setup the Edit.Color Scheme submenu
+ func! s:SetupColorSchemes() abort
+ if s:did_setup_color_schemes
+ return
+ endif
+ let s:did_setup_color_schemes = 1

! let n = globpath(&runtimepath, "colors/*.vim", 1, 1)

! " Ignore case for VMS and windows, sort on name
! let names = sort(map(n, 'substitute(v:val, "\\c.*[/\\\\:\\]]\\([^/\\\\:]*\\)\\.vim", "\\1", "")'), 1)

! " define all the submenu entries
! let idx = 100
! for name in names
! exe "an 20.450." . idx . ' &Edit.C&olor\ Scheme.' . name . " :colors " . name . "<CR>"
! let idx = idx + 10
! endfor
! silent! aunmenu &Edit.Show\ C&olor\ Schemes\ in\ Menu
! endfun
! if exists("do_no_lazyload_menus")
! call s:SetupColorSchemes()
! else
! an <silent> 20.450 &Edit.Show\ C&olor\ Schemes\ in\ Menu :call <SID>SetupColorSchemes()<CR>
! endif


" Setup the Edit.Keymap submenu
if has("keymap")
! let s:did_setup_keymaps = 0
!
! func! s:SetupKeymaps() abort
! if s:did_setup_keymaps
! return
! endif
! let s:did_setup_keymaps = 1
!
! let n = globpath(&runtimepath, "keymap/*.vim", 1, 1)
! if !empty(n)
! let idx = 100
! an 20.460.90 &Edit.&Keymap.None :set keymap=<CR>
! for name in n
! " Ignore case for VMS and windows
! let name = substitute(name, '\c.*[/\\:\]]\([^/\\:_]*\)\(_[0-9a-zA-Z-]*\)\=\.vim', '\1', '')
! exe "an 20.460." . idx . ' &Edit.&Keymap.' . name . " :set keymap=" . name . "<CR>"
! let idx = idx + 10
! endfor
! endif
! silent! aunmenu &Edit.Show\ &Keymaps\ in\ Menu
! endfun
! if exists("do_no_lazyload_menus")
! call s:SetupKeymaps()
! else
! an <silent> 20.460 &Edit.Show\ &Keymaps\ in\ Menu :call <SID>SetupKeymaps()<CR>
endif
endif
! if has("win32") || has("gui_motif") || has("gui_gtk") || has("gui_kde") || has("gui_photon") || has("gui_mac")
an 20.470 &Edit.Select\ Fo&nt\.\.\. :set guifont=*<CR>
endif

***************
*** 396,405 ****
endif
endif

! an 40.300 &Tools.&Jump\ to\ this\ tag<Tab>g^] g<C-]>
! vunmenu &Tools.&Jump\ to\ this\ tag<Tab>g^]
! vnoremenu &Tools.&Jump\ to\ this\ tag<Tab>g^] g<C-]>
! an 40.310 &Tools.Jump\ &back<Tab>^T <C-T>
an 40.320 &Tools.Build\ &Tags\ File :exe "!" . g:ctags_command<CR>

if has("folding") || has("spell")
--- 410,419 ----
endif
endif

! an 40.300 &Tools.&Jump\ to\ This\ Tag<Tab>g^] g<C-]>
! vunmenu &Tools.&Jump\ to\ This\ Tag<Tab>g^]
! vnoremenu &Tools.&Jump\ to\ This\ Tag<Tab>g^] g<C-]>
! an 40.310 &Tools.Jump\ &Back<Tab>^T <C-T>
an 40.320 &Tools.Build\ &Tags\ File :exe "!" . g:ctags_command<CR>

if has("folding") || has("spell")
***************
*** 410,426 ****
if has("spell")
an 40.335.110 &Tools.&Spelling.&Spell\ Check\ On :set spell<CR>
an 40.335.120 &Tools.&Spelling.Spell\ Check\ &Off :set nospell<CR>
! an 40.335.130 &Tools.&Spelling.To\ &Next\ error<Tab>]s ]s
! an 40.335.130 &Tools.&Spelling.To\ &Previous\ error<Tab>[s [s
an 40.335.140 &Tools.&Spelling.Suggest\ &Corrections<Tab>z= z=
! an 40.335.150 &Tools.&Spelling.&Repeat\ correction<Tab>:spellrepall :spellrepall<CR>
an 40.335.200 &Tools.&Spelling.-SEP1- <Nop>
! an 40.335.210 &Tools.&Spelling.Set\ language\ to\ "en" :set spl=en spell<CR>
! an 40.335.220 &Tools.&Spelling.Set\ language\ to\ "en_au" :set spl=en_au spell<CR>
! an 40.335.230 &Tools.&Spelling.Set\ language\ to\ "en_ca" :set spl=en_ca spell<CR>
! an 40.335.240 &Tools.&Spelling.Set\ language\ to\ "en_gb" :set spl=en_gb spell<CR>
! an 40.335.250 &Tools.&Spelling.Set\ language\ to\ "en_nz" :set spl=en_nz spell<CR>
! an 40.335.260 &Tools.&Spelling.Set\ language\ to\ "en_us" :set spl=en_us spell<CR>
an <silent> 40.335.270 &Tools.&Spelling.&Find\ More\ Languages :call <SID>SpellLang()<CR>

let s:undo_spellang = ['aun &Tools.&Spelling.&Find\ More\ Languages']
--- 424,440 ----
if has("spell")
an 40.335.110 &Tools.&Spelling.&Spell\ Check\ On :set spell<CR>
an 40.335.120 &Tools.&Spelling.Spell\ Check\ &Off :set nospell<CR>
! an 40.335.130 &Tools.&Spelling.To\ &Next\ Error<Tab>]s ]s
! an 40.335.130 &Tools.&Spelling.To\ &Previous\ Error<Tab>[s [s
an 40.335.140 &Tools.&Spelling.Suggest\ &Corrections<Tab>z= z=
! an 40.335.150 &Tools.&Spelling.&Repeat\ Correction<Tab>:spellrepall :spellrepall<CR>
an 40.335.200 &Tools.&Spelling.-SEP1- <Nop>
! an 40.335.210 &Tools.&Spelling.Set\ Language\ to\ "en" :set spl=en spell<CR>
! an 40.335.220 &Tools.&Spelling.Set\ Language\ to\ "en_au" :set spl=en_au spell<CR>
! an 40.335.230 &Tools.&Spelling.Set\ Language\ to\ "en_ca" :set spl=en_ca spell<CR>
! an 40.335.240 &Tools.&Spelling.Set\ Language\ to\ "en_gb" :set spl=en_gb spell<CR>
! an 40.335.250 &Tools.&Spelling.Set\ Language\ to\ "en_nz" :set spl=en_nz spell<CR>
! an 40.335.260 &Tools.&Spelling.Set\ Language\ to\ "en_us" :set spl=en_us spell<CR>
an <silent> 40.335.270 &Tools.&Spelling.&Find\ More\ Languages :call <SID>SpellLang()<CR>

let s:undo_spellang = ['aun &Tools.&Spelling.&Find\ More\ Languages']
***************
*** 437,450 ****
endif

if !exists("g:menutrans_set_lang_to")
! let g:menutrans_set_lang_to = 'Set language to'
endif

let found = 0
! let s = globpath(&rtp, "spell/*." . enc . ".spl")
! if s != ""
let n = 300
! for f in split(s, "\n")
let nm = substitute(f, '.*spell[/\\]\(..\)\.[^/\\]*\.spl', '\1', "")
if nm != "en" && nm !~ '/'
let _nm = nm
--- 451,464 ----
endif

if !exists("g:menutrans_set_lang_to")
! let g:menutrans_set_lang_to = 'Set Language to'
endif

let found = 0
! let s = globpath(&runtimepath, "spell/*." . enc . ".spl", 1, 1)
! if !empty(s)
let n = 300
! for f in s
let nm = substitute(f, '.*spell[/\\]\(..\)\.[^/\\]*\.spl', '\1', "")
if nm != "en" && nm !~ '/'
let _nm = nm
***************
*** 474,487 ****
" Tools.Fold Menu
if has("folding")
" open close folds
! an 40.340.110 &Tools.&Folding.&Enable/Disable\ folds<Tab>zi zi
an 40.340.120 &Tools.&Folding.&View\ Cursor\ Line<Tab>zv zv
! an 40.340.120 &Tools.&Folding.Vie&w\ Cursor\ Line\ only<Tab>zMzx zMzx
! inoremenu 40.340.120 &Tools.&Folding.Vie&w\ Cursor\ Line\ only<Tab>zMzx <C-O>zM<C-O>zx
! an 40.340.130 &Tools.&Folding.C&lose\ more\ folds<Tab>zm zm
! an 40.340.140 &Tools.&Folding.&Close\ all\ folds<Tab>zM zM
! an 40.340.150 &Tools.&Folding.O&pen\ more\ folds<Tab>zr zr
! an 40.340.160 &Tools.&Folding.&Open\ all\ folds<Tab>zR zR
" fold method
an 40.340.200 &Tools.&Folding.-SEP1- <Nop>
an 40.340.210 &Tools.&Folding.Fold\ Met&hod.M&anual :set fdm=manual<CR>
--- 488,501 ----
" Tools.Fold Menu
if has("folding")
" open close folds
! an 40.340.110 &Tools.&Folding.&Enable/Disable\ Folds<Tab>zi zi
an 40.340.120 &Tools.&Folding.&View\ Cursor\ Line<Tab>zv zv
! an 40.340.120 &Tools.&Folding.Vie&w\ Cursor\ Line\ Only<Tab>zMzx zMzx
! inoremenu 40.340.120 &Tools.&Folding.Vie&w\ Cursor\ Line\ Only<Tab>zMzx <C-O>zM<C-O>zx
! an 40.340.130 &Tools.&Folding.C&lose\ More\ Folds<Tab>zm zm
! an 40.340.140 &Tools.&Folding.&Close\ All\ Folds<Tab>zM zM
! an 40.340.150 &Tools.&Folding.O&pen\ More\ Folds<Tab>zr zr
! an 40.340.160 &Tools.&Folding.&Open\ All\ Folds<Tab>zR zR
" fold method
an 40.340.200 &Tools.&Folding.-SEP1- <Nop>
an 40.340.210 &Tools.&Folding.Fold\ Met&hod.M&anual :set fdm=manual<CR>
***************
*** 496,509 ****
an 40.340.240 &Tools.&Folding.Delete\ &All\ Folds<Tab>zD zD
" moving around in folds
an 40.340.300 &Tools.&Folding.-SEP2- <Nop>
! an 40.340.310.10 &Tools.&Folding.Fold\ col&umn\ width.\ &0\ :set fdc=0<CR>
! an 40.340.310.20 &Tools.&Folding.Fold\ col&umn\ width.\ &2\ :set fdc=2<CR>
! an 40.340.310.30 &Tools.&Folding.Fold\ col&umn\ width.\ &3\ :set fdc=3<CR>
! an 40.340.310.40 &Tools.&Folding.Fold\ col&umn\ width.\ &4\ :set fdc=4<CR>
! an 40.340.310.50 &Tools.&Folding.Fold\ col&umn\ width.\ &5\ :set fdc=5<CR>
! an 40.340.310.60 &Tools.&Folding.Fold\ col&umn\ width.\ &6\ :set fdc=6<CR>
! an 40.340.310.70 &Tools.&Folding.Fold\ col&umn\ width.\ &7\ :set fdc=7<CR>
! an 40.340.310.80 &Tools.&Folding.Fold\ col&umn\ width.\ &8\ :set fdc=8<CR>
endif " has folding

if has("diff")
--- 510,523 ----
an 40.340.240 &Tools.&Folding.Delete\ &All\ Folds<Tab>zD zD
" moving around in folds
an 40.340.300 &Tools.&Folding.-SEP2- <Nop>
! an 40.340.310.10 &Tools.&Folding.Fold\ Col&umn\ Width.\ &0\ :set fdc=0<CR>
! an 40.340.310.20 &Tools.&Folding.Fold\ Col&umn\ Width.\ &2\ :set fdc=2<CR>
! an 40.340.310.30 &Tools.&Folding.Fold\ Col&umn\ Width.\ &3\ :set fdc=3<CR>
! an 40.340.310.40 &Tools.&Folding.Fold\ Col&umn\ Width.\ &4\ :set fdc=4<CR>
! an 40.340.310.50 &Tools.&Folding.Fold\ Col&umn\ Width.\ &5\ :set fdc=5<CR>
! an 40.340.310.60 &Tools.&Folding.Fold\ Col&umn\ Width.\ &6\ :set fdc=6<CR>
! an 40.340.310.70 &Tools.&Folding.Fold\ Col&umn\ Width.\ &7\ :set fdc=7<CR>
! an 40.340.310.80 &Tools.&Folding.Fold\ Col&umn\ Width.\ &8\ :set fdc=8<CR>
endif " has folding

if has("diff")
***************
*** 531,537 ****
an 40.520 &Tools.-SEP3- <Nop>
an <silent> 40.530 &Tools.&Convert\ to\ HEX<Tab>:%!xxd
\ :call <SID>XxdConv()<CR>
! an <silent> 40.540 &Tools.Conve&rt\ back<Tab>:%!xxd\ -r
\ :call <SID>XxdBack()<CR>

" Use a function to do the conversion, so that it also works with 'insertmode'
--- 545,551 ----
an 40.520 &Tools.-SEP3- <Nop>
an <silent> 40.530 &Tools.&Convert\ to\ HEX<Tab>:%!xxd
\ :call <SID>XxdConv()<CR>
! an <silent> 40.540 &Tools.Conve&rt\ Back<Tab>:%!xxd\ -r
\ :call <SID>XxdBack()<CR>

" Use a function to do the conversion, so that it also works with 'insertmode'
***************
*** 574,600 ****
endif
endfun

" Setup the Tools.Compiler submenu
! let s:n = globpath(&runtimepath, "compiler/*.vim")
! let s:idx = 100
! while strlen(s:n) > 0
! let s:i = stridx(s:n, "\n")
! if s:i < 0
! let s:name = s:n
! let s:n = ""
! else
! let s:name = strpart(s:n, 0, s:i)
! let s:n = strpart(s:n, s:i + 1, 19999)
endif
! " Ignore case for VMS and windows
! let s:name = substitute(s:name, '\c.*[/\\:\]]\([^/\\:]*\)\.vim', '\1', '')
! exe "an 30.440." . s:idx . ' &Tools.Se&T\ Compiler.' . s:name . " :compiler " . s:name . "<CR>"
! unlet s:name
! unlet s:i
! let s:idx = s:idx + 10
! endwhile
! unlet s:n
! unlet s:idx

if !exists("no_buffers_menu")

--- 588,633 ----
endif
endfun

+ let s:did_setup_compilers = 0
+
" Setup the Tools.Compiler submenu
! func! s:SetupCompilers() abort
! if s:did_setup_compilers
! return
endif
! let s:did_setup_compilers = 1
!
! let n = globpath(&runtimepath, "compiler/*.vim", 1, 1)
! let idx = 100
! for name in n
! " Ignore case for VMS and windows
! let name = substitute(name, '\c.*[/\\:\]]\([^/\\:]*\)\.vim', '\1', '')
! exe "an 30.440." . idx . ' &Tools.Se&t\ Compiler.' . name . " :compiler " . name . "<CR>"
! let idx = idx + 10
! endfor
! silent! aunmenu &Tools.Show\ Compiler\ Se&ttings\ in\ Menu
! endfun
! if exists("do_no_lazyload_menus")
! call s:SetupCompilers()
! else
! an <silent> 30.440 &Tools.Show\ Compiler\ Se&ttings\ in\ Menu :call <SID>SetupCompilers()<CR>
! endif
!
! " Load ColorScheme, Compiler Setting and Keymap menus when idle.
! if !exists("do_no_lazyload_menus")
! func! s:SetupLazyloadMenus()
! call s:SetupColorSchemes()
! call s:SetupCompilers()
! if has("keymap")
! call s:SetupKeymaps()
! endif
! endfunc
! augroup SetupLazyloadMenus
! au!
! au CursorHold,CursorHoldI * call <SID>SetupLazyloadMenus() | au! SetupLazyloadMenus
! augroup END
! endif
!

if !exists("no_buffers_menu")

***************
*** 829,836 ****
an 70.350 &Window.-SEP2- <Nop>
an 70.355 &Window.Move\ &To.&Top<Tab>^WK <C-W>K
an 70.355 &Window.Move\ &To.&Bottom<Tab>^WJ <C-W>J
! an 70.355 &Window.Move\ &To.&Left\ side<Tab>^WH <C-W>H
! an 70.355 &Window.Move\ &To.&Right\ side<Tab>^WL <C-W>L
an 70.360 &Window.Rotate\ &Up<Tab>^WR <C-W>R
an 70.362 &Window.Rotate\ &Down<Tab>^Wr <C-W>r
an 70.365 &Window.-SEP3- <Nop>
--- 862,869 ----
an 70.350 &Window.-SEP2- <Nop>
an 70.355 &Window.Move\ &To.&Top<Tab>^WK <C-W>K
an 70.355 &Window.Move\ &To.&Bottom<Tab>^WJ <C-W>J
! an 70.355 &Window.Move\ &To.&Left\ Side<Tab>^WH <C-W>H
! an 70.355 &Window.Move\ &To.&Right\ Side<Tab>^WL <C-W>L
an 70.360 &Window.Rotate\ &Up<Tab>^WR <C-W>R
an 70.362 &Window.Rotate\ &Down<Tab>^Wr <C-W>r
an 70.365 &Window.-SEP3- <Nop>
***************
*** 913,919 ****
let s:suglist = spellsuggest(w, 10)
endif
if len(s:suglist) > 0
! let s:changeitem = 'change\ "' . escape(w, ' .'). '"\ to'
let s:fromword = w
let pri = 1
" set 'cpo' to include the <CR>
--- 946,952 ----
let s:suglist = spellsuggest(w, 10)
endif
if len(s:suglist) > 0
! let s:changeitem = 'Change\ "' . escape(w, ' .'). '"\ to'
let s:fromword = w
let pri = 1
" set 'cpo' to include the <CR>
***************
*** 925,934 ****
let pri += 1
endfor

! let s:additem = 'add\ "' . escape(w, ' .') . '"\ to\ word\ list'
exe 'anoremenu 1.6 PopUp.' . s:additem . ' :spellgood ' . w . '<CR>'

! let s:ignoreitem = 'ignore\ "' . escape(w, ' .') . '"'
exe 'anoremenu 1.7 PopUp.' . s:ignoreitem . ' :spellgood! ' . w . '<CR>'

anoremenu 1.8 PopUp.-SpellSep- :
--- 958,967 ----
let pri += 1
endfor

! let s:additem = 'Add\ "' . escape(w, ' .') . '"\ to\ Word\ List'
exe 'anoremenu 1.6 PopUp.' . s:additem . ' :spellgood ' . w . '<CR>'

! let s:ignoreitem = 'Ignore\ "' . escape(w, ' .') . '"'
exe 'anoremenu 1.7 PopUp.' . s:ignoreitem . ' :spellgood! ' . w . '<CR>'

anoremenu 1.8 PopUp.-SpellSep- :
***************
*** 1067,1073 ****
if !exists("did_install_syntax_menu")
an 50.212 &Syntax.&Manual :syn manual<CR>
an 50.214 &Syntax.A&utomatic :syn on<CR>
! an <silent> 50.216 &Syntax.on/off\ for\ &This\ file :call <SID>SynOnOff()<CR>
if !exists("*s:SynOnOff")
fun s:SynOnOff()
if has("syntax_items")
--- 1100,1106 ----
if !exists("did_install_syntax_menu")
an 50.212 &Syntax.&Manual :syn manual<CR>
an 50.214 &Syntax.A&utomatic :syn on<CR>
! an <silent> 50.216 &Syntax.On/Off\ for\ &This\ File :call <SID>SynOnOff()<CR>
if !exists("*s:SynOnOff")
fun s:SynOnOff()
if has("syntax_items")
***************
*** 1095,1108 ****
if exists("do_syntax_sel_menu")
runtime! synmenu.vim
else
! an 50.10 &Syntax.&Show\ filetypes\ in\ menu :let do_syntax_sel_menu = 1<Bar>runtime! synmenu.vim<Bar>aunmenu &Syntax.&Show\ filetypes\ in\ menu<CR>
an 50.195 &Syntax.-SEP1- <Nop>
endif

an 50.210 &Syntax.&Off :syn off<CR>
an 50.700 &Syntax.-SEP3- <Nop>
! an 50.710 &Syntax.Co&lor\ test :sp $VIMRUNTIME/syntax/colortest.vim<Bar>so %<CR>
! an 50.720 &Syntax.&Highlight\ test :runtime syntax/hitest.vim<CR>
an 50.730 &Syntax.&Convert\ to\ HTML :runtime syntax/2html.vim<CR>

endif " !exists("did_install_syntax_menu")
--- 1128,1141 ----
if exists("do_syntax_sel_menu")
runtime! synmenu.vim
else
! an <silent> 50.10 &Syntax.&Show\ File\ Types\ in\ Menu :let do_syntax_sel_menu = 1<Bar>runtime! synmenu.vim<Bar>aunmenu &Syntax.&Show\ File\ Types\ in\ Menu<CR>
an 50.195 &Syntax.-SEP1- <Nop>
endif

an 50.210 &Syntax.&Off :syn off<CR>
an 50.700 &Syntax.-SEP3- <Nop>
! an 50.710 &Syntax.Co&lor\ Test :sp $VIMRUNTIME/syntax/colortest.vim<Bar>so %<CR>
! an 50.720 &Syntax.&Highlight\ Test :runtime syntax/hitest.vim<CR>
an 50.730 &Syntax.&Convert\ to\ HTML :runtime syntax/2html.vim<CR>

endif " !exists("did_install_syntax_menu")
*** ../vim-8.0.1278/src/version.c 2017-11-09 18:33:22.412374650 +0100
--- src/version.c 2017-11-09 18:49:21.905690822 +0100
***************
*** 763,764 ****
--- 763,766 ----
{ /* Add new patch number below this line */
+ /**/
+ 1279,
/**/

--
THEOREM: VI is perfect.
PROOF: VI in roman numerals is 6. The natural numbers < 6 which divide 6 are
1, 2, and 3. 1+2+3 = 6. So 6 is a perfect number. Therefore, VI is perfect.
QED
-- Arthur Tateishi

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages