Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

vscode settings - 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}},
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...