Skip to content

Instantly share code, notes, and snippets.

@rands0n
Last active October 5, 2016 17:59
Show Gist options
  • Select an option

  • Save rands0n/b05fccf94cd0f16c12d6beb10b91bdd1 to your computer and use it in GitHub Desktop.

Select an option

Save rands0n/b05fccf94cd0f16c12d6beb10b91bdd1 to your computer and use it in GitHub Desktop.

Revisions

  1. rands0n revised this gist Oct 5, 2016. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions vim.md
    Original file line number Diff line number Diff line change
    @@ -37,6 +37,8 @@ Hint: `j` looks like a down arrow.

    ## Copy/Paste

    You need to select first what you need to copy. Make this by pressing `v`.

    `P` → paste before, remember `p` is paste after current position.

    `yy` → copy the current line, easier but equivalent to `ddP`
  2. rands0n revised this gist Sep 5, 2016. 1 changed file with 12 additions and 0 deletions.
    12 changes: 12 additions & 0 deletions vim.md
    Original file line number Diff line number Diff line change
    @@ -34,3 +34,15 @@ Hint: `j` looks like a down arrow.
    `g_` → go to the last non-blank character of line

    `/pattern` → search for pattern

    ## Copy/Paste

    `P` → paste before, remember `p` is paste after current position.

    `yy` → copy the current line, easier but equivalent to `ddP`

    ## Undo/Redo

    `u` → undo

    `<C-r>` → redo
  3. rands0n revised this gist Sep 5, 2016. 1 changed file with 12 additions and 0 deletions.
    12 changes: 12 additions & 0 deletions vim.md
    Original file line number Diff line number Diff line change
    @@ -22,3 +22,15 @@ Hint: `j` looks like a down arrow.
    `O` → insert a new line before the current one

    `cw` → replace from the cursor to the end of the word

    ## Basic moves

    `0` → go to the first column

    `^` → go to the first non-blank character of the line

    `$` → go to the end of line

    `g_` → go to the last non-blank character of line

    `/pattern` → search for pattern
  4. rands0n revised this gist Sep 5, 2016. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions vim.md
    Original file line number Diff line number Diff line change
    @@ -16,6 +16,9 @@ Hint: `j` looks like a down arrow.
    ## Insert mode

    `a` → insert after the cursor

    `o` → insert a new line after the current one

    `O` → insert a new line before the current one

    `cw` → replace from the cursor to the end of the word
  5. rands0n revised this gist Sep 5, 2016. 1 changed file with 4 additions and 7 deletions.
    11 changes: 4 additions & 7 deletions vim.md
    Original file line number Diff line number Diff line change
    @@ -15,10 +15,7 @@ Hint: `j` looks like a down arrow.

    ## Insert mode

    1. `a` → insert after the cursor

    2. `o` → insert a new line after the current one

    3. `O` → insert a new line before the current one

    4. `cw` → replace from the cursor to the end of the word
    `a` → insert after the cursor
    `o` → insert a new line after the current one
    `O` → insert a new line before the current one
    `cw` → replace from the cursor to the end of the word
  6. rands0n revised this gist Sep 5, 2016. 1 changed file with 16 additions and 1 deletion.
    17 changes: 16 additions & 1 deletion vim.md
    Original file line number Diff line number Diff line change
    @@ -6,4 +6,19 @@

    `dd` → Delete (and copy) the current line

    `p` → Pase
    `p` → Paste

    `hjkl` (highly recommended but not mandatory) → basic cursor move (←↓↑→).

    Hint: `j` looks like a down arrow.
    `:help <command>` → Show help about `<command>`. You can use `:help` without a `<command>` to get general help.

    ## Insert mode

    1. `a` → insert after the cursor

    2. `o` → insert a new line after the current one

    3. `O` → insert a new line before the current one

    4. `cw` → replace from the cursor to the end of the word
  7. rands0n revised this gist Sep 5, 2016. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion vim.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,9 @@
    `i` → Insert mode. Type `ESC` to return to Normal mode.

    `x` → Delete the char under the cursor

    `:wq` → Save and Quit (`:w` save, `:q` quit)

    `dd` → Delete (and copy) the current line
    `p` → Pase

    `p` → Pase
  8. rands0n created this gist Sep 5, 2016.
    6 changes: 6 additions & 0 deletions vim.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    `i` → Insert mode. Type `ESC` to return to Normal mode.
    `x` → Delete the char under the cursor
    `:wq` → Save and Quit (`:w` save, `:q` quit)
    `dd` → Delete (and copy) the current line
    `p` → Pase