This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| linux:vi [2024/10/10 10:36] – [Useful Commands] tmade | linux:vi [2026/04/07 16:08] (current) – [Visual Mode] tmade | ||
|---|---|---|---|
| Line 12: | Line 12: | ||
| \> #A word ends with | \> #A word ends with | ||
| :set hlsearch | :set hlsearch | ||
| - | % #Jump to closing bracket | + | % #Jump to closing bracket, when curser is on " |
| + | # #Jump to function, when curser is on function or where the function is called (and vice versa) | ||
| | | ||
| ==== Edit ==== | ==== Edit ==== | ||
| Line 53: | Line 54: | ||
| :set paste #to avoid linefeeds by pasting code | :set paste #to avoid linefeeds by pasting code | ||
| :set nopaste | :set nopaste | ||
| + | :syntax on | ||
| + | :syntax off # | ||
| | | ||
| ====Visual Mode==== | ====Visual Mode==== | ||
| - | If you can´t enter text with putty and right mouse click, set | + | If you can´t enter text with putty and right mouse click, set |
| set mouse-=a | set mouse-=a | ||
| in file | in file | ||
| Line 68: | Line 71: | ||
| Adapt to it - with mouse mode turned on, the new way to paste is | Adapt to it - with mouse mode turned on, the new way to paste is | ||
| shift-right-click | shift-right-click | ||
| + | |||
| + | ====Multi-edit==== | ||
| + | To edit various lines: | ||
| + | |||
| + | - strg +v | ||
| + | - mark all lines with arrow up/ down | ||
| + | - press " | ||
| + | - press tab or space | ||
| + | - escape | ||
| | | ||