Skip to content

Commit

Permalink
add keymap
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenyangze committed Mar 29, 2023
1 parent 75d66e4 commit af3c8dd
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions layers/user/edit.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
" 自动标记文件编辑的位置
function! SetFileMark()
if &filetype != 'nerdtree' && &filetype != 'qf' && &filetype != 'tagbar' && &filetype != 'terminal'
execute "normal! m\P" |
execute "normal! `\P"
endif
endfunction

augroup mark_position
autocmd!
autocmd InsertEnter * call SetFileMark()
augroup END

nnoremap <silent> ,i `P

0 comments on commit af3c8dd

Please sign in to comment.