In order to cut the current line that your cursor is on Visual Studio Code (VS Code) make use of the below keyboard shortcuts based on the Operating System you are on.
Windows
Control + X
macOS
⌘ Command + X
Linux
Control + X
Demo:

As you would see in the above demo gif image, initially the cursor was on line 3, and Command + X keys were pressed causing the line 3 to be cached in the clipboard and the lines below it were moved up.
Make use of the standard keyboard short (Control + V or Command + V on macOS) to paste the line that you just cut.
How to delete the current line?
If you want to delete (and not cut) the current line, make use of the below keyboard shortcut
Windows
Control + ⇧ Shift + K
macOS
⌘ Command + ⇧ Shift + K
Linux
Control + ⇧ Shift + K
Note this will not copy the deleted line into the clipboard.
Both cut and delete the line's shortcut also works to remove empty lines.
Have Questions? Post them here!
- How to create a New Project in Visual Studio Code (VS Code)
- How to Whitelist IP Address on GoDaddy Hosting?
- CentOS Cannot find a valid baseurl for repo base7x86_64 yum
- Fix: This app is no longer shared with you error iPhone or iPad iOS
- How to check the version of NodeJS installed
- [Error] There was an error connecting to the apple id server
- Find Restroom Near Me - Closest Toilet Nearby Using Your Current Location
- How to install xz data compression software using Brew
- Steps to Delete or Deactivate Instagram Account
- How to enable line numbers in IntelliJ
- How to display line numbers in Terminal while displaying content of a file
- Unzip a Zip file from Terminal Command
- Install SonarLint on Visual Studio Code
- How to Scan iPhone for Virus? Is Antivirus it really required?
- 100+ SEO Tips to improve your website search ranking
- [fix] Editor could not be opened unexpected error: File is a directory (VS Code)
- How to Fix Spelling Errors on Microsoft Word for Mac
- How to convert byte array to String [Kotlin]
- [Fix] Error 1020 Cloudflare: Access was denied
- Command: How to scp a file to remote server location?
- What is an Authorization Code Grant? OAuth 2.0
- How to Connect to AWS Windows EC2 UI Instance from M1 Mac (Updated 2022)
- How to replace with space
- VS Code Remove Unused Imports Keyboard Shortcut
- How to rerun last command in Zsh shell
- Eclipse Error : The Eclipse executable launcher was unable to locate its companion shared library. - Eclipse
- Error 404 Tomcat homepage http://localhost:8080/ not displayed - Tomcat
- ASCII to HEX and HEX to ASCII Conversion Notepad++ - NotepadPlusPlus
- How to use HashTags # correctly on Social Media Facebook Twitter - HowTos
- How to hide quick launch in SharePoint classic site - SharePoint
- [Solution] Spring Tool Suite (STS) support for JSP (JAVA EE) - Eclipse
- JavaScript: Convert an Image into Base64 String - JavaScript
- How to create SharePoint Online List Item using REST API - SharePoint