Using q in man.vim prevents q/, q? from working.
It would be convenient to use gq as a shortcut to close man window - the same way as vim-fugitive does.
https://github.com/vim/vim/pull/8210
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
@andrey-starodubtsev pushed 1 commit.
—
You are receiving this because you are subscribed to this thread.
Merging #8210 (6c5cad2) into master (847fe7d) will not change coverage.
The diff coverage isn/a.
@@ Coverage Diff @@ ## master #8210 +/- ## ======================================= Coverage 2.46% 2.46% ======================================= Files 146 146 Lines 161675 161675 ======================================= Hits 3990 3990 Misses 157685 157685
| Flag | Coverage Δ | |
|---|---|---|
| huge-gcc-unittests | 2.46% <ø> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered by Codecov. Last update 847fe7d...6c5cad2. Read the comment docs.
@andrey-starodubtsev pushed 1 commit.
—
You are receiving this because you are subscribed to this thread.
Hmm, but "gq" is also a valid command. And it's not shorter than just typing ":q", which everybody knows.
Well, on the other hand gq isn't applicable to buffers which are marked as nomodifiable.
How about just dropping the "q" mapping?
I'm all for it; force-pushed removal of q in 55f3ac1.
Hmm, but "gq" is also a valid command.
But gq would not be used in a manpage because the latter is meant to be read, not edited.
And it's not shorter than just typing ":q", which everybody knows.
We still have to press Enter to execute :q, so that's 3 keypresses against 2 for gq.
How about just dropping the "q" mapping?
Or we could double the q in the lhs.
diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt index 8cb2e118a..411c45333 100644 --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -607,7 +607,7 @@ Global mapping: Local mappings: CTRL-] Jump to the manual page for the word under the cursor. CTRL-T Jump back to the previous manual page. -q Same as the |:quit| command. +qq Same as the |:quit| command. To use a vertical split instead of horizontal: > let g:ft_man_open_mode = 'vert' diff --git a/runtime/ftplugin/man.vim b/runtime/ftplugin/man.vim index fbe6c5a12..7b425b809 100644 --- a/runtime/ftplugin/man.vim +++ b/runtime/ftplugin/man.vim @@ -36,14 +36,14 @@ if &filetype == "man" nnoremap <buffer> <silent> <c-]> :call <SID>PreGetPage(v:count)<CR> nnoremap <buffer> <silent> <c-t> :call <SID>PopPage()<CR> - nnoremap <buffer> <silent> q :q<CR> + nnoremap <buffer> <silent> qq :q<CR> " Add undo commands for the maps let b:undo_ftplugin = b:undo_ftplugin \ . '|silent! nunmap <buffer> <Plug>ManBS' \ . '|silent! nunmap <buffer> <c-]>' \ . '|silent! nunmap <buffer> <c-t>' - \ . '|silent! nunmap <buffer> q' + \ . '|silent! nunmap <buffer> qq' endif if exists('g:ft_man_folding_enable') && (g:ft_man_folding_enable == 1)
The only command which would be shadowed is the one starting a recording in the q register. But it's already broken in the current version of the man plugin. In fact, all recordings are currently broken. With this patch, only the q recording would remain broken.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
![]()
Or we could double the q in the lhs.
Never mind, that's a bad idea. If the user has started a recording in a different window, the mapping would interfere if they try to end the recording in the man window.
—
You are receiving this because you are subscribed to this thread.
How about Q instead? Maybe most users, like @ andrey-starodubtsev, while reading man pages in Vim rather record a macro or open a command-line window than "Ex" mode.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Ah, bummer. This makes man <prog> slightly less ergonomic for me. But I think I can re-add the mapping myself with a filetype plugin or similar.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()