mirror of
https://github.com/vim/vim.git
synced 2025-07-04 23:07:33 -04:00
Add option guard and undo
Signed-off-by: Rob B <github@0x7e.net>
This commit is contained in:
parent
c8e39c0127
commit
a5da18c6ab
@ -49,10 +49,17 @@ if !exists('*' .. expand('<SID>') .. 'GoKeywordPrg')
|
||||
endfunc
|
||||
endif
|
||||
|
||||
noremap <silent> <buffer> ]] <Cmd>call <SID>GoFindSection('next_start', v:count1)<CR>
|
||||
noremap <silent> <buffer> ][ <Cmd>call <SID>GoFindSection('next_end', v:count1)<CR>
|
||||
noremap <silent> <buffer> [[ <Cmd>call <SID>GoFindSection('prev_start', v:count1)<CR>
|
||||
noremap <silent> <buffer> [] <Cmd>call <SID>GoFindSection('prev_end', v:count1)<CR>
|
||||
if !exists("no_plugin_maps") && !exists("no_go_maps")
|
||||
noremap <silent> <buffer> ]] <Cmd>call <SID>GoFindSection('next_start', v:count1)<CR>
|
||||
noremap <silent> <buffer> ][ <Cmd>call <SID>GoFindSection('next_end', v:count1)<CR>
|
||||
noremap <silent> <buffer> [[ <Cmd>call <SID>GoFindSection('prev_start', v:count1)<CR>
|
||||
noremap <silent> <buffer> [] <Cmd>call <SID>GoFindSection('prev_end', v:count1)<CR>
|
||||
let b:undo_ftplugin ..= ''
|
||||
\ . '| unmap <buffer> ]]'
|
||||
\ . '| unmap <buffer> ]['
|
||||
\ . '| unmap <buffer> [['
|
||||
\ . '| unmap <buffer> []'
|
||||
endif
|
||||
|
||||
function! <SID>GoFindSection(dir, count)
|
||||
mark '
|
||||
|
Loading…
x
Reference in New Issue
Block a user