The Vim text editor tool was mostly developed by Bram Moolenaar, in addition to a subset of other smart & dedicated individuals. It can be used to edit plain text of all kinds. In contrast to what most people belive there is another way of exiting vim instead of just opting to reboot the comuter. Additionally, Vim has “on-line” help which can be accessed by entering “:help”.
In this article you will find a really basic introduction to vim. The general syntax to make use of vim is: user@pc:~$ vim [options] [filelist]. For the Arabic reading experience, please try: user@pc~:$ vim -A [file]. There is a lot of commands that can be utilized and I believe, in trained hands it is a tool of great power, however for this post I am sticking to the fundamentals, aiming to make it to the other side:
- Enter vim
- Do stuff in vim
- Exit vim.
1. Enter vim
2. Do stuff in vim
2.1 Enable Creature Comforts
The following configuration will allow for a better user experience whilst using vim. It should be noted that these configuration changes will not persist when vim is closed. Therefore, if you plan on using vim again you should save it to: ~/.vimrc
2.2 Search
2.3 Insert Text
2.4 Copy and Paste
3. Exit vim
There are a few different methods to exit vim, taking it that the changes are correct and wanted write quit :wq is the way to go. Your options to exit:
- :w – write/save but do not exit yet.
- :wq write and quit
- : x write and quit (if I do not add a space it turns it an emoji 😡 )
- :q quit altough does not work with unsaved work.
- :q! quit and discard any unsaved work.
Vim cheat sheet: https://gist.github.com/nerdalert/5f80853b4e195204bc6d
Vim pro explaining Vim for an hour: https://youtu.be/RZ4p-saaQkc?si=fo8KVeymaVMpVDFx
A random link has just shown up and it refuses to be removed: https://nano-editor.org/download.php