VI commands help

Hey guys im new to Linux and have been playing around with the VI editor but have a few questions

what would be the best way to delete all trailing �white space' (SPACE and TAB) at the end of all lines in the vi buffer.

and how would i go about searching for a word without regard to upper or lower case, so if i search for hello it would find HELLO and hello.

Any help would be appreciated.

Andrew

You can use substitution to remove the tabs or spaces at the end of the line:

:s/[ ^I]*$//g (note: ^I is me hitting tab)

As for the case matching

:set ic

says to match "insensitive case"

Cheers,

Keith