Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Move a Line Up or Down in Visual Studio Code on Chromebook

I know how to do it on Mac, Linux and Windows, but it doesn't work on Chromebook. You'd expect it to be alt-up/down like Win/Linux, but that is treated like home and end.

Anybody know the trick?

like image 211
Travis Reeder Avatar asked Jan 15 '19 15:01

Travis Reeder


People also ask

How do you shift line up in VS code?

If you put the cursor on a line of code and use the Alt+Up Arrow keys, the line of code you've selected moves up. If you use the Alt+Down Arrow keys, the line of code selected moves down.

How do you move a line up on a Chromebook?

Alt + Up/Down and Ctrl + Alt + Up/Down are reserved by Chromebook. You could open File --> Preferences --> Keyboard Shorcuts in VS Code and change Move Line Up/Down settings to something else.

How do you go down a line on a Chromebook?

In a Gmail email, Google Doc, etc., enter moves you to a new line. In other sites or apps, it may be alt-enter, ctrl-enter, shift-enter, or another key sequence.

How do I move lines of code down?

To move a line down use ⌥⇧↓ (macOS), or Alt+Shift+Down Arrow (Windows/Linux).


2 Answers

Alt + Up/Down and Ctrl + Alt + Up/Down are reserved by Chromebook. You could open File --> Preferences --> Keyboard Shorcuts in VS Code and change Move Line Up/Down settings to something else.

Chromebook keyboard shortcuts

Chromebook keyboard shortcuts image

like image 71
Mischa Radenovic Avatar answered Sep 24 '22 15:09

Mischa Radenovic


There's a easy way.

Just open google-chrome and type chrome://flags in the URL bar,go to the Experiments page.

Search Deprecate Alt based six-pack , then Enable this feature.

Restart.

Then you can use the default shortcut to move line up/down in VSCode.

like image 27
Lee Avatar answered Sep 20 '22 15:09

Lee