DEV Community

Is Vim or Nano Better for Linux User?

Anurag Vishwakarma on November 16, 2023

Photo by Gabriel Heinzer on Unsplash Two of the most popular and commonly used text editors are vim and nano. 🥊 What is Vim? Vim (sho...
Collapse
 
dreamhollow4219 profile image
Ian

It's really a matter of preference.

I'm a hardcore Vim user even though there's still I could learn about optimizing use of the program.

But I could see how people prefer Nano because it's closer to an interactive editor compared to Vim.

I'm surprised Emacs is being left in the dark, here.

Collapse
 
katafrakt profile image
Paweł Świątkowski

Emacs user myself, I'm not really surprised. While Emacs might work inside terminal, I think the default is to run is as a separate application. It's also not quite fast to start and more suitable for opening a project in it and working in it for a long time. This "Vim vs Nano" articles seem to be rather aimed at use case of quickly updating a config file over SSH, more than making it a daily main editor.

And the fact that Vi/Vim and nano are installed by default on most distributions while Emacs is not also probably has something to do with it.

Collapse
 
srtechwriter profile image
marcia wilbur • Edited

I was working with MX Linux re their Alpha for pi. I said, hey... where's Midnight Commander. The response was... well users can just install it... I'm like... this is small board and I really would like to request mc. Nope. The people who create the distros select packages... and I have met some interesting OS "devs". I'm the lead dev for respin, a distro customization tool. I'm waiting for someone respin to something better... still waiting. Why no emacs. Give options!!!!!

Collapse
 
srtechwriter profile image
marcia wilbur

right!

Collapse
 
m0n0x41d profile image
Ivan Zakutnii

Once in Vim, always in Vim.

p.s. This is not a 'how-to-exit-vim' joke.

Collapse
 
dotsilas profile image
Silas Duarte

VI key binds are genius, a very very cool way to manage all the things with the keyboard...

...and you can use it in other terminal apps (fish shell, ranger, etc), text editors (obsidian, VS Code, Notepad++), IDEs (Visual Studio, JetBrains IDEs, Eclipse, etc), web browsers (Vimium), Windows Managers (Hammerspoon, Komorebi, i3wm and a lot of more in Linux).

VI/Neovim are very customizable editors, you can do (almost) anything with them, and if you struggle with the configuration there is distros like NVChad or LunarVim with all the things out of the box.

So, even if you don't want to use vim/neovim as your main editor, when you learn VI, you can enjoy/take advantage of VI.. :)

Collapse
 
anurag_vishwakarma profile image
Anurag Vishwakarma

Thanks for letting me know all this stuff. Specially about the distro.

Collapse
 
gbhorwood profile image
grant horwood

i was super excited about lunarvim, but eventually went back to my custom vim set up if for no other reason than it was what i was familiar with.

for people just getting into vim or people who aren't stuck in their ways (like me!), though, lunar is probably going to be awesome.

Collapse
 
dotsilas profile image
Silas Duarte

I feel a bit the same, I'm currently working on my own Vim setup because I would like to have full knowledge of all the parts and how they work, and I would like something lighter than the distros, but for now I use LunarVim to get the job done.

Do you have your Vim/Neovim dotfiles somewhere? It's always inspiring to read other's setup :)

Thread Thread
 
gbhorwood profile image
grant horwood

i don't know if i'd call it "inspiring", but it's here:
github.com/gbhorwood/vimrc/blob/ma...

Collapse
 
marcorodnav profile image
Marco Rodríguez Navarro

Personally, I think this is not a fair comparison. Nowadays vim has lots of customization options. Heck, you can search for "Vim as a full IDE" and several guides will come up.
However, I don't see much of improvements for nano. I guess because nano is not a realistic option for anyone to do any serious job, besides quickly edit a config file in a server (or any similar task).
A fairer match would be "vi vs nano". These two are by default in almost all linux distros, and both fulfill the same goal: to make quick changes.

Collapse
 
cappe987 profile image
Casper

I'd argue that Vim learning curve isn't very steep. It's longer than Nano because Nano is very limited in functionality. Take 30 minutes to learn the basic Vim keys hjkli, Esc, and save/exit. Then you basically have what Nano has. Then continue learning as you go.

Vim also has these features by default:

  • Syntax highlighting for code/config files
  • Search and replace functionality
  • Go to line numbers
  • Auto-indentation and undo/redo capabilities
Collapse
 
barnesric56 profile image
RawHide81

EMACS

Image description

Collapse
 
anurag_vishwakarma profile image
Anurag Vishwakarma

If you’re interested you can join our WhatsApp Channel where I share stuff related to Cloud, DevOps etc.

Collapse
 
smilebootyvikki03 profile image
vandhanaKumar

Work in it.

Collapse
 
anurag_vishwakarma profile image
Anurag Vishwakarma

WTF?

Collapse
 
kaamkiya profile image
Kaamkiya

Never used Nano, I'm a hardcore Vim user. I love it's customizability, although I wish they didn't make a whole new script for customization (VimScript).

P.S. Vim is not short for Vi, it's short for Vi Improved.

Collapse
 
katafrakt profile image
Paweł Świątkowski

Vim is terminal based. Nano provides a simple GUI-based interface

Wait, how is nano not terminal-based? What am I missing?

Collapse
 
anurag_vishwakarma profile image
Anurag Vishwakarma

Vim is a terminal-based text editor. This means that vim runs in a terminal or shell window.

Nano provides a simple graphical user interface (GUI). Nano runs as its own application window, with menu bars, input boxes, and other GUI elements. This can make nano feel more familiar and user-friendly, especially for those used to GUI text editors.

Collapse
 
cappe987 profile image
Casper

No. Nano runs in the terminal just like Vim. If your Nano opens up a separate window you must have some non-standard version or maybe alias to override it. Feel free to share a screenshot of what Nano looks like to you.

Collapse
 
katafrakt profile image
Paweł Świątkowski

This is not true, at least in my experience. That's why I'm asking if you are referring to some GUI-fied version of nano. I've used GVim (separate window Vim), but never heard of such version of nano.

Collapse
 
mjablecnik profile image
Martin Jablečník

Nano does't have GUI (graphical user interface). It is running only in terminal with TUI (terminal user interface).
On the other hand Vim you can run in terminal with TUI but also in GUI (try find vim-gtk)
github.com/vhakulinen/gnvim
github.com/equalsraf/neovim-qt

Collapse
 
brandonwallace profile image
brandon_wallace

Vim is not that hard to learn. Beginners can run vimtutor on the command line. Then learn more and more as time goes on.

Collapse
 
srtechwriter profile image
marcia wilbur

Never been a vim or vi fan. The vulnerability a few years made me go - See... Emacs was my first editor of choice but I honestly can say I prefer something like ATOM before MS bought github and scrapped it. I still use atom with --no-sandbox. Can use VSCode as long as telemetry is not enabled but it's MS and as an advocate, it's a hard pill to swallow.

nano for quick edits
midnight commander for quick edits
atom for notes, drafts, coding, writing

Collapse
 
kammarianand profile image
Anand

Well absolutely VIM

Collapse
 
daalvand profile image
Mehdi Daalvand

Everybody says Nano is simpler than Vim, but I don't know why working with Nano was harder than Vim, even when I was a beginner.