Skip to content

Commit 0966b86

Browse files
committed
mappings: restore "q" mapping, soft-deprecate "gq"
Essentially reverts cfc66aa. - `q` is much more ergonomic than `gq`. - `q` continues to win in the wild, and is used for e.g. quitting a `:Man` buffer. - "quit" is a vastly more-common use-case than "record a macro". - One can use a mapping like `\q` to opt-in to macro recording when it is needed.
1 parent aed4e49 commit 0966b86

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

doc/dirvish.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ Buffer-local (filetype=dirvish) ~
4848
Sets |g:dirvish_mode| to [count], if given.
4949
Mnemonic: higher [count] => more files.
5050
<Plug>(dirvish_quit)
51-
gq Quits and returns to the original file.
51+
q Quits and returns to the original file.
52+
gq Alias to "q". May be removed in the future.
5253
<2-LeftMouse>
5354
i
5455
<CR> Opens file at cursor.

ftplugin/dirvish.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ let s:nowait = (v:version > 703 ? '<nowait>' : '')
77
let s:sep = exists('+shellslash') && !&shellslash ? '\' : '/'
88

99
if !hasmapto('<Plug>(dirvish_quit)', 'n')
10+
execute 'nmap '.s:nowait.'<buffer> q <Plug>(dirvish_quit)'
1011
execute 'nmap '.s:nowait.'<buffer> gq <Plug>(dirvish_quit)'
1112
endif
1213
if !hasmapto('<Plug>(dirvish_arg)', 'n')

0 commit comments

Comments
 (0)