Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Repeat command
- | Command | Effect |
- |---------------------|-------------------------------------|
- | `<number><command>` | Repeat `<command>` `<number>` times |
- # Move the cursor
- | Command | Cursor movement |
- |--------------------|-----------------------|
- | `h`, `j`, `k`, `l` | Left, up, down, right |
- | `e` | End of word |
- | `gg` | Start of file |
- # Delete text
- | Command | Effect |
- |---------|------------------------------------------------|
- | `dd` | Delete current line |
- | `dG` | Delete current line and rest of file |
- # Insert text
- | Command | Effect |
- |----------------|----------------------------------------------------------------------------|
- | `a` | Enter insert mode after cursor position |
- | `i` | Enter insert mode before cursor position |
- | `r<character>` | Delete text under cursor, insert `<character>`, and return to command mode |
- | `s` | Delete text under cursor and enter insert mode |
- | `c<motion>` | Delete text from cursor to `<motion>` and enter insert mode (e.g. `ciw`) |
- # Macros
- | Command | Effect |
- |---------|-----------------------------------------------------------------|
- | `q<letter><commands>q` | Record macro `<commands>` at register `<letter>` |
- | `@<letter>` | Execute macro at register `<letter>` |
- Like any `vim` command, you can repeat a macro `<number>` times with
- `<number>@<letter>`.
- # Visual block mode
- | Command | Effect |
- |----------|-------------------------|
- | `ctrl-v` | Enter visual block mode |
- In visual block mode, all cursor movements duplicate or extend the cursor.
- For example, `ctrl-v` `10j` `e` `s` `fixup` `esc` enters visual block mode,
- duplicates the cursor over the next 10 lines, extends the cursor to the end of
- the current word, deletes the selection and enters insert mode, inserts "fixup"
- on each of the 11 selected lines, and returns to command mode.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement