linux:vi
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| linux:vi [2020/09/07 19:03] – Wulf Rajek | linux:vi [2023/05/29 11:55] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 44: | Line 44: | ||
| set expandtab | set expandtab | ||
| </ | </ | ||
| + | |||
| + | ===== Cut, Copy & Paste ===== | ||
| + | |||
| + | - Press '' | ||
| + | - Then press '' | ||
| + | - Then press '' | ||
| + | - Then press '' | ||
| + | |||
| + | - Copy the entire line by pressing '' | ||
| + | - Paste the line by pressing '' | ||
| + | |||
| + | ===== Copy whole file to clipboard ===== | ||
| + | |||
| + | The clipboard is buffer +. To copy to clipboard, do "+y and [movement]. | ||
| + | So, gg"+yG will copy the whole file. | ||
| + | |||
| + | Similarly, to paste from clipboard, "+p | ||
| + | |||
| + | Alternatively: | ||
| + | gg"*yG | ||
| + | :%y+ | ||
| + | |||
| + | ===== Search & Replace ===== | ||
| + | |||
| + | < | ||
| + | : | ||
| + | </ | ||
| + | |||
| + | Complex replace with reference: | ||
| + | < | ||
| + | : | ||
| + | </ | ||
| + | |||
| + | to repeat, press ":", | ||
linux/vi.1599501791.txt.gz · Last modified: (external edit)