Created
September 25, 2014 12:00
-
-
Save hcs42/ce008b393e827c87e16b to your computer and use it in GitHub Desktop.
Make <c-w><c-]> work with vim-erlang-tags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! VimErlangTagsSelectSplit() | |
split | |
let orig_isk = &isk | |
set isk+=: | |
normal "_vawo | |
if getline('.')[col('.') - 2] =~# '[#?]' | |
normal h | |
endif | |
let &isk = orig_isk | |
endfunction | |
function! VimErlangTagsDefineMappings() | |
nnoremap <buffer> <c-]> :call VimErlangTagsSelect()<cr><c-]> | |
nnoremap <buffer> g<LeftMouse> :call VimErlangTagsSelect()<cr>g<LeftMouse> | |
nnoremap <buffer> <c-LeftMouse> :call VimErlangTagsSelect()<cr><c-LeftMouse> | |
nnoremap <buffer> g] :call VimErlangTagsSelect()<cr>g] | |
nnoremap <buffer> g<c-]> :call VimErlangTagsSelect()<cr>g<c-]> | |
nnoremap <buffer> <c-w><c-]> :call VimErlangTagsSelectSplit()<cr><c-]> | |
nnoremap <buffer> <c-w>] :call VimErlangTagsSelectSplit()<cr><c-]> | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment