Created
June 13, 2010 07:43
-
-
Save mmisono/436443 to your computer and use it in GitHub Desktop.
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
" http://github.com/eagletmt/dotfiles/blob/master/dot.vimrc | |
" find next help tagjump {{{2 | |
" original: http://d.hatena.ne.jp/mFumi/20100612/1276355084 | |
autocmd MyAutoCmd FileType help nnoremap <buffer> <silent> <Tab> :<C-u>call <SID>find_next_help_tagjump('W')<CR> | |
autocmd MyAutoCmd FileType help nnoremap <buffer> <silent> <S-Tab> :<C-u>call <SID>find_next_help_tagjump('bW')<CR> | |
function! s:find_next_help_tagjump(flag) " {{{ | |
let orig_view = winsaveview() | |
let helpHyperTextJump = '\\\@<!|[^"*|]\+|' | |
let helpOption1 = "'[a-z]\\{2,\\}'" | |
let helpOption2 = "'t_..'" | |
let regex = join([helpHyperTextJump, helpOption1, helpOption2], '\|') | |
while search(regex, a:flag) > 0 | |
if synIDattr(synID(line('.'), col('.'), 0), 'name') =~# '^\(helpBar\|helpOption\)$' | |
return | |
endif | |
endwhile | |
call winrestview(orig_view) | |
endfunction " }}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment