-1

Normally when i use vscode I have a shortcut that uses shift+space that goes to the end of the line. Is there a way I could do this in vim.

  • 4
    In insert mode, use ``, like in any text editor. In normal mode, use `$`. And consider going through `$ vimtutor` when you have 20-30 minutes free. – romainl Sep 18 '21 at 10:57
  • 1
    I thought it'd be a simple remapping in the .vimrc file, but it looks like it's not actually possible: https://stackoverflow.com/questions/279959/how-can-i-make-shiftspacebar-page-up-in-vim – Chaos_Is_Harmony Sep 18 '21 at 11:33

1 Answers1

1

Shift + A moves to the end of the line and enters insert mode (i.e., Append to the line).

$ just moves the cursor to the end of the line without entering insert mode.

You could possibly change Shift + Space or any other arbitrary key combination to do one of those things, but why not just use what Vim already has?

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
  • 1
    Agreed. And the `$` makes sense to use because also represents the end of a line in regular expressions. (Similar to how `^` moves to the first non-blank character in vim and represents the start of a line in regular expressions). – mattb Sep 18 '21 at 13:12