Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k 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 Reply

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...