m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/vim.md
blob: c69b9c480b59909009b71f5874f56fe8c4f2b8d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Vim tricks

## Navigating help

| prefix | example       | context                                          |
| ------ | ------------- | ------------------------------------------------ |
| `:`    | `:h :r`       | ex command (command starting with a colon)       |
| `none` | `:h r`        | normal mode                                      |
| `v_`   | `:h v_r`      | visual mode                                      |
| `i_`   | `:h i_CTRL-W` | insert mode                                      |
| `c_`   | `:h c_CTRL-R` | ex command line                                  |
| `/`    | `:h /\r`      | search pattern (in this case, `:h \r` also works |
| `'`    | `:h 'ro'`     | option                                           |
| `-`    | `:h -r`       | Vim argument (starting Vim)                      |

## Using vim as a hex editor?

    :%!xxd
    :%!xxd -r