Skip to content

Instantly share code, notes, and snippets.

@tamago324
Last active May 6, 2022 23:38
Show Gist options
  • Save tamago324/91b762c8c8ffa526d9f36e1d5688e4f6 to your computer and use it in GitHub Desktop.
Save tamago324/91b762c8c8ffa526d9f36e1d5688e4f6 to your computer and use it in GitHub Desktop.
exec "normal! \<Tab>" がうまく実行できなかったため、その対応
nnoremap <Plug>MyplusejumpTab <C-i>
function! s:jump(cmd) abort
let l:bufname = bufname('%')
if a:cmd ==# 'next'
" exec "normal! \<Tab>"
exec "normal <Plug>MyplusejumpTab"
else
exec "normal! \<C-o>"
endif
let l:new_bufname = bufname('%')
if l:bufname !=# l:new_bufname
call search_pulse#Pulse(v:true)
endif
endfunction
nnoremap <silent> <C-o> <Cmd>call <SID>jump('prev')<CR>
nnoremap <silent> <Tab> <Cmd>call <SID>jump("next")<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment