Toggle Word Wrap

Tired of scrolling horizontally to read a long line of code, an extensive URL, or a big JSON string? Instead of manually breaking the line or scrolling back and forth, you can use a quick shortcut. Pressing Alt + Z toggles word wrap. It visually breaks long lines to fit your screen width without actually adding real line breaks to your file.

Cursor History

Have you ever clicked on a function definition, went to another file to check how it works, and then completely lost where you were originally typing? You can use Alt + (Left Arrow) to go back to your previous cursor positions, and Alt + (Right Arrow) to go forward. It works exactly like the back and forward buttons on a web browser, but for your code navigation!

Select Next Occurrence

If you want to rename or edit a specific word in multiple places, standard "Find and Replace" can be overkill and might change things you didn't want to. Instead, select a word and press Ctrl + D. This will find and select the very next occurrence of that exact word, creating a new cursor for each one. You can press it multiple times to select several instances and edit them all simultaneously!

Rename Symbol

Manually changing a variable or function name across a large file is asking for syntax errors. If you just select the word and type over it, you might miss some instances. Instead, click on the variable or function you want to rename and press F2. VS Code will smartly rename that symbol across your entire scope, ensuring that nothing breaks.

Move Line

Need to swap lines of code? Don't waste time cutting and pasting. You can hold Alt + (Up Arrow) or Alt + (Down Arrow) to seamlessly move the current line (or a selected block of code) up or down through your file. It auto-formats the indentation as it goes.

Duplicate Line

Similar to moving lines, you can duplicate the line you are currently on without having to select, copy, and paste it. Just press Shift + Alt + (Down Arrow) or (Up Arrow) to instantly clone the line above or below. This is extremely useful when writing repetitive HTML tags or object properties.

Delete Line

Triple-clicking a line or holding down Backspace to get rid of code is slow and annoying. Just put your cursor anywhere on the line and press Ctrl + Shift + K. The entire line vanishes on the spot without messing up your clipboard or leaving empty whitespace behind.

Jump to Symbol

Hunting through a 500-line file just to find a function definition gets old fast. Press Ctrl + Shift + O and start typing the function or variable name to jump straight to it. If you type a colon (:), it even groups everything neatly by methods, variables, and classes. Need to find a symbol anywhere across your whole project? Hit Ctrl + T.

Fold with Braces

When dealing with a long function or a nested object, scrolling all the way down just to find where it closes is a pain. Instead of hunting for the tiny fold arrow in the gutter, you can simply double-click right on an opening or closing curly brace ({ or }). VS Code will instantly select the entire matching block! And if the code is already folded, double-clicking the collapsed {...} badge pops it right open.

Column Selection

Ever had a list of 20 items where you needed to add quotes, commas, or fix the indentation on every single line? Instead of tapping arrow keys line by line, hold Shift + Alt and drag your mouse vertically. You get a tall column of cursors so you can type, delete, or paste across all those lines at the exact same time.

Custom Snippets

Stop installing bloated snippet extensions for basic boilerplate you could write in 10 seconds. You can drop a .vscode/snippets.code-snippets file right in your workspace. With handy built-in variables like $TM_FILENAME_BASE and tab stops like $1, everyone on your team gets identical, fast snippets without downloading a single extension:

                            
{
  "Component Boilerplate": {
    "scope": "javascript,typescript",
    "prefix": "rfc",
    "body": [
      "export function $TM_FILENAME_BASE() {",
      "  return (",
      "    
", "

$1

", "
", " );", "}" ], "description": "Create component boilerplate natively" } }

Native Timeline

Ever accidentally wiped out a good chunk of code, closed VS Code, and realized your undo history was gone? Don't panic, and definitely don't rush to install heavy extensions like GitLens or Local History. Open the Timeline panel at the bottom of the Explorer sidebar. VS Code quietly saves local snapshots every single time you hit save, letting you compare diffs and resurrect lost code with one click.

Transform Case

Need to quickly convert variables or text between camelCase, UPPERCASE, lowercase, or Title Case? You don't need to retype or install extensions. Simply select the text, open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P), and search for Transform to... to convert your selection immediately.

                            1. Select the word or text block
2. Press Ctrl + Shift + P (or Cmd + Shift + P)
3. Type: Transform to
4. Pick: Uppercase, Lowercase, Title Case, Camel Case, Snake Case, or Kebab Case