// how to create file on Vim
The GNU nano, commonly known as ‘nano,’ is an improved project of the Pico text editor, which was released in 1999. Like Vim, Nano also comes pre-installed on most Linux systems. The Nano text editor an ideal tool for beginners. On startup, the Nano text editor shows the following interface.
// how to create file with nano
When you search for terminal-based text file editing, then you will find that two of the top choices are Vim and Nano. Which one is better? This is a long debate and I’m not going to directly answer this question, but will instead focus on the differences between nano and Vim. This article highlights some of the differences that set these text editors apart.
Ease of Learning
The graphs in the image above show the learning curves of various text editors, in which Nano and Vim are also included. When you start working with Vim, you might not even know how to edit a file on it. Initially, you might need to find a cheat sheet on Google, but in a couple of hours, you will to know the basics of the Vim text editor. You can also download the GUI version of VIM, known as gVim, to practice some common commands. The toolbar and menus will also make it easy to learn how to use Vim. Then you have Nano, which is an improved text editor of Pico, has no learning curve, and is relatively user-friendly compared to Vim. Even if you have not worked with Nano before, you can easily learn how to use this text editor with a little knowledge and without requiring any additional help.
Vim behaves like a model, and while you are using Vim, you will be constantly changing between the edit mode and the command mode. On the other hand, with the Nano text editor, you only use one mode with some special key combinations. So, Vim is much faster than Nano.
Vim is necessary for a Linux system administrator. This text editor is also good for programmers because you can use it to program code in the form of a plain text file that is easy to copy and manipulate. Furthermore, Vim is good for anyone wanting to work with command line text editors often, and even works for writers. Vim is therefore a good program for all users.
Nano is great text editor for beginners who are new to terminal-based text editing. Nano is also useful for those who want to make just a few simple edits. If you are not a “perfect” Linux user, then Nano might be for you.
To differentiate between these text editors, it would help to list some important features of Vim and Nano.
Using Vim, you can unlock speed and efficiency with some powerful features, which include window support, macros, command repetition, text objects, registers, filters, auto-completion, and global substitution.
Nano does not support advanced features, such as window splitting, macros, auto-completion, viewing multiple files at once, rectangle selecting/vertical block/editing, etc.
Vim is a more powerful tool with which you can make complicated edits in a quick and easy way. With Nano, it can prove more difficult and time-consuming to make complicated edits.
So, Vim or Nano?
If you want to perform more advanced tasks using the command line, then you may find Vim is best to use. Vim is simple and attractive in its own way. So, it is better to prefer Vim over Nano, because if you are using a nano text editor, and you just started learning some important features of Vim. You will perform more efficiently and effectively as compared with Nano. So, it is up to you to choose whichever text editor best fulfills your needs.