Last active
March 23, 2026 03:02
-
-
Save vitorbritto/9983723 to your computer and use it in GitHub Desktop.
Revisions
-
Vitor Britto revised this gist
Jan 20, 2023 . 1 changed file with 0 additions and 122 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,122 +0,0 @@ -
vitorbritto revised this gist
Apr 18, 2014 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,8 +19,6 @@ | `CTRL+K` | Delete to end | | `CTRL+T` | Transpose | | `CMD+ALT+.` | Close tag | | `CMD+ALT+Q` | Wrap paragraph at ruler | | `F5` | Sort lines | | `CTRL+F5` | Sort lines (case sensitive) | @@ -40,6 +38,7 @@ | `CTRL+SHIFT+M` | Expand selection to brackets | | `CMD+SHIFT+J` | Expand selection to indentation | | `CMD+SHIFT+A` | Expand selection to tag | | `CTRL+SHIFT+W` | Wrap selection with tag | ## Find -
vitorbritto revised this gist
Apr 4, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -119,5 +119,5 @@ > **Notes:** <br> > Based on the cheat sheet from **Dash StyleSheet**. <br> > Converted and adapted by Vitor Britto. -
vitorbritto revised this gist
Apr 4, 2014 . 2 changed files with 8 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -30,7 +30,7 @@ ## Selection | Command | Description | |:----|:-----| | `CMD+SHIFT+L` | Split into lines | | `CTRL+SHIFT+Arrow Up` | Add previous line | | `CTRL+SHIFT+Arrow Down` | Add next line | @@ -45,7 +45,7 @@ ## Find | Command | Description | |:----|:-----| | `CMD+F` | Find | | `CMD+G` | Find next | | `CMD+SHIFT+G` | Find previous | @@ -62,7 +62,7 @@ ## View | Command | Description | |:----|:-----| | CTRL+` | Show console | | `CMD+CTRL+F` | Enter full screen | | `CMD+CTRL+SHIFT+F` | Enter distraction free mode | @@ -78,7 +78,7 @@ ## Go to | Command | Description | |:----|:-----| | `CMD+P` | Go to anything | | `CMD+R` | Go to symbol | | `CTRL+G` | Go to line | @@ -99,7 +99,7 @@ ## Tools | Command | Description | |:----|:-----| | `CMD+SHIFT+P` | Command palette | | `CTRL+ALT+V` | View in browser | | `CMD+B` | Build | @@ -113,7 +113,7 @@ ## Project | Command | Description | |:----|:-----| | `CMD+CTRL+P` | Switch project window | This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,7 +19,7 @@ ## Editing a File | Command | Description | |:----|:-----| | `:e[dit]` | Edit the current file. This is useful to re-edit the current file, when it has been changed outside of Vim. | | `:e[dit]!` | Edit the current file always. Discard any changes to the current buffer. This is useful if you want to start all over again. | | `:e[dit] {file}` | Edit {file}. | @@ -30,7 +30,7 @@ ## Inserting Text | Command | Description | |:----|:-----| | `a` | Append text after the cursor [count] times. | | `A` | Append text at the end of the line [count] times. | | `i` | Insert text before the cursor [count] times. | -
vitorbritto revised this gist
Apr 4, 2014 . 2 changed files with 13 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ ## Edit | Command | Description | |:----|:-----| | `CMD+SHIFT+V` | Paste and indent | | `CMD+]` | Indent | | `CMD+[` | Unindent | This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ ## How to Exit | Command | Description | |:----|:-----| | `:q[uit]` | Quit Vim. This fails when changes have been made. | | `:q[uit]!` | Quit without writing. | | `:cq[uit]` | Quit always, without writing. | @@ -43,15 +43,15 @@ ## Inserting a file | Command | Description | |:----|:-----| | `:r[ead] [name]` | Insert the file [name] below the cursor. | | `:r[ead] !{cmd}` | Execute {cmd} and insert its standard output below the cursor. | ## Deleting Text | Command | Description | |:----|:-----| | `<Del>` or `x` | Delete [count] characters under and after the cursor | | `X` | Delete [count] characters before the cursor | | `d{motion}` | Delete text that {motion} moves over | @@ -67,7 +67,7 @@ ## Changing (or Replacing) Text | Command | Description | |:----|:-----| | `r{char}` | replace the character under the cursor with {char}. | | `R` | Enter Insert mode, replacing characters rather than inserting | | `~` | Switch case of the character under the cursor and move the cursor to the right. If a [count] is given, do that many characters. | @@ -105,7 +105,7 @@ CTRL-Y to scroll the screen down {not in Vi}. ## Copying and Moving Text | Command | Description | |:----|:-----| | `"{a-zA-Z0-9.%#:-"}` | Use register {a-zA-Z0-9.%#:-"} for next delete, yank or put (use uppercase character to append with delete and yank) ({.%#:} only work with put). | | `:reg[isters]` | Display the contents of all numbered and named registers. | | `:reg[isters] {arg}` | Display the contents of the numbered and named registers that are mentioned in {arg}. | @@ -128,7 +128,7 @@ CTRL-Y to scroll the screen down {not in Vi}. ## Undo/Redo/Repeat | Command | Description | |:----|:-----| | `u` | Undo [count] changes. | | `:u[ndo]` | Undo one change. | | `CTRL-R` | Redo [count] changes which were undone. | @@ -148,7 +148,7 @@ Basic motion commands: ``` | Command | Description | |:----|:-----| | `h` | [count] characters to the left (exclusive). | | `l` | [count] characters to the right (exclusive). | | `k` or `CTRL-P` | [count] lines upward | @@ -188,7 +188,7 @@ A WORD consists of a sequence of non-blank characters, separated with white spac ``` | Command | Description | |:----|:-----| | `(` | [count] sentences backward | | `)` | [count] sentences forward | | `{` | [count] paragraphs backward | @@ -201,7 +201,7 @@ A WORD consists of a sequence of non-blank characters, separated with white spac ## Marks | Command | Description | |:----|:-----| | `m{a-zA-Z}` | Set mark {a-zA-Z} at cursor position (does not move the cursor, this is not a motion command). | | `m'` | Set the previous context mark. This can be jumped to with the "''" or "``" command (does not move the cursor, this is not a motion command). | | `:[range]ma[rk] {a-zA-Z}` | Set mark {a-zA-Z} at last line number in [range], column 0. Default is cursor line. | @@ -216,7 +216,7 @@ A WORD consists of a sequence of non-blank characters, separated with white spac ## Searching | Command | Description | |:----|:-----| | `/{pattern}[/]` | Search forward for the [count]'th occurrence of {pattern} | | `/{pattern}/{offset}` | Search forward for the [count]'th occurrence of {pattern} and go {offset} lines up or down. | | `/<CR>` | Search forward for the [count]'th latest used pattern | @@ -246,15 +246,15 @@ The operators that can be used are: ``` | Command | Description | |:----|:-----| | `v` | start Visual mode per character. | | `V` | start Visual mode linewise. | | `<Esc>` | exit Visual mode without making any changes | ## How to Suspend | Command | Description | |:----|:-----| | `CTRL-Z` | Suspend Vim, like ":stop". Works in Normal and in Visual mode. In Insert and Command-line mode, the CTRL-Z is inserted as a normal character. | | `:sus[pend][!]` or `:st[op][!]` | Suspend Vim. If the '!' is not given and 'autowrite' is set, every buffer with changes and a file name is written out. If the '!' is given or 'autowrite' is not set, changed buffers are not written, don't forget to bring Vim back to the foreground later! | -
vitorbritto created this gist
Apr 4, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,123 @@ # Sublime Text 2 Cheat Sheet ## Edit | Command | Description | |-|-| | `CMD+SHIFT+V` | Paste and indent | | `CMD+]` | Indent | | `CMD+[` | Unindent | | `CMD+CTRL+Arrow Up` | Swap line up | | `CMD+CTRL+Arrow Down` | Swap line down | | `CMD+SHIFT+D` | Duplicate line | | `CMD+J` | Join lines | | `CMD+Arrow Left` | Beginning of line | | `CMD+Arrow Right` | End of line | | `CMD+/` | Toggle comment | | `CMD+CTRL+/` | Toggle comment block | | `CTRL+SHIFT+K` | Delete line | | `CTRL+K` | Delete to end | | `CTRL+T` | Transpose | | `CMD+ALT+.` | Close tag | | `CMD+SHIFT+A` | Expand selection to tag | | `CTRL+SHIFT+W` | Wrap selection with tag | | `CMD+ALT+Q` | Wrap paragraph at ruler | | `F5` | Sort lines | | `CTRL+F5` | Sort lines (case sensitive) | | `CMD+ALT+T` | Special characters | ## Selection | Command | Description | |-|-| | `CMD+SHIFT+L` | Split into lines | | `CTRL+SHIFT+Arrow Up` | Add previous line | | `CTRL+SHIFT+Arrow Down` | Add next line | | `Esc` | Single selection - Cancel multiple selections | | `CMD+L` | Expand selection to line | | `CMD+D` | Expand selection to words | | `CTRL+SHIFT+M` | Expand selection to brackets | | `CMD+SHIFT+J` | Expand selection to indentation | | `CMD+SHIFT+A` | Expand selection to tag | ## Find | Command | Description | |-|-| | `CMD+F` | Find | | `CMD+G` | Find next | | `CMD+SHIFT+G` | Find previous | | `CMD+I` | Incremental find | | `CMD+ALT+F` | Replace | | `CMD+ALT+E` | Replace next | | `CMD+ALT+G` | Quick find | | `CMD+CTRL+G` | Quick find all | | `CMD+D` | Quick add next | | `CMD+E` | Use selection for find | | `CMD+SHIFT+E` | Use selection for replace | | `CMD+SHIFT+F` | Find in files | ## View | Command | Description | |-|-| | CTRL+` | Show console | | `CMD+CTRL+F` | Enter full screen | | `CMD+CTRL+SHIFT+F` | Enter distraction free mode | | `CMD+ALT+1-4` | Single layout | | `CMD+ALT+2-4` | 2-4 column layout | | `CMD+ALT+SHIFT+2-3` | 2-3 row layout | | `CMD+ALT+5` | Grid layout | | `CTRL+1` | Group 1 | | `CTRL+SHIFT+1` | Group 2 | | `F6` | Spell check | ## Go to | Command | Description | |-|-| | `CMD+P` | Go to anything | | `CMD+R` | Go to symbol | | `CTRL+G` | Go to line | | `CMD+ALT+Arrow Right` | Next file | | `CMD+ALT+Arrow Left` | Previous file | | `CMD+ALT+Arrow Up` | Switch header / implementation | | `CMD+1` | Go to first file | | `CTRL+L` | Scroll to selection | | `CTRL+ALT+Arrow Up` | Scroll line up | | `CTRL+ALT+Arrow Down` | Scroll line down | | `CMD+F2` | Toggle bookmark | | `F2` | Next bookmark | | `SHIFT+F2` | Previous bookmark | | `CMD+SHIFT+F2` | Clear bookmarks | | `CTRL+M` | Jump to matching bracket | ## Tools | Command | Description | |-|-| | `CMD+SHIFT+P` | Command palette | | `CTRL+ALT+V` | View in browser | | `CMD+B` | Build | | `CTRL+Q` | Record macro | | `CTRL+R` | Run | | `CTRL+ALT+R` | Run with arguments | | `CTRL+D` | Debug | | `CTRL+ALT+D` | Debug with arguments | ## Project | Command | Description | |-|-| | `CMD+CTRL+P` | Switch project window | > **Notes:** <br> > Based on the cheat sheet from Dash StyleSheet. <br> > Converted and adapted by Vitor Britto. This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,265 @@ ## Vim Commands Cheat Sheet ## How to Exit | Command | Description | |-|-| | `:q[uit]` | Quit Vim. This fails when changes have been made. | | `:q[uit]!` | Quit without writing. | | `:cq[uit]` | Quit always, without writing. | | `:wq` | Write the current file and exit. | | `:wq!` | Write the current file and exit always. | | `:wq {file}` | Write to {file}. Exit if not editing the last | | `:wq! {file}` | Write to {file} and exit always. | | `:[range]wq[!]` | [file] Same as above, but only write the lines in [range]. | | `ZZ` | Write current file, if modified, and exit. | | `ZQ` | Quit current file and exit (same as ":q!"). | ## Editing a File | Command | Description | |-|-| | `:e[dit]` | Edit the current file. This is useful to re-edit the current file, when it has been changed outside of Vim. | | `:e[dit]!` | Edit the current file always. Discard any changes to the current buffer. This is useful if you want to start all over again. | | `:e[dit] {file}` | Edit {file}. | | `:e[dit]! {file}` | Edit {file} always. Discard any changes to the current buffer. | | `gf` | Edit the file whose name is under or after the cursor. Mnemonic: "goto file". | ## Inserting Text | Command | Description | |-|-| | `a` | Append text after the cursor [count] times. | | `A` | Append text at the end of the line [count] times. | | `i` | Insert text before the cursor [count] times. | | `I` | Insert text before the first non-blank in the line [count] times. | | `gI`| Insert text in column 1 [count] times. | | `o` | Begin a new line below the cursor and insert text, repeat [count] times. | | `O` | Begin a new line above the cursor and insert text, repeat [count] times. | ## Inserting a file | Command | Description | |-|-| | `:r[ead] [name]` | Insert the file [name] below the cursor. | | `:r[ead] !{cmd}` | Execute {cmd} and insert its standard output below the cursor. | ## Deleting Text | Command | Description | |-|-| | `<Del>` or `x` | Delete [count] characters under and after the cursor | | `X` | Delete [count] characters before the cursor | | `d{motion}` | Delete text that {motion} moves over | | `vdd` | Delete [count] lines | | `D` | Delete the characters under the cursor until the end of the line | | `{Visual}x` or `{Visual}d` | Delete the highlighted text (for {Visual} see Selecting Text). | | `{Visual}CTRL-H` or `{Visual}` | When in Select mode: Delete the highlighted text | | `{Visual}X` or `{Visual}D` | Delete the highlighted lines | | `:[range]d[elete]` | Delete [range] lines (default: current line) | | `:[range]d[elete] {count}` | Delete {count} lines, starting with [range] | ## Changing (or Replacing) Text | Command | Description | |-|-| | `r{char}` | replace the character under the cursor with {char}. | | `R` | Enter Insert mode, replacing characters rather than inserting | | `~` | Switch case of the character under the cursor and move the cursor to the right. If a [count] is given, do that many characters. | | `~{motion}` | switch case of {motion} text. | | `{Visual}~` | Switch case of highlighted text | ## Substituting ``` :[range]s[ubstitute]/{pattern}/{string}/[c][e][g][p][r][i][I] [count] - For each line in [range] replace a match of {pattern} with {string}. :[range]s[ubstitute] [c][e][g][r][i][I] [count] :[range]&[c][e][g][r][i][I] [count] - Repeat last :substitute with same search pattern and substitute string, but without the same flags. You may add extra flags The arguments that you can use for the substitute commands: You can type: 'y' to substitute this match 'n' to skip this match 'a' to substitute this and all remaining matches {not in Vi} 'q' to quit substituting {not in Vi} CTRL-E to scroll the screen up {not in Vi} CTRL-Y to scroll the screen down {not in Vi}. [c] - Confirm each substitution. Vim positions the cursor on the matching string. [e] When the search pattern fails, do not issue an error message and, in particular, continue in maps as if no error occurred. [g] Replace all occurrences in the line. Without this argument, replacement occurs only for the first occurrence in each line. [i] Ignore case for the pattern. [I] Don't ignore case for the pattern. [p] Print the line containing the last substitute. ``` ## Copying and Moving Text | Command | Description | |-|-| | `"{a-zA-Z0-9.%#:-"}` | Use register {a-zA-Z0-9.%#:-"} for next delete, yank or put (use uppercase character to append with delete and yank) ({.%#:} only work with put). | | `:reg[isters]` | Display the contents of all numbered and named registers. | | `:reg[isters] {arg}` | Display the contents of the numbered and named registers that are mentioned in {arg}. | | `:di[splay] [arg]` | Same as :registers. | | `["x]y{motion}` | Yank {motion} text [into register x]. | | `["x]yy` | Yank [count] lines [into register x] | | `["x]Y` | yank [count] lines [into register x] (synonym for yy). | | `{Visual}["x]y` | Yank the highlighted text [into register x] (for {Visual} see Selecting Text). | | `{Visual}["x]Y` | Yank the highlighted lines [into register x] | | `:[range]y[ank] [x]` | Yank [range] lines [into register x]. | | `:[range]y[ank] [x] {count}` | Yank {count} lines, starting with last line number in [range] (default: current line), [into register x]. | | `["x]p` | Put the text [from register x] after the cursor [count] times. | | `["x]P` | Put the text [from register x] before the cursor [count] times. | | `["x]gp` | Just like "p", but leave the cursor just after the new text. | | `["x]gP` | Just like "P", but leave the cursor just after the new text. | | `:[line]pu[t] [x]` | Put the text [from register x] after [line] (default current line). | | `:[line]pu[t]! [x]` | Put the text [from register x] before [line] (default current line). | ## Undo/Redo/Repeat | Command | Description | |-|-| | `u` | Undo [count] changes. | | `:u[ndo]` | Undo one change. | | `CTRL-R` | Redo [count] changes which were undone. | | `:red[o]` | Redo one change which was undone. | | `U` | Undo all latest changes on one line. {Vi: while not moved off of it} | | `.` | Repeat last change, with count replaced with [count]. | ## Moving Around ``` Basic motion commands: k h l j ``` | Command | Description | |-|-| | `h` | [count] characters to the left (exclusive). | | `l` | [count] characters to the right (exclusive). | | `k` or `CTRL-P` | [count] lines upward | | `j` or `CTRL-J` or `CTRL-N` | [count] lines downward (linewise). | | `0` | To the first character of the line (exclusive). | | `<Home>` | To the first character of the line (exclusive). | | `^` | To the first non-blank character of the line | | `$` or `<End>` | To the end of the line and [count - 1] lines downward | | `g0` or `g<Home>` | When lines wrap ('wrap on): To the first character of the screen line (exclusive). Differs from "0" when a line is wider than the screen. When lines don't wrap ('wrap' off): To the leftmost character of the current line that is on the screen. Differs from "0" when the first character of the line is not on the screen. | | `g^` | When lines wrap ('wrap' on): To the first non-blank character of the screen line (exclusive). Differs from "^" when a line is wider than the screen. When lines don't wrap ('wrap' off): To the leftmost non-blank character of the current line that is on the screen. Differs from "^" when the first non-blank character of the line is not on the screen. | | `g$` or `g<End&gr;` | When lines wrap ('wrap' on): To the last character of the screen line and [count - 1] screen lines downward (inclusive). Differs from "$" when a line is wider than the screen. When lines don't wrap ('wrap' off): To the rightmost character of the current line that is visible on the screen. Differs from "$" when the last character of the line is not on the screen or when a count is used. | | `f{char}` | To [count]'th occurrence of {char} to the right. The cursor is placed on {char} (inclusive). | | `F{char}` | To the [count]'th occurrence of {char} to the left. The cursor is placed on {char} (inclusive). | | `t{char}` | Till before [count]'th occurrence of {char} to the right. The cursor is placed on the character left of {char} (inclusive). | | `T{char}` | Till after [count]'th occurrence of {char} to the left. The cursor is placed on the character right of {char} (inclusive). | | `;` | Repeat latest f, t, F or T [count] times. | | `,` | Repeat latest f, t, F or T in opposite direction [count] times. | | `- <minus>` | [count] lines upward, on the first non-blank character (linewise). | | `+` or `CTRL-M` or `<CR>` | [count] lines downward, on the first non-blank character (linewise). | | `_ <underscore>` | [count] - 1 lines downward, on the first non-blank character (linewise). | | `<C-End>` or `G` | Goto line [count], default last line, on the first non-blank character. | | `<C-Home>` or `gg` | Goto line [count], default first line, on the first non-blank character. | | `<S-Right>` or `w` | [count] words forward | | `<C-Right>` or `W` | [count] WORDS forward | | `e` | Forward to the end of word [count] | | `E` | Forward to the end of WORD [count] | | `<S-Left>` or `b` | [count] words backward | | `<C-Left>` or `B` | [count] WORDS backward | | `ge` | Backward to the end of word [count] | | `gE` | Backward to the end of WORD [count] | ``` These commands move over words or WORDS. A word consists of a sequence of letters, digits and underscores, or a sequence of other non-blank characters, separated with white space (spaces, tabs, ). This can be changed with the 'iskeyword' option. A WORD consists of a sequence of non-blank characters, separated with white space. An empty line is also considered to be a word and a WORD. ``` | Command | Description | |-|-| | `(` | [count] sentences backward | | `)` | [count] sentences forward | | `{` | [count] paragraphs backward | | `}` | [count] paragraphs forward | | `]]` | [count] sections forward or to the next '{' in the first column. When used after an operator, then the '}' in the first column. | | `][` | [count] sections forward or to the next '}' in the first column | | `[[` | [count] sections backward or to the previous '{' in the first column | | `[]` | [count] sections backward or to the previous '}' in the first column | ## Marks | Command | Description | |-|-| | `m{a-zA-Z}` | Set mark {a-zA-Z} at cursor position (does not move the cursor, this is not a motion command). | | `m'` | Set the previous context mark. This can be jumped to with the "''" or "``" command (does not move the cursor, this is not a motion command). | | `:[range]ma[rk] {a-zA-Z}` | Set mark {a-zA-Z} at last line number in [range], column 0. Default is cursor line. | | `:[range]k{a-zA-Z}` | Same as :mark, but the space before the mark name can be omitted. | | `'{a-z}` | To the first non-blank character on the line with mark {a-z} (linewise). | | `'{A-Z0-9}` | To the first non-blank character on the line with mark {A-Z0-9} in the correct file | | ``{a-z}` | To the mark {a-z} | | ``{A-Z0-9}` | To the mark {A-Z0-9} in the correct file | | `:marks` | List all the current marks (not a motion command). | | `:marks {arg}` | List the marks that are mentioned in {arg} (not a motion command). | ## Searching | Command | Description | |-|-| | `/{pattern}[/]` | Search forward for the [count]'th occurrence of {pattern} | | `/{pattern}/{offset}` | Search forward for the [count]'th occurrence of {pattern} and go {offset} lines up or down. | | `/<CR>` | Search forward for the [count]'th latest used pattern | | `//{offset}<CR>` | Search forward for the [count]'th latest used pattern with new. If {offset} is empty no offset is used. | | `?{pattern}[?]<CR>` | Search backward for the [count]'th previous occurrence of {pattern} | | `?{pattern}?{offset}<CR>` | Search backward for the [count]'th previous occurrence of {pattern} and go {offset} lines up or down | | `?<CR>` | Search backward for the [count]'th latest used pattern | | `??{offset}<CR>` | Search backward for the [count]'th latest used pattern with new {offset}. If {offset} is empty no offset is used. | | `n` | Repeat the latest "/" or "?" [count] times. | | `N` | Repeat the latest "/" or "?" [count] times in opposite direction. | ## Selecting Text (Visual Mode) ``` To select text, enter visual mode with one of the commands below, and use motion commands to highlight the text you are interested in. Then, use some command on the text. The operators that can be used are: ~ switch case d delete c change y yank > shift right < shift left ! filter through external command = filter through 'equalprg' option command gq format lines to 'textwidth' length ``` | Command | Description | |-|-| | `v` | start Visual mode per character. | | `V` | start Visual mode linewise. | | `<Esc>` | exit Visual mode without making any changes | ## How to Suspend | Command | Description | |-|-| | `CTRL-Z` | Suspend Vim, like ":stop". Works in Normal and in Visual mode. In Insert and Command-line mode, the CTRL-Z is inserted as a normal character. | | `:sus[pend][!]` or `:st[op][!]` | Suspend Vim. If the '!' is not given and 'autowrite' is set, every buffer with changes and a file name is written out. If the '!' is given or 'autowrite' is not set, changed buffers are not written, don't forget to bring Vim back to the foreground later! | > **Notes:** <br> > Based on the cheat sheet from **fprintf**. <br> > Converted and adapted by Vitor Britto.