atyh on Nostr: vi(1) editor learnin fer 04-03-23: --------------------------------------- how to: ...
vi(1) editor learnin fer 04-03-23:
---------------------------------------
how to:
vi:
-insert from external file at cursor = :r ~/file-name
-insert results of shell command at cursor = :r !command
-insert string at begining of every line = :%s/^/TEXT TO INSERT/g
-insert string at end of every line = :%s/$/TEXT TO INSERT/g
-replace all instances of THING with OTHER THING = :%s/THING/OTHER THING/g
(add i after /g to make for case insensitive)
---------------------------------------
now,
sleep 28800s && wake
---------------------------------------
how to:
vi:
-insert from external file at cursor = :r ~/file-name
-insert results of shell command at cursor = :r !command
-insert string at begining of every line = :%s/^/TEXT TO INSERT/g
-insert string at end of every line = :%s/$/TEXT TO INSERT/g
-replace all instances of THING with OTHER THING = :%s/THING/OTHER THING/g
(add i after /g to make for case insensitive)
---------------------------------------
now,
sleep 28800s && wake