Mercurial > vim
diff runtime/ftplugin/gdscript.vim @ 30324:0827d3d6d8c0
Update runtime files
Commit: https://github.com/vim/vim/commit/9712ff1288f942736ed76c0dec014909f067eec9
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Sep 18 13:04:22 2022 +0100
Update runtime files
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 18 Sep 2022 14:15:05 +0200 |
parents | ebed259f919f |
children |
line wrap: on
line diff
--- a/runtime/ftplugin/gdscript.vim +++ b/runtime/ftplugin/gdscript.vim @@ -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