User Tools

Site Tools


linux:vi

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:vi [2020/09/07 19:14] Wulf Rajeklinux:vi [2023/05/29 11:55] (current) – external edit 127.0.0.1
Line 55: Line 55:
   - Paste the line by pressing ''p''.   - Paste the line by pressing ''p''.
  
 +===== 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 =====
 +
 +<code>
 +:%s/bla/blubs/
 +</code>
 +
 +Complex replace with reference:
 +<code>
 +:%s/rtrim(\(.*\),"0")/zerotrim(\1)/
 +</code>
 +
 +to repeat, press ":", then the cursor up
  
linux/vi.1599502468.txt.gz · Last modified: 2023/05/29 11:53 (external edit)