Beginner Vim Guide
Why Vim? It's a command line text editor that allows you to perform coding functions on the text itself. You can install it anyhere and operates totally in command line interface.
- Install Vim 8.0+
- cd to the directory you'd like to work in and type vim (return)
- Vim has two modes - insert mode and command mode. You may spend equal times in both.
Now you're in Vim
- Type :Ex to open the file explorer. You can navigate through folder and files using the arrow keys. Press enter when you find the file you're lookign for.
- Type i in order to enter insert mode. This is the regular text editor mode. Press escape to enter command mode.
- In command mode, you are able to do a great deal of programmatic things. For now, we will simply save and close the file.
- Type :w (return) to save the file.
- Type :q (return) to close the file and exit Vim.
Practice this a few times and then try this
- Type vim (filename) to open a file directly from command line.
- You can save and close at the same time by typing :wq (return).
You can now use Vim!
You've opened files, wrote in them, saved and quit. You can now use Vim. Anything from this point forward will be geared toward advanced text or code manipulation, which will save you time and allow you to become faster and more productive. Stay tuned for the next guide.
Before you leave...
Let me know what you think or what you'd like to see next. [email protected]