Update runtime files

This commit is contained in:
Bram Moolenaar
2022-09-18 13:04:22 +01:00
parent 65ee49decf
commit 9712ff1288
32 changed files with 703 additions and 331 deletions

View File

@ -41,14 +41,19 @@ def GDScriptFoldLevel(): string
enddef
# Next/Previous section
def NextSection(back: bool, cnt: number)
for n in range(cnt)
search('^\s*func\s', back ? 'bW' : 'W')
endfor
enddef
if !exists("g:no_plugin_maps")
# Next/Previous section
def NextSection(back: bool, cnt: number)
for n in range(cnt)
search('^\s*func\s', back ? 'bW' : 'W')
endfor
enddef
nnoremap <silent><buffer> ]] <scriptcmd>NextSection(false, v:count1)<CR>
nnoremap <silent><buffer> [[ <scriptcmd>NextSection(true, v:count1)<CR>
xmap <buffer><expr> ]] $'<C-\><C-N>{v:count1}]]m>gv'
xmap <buffer><expr> [[ $'<C-\><C-N>{v:count1}[[m>gv'
nnoremap <silent><buffer> ]] <scriptcmd>NextSection(false, v:count1)<CR>
nnoremap <silent><buffer> [[ <scriptcmd>NextSection(true, v:count1)<CR>
xmap <buffer><expr> ]] $'<C-\><C-N>{v:count1}]]m>gv'
xmap <buffer><expr> [[ $'<C-\><C-N>{v:count1}[[m>gv'
b:undo_ftplugin ..=
\ " | silent exe 'unmap <buffer> [['"
\ .. " | silent exe 'unmap <buffer> ]]'"
endif