From 137efc71a6647047d84a324d6c1861216901ec72 Mon Sep 17 00:00:00 2001 From: Michael Campagnaro Date: Fri, 24 Nov 2023 19:48:11 -0500 Subject: [PATCH] Disable treating special characters are regex when doing a vim search --- .vimrc | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/.vimrc b/.vimrc index 590d8dc..3e69f66 100644 --- a/.vimrc +++ b/.vimrc @@ -615,17 +615,31 @@ noremap noremap m :vsplit noremap mm :split -" Faster way to activate the 'a' register. This is useful for putting different -" lines of text into the 'a' register and then pasting it as a group. -" You need to first use `a` and then subsequent use is A. -" The paste command will use this content until you do something with a -" different register. You can later paste the 'a' contents using `a p` +" Disable treating special characters as regex when doing searches as it's so +" fucking annoying having to escape them, particularly periods and asterisk. +" This is done by setting the 'very nomagic' setting \V. +nnoremap / /\V + +"----------------------------------------------------- +" 'a' register helpers +" +" Faster way to activate the 'a' named register. These registers can be used +" for various operations like yanking (copying), deleting, and pasting text. +" Each register is identified by a single character. For example, there are +" named registers 'a' to 'z', where text yanked or deleted can be specifically +" stored and later retrieved. +" +" First activate the register with a and then do your yank, delete or +" paste. Subsequent yanks into a will overwrite existing data. You can +" append to the register by using aa +" " This overwrites the contents of a. noremap a "a " This appends to a. noremap aa "A +"----------------------------------------------------- " Backward replace word including cursor character. noremap d cvb