Quick Vim Tutorial

Vim Modes The basics

These are the very basic commands needed to start vim, open a file, edit, and save a file.
Some Useful Options for ~/.vimrc

Mixed File Format:
Unix, Windows, and MAC all use different end of line (EOL) character. Vim typically figures out the fileformat for you automatically. A file with \r\n linefeeds becomes dos, a file with \r only becomes mac, and a file with \n only becomes unix. However, when a file contains BOTH \r\n and \n linefeeds, Vim declares it as a UNIX file and displays the ^M (\r) characters. These mixed-EOL files come about from stuff edited in different editors: some editors only save the lines actually changed, converting only part of the file to DOS-style or MAC-style line endings. This also happens with files generated by user-written programs if a consistent mechanism for line termination isn't used. Here is the trick to remove all the ^M's. References: There are many more commands for using vim. What I have shown above will give a user the basic tools for editing text files. For all the commands and tricks for programmers, you can check out