summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2020-04-22 18:48:05 +0000
committerbrian m. carlson <sandals@crustytoothpaste.net>2020-04-22 18:48:05 +0000
commitd74a69607a07fe2304911096f2d5371375a71116 (patch)
treeb72860106de1dff31f73e3c880d5cf2e9dc39bea
parent1632d57732603904711f5408445a16af281717c2 (diff)
vimrc: swap mappings for "* and "+
On most systems, the "* and "+ registers both refer to the system clipboard. On X11, however, the former refers to the PRIMARY selection (the one chosen by highlighting with the mouse) and the latter refers to the CLIPBOARD selection (the one usually accessed with Ctrl-C and Ctrl-V). It's obvious that a double backslash is easier to type than a backslash and C, so the former should be used for the more common selection. Because the CLIPBOARD selection is easier to access with the keyboard, which is faster and more precise than using the middle button to paste, let's switch the mappings such that "+ maps to the double leader key. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
-rw-r--r--vim/vimrc6
1 files changed, 3 insertions, 3 deletions
diff --git a/vim/vimrc b/vim/vimrc
index cb57334..3f9aef7 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -110,9 +110,9 @@ endif
"" Maps.
" Show highlighting groups under cursor.
noremap <F10> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
-" "* is hard to type. Map it to something easier.
-noremap <Leader><Leader> "*
-noremap <Leader>c "+
+" "+ is hard to type. Map it to something easier.
+noremap <Leader><Leader> "+
+noremap <Leader>c "*
noremap <Leader>s "_
noremap <Leader>d "_d
" Trim trailing whitespace.