VIM, as Ugly as It Is Fast
Hello there Nullbyte users!
This will be my first article here.
Feel free to give feedback in the comments!
Today I'll be introducing the UNIX text editor VIM.
VIM is a text editor that is completely controlled from the keyboard.
An experienced VIM user is A LOT faster than a sublime user and since time = hacking, we don't want to waste time.
VIM is available for all UNIX based OS'es. In fact big chance you already have it. You can see if you have vim by simply typing 'vim' in the terminal.
If you get an error 'command not found' simply download vim by using:
$ sudo apt-get install vim
$ sudo dnf install vim
if that doesnt work you can install it from source, unpack, read the README and follow from there.
Alright, now that's done, type in 'vim' in the terminal.
what you'll see is something like:
Now as you may have noticed, you are unable to write text and if you tried, some 'random' commands may have been executed.
The reason for this is that you are not in Insert Mode but in Normal mode.
To enter Insert Mode simply press i on your keyboard.
You can now type what you want.
To exit Insert Mode and go back to Normal Mode press Esc.
To save a file, make sure you are in Normal Mode and type
To exit the program, make sure you are Normal Mode and type:
This is what VIM makes great. You have different modes and in each mode the keys have different meaning.
Insert mode is not very special, it's basicly just Nano. You can type and (god forbid) navigate with arrow keys.
This mode is what makes VIM, VIM. In this mode you can:
- quickly edit code
- copy and paste
- turn settings on or off
And a whole lot of other stuff which I will explain in my next guide where I will be covering the Normal mode.
Hope you liked it.