linux for blondes


Vim is my favourite text editor. It's nice and simple to use once you have the hang of a few basic comands.

start up comand $ vim

start up a particuar file $ vim file.html

Basic comands

i    lets you insert text

esc    stops what you were doing before (inserting text, etc)

s   puts whatever you type next ontop of what was there before for one character ( if you type s then escape it will be the same as a backspace)

:w    writes to file ie saves

:q quilts the program

:wq   saves and quits

yy  "yanks" ie copies the line you are on

p  pastes the last thing you copied

More complex comands

:%s /wordone/wordtwo/gc   finds wordone and replaces it with wordtwo
  g      global - on all instances in each line
  c      confirms - a confirm prompt appears before each change is made
  %     on all lines