aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2021-11-14 08:36:13 +0900
committernsfisis <nsfisis@gmail.com>2021-11-14 08:36:13 +0900
commitfdd1058f4a09468480213f8e84fda7f56c252588 (patch)
treeddcb85150f9772587bd0e8f032649b045bffa096
parent2043676949a0b7eb85d2f627e0ac441e38044de2 (diff)
downloaddotfiles-fdd1058f4a09468480213f8e84fda7f56c252588.tar.gz
dotfiles-fdd1058f4a09468480213f8e84fda7f56c252588.tar.zst
dotfiles-fdd1058f4a09468480213f8e84fda7f56c252588.zip
vim: disable Ex mode
-rw-r--r--.vimrc14
1 files changed, 9 insertions, 5 deletions
diff --git a/.vimrc b/.vimrc
index 13a6b55..b845488 100644
--- a/.vimrc
+++ b/.vimrc
@@ -655,8 +655,8 @@ endfunction
" Mappings {{{1
" Note: |:noremap| defines mappings in |Normal|, |Visual|, |Operator-Pending|
-" and |Select| mode. Because I don't use |Select| mode, |:noremap| is executed
-" as substitute of |:nnoremap|, |:xnoremap| and |:onoremap| for simplicity.
+" and |Select| mode. Because I don't use |Select| mode, I use |:noremap| as
+" substitute of |:nnoremap|, |:xnoremap| and |:onoremap| for simplicity.
" Fix the search direction. {{{2
@@ -712,7 +712,7 @@ nnoremap @N N.
nnoremap @a 9999@@
-" Execute the laste executed macro again.
+" Execute the last executed macro again.
nnoremap ` @@
@@ -1050,13 +1050,17 @@ xnoremap g- g<C-x>
-" Disable unuseful mappings. {{{2
+" Disable unuseful or dangerous mappings. {{{2
-" Avoid entering Select mode.
+" Disable Select mode.
nnoremap gh <Nop>
nnoremap gH <Nop>
nnoremap g<C-h> <Nop>
+" Disable Ex mode.
+nnoremap Q <Nop>
+nnoremap gQ <Nop>
+
nnoremap ZZ <Nop>
nnoremap ZQ <Nop>