]> git.rmz.io Git - dotfiles.git/blobdiff - vim/ftplugin/gitrebase.vim
lazyvim: absorb icons into rmz.util.ui
[dotfiles.git] / vim / ftplugin / gitrebase.vim
index 7a157042e8280c6d111f0e4d793bac14b9494b22..897aaf69fb8e7bae33170439c080a68e3ba47b70 100644 (file)
@@ -1,5 +1,16 @@
-nnoremap <leader>p :Pick<cr>
-nnoremap <leader>s :Squash<cr>
-nnoremap <leader>e :Edit<cr>
-nnoremap <leader>r :Reword<cr>
-nnoremap <leader>f :Fixup<cr>
+setlocal nomodeline   " first line might contain 'vim:'
+
+nnoremap <buffer> <nowait> <leader>p :Pick<cr>
+nnoremap <buffer> <nowait> <leader>s :Squash<cr>
+nnoremap <buffer> <nowait> <leader>e :Edit<cr>
+nnoremap <buffer> <nowait> <leader>r :Reword<cr>
+nnoremap <buffer> <nowait> <leader>f :Fixup<cr>
+nnoremap <buffer> <nowait> <leader>d :Drop<cr>
+
+" used to be part of vim, now removed see
+" https://github.com/tpope/vim-git/commit/3a96b1bca
+" https://github.com/tpope/vim-git/commit/6ee5e1f20
+let &l:keywordprg = 'git show'
+nnoremap <buffer> <expr> K col('.') < 7 && expand('<Lt>cword>') =~ '\X' && getline('.') =~ '^\w\+\s\+\x\+\>' ? 'wK' : 'K'
+
+let b:undo_ftplugin = "setl keywordprg< |exe 'nunmap <buffer> K'"