Ubuntu – Difference between Nano and Vim

nanovim

I have recently started using Ubuntu and hence, the terminal.

As text editor, I have used the pre-installed nano. Now I wonder whether I should install and use vim as well.

What are each of those text editors' special features, advantages and disadvantages? Which one is better suited for newcomers, and for what use cases would the other be preferable?

Best Answer

Vim and Nano are completely different terminal text editors.

Nano is simple, easy to use and master while Vim is powerful and tough to master.

To differentiate, it will be better to list some features of them. Since we don't use terminal editors for normal edits or coding, I'm listing some of the most interesting features that help for the way we use them today.

Nano:

  • Easy to use and master.
  • Nano has most of the shortcuts listed at the bottom of the window, making it extremely simple to use.
  • Search function
  • Search and replace
  • "Goto line" command
  • Automatic indentation

Vim:

  • Tough to get started with and master. The editing and command modes will confuse beginners.
  • Session recovery
  • Split screen
  • Tab expansion
  • Completion commands
  • Syntax coloring

Although I hated Vim when I first met it, now I prefer it over Nano.