VI Basic Commands: X DW D DD
VI Basic Commands: X DW D DD
x dw D dd .
delete the character at the cursor location! delete the current word! delete the remainder of the line after the cursor! delete the current line! repeat the last insertion, replacement or delete command!
Replacing strings
Can also 'e done manually, searching and replacing once, and then using n )ne,t occurrence* and . )repeat last edit*! n,ps/str1/str2/g 'et/een line num'ers n and p, su'stitute all )g: glo'al* occurrences of str1 'y str2! 1,$s/str1/str2/g in the /hole file )0: last line*, su'stitute all occurrences of str1 'y str2!
Misc
[Ctrl] l redra/ the screen! J join the current line /ith the ne,t one
!oing further
vi has much more fle,i'ility and many more commands for po/er users3 4t can ma(e you e,tremely producti%e in editing and creating te,t! "earn more 'y ta(ing the 5uic( tutorial: 6ust type vimtutor! Find many more resources on the net3