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.
Facing issues? Have Questions? Post them here! I am happy to answer!
- [Fix] Error 1020 Cloudflare: Access was denied
- What is an Authorization Code Grant? OAuth 2.0
- Fix: psql: error: connection to server at localhost (::1) port 5432 failed: FATAL: database does not exist
- 100+ SEO Tips to improve your website search ranking
- How to submit website to dmoz directory
- How to check the version of NodeJS installed
- How to enter Rockstar Activation Code?
- Background task activation is spurious error - Windows 10, Office 2016, Office 365
- Angular CLI ng Error: You need to specify a command before moving on. Use --help to view the available commands
- cURL HTTP GET request command examples
- Fix - JioCinema Something Went Wrong Please Try Again Error 8001 while streaming IPL Cricket Live
- How to remove password from pdf file
- How to identify the version of IntelliJ
- Command: How to scp a file to remote server location?
- How to add Widgets to MacBook Desktop
- Setting up RSS feeds notifications within Outlook
- Fix - Website Connection timed out Error Code 522 (Cloudflare)
- How to fix: Please check your network connection (Retry)
- Fix: Could not connect to Redis at 127.0.0.1:6379: Connection refused
- Accept Only 0-9 Numbers RegEx Example
- How to create a New Project in Visual Studio Code (VS Code)
- Top 10 emerging breakthrough trending technologies
- Free Unlimited Calls from MTNL & BSNL Landlines from 1st May 2015
- [Error] zsh: command not found: mvn
- How to Scan iPhone for Virus? Is Antivirus it really required?
- Tutorial Java SOAP WebServices JAS-WS with Eclipse J2EE IDE and Tomcat Server Part 1 - Java
- How to make Mac Terminal Black - MacOS
- fatal: Unable to create '/c/git_repo/.git/index.lock': File exists. If no other git process is currently running, this probably means a git process crashed in this repository earlier. - Git
- How to enable Do Not Disturb (DND) mode in Microsoft Teams - Teams
- How to Exit Node Prompt from Mac Terminal - MacOS
- 34: Traverse a List in Reverse Order - 1000+ Python Programming - Python-Programs
- cURL -d Option with Examples - cURL
- [Fix] brew: command not found Mac or Linux Terminal Error - MacOS