Skip to content

Commit

Permalink
feat(keymap)!: remove the default gs keymap
Browse files Browse the repository at this point in the history
Problem:

gs is a stupid mapping.

Solution:

Remove it!
  • Loading branch information
lewis6991 committed Apr 24, 2024
1 parent a1550db commit dae7e77
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
2 changes: 2 additions & 0 deletions runtime/doc/news.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ The following changes may require adaptations in user config or plugins.
|nvim_open_win()| now blocks all autocommands when `noautocmd` is set,
rather than just those from setting the `buffer` to display in the window.

• Removed the default |gs| mapping.

==============================================================================
BREAKING CHANGES IN HEAD *news-breaking-dev*

Expand Down
5 changes: 2 additions & 3 deletions runtime/doc/various.txt
Original file line number Diff line number Diff line change
Expand Up @@ -515,16 +515,15 @@ gO Show a filetype-specific, navigable "outline" of the

Currently works in |help| and |:Man| buffers.

[N]gs *gs* *:sl* *:sleep*
*:sl* *:sleep*
:[N]sl[eep] [N][m] Do nothing for [N] seconds, or [N] milliseconds if [m]
was given. "gs" always uses seconds.
was given.
Default is one second. >
:sleep "sleep for one second
:5sleep "sleep for five seconds
:sleep 100m "sleep for 100 milliseconds
10gs "sleep for ten seconds
< Can be interrupted with CTRL-C.
"gs" stands for "goto sleep".
While sleeping the cursor is positioned in the text,
if at a visible position.
Queued messages are processed during the sleep.
Expand Down
2 changes: 2 additions & 0 deletions runtime/doc/vim_diff.txt
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,8 @@ Highlight groups:
\|setlocal winhighlight=StatusLine:StatusLineTerm,StatusLineNC:StatusLineTermNC
\|else|setlocal winhighlight=|endif
<
Keymaps:
*gs*

Options:
*'aleph'* *'al'*
Expand Down
5 changes: 0 additions & 5 deletions src/nvim/normal.c
Original file line number Diff line number Diff line change
Expand Up @@ -5525,11 +5525,6 @@ static void nv_g_cmd(cmdarg_T *cap)
nv_gomark(cap);
break;

// "gs": Goto sleep.
case 's':
do_sleep(cap->count1 * 1000);
break;

// "ga": Display the ascii value of the character under the
// cursor. It is displayed in decimal, hex, and octal. -- webb
case 'a':
Expand Down
2 changes: 1 addition & 1 deletion test/old/testdir/test_sleep.vim
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func! Test_sleep_bang()
call s:assert_takes_longer('sl 50m', 50)
call s:assert_takes_longer('sl! 50m', 50)
call s:assert_takes_longer('1sleep', 1000)
call s:assert_takes_longer('normal 1gs', 1000)
" call s:assert_takes_longer('normal 1gs', 1000)
endfunc

" vim: shiftwidth=2 sts=2 expandtab

0 comments on commit dae7e77

Please sign in to comment.