If you can learn to use vi to edit files, you will find your linux life becomes much easier. GUI editors sometimes changes the format of the text you see on your screen when you write the file. vi highlights all characters in the file that aren't plain text.
vi has two modes. Navigation mode and text entry mode.
When you start vi, you start in navigation mode.
To get to text entry mode, navigate to where you want to enter text, and press 'i'. Then type in the text you want to enter.
To return to navigation mode, press 'ESC'.
To get to navigation mode, press ESC once or more times. You're now in navigation mode.
Use your arrow keys to move around the file. Once you're familiar with doing this, you can go to 'faster navigating' below.
If you have just started and you're editing a new file, then there's nothing to navigate - so press 'i' to go to text entry mode and start entering your text.
To get into text entry mode requires you to press one of these keys :
i - insert text where the cursor is
I - insert text at the start of the line
a - append text after the cursor
A - append text at the end of the line
Once you're happy using the arrow keys to move around the file, these are faster ways to do the same thing.
w - move forward one word
b - move backward one word
1G - Go to line 1
50G - go to line 50
G - Go to the last line in the file
<ctrl>f - Go forwards one page
<ctrl>b - go backwards one page
|$ vi myfile|
Using the vi commands above, practice entering text and saving your file. Yes, you can use <ctrl>v to paste text from the clipboard. You must be in text entry mode ! This is often the quickest way to copy text from a webpage into a file.
If you paste text when you are in navigation mode, then vi will take the characters as navigation keys. You can practice this also, to see what I mean.
If you get into trouble, press ESC to ensure you're in navigation mode, then press :q! to quit vi immediately and start again.