Skip to content

Commit

Permalink
✨feat: gngpの入力を連続でできるように
Browse files Browse the repository at this point in the history
  • Loading branch information
utubo committed Dec 3, 2024
1 parent e79a1d6 commit 598fbe1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .vim/autoload/vimrc/lazyload.vim
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,10 @@ au vimrc SafeState * ++once B()
enddef
au vimrc BufReadPost * C()
C()
nn gn <Cmd>bnext<CR>
nn gp <Cmd>bprevious<CR>
nm <SID>(buf)n <Cmd>bnext<CR><SID>(buf)
nm <SID>(buf)p <Cmd>bprevious<CR><SID>(buf)
nm gn <SID>(buf)n
nm gp <SID>(buf)p
g:recentBufnr = 0
au vimrc BufLeave * g:recentBufnr = bufnr()
nn <expr> gr $"\<Cmd>b{g:recentBufnr}\<CR>"
Expand Down
6 changes: 4 additions & 2 deletions src/.vim/autoload/vimrc/lazyload.src.vim
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,10 @@ SetupTabstopLazy()

# ------------------------------------------------------
# バッファ操作 {{{
nnoremap gn <Cmd>bnext<CR>
nnoremap gp <Cmd>bprevious<CR>
nmap <SID>(buf)n <Cmd>bnext<CR><SID>(buf)
nmap <SID>(buf)p <Cmd>bprevious<CR><SID>(buf)
nmap gn <SID>(buf)n
nmap gp <SID>(buf)p
g:recentBufnr = 0
au vimrc BufLeave * g:recentBufnr = bufnr()
nnoremap <expr> gr $"\<Cmd>b{g:recentBufnr}\<CR>"
Expand Down

0 comments on commit 598fbe1

Please sign in to comment.