From fdd1058f4a09468480213f8e84fda7f56c252588 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 14 Nov 2021 08:36:13 +0900 Subject: vim: disable Ex mode --- .vimrc | 14 +++++++++----- 1 file 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 -" Disable unuseful mappings. {{{2 +" Disable unuseful or dangerous mappings. {{{2 -" Avoid entering Select mode. +" Disable Select mode. nnoremap gh nnoremap gH nnoremap g +" Disable Ex mode. +nnoremap Q +nnoremap gQ + nnoremap ZZ nnoremap ZQ -- cgit v1.2.3-70-g09d2