Remove unnecessary leading space in prompt from mappings

We often use the pattern «map global normal ": foo"».  The space
after the colon is unnecessary since execution of the mapping won't
add to history anyway, since 217dd6a1d (Disable history when executing
maps, 2015-11-10).
With the parent commit, the space is no longer necessary for user
mappings, so there is no reason to continue the cargo-cult.

Remove the space from mappings to set a good example.
This commit is contained in:
Johannes Altmanninger 2022-07-30 22:28:02 +02:00
parent a36473f4bb
commit 395f438378
6 changed files with 12 additions and 12 deletions

View File

@ -4,7 +4,7 @@ hook global BufCreate .*\.(diff|patch) %{
hook global WinSetOption filetype=diff %{ hook global WinSetOption filetype=diff %{
require-module diff require-module diff
map buffer normal <ret> %{: diff-jump<ret>} map buffer normal <ret> :diff-jump<ret>
} }
hook -group diff-highlight global WinSetOption filetype=diff %{ hook -group diff-highlight global WinSetOption filetype=diff %{

View File

@ -4,9 +4,9 @@ hook global BufCreate .+\.eml %{
hook global WinSetOption filetype=mail %{ hook global WinSetOption filetype=mail %{
require-module mail require-module mail
map buffer normal <ret> %{: diff-jump<ret>} map buffer normal <ret> :diff-jump<ret>
hook -once -always window WinSetOption filetype=.* %{ hook -once -always window WinSetOption filetype=.* %{
unmap buffer normal <ret> %{: diff-jump<ret>} unmap buffer normal <ret> :diff-jump<ret>
} }
} }

View File

@ -131,7 +131,7 @@ define-command -params 1 -hidden doc-render %{
set-option buffer readonly true set-option buffer readonly true
add-highlighter buffer/ ranges doc_render_ranges add-highlighter buffer/ ranges doc_render_ranges
add-highlighter buffer/ wrap -word -indent add-highlighter buffer/ wrap -word -indent
map buffer normal <ret> ': doc-follow-link<ret>' map buffer normal <ret> :doc-follow-link<ret>
} }
define-command -params 0..2 \ define-command -params 0..2 \

View File

@ -104,8 +104,8 @@ define-command -params 1.. \
# We need to unmap in case an existing buffer changes type, # We need to unmap in case an existing buffer changes type,
# for example if the user runs "git show" and "git status". # for example if the user runs "git show" and "git status".
map_diff_goto_source=$([ -n "${map_diff_goto_source}" ] \ map_diff_goto_source=$([ -n "${map_diff_goto_source}" ] \
&& printf %s "map buffer normal <ret> %[: git-diff-goto-source<ret>] -docstring 'Jump to source from git diff'" \ && printf %s "map buffer normal <ret> :git-diff-goto-source<ret> -docstring 'Jump to source from git diff'" \
|| printf %s "unmap buffer normal <ret> %[: git-diff-goto-source<ret>]") || printf %s "unmap buffer normal <ret> :git-diff-goto-source<ret>")
printf %s "evaluate-commands -try-client '$kak_opt_docsclient' %{ printf %s "evaluate-commands -try-client '$kak_opt_docsclient' %{
edit! -fifo ${output} *git* edit! -fifo ${output} *git*

View File

@ -14,7 +14,7 @@ hook -group man-highlight global WinSetOption filetype=man %{
# References to other manpages # References to other manpages
add-highlighter window/man-highlight/ regex [-a-zA-Z0-9_.]+\([a-z0-9]+\) 0:header add-highlighter window/man-highlight/ regex [-a-zA-Z0-9_.]+\([a-z0-9]+\) 0:header
map window normal <ret> ': man-jump<ret>' map window normal <ret> :man-jump<ret>
hook -once -always window WinSetOption filetype=.* %{ hook -once -always window WinSetOption filetype=.* %{
remove-highlighter window/man-highlight remove-highlighter window/man-highlight
@ -141,7 +141,7 @@ man-jump %{
# Suggested keymaps for a user mode # Suggested keymaps for a user mode
declare-user-mode man declare-user-mode man
map global man 'g' -docstring 'Jump to a man page using selected man page link' ': man-jump<ret>' map global man 'g' -docstring 'Jump to a man page using selected man page link' :man-jump<ret>
map global man 'j' -docstring 'Go to next man page link' ': man-link-next<ret>' map global man 'j' -docstring 'Go to next man page link' :man-link-next<ret>
map global man 'k' -docstring 'Go to previous man page link' ': man-link-prev<ret>' map global man 'k' -docstring 'Go to previous man page link' :man-link-prev<ret>
map global man 'm' -docstring 'Look up a man page' ':man<space>' map global man 'm' -docstring 'Look up a man page' :man<space>