Reputation: 547
Previously I used Windows 10 operating system. I am a beginner and I am learning HTML, CSS. I used Visual Studio Code on Windows 10. There I used the shift + alt + arrow-down key to duplicate some selected lines just under the selected lines. I recently shifted to Ubuntu and the shift + alt + arrow-down key is not working like windows. It is not duplicating the selected lines.
How can I make these keys working like windows or is there any other key to do the same work?
Help me, please.
Upvotes: 11
Views: 30282
Reputation: 11
You can add this shortcut yourself because it is not enabled in Linux by default.
Press Ctrl + Shift + P in VsCode.
Then find Duplicate Selection in the list and press setting icon next to it.
Then you can add Ctrl + Alt + Down to be the shortcut!
Upvotes: 1
Reputation: 81
This can be solved with the Windows default keybindings extension.
Also run the following in your terminal to stop the window manager from intercepting the alt+up/down/left/right
shortcuts, more info on the extension page.
# ubuntu
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left "['']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right "['']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-down "['']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-up "['']"
Upvotes: 6
Reputation: 87
On ubuntu, you can use this combination to Copy Line Down and Copy Line Up Ctrl + Shift + D and Ctrl + Shift + Alt + UpArrow respectively. You can can also update these keys to your preferred keys as hinted by @Syed Muhammad Moiz
Upvotes: 0
Reputation: 445
For Linux:
Ctrl+Shift+Alt+Down and Ctrl+Shift+Alt+Up
You Might need to use numpad Down and Up for Linux
You can also go to: File > Preferences > Keyboard Shortcuts. and search for: Copy Line Down or Copy Line Up, change the keyboard shortcut for this command by right clicking on the command and selecting Change Keybinding
Upvotes: 13