aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-12-29 22:09:24 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-12-29 22:09:24 +1300
commit8764b301085e6323f0cadce8462e506a2dbea493 (patch)
treef7cdad06710e612b3be08d86018b6679945bc3cb
parent910ae99ce28f432f980f04d3aca614156527225e (diff)
downloaddotfiles-8764b301085e6323f0cadce8462e506a2dbea493.tar.gz
Add regex_escape.vim plugin
-rw-r--r--.gitmodules3
m---------vim/bundle/regex_escape0
-rw-r--r--vim/vimrc4
3 files changed, 7 insertions, 0 deletions
diff --git a/.gitmodules b/.gitmodules
index f13f3697..350261c6 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -44,6 +44,9 @@
[submodule "vim/bundle/redact_pass"]
path = vim/bundle/redact_pass
url = https://sanctum.geek.nz/code/vim-redact-pass.git
+[submodule "vim/bundle/regex_escape"]
+ path = vim/bundle/regex_escape
+ url = https://sanctum.geek.nz/code/vim-regex-escape.git
[submodule "vim/bundle/replace_operator"]
path = vim/bundle/replace_operator
url = https://sanctum.geek.nz/code/vim-replace-operator.git
diff --git a/vim/bundle/regex_escape b/vim/bundle/regex_escape
new file mode 160000
+Subproject 57608dd23b6be224c74a03f2d27112b9b08f481
diff --git a/vim/vimrc b/vim/vimrc
index 122a108d..608f9a2b 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -405,6 +405,10 @@ nnoremap <Leader>/ :<C-U>vimgrep /\c/j **<S-Left><S-Left><Right>
" \? types :helpgrep for me ready to enter a search pattern
nnoremap <Leader>? :<C-U>helpgrep \c<S-Left>
+" \\ escapes regex metacharacters
+nmap <Leader>\ <Plug>(RegexEscape)
+xmap <Leader>\ <Plug>(RegexEscape)
+
" \DEL deletes the current buffer
nnoremap <Leader><Delete> :bdelete<CR>
" \INS edits a new buffer