Disable treating special characters are regex when doing a vim search

This commit is contained in:
Michael Campagnaro 2023-11-24 19:48:11 -05:00
parent 98c74416e8
commit 137efc71a6

24
.vimrc
View File

@ -615,17 +615,31 @@ noremap <c-h> <c-w><Left>
noremap <leader>m :vsplit<cr> noremap <leader>m :vsplit<cr>
noremap <leader>mm :split<cr> noremap <leader>mm :split<cr>
" Faster way to activate the 'a' register. This is useful for putting different " Disable treating special characters as regex when doing searches as it's so
" lines of text into the 'a' register and then pasting it as a group. " fucking annoying having to escape them, particularly periods and asterisk.
" You need to first use `<leader>a` and then subsequent use is <leader>A. " This is done by setting the 'very nomagic' setting \V.
" The paste command will use this content until you do something with a nnoremap / /\V
" different register. You can later paste the 'a' contents using `<leader>a p`
"-----------------------------------------------------
" '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 <leader>a and then do your yank, delete or
" paste. Subsequent yanks into <leader>a will overwrite existing data. You can
" append to the register by using <leader>aa
"
" This overwrites the contents of a. " This overwrites the contents of a.
noremap <leader>a "a noremap <leader>a "a
" This appends to a. " This appends to a.
noremap <leader>aa "A noremap <leader>aa "A
"-----------------------------------------------------
" Backward replace word including cursor character. " Backward replace word including cursor character.
noremap <leader>d cvb noremap <leader>d cvb