Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a VS Code shortcut to move/select up/down to the next empty line?

I just transitioned from Sublime to VS Code and love it. Wondering if there are equivalent combos, or a way to set them, for jumping/selecting chunks of line, down/up to the next blank line. This is what these looked like for me in ST3:

{"keys": ["ctrl+shift+["], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": false, "extend": true}},
{"keys": ["ctrl+shift+]"], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": true, "extend": true}},
{"keys": ["ctrl+{"], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": false, "extend": true}},
{"keys": ["ctrl+}"], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": true, "extend": true}},
like image 658
rkp333 Avatar asked Aug 21 '17 00:08

rkp333


People also ask

What's the shortcut to move text up and down in VS Code?

Hold Alt and press up or down arrows. Select a word, phrase or a function. While holding Alt use arrow keys up or down to move the selection up or down in your source code.

What is Ctrl K in VS Code?

To launch the Define Keybinding widget, press Ctrl+K Ctrl+K. The widget listens for key presses and renders the serialized JSON representation in the text box and below it, the keys that VS Code has detected under your current keyboard layout.

What is Ctrl D in VS Code?

Ctrl+D selects the word at the cursor, or the next occurrence of the current selection. Tip: You can also add more cursors with Ctrl+Shift+L, which will add a selection at each occurrence of the current selected text.


1 Answers

The following plugin meets your requirments I believe

Quote from plugin description

Travel in a text editor by jumping over code "paragraphs", to the closest empty line, optionally selecting text along the way.

The following commands and corresponding default keybindings are provided:

block-travel.jumpUp: alt+up
block-travel.selectUp: alt+shift+up
block-travel.jumpDown: alt+down
block-travel.selectDown: alt+shift+down
like image 194
david_adler Avatar answered Oct 01 '22 15:10

david_adler