Add a keyboard shortcut that opens a new tab with vimdiff showing VCS differences for the current file

This commit is contained in:
Kevin MacMartin 2024-03-05 18:14:53 -05:00
parent 432d4768db
commit 4311324119

View file

@ -77,6 +77,8 @@
" # | (N) -> center vertically on nth last search term " # | (N) -> center vertically on nth last search term
" "
" (toggles and features) " (toggles and features)
" <Leader>d | (N) -> VCS vimdiff in a new tab with signify
"
" ik | (N) -> add cursor character as a keyword " ik | (N) -> add cursor character as a keyword
" iK | (N) -> remove cursor character as a keyword " iK | (N) -> remove cursor character as a keyword
" "
@ -404,6 +406,9 @@
"} "}
"TOGGLES AND FEATURES:{ "TOGGLES AND FEATURES:{
"VCS vimdiff in a new tab with signify
nnoremap <silent><expr> <Leader>d ':SignifyDiff<CR>'
"add/remove cursor character as a keyword "add/remove cursor character as a keyword
nmap <expr><silent> <Leader>k ':execute "setlocal iskeyword+=".getline(".")[col(".")-1]<CR>:echo "The character ".getline(".")[col(".")-1]." has been added to iskeyword"<CR>' nmap <expr><silent> <Leader>k ':execute "setlocal iskeyword+=".getline(".")[col(".")-1]<CR>:echo "The character ".getline(".")[col(".")-1]." has been added to iskeyword"<CR>'
nmap <expr><silent> <Leader>K ':execute "setlocal iskeyword-=".getline(".")[col(".")-1]<CR>:echo "The character ".getline(".")[col(".")-1]." has been removed from iskeyword"<CR>' nmap <expr><silent> <Leader>K ':execute "setlocal iskeyword-=".getline(".")[col(".")-1]<CR>:echo "The character ".getline(".")[col(".")-1]." has been removed from iskeyword"<CR>'