aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2022-06-01 20:14:35 +0200
committerTeddy Wing2022-06-01 21:03:33 +0200
commit7da6f24af2750e12cae9448847952fa528399539 (patch)
tree175c5ef38fe01c6e959bfa734a516f6c01cbad51
parenta244f16725052c50113fc21bc39231104d6775bc (diff)
downloaddotvim-7da6f24af2750e12cae9448847952fa528399539.tar.bz2
vimrc: Add `yp` mapping to paste from the "0 register
Makes it easier to search and replace with `n` and visual selection. Though perhaps `gn` would solve this? Though not in cases where I need to replace something that's different from the search pattern.
-rw-r--r--vimrc7
1 files changed, 7 insertions, 0 deletions
diff --git a/vimrc b/vimrc
index 64ca434..66c2b2a 100644
--- a/vimrc
+++ b/vimrc
@@ -489,6 +489,9 @@
" * Prevent Paredit from changing filetype plugin and indent settings.
" * Remove Slimv settings.
"
+" 2022.06.01:
+" * Add `yp` mapping to paste from the "0 register.
+"
" Pathogen
@@ -887,6 +890,10 @@ cnoremap <Esc>f <S-Right>
" Read from OS X pasteboard for faster pasting
nnoremap <leader>p :read !pbpaste<cr>:silent! call repeat#set("\<leader>p")<cr>
+" Easier pasting from the previous yank.
+nnoremap yp "0p
+xnoremap yp "0p
+
nnoremap <leader>gb :GitBlamer<cr>
nnoremap <leader>gp :!git log -p -- %<cr>