Shortcuts

⌘K
  1. Home
  2. /
  3. Docs
  4. /
  5. Shortcuts
  6. /
  7. Useful keyboard shortcuts...
  8. /
  9. All keyboard shortcuts...

All keyboard shortcuts for text and code editors

The most important keyboard shortcuts for text and code editors

With the right keyboard shortcuts, you can edit text faster, search through files, and modify multiple lines at once. This reference guide contains 100 essential keyboard shortcuts and key sequences for Notepad++, Sublime Text, Vim, Neovim, and Emacs, with clear explanations for each command.

Which keyboard shortcuts are important in text and code editors?

The most important keyboard shortcuts help you search, replace, edit lines, select, and save. In code editors, there are additional commands for commenting, indenting, and navigating between matching brackets.

The controls vary considerably. Notepad++ and Sublime Text use many common Ctrl shortcuts. Vim and Neovim work with modes: the same key can either enter text or execute a command. Emacs often uses a sequence of two key combinations.

Below you’ll find 20 entries per editor, totaling exactly 100. This is a selection of important standard commands. These editors also offer additional commands and options for assigning your own keyboard shortcuts.

Editor Mentions Key Topics
Notepad++ 1–20 Search, move lines, comments, bookmarks, and text completion.
Sublime Text 21–40 File navigation, multiple cursors, selections, and line editing.
Vim 41–60 Modes, navigate, copy, delete, search, and save.
Neovim 61–80 Text objects, indentation, split windows, and buffers.
Emacs 81–100 Files, buffers, selections, queries, and windows.

Here’s how to read the key combinations

For Ctrl + F, hold down Ctrl while pressing F. For Ctrl + K, followed by Ctrl + D, you execute two combinations in succession. A sequence like dd means you press d twice, without holding down Ctrl.

The tables for Notepad++ and Sublime Text use the default keys for Windows. Vim, Neovim, and Emacs are described without custom key profiles or plugins. A terminal, operating system, or custom configuration may intercept or alter certain combinations.

Capital letters are important: in Vim and Neovim, "v" and "V" are different commands. To type a capital letter, typically press and hold the Shift key, then release it.

Notepad++: 20 Important Keyboard Shortcuts

Notepad++ is useful for source code, configuration files, exports, and plain text. In particular, search, line editing, and bookmarks save you a lot of time when working with long files.

Searching and navigating a file

No. Shortcut What does this keyboard shortcut do?
1 Ctrl + F Opens the search window. Search for a word, text fragment, or pattern in the current document and, if necessary, check the selected search mode.
2 Ctrl + H Open "Find and Replace." Enter the genuine text and the replacement text; then choose whether you want to replace a single match or multiple matches.
3 Ctrl + Shift + F Opens "Search in Files." This allows you to search for files within a selected folder, optionally limited to specific file types, such as text files or scripts.
4 F3 Jump to the next match for your current search. This way, you don’t have to keep reopening the search window.
5 Shift + F3 Jump to the previous entry. This is useful if you’ve skipped over an entry you found or want to review search results in reverse order.
6 Ctrl + G Opens the window to jump to a line or position. Use a line number from an error message to quickly find the correct location.
7 Ctrl + B Jumps to the corresponding bracket when the cursor is positioned on a recognized bracket. Useful for checking nested expressions or code blocks.

Edit rules and text

No. Shortcut What does this keyboard shortcut do?
8 Ctrl + D Duplicates the selection or, if no selection is made, the current line. Use this for similar configuration lines and then adjust the differing values.
9 Ctrl + L Cuts the current line. The line is removed from the document and placed on the clipboard, so you can paste it elsewhere.
10 Ctrl + Shift + ↑ Moves the current line or selected lines up. This allows you to change the order without having to cut, navigate, and paste individually.
11 Ctrl + Shift + ↓ Moves the current line or selected lines down. Useful for rearranging lists, settings, or sequential instructions.
12 Ctrl + Q Enables or disables line comments. The comment delimiters used depend on the selected programming language and its support for them.
13 Ctrl + Space Invokes available text or code completion. The suggestions depend, among other things, on the active language, words in documents, and configured completion options.
14 Ctrl + Shift + Space Displays available information about feature parameters. This works when relevant information is available for the active language and feature.
15 Ctrl + J Merges selected lines by removing internal line breaks. Then check for spacing and readability, especially in source code or structured data.
16 Ctrl + U Convert selected text to lowercase. Suitable for text editing; when working with code, be mindful of case-sensitive names.
17 Ctrl + Shift + U Convert selected text to uppercase. This is useful for headings or fixed terms, provided that the modified spelling is permitted in context.

Use bookmarks

No. Shortcut What does this keyboard shortcut do?
18 Ctrl + F2 Adds or removes a bookmark on the current line. Use this to mark important places you want to return to while editing.
19 F2 Jumps to the next bookmark in the document. This is handy when you want to check several scattered settings or text passages one after another.
20 Shift + F2 Jump to the previous bookmark. Use this to scroll back through the lines you previously marked for review.

Sublime Text: 20 Essential Keyboard Shortcuts

Sublime Text stands out for features such as fast navigation and multiple simultaneous selections. This allows you to perform the same text editing in different locations. Be sure to check which sections are selected before you start typing.

Open files and search for text

No. Shortcut What does this keyboard shortcut do?
21 Ctrl + P Open Goto Anything. Type a filename or a recognizable part of it to quickly open a file from the available project files.
22 Ctrl + Shift + P Opens the command palette. Search for a command by name when you know the function but not the menu location or corresponding keyboard shortcut.
23 Ctrl + R Displays symbols in the current file. With supported syntax, you can jump directly to, for example, a function or other recognized definition.
24 Ctrl + G Jump to a line number. This is useful when an error message, a colleague, or a log file refers to a specific line in the document.
25 Ctrl + F Opens the search panel for the current file. Check options such as case sensitivity and regular expressions if the results differ from what you expected.
26 Ctrl + H Opens the replace dialog box. Find a text fragment and specify what you want to replace it with, within a selected section if desired.
27 Ctrl + Shift + F Opens Search in Files. Use this to find text within a project or selected file range without having to open each file individually.
28 F3 Goes to the next match for the current search query. This allows you to review the found listings one after another.
29 Shift + F3 Goes to the previous match. This is the counterpart to F3 and helps you revisit a previously found text location.

Multiple selections and cursors

No. Shortcut What does this keyboard shortcut do?
30 Ctrl + D Select a word or add the following match. Repeat the command to change multiple instances of the same text at once.
31 Ctrl + K, then Ctrl + D Skip an item when building a multiple selection. This allows you to leave a specific item unselected while continuing to select others.
32 Alt + F3 Selects all instances of the current word. Use this for a broad text change after you’ve verified that all selections are intended.
33 Ctrl + Shift + L Splits a selected block into separate selections by line. You can then perform the same operation on each selected line.
34 Ctrl + Alt + ↓ Extend a multiple selection to include the line below it. This is useful for inserting similar text on consecutive lines.
35 Ctrl + U Undoes the last selection change. Use this when you’ve accidentally added one too many matches or lines while using multiple cursors.

Rules, comments, and sorting

No. Shortcut What does this keyboard shortcut do?
36 Ctrl + Shift + D Duplicates the current line or selection. This speeds up the creation of similar blocks of text, where you then only need to change a few parts.
37 Ctrl + Shift + K Deletes the current line or the selected lines. You do not need to first select the exact text and the corresponding line break.
38 Ctrl + / Enables or disables line comments. Sublime Text uses the comment lines associated with the active syntax.
39 Ctrl + Shift + / Enables or disables block comments where the syntax supports it. This allows you to enclose a selected text section with the appropriate comment delimiters.
40 F9 Sorts lines in the selection or document. Suitable for lists; use this only when the genuine order has no substantive meaning.

Vim: 20 Important Keys and Commands

Vim uses different modes. In normal mode, you execute commands. In insert mode, you type text. You use visual mode to select text.

All of the commands listed below start in normal mode, except for Esc. Use h, j, k, and l to move left, down, up, and right, respectively. The arrow keys usually work as well.

Input and Navigation

No. Key or command What does this assignment entail?
41 i Start input mode before the cursor. From that point on, letters will be entered as text until you exit input mode again.
42 Esc Exit input mode or visual mode and return to normal mode. Use this before you want to issue a normal editing command.
43 a Start input mode after the cursor. This is useful when you want to add text immediately after the current character without having to navigate further first.
44 o Opens a brand new line below the current line and starts edit mode there. Any automatic indentation depends on the settings.
45 w Jumps to the beginning of the next word. Punctuation marks and the configured word definition influence which boundaries Vim uses for this.
46 b Moves backward to the beginning of a word. If the cursor is in the middle of a word, it first moves to the beginning of that word.
47 0 Jumps to the first character of the current line, including any indentation. This refers to the number key zero.
48 $ Jumps to the end of the current line. Type the dollar sign using the key combination that corresponds to your keyboard layout.
49 gg Jumps to the first line of the file. Press the lowercase "g" twice; you don’t need to press Enter afterward.
50 G Jumps to the last line without a preceding number. With a line number preceding it, such as 25G, you’ll go to that specific line.

Edit, search, and save text

No. Key or command What does this assignment entail?
51 dd Deletes the current line and saves it to a register as usual. Prefixing the command with a number, such as 3dd, deletes multiple lines.
52 yy Copies the current line to a register. In Vim, this is called “yanking”; it does not automatically mean that the text is on the platform clipboard.
53 p Inserts the contents of the clipboard after the cursor. If an entire line is copied, the text is inserted below the current line.
54 u Undoes the last text change. Repeatedly pressing this button goes further back through the available changes in the current buffer.
55 Ctrl + R Reapplies a previously undone change. This definition applies in normal mode; in other modes, the same key combination may perform a different action.
56 v Start a selection by character. Move the cursor to expand the selection, and then perform a copy or delete operation, for example.
57 /search text, then Enter Searches forward for the specified pattern. Special characters may have special meanings, as Vim supports patterns and regular expressions.
58 n Repeats the last search in the same direction. After a search with a question mark, this could therefore be in reverse order.
59 :w, then Enter Writes the current buffer to the linked file. For a brand new buffer without a filename, you must also specify a name.
60 :wq, then Enter Saves the file and closes the current window. If this was the last window, Vim will exit, provided that saving and closing are successful.

Neovim: 20 Important Keys and Commands

Neovim shares many commands with Vim. The basic commands listed above therefore also work in Neovim. This additional selection focuses on specific text editing tasks, indentation, and working with multiple windows.

Start here in normal mode as well. The commands use standard functions and do not require a plug-in. A buffer is the text that the editor is editing in memory; different windows can display the same buffer.

Words, selections, and repeated changes

No. Key or command What does this assignment entail?
61 ciw Deletes the word under the cursor and enters input mode. This allows you to type a replacement word immediately, without having to select it manually first.
62 diw Deletes the word under the cursor, usually without including the surrounding spaces. You remain in normal mode after the edit.
63 yiw Copies the word under the cursor to a register. The cursor does not need to be at the beginning of the word to do this.
64 viw Selects the word under the cursor. Use this as a starting point if you first want to see which text object will be affected by the next operation.
65 V Start selecting entire lines. Move the cursor up or down to add additional lines to the selection.
66 Ctrl + V Start visual block selection when the terminal signals this combination. Use it to select a rectangular text area, such as a column in aligned data.
67 . Repeats the last repeatable change. For example, change one word using ciw and then apply the same change to a different position.
68 J Merges the current line with the next one. Neovim typically adjusts the spacing accordingly; check the result for source code or special text formatting.

Adjust indentation

No. Key or command What does this assignment entail?
69 >> Indent the current line by one level. The size of that indent follows the set indent width.
70 << Reduces the indentation of the current line by one level. Useful for repositioning a line within the surrounding structure.
71 == Recalculates the indentation of the current line. The result depends on the available language support and the indentation rules that have been set.
72 gg=G Reapplies the indentation to the entire file. The cursor first jumps to the top and then applies the indentation command until the end of the file.

Windows, buffers, and replacements

No. Key or command What does this assignment entail?
73 Ctrl + W, then s Splits the current window into two windows, one above the other. Both initially display the same buffer, allowing you to compare two text passages side by side.
74 Ctrl + W, then v Creates a vertical split with windows side by side. Useful for keeping different parts of a file visible at the same time.
75 Ctrl + W, then w Moves to the next window. Repeat the sequence to navigate through multiple open text windows.
76 Ctrl + W, then h Moves the focus to the window to the left of the current window, if one is present.
77 Ctrl + W, then l Moves the focus to the window to the right of the current window. This changes which window you’re interacting with, without changing the text.
78 :bn, then Enter Opens the next available buffer in the current window. Unsaved changes and buffer settings may determine whether the switch is allowed.
79 :bp, then Enter Opens the previous available buffer. Use this together with :bn to switch between previously opened files.
80 :%s/old/brand new/gc, then Enter Searches the entire file for the old pattern and asks for each match whether it should be replaced with the brand new one. Update both texts.

Emacs: 20 Important Keyboard Shortcuts

Emacs uses its own, widely used notation. C-x means Ctrl + X. M-x means Meta + X, usually executed with Alt + X. If Alt doesn’t work as Meta, you can often press Esc first and then the intended key.

For C-x C-f, first press Ctrl + X, then Ctrl + F. For C-x b, first press Ctrl + X, release Ctrl, and then press b. The key bindings below are based on the standard GNU Emacs configuration, without, for example, Evil mode.

Managing Files and Caches

No. Shortcut What does this keyboard shortcut do?
81 C-x C-f Opens a file in a buffer. Enter the filename and press Enter; if you enter a brand new name, you can create a brand new file.
82 C-x C-s Saves the current file buffer. This is the standard save command; in default Emacs, Ctrl + S alone initiates a search.
83 C-x C-w Writes the current buffer to a specified filename. Use this when you want to save the edited text under a different name.
84 C-x b Switches to a named buffer. Confirm the desired buffer by pressing Enter to continue working in that text or editor view.
85 C-x k Close the selected buffer. Emacs may ask for confirmation when making changes; this prevents the corresponding file from being deleted from the disk.
86 C-x C-c Prompts you to quit Emacs. If there are modified file buffers, you’ll have the opportunity to choose which changes still need to be saved.

Search, select, and move text

No. Shortcut What does this keyboard shortcut do?
87 C-s Start searching as you type. Press C-s again to find the next match and press Enter to exit search mode.
88 C-r Start a backward search. This is useful when the text you’re looking for is before the cursor or if you want to review previous entries.
89 M-% Start the replacement with confirmation by agreement. Specify the search text and replacement; by default, the command works from the cursor or within the active selection.
90 C-Spatie Place and activate the selection marker. Then move the cursor: the area between the marker and the cursor forms the selected region.
91 C-w Cuts the selected region and stores the text in the kill ring. This is the text history that Emacs uses for such operations.
92 M-w Copies the selected region to the kill ring without deleting the genuine text. The exact integration with the platform clipboard depends on the environment.
93 C-y Inserts the last text saved in the kill ring. In Emacs, this is called “yanking”; it’s the usual counterpart to cutting or copying.
94 M-y Replaces the pasted text with a previous kill-ring entry immediately after pasting. Repeat the command to scroll through the available text history.

Restore, run commands, and split windows

No. Shortcut What does this keyboard shortcut do?
95 C-/ Undoes a text change. If the terminal does not support this combination, you can use the standard alternatives C-x u or C-_.
96 C-g Aborts an unfinished keystroke sequence or many active commands. Use this when Emacs is waiting for additional input and you want to start over.
97 M-x Execute a command by name. Type the command name, use the "add" option if necessary, and confirm with Enter.
98 C-x 2 Splits the selected window into two windows, one above the other. Both can display the same buffer or different buffers.
99 C-x 3 Splits the selected window into two side-by-side windows. Handy for viewing two text passages or files at the same time.
100 C-x o Moves the focus to another window within the same Emacs frame. Repeat the command to cycle through multiple text windows.

How do you use this overview while editing?

Start with the table in your own editor. First, learn how to search, undo, and perform the offers you repeat most often. For long configuration files, these might include bookmarks and moving lines. For recurring text patterns, using multiple cursors or text objects can be more efficient.

If you’re working with Vim or Neovim, start by practicing the transition between insert mode and normal mode. The commands only become predictable once you know which mode is active. With Emacs, it helps to read the prefix sequences aloud: first C-x, then the following key.

  • Check your selection before modifying multiple text areas at once.
  • Save a draft before you replace or reorganize a file on a large scale.
  • Check the search mode if punctuation marks are interpreted differently than expected.
  • View custom mappings if a standard combination performs a different function.

Frequently Asked Questions About Keyboard Shortcuts in Text Editors

Are the keyboard shortcuts for Vim and Neovim the same?

Many basic commands are the same. The Vim commands in this overview also work in a standard Neovim configuration, and many of the Neovim commands mentioned here also work in Vim. Differences arise, among other things, due to custom settings, plugins, and additional features.

Why doesn’t Vim type any text when I press letters?

Vim is probably in normal mode. In this mode, letters execute commands. Press i to enter text and Esc to return. This distinction also applies to Neovim.

Why doesn’t Ctrl + V paste in Neovim?

In normal mode, Ctrl + V starts a block selection by default, provided the terminal passes on the combination. For example, you can paste text from registers using p. The platform clipboard is a separate feature whose availability depends on the environment.

Does selecting multiple items also change references in other files?

A multiple selection updates the selected text locations. This does not guarantee that all references to a function or variable will be updated. For a structural name change, you need appropriate language support and a refactoring feature.

Why don’t some combinations work in a terminal?

The terminal or operating system may intercept keystrokes. Certain key combinations may also transmit the same character code. Check the terminal settings and the editor’s key configuration, especially for Ctrl + Space, Alt combinations, and special characters.

Key Insights

  • This reference guide contains 100 entries: 20 per text or code editor.
  • Notepad++ and Sublime Text offer quick commands for searching, line editing, and selections.
  • In Vim and Neovim, the active mode and uppercase letters determine which command is executed.
  • Emacs uses prefix sequences, buffers, and a kill ring for many everyday operations.
  • If you notice any unusual behavior, check your settings, plug-ins, and any potential terminal conflicts.