VIM: Adds bindings to default to "very magic" searching
By default, vim's reg-ex matching is weird. For example:
> * is special when not escaped but…
> + is special when escaped
> \{x,y} (escaping only the opening bracket) works but…
> You have to use \( \) (escape both parens)
> [] is special when both are unescaped
Source: https://wincent.com/wiki/Vim_regexes
For more details, check out Greg Hurrell's screencast:
https://www.youtube.com/watch?v=VjOcINs6QWs
This commit is contained in:
parent
7a4a785ac7
commit
c050efe3b5
1 changed files with 4 additions and 0 deletions
|
|
@ -67,3 +67,7 @@ nnoremap <leader>cL :w! \| !compiler <c-r>% letter<CR>
|
|||
" Opens the compiled documents
|
||||
" If something like html, it doesn't need to be compiled first
|
||||
nnoremap <leader>co :!opout <c-r>%<CR><CR>
|
||||
|
||||
" Makes vim default to "very magic" searching
|
||||
nnoremap / /\v
|
||||
vnoremap / /\v
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue