Vim vs. Nano vs. Emacs: Three sysadmins weigh in (2024)

Posted: June 22, 2021 | | by Tyler Carrigan (Editorial Team, Red Hat), Amy Marrich (Sudoer, Red Hat), Seth Kenlon (Editorial Team, Red Hat), Ricardo Gerardi (Editorial Team, Sudoer alumni, Red Hat)

Image

Vim vs. Nano vs. Emacs: Three sysadmins weigh in (1)

Text editors. They aren't something that most users put a lot of thought into. However, not all text editors are alike, and with more time at the terminal, you mightfind that a particular editor works best for you. I asked several of our contributors to write up a "pro" position for Vim, Nano, and Emacs. Each text editor is represented by one contributor with a great deal of experience with the given editor. We are talking about features, comparisons, and personal experiences. Let's jump into the editors, with Vim up first.

[ You might also like:Sysadmin tools: Viewing text in Linux with tail and head ]

Vim - Ricardo Gerardi

Vim is a lightweight but powerful all-purpose text editor that addresses all your text editing needs, from basic configuration file editing to emulating entire Integrated Development Environments (IDE) for software development.

I've been using Vim in one way or another for over 20 years, but around five years ago, I decided to use Vim for all my text needs. I use Vim to write documentation, code in different programming languages, and I wrote an entire book (400+ pages) using Vim exclusively.

Vim's name is a contraction for Vi Improved as it extends the original vi text editor developed for the Unix operating system in the 1970s/80s. Vim has all the features you'd expect from a modern text editor, such as:

  • Undo/redo
  • Autocompletion
  • GUI mode
  • Search and replace
  • Built-in terminal
  • Built-in file manager
  • Spell check
  • Color schemes
  • Syntax highlight

I could list many other features, but this is not what makes Vim different. In my opinion, Vim is the best text editor out there due to a combination of other factors. Let's take a look at those below.

1. Vim is ubiquitous

Vim is everywhere. It's installed by default in most Linux distributions. If not, you can install it using your distribution's package manager. In addition, many distributions include Vim goodies such as plugins, extensions, and dictionaries with their standard package manager. Vim is also available for several other operating systems, including Unix, macOS, and Windows. Vim configuration is portable, and you can have the same Vim experience by copying your configuration files from one machine to another.

2. Vim is fast

Vim is lightweight and fast. Vim runs primarily on the terminal with a small footprint. Combined with a super-fast startup time and zero latency, you can use Vim anytime, anywhere, including over remote connections via SSH and low-powered hardware. You can even have multiple Vim sessions open at once without impacting your machine's performance.

3. Vim is keyboard-driven

Vim provides a keyboard-only experience. You can do everything in Vim without taking your hands off the keyboard. No context switching with the mouse improves your comfort and efficiency. It also allows a good experience when typing in restricted spaces such as when commuting on a train or bus.

4. Vim is intuitive

Vim provides simple and fast navigation commands. You can move your cursor with the arrow keys (or "h", "j", "k", "l" to keep your hand on the home row) like other text editors but, when you start using text objects, you increase your efficiency a lot. For example, pressing "w" takes you to the beginning of the next word, "b" back to the previous word, and "$" to the end of the line. You can also combine these with numbers to move faster. For example, "3w" moves to the beginning of the third word. Vim provides many of these navigation commands.

In addition to navigation commands, Vim provides intuitive mnemonics actions. For example, press "i" to insert text, "c" to change, "d" to delete, and so on.

The best part is you can combine these two ideas to create powerful command chains. For example, "dw" deletes all text until the next word, "d$" deletes until the end of the line, and "c3w" changes all text until the third word.

Vim structures these command chains semantically, reflecting our thought process, similar to sentences in English with verbs and objects. You can combine them logically to compose your own actions without requiring specific commands or functions; or memorizing some weird combinations of keys like Ctrl+Shift+F4 to perform actions.

When you first start with Vim, these commands feel awkward but, with a little practice, they make text editing highly efficient. In fact, Vim keybindings are so popular that other editors like Emacs and even many IDE's provide a way to enable/emulate them.

5. Vim is flexible and extensible

Vim is extremely flexible and powerful. You can start simple and use it to edit configuration files quickly. You can also write programs in your favorite programming language, with features like code completion, syntax highlighting, and syntax checking, similar to popular IDE's. Vim provides out-of-the-box syntax highlighting for many languages and file types.

Vim is fully customizable. You can provide options on the fly or through a config file. You can also create conditional configurations that are effective only when editing a particular type of file. In addition to customization, Vim supports plugins out of the box. The open-source community has developed several plugins to extend Vim's functionality even further. You can add code syntax for other languages, integrate with Git, add a fancy status bar, fuzzy finding, smart code commenting, code snippets, and many other features.

More than just a text editor, Vim is a platform that allows you to build your own text editing experience according to your requirements and preferences.

Want to learn more?

If you want to learn more about Vim, take a look at some of these links:

See Also
Emacs vs Vim

  • Linux basics: A beginner's guide to text editing with vim
  • An introduction to the vi editor
  • 5 useful Vim plugins for developers
  • Vim: Basic and intermediate commands
  • Top five Vim plugins for sysadmins
  • Use Vim macros to automate frequent tasks

Final words on Vim

Vim is a fantastic text editor. It's fast, flexible, and powerful, but most of all, it's fun to use. I honestly don't see me doing some of the things that I can do in Vim with any other editor, at least not as efficiently.

I confess that Nano has saved my life on a couple of occasions, the most recent while I was writing a certification test and Vim's keybinds did not work due to limitations with the exam's web interface. Nano's simple nature allowed me to complete the test successfully.

I've never used Emacs, mostly because I never felt it would provide anything I couldn't do with Vim with a smaller footprint. Perhaps I'll give it a try someday but, until then, Vim continues to be the main driver for all my text editing requirements.

Needless to say, I wrote this blog post using Vim ;-)

Nano - Amy Marrich

Nano is a lightweight text editor, plain and simple. Its sole purpose is to let you edit text.In fact, it's so lightweight many *nix operating systems use it as the editor when in recovery mode.

Even with it being lightweight, it does have some more complex capabilities, though not to the extent that some of the other editors do. Then again, you don't need to install anything else to use it either.

Search

As already mentioned, other text editors are much more robust, but one feature I prefer by far in Nano is the search capability. Unlike most aspects of Linux, the search feature in Nano is not case sensitive by default though you can easily tell it to be. This comes in handy when you're looking for all instances of a word or if you're not sure what case the word is in.

Some other benefits of the search feature include:

  • Moving to specific locations within the document
  • Finding/replacing a word or words
  • The ability to search backward
  • The very handy fact it will wrap back to the top once it reaches the end of the document to continue the search

Other resources

Because Nano is lightweight and easy to use, there isn't much of a learning curve to get started, but here are some tutorials to dive in deeper:

Emacs - Seth Kenlon

GNU Emacs has all the usual features: Easy package installation (package-list-packages), easy theming (customize-themes), a GUI interface as well as a terminal-only interface, a builtin file manager (dired), split screens, remote editing, autosaves, and much more.

The keybindings are a little awkward, but no more so than playing the piano, and it's often just as fluid, especially on a Dvorak keyboard.

But I think it's a unique luxury to have one application that is also itself a live coding environment. The way GNU Emacs can redefine itself, and be redefined by the user, is its most powerful feature.

Lisp

I didn't start using Emacs intending to care about Lisp, much less to learn any of it. Even today, my .emacs configuration file is little more than a patchwork collection of other people's ingenious hacks. But the power within GNU Emacs is enticing, and a small hack in a config file can grow into a complex script that saves you hours during your workday.

With an only rudimentary knowledge of Lisp combined with functions already built into Emacs, I was able to move autosaves into a hidden directory, providing me with the comfort of not having to look at backup files but at the same time knowing that the backup files exist.

I haven't lost data in Emacs due to a crash or disconnection in years.

Lightweight Emacs

There's more to Emacs than GNU and Lisp, though.

The tradition of "emacsen" (that's the accepted plural form of more than one Emacs) pre-dates and continues beyond the GNU Emacs implementation.

There are many options for editors based around a collection of macros and a specific style of user experience, most of them more lightweight than the GNU editor.

Some of my favorites:

I use these emacsen and emacs-alikes almost as often as I use GNU Emacs because they're easy to compile and run from /home on servers where I don't have sudo privileges. They provide similar (or the same) keybindings I'm used to, access to macros and functions, and a familiar overall user experience. And because Emacs is such a big concept, it very often is also able to provide a familiar user experience for users of other editors.

You can use Vim keybindings in GNU Emacs with evil-mode, and you can mimic GNU Nano with Joe's jpico.

The Emacs world

The world of Emacs is a rich one, and as often as I try other editors, I have yet to find anything lacking in GNU Emacs.

Sure, I enjoy Vim for quick edits and its simple navigation, and I have a legitimately reverent appreciation for Nano's intuitive interface, but Emacs is the place I call home.

[ Getting started with containers? Check out this free course. Deploying containerized applications: A technical overview. ]

Decision time

Ok, so now you have to make a decision. Which of these text editors is going to be best for you? If you're like me, whichever is installed and easy to get to is the one I am using most often (Vim). However, I can't choose for you. The best advice I can give is to try out each editor for yourself and see which flavor you like best. Remember, the goal is to be efficient and comfortable with whichever editor you choose.

Topics: Linux Text editors

Vim vs. Nano vs. Emacs: Three sysadmins weigh in (2024)

FAQs

Is Emacs more powerful than Vim? ›

Vi is generally considered faster than Emacs, especially in terms of startup time and performance on systems with limited resources. Its lightweight design focuses on speed and efficiency, making it a preferred choice for tasks requiring quick loading and less memory usage.

Why do people prefer Vim over Nano? ›

Nano can be suitable for your needs if your project is modest or if you only need to perform a few simple editing operations. Vim is a superior choice, nevertheless, if your project is big and requires complicated procedures. Vim has multiple capabilities to improve your productivity.

Is Nano lighter than Vim? ›

Depending on who you ask, Linux aficionados might tell you to use Emacs, Vi/Vim, or Nano. It is a fiercely debated topic. Emacs and Vi/Vim are complex and powerful text editors while Nano is a lightweight, simplified editor.

Is Emacs better than Nano? ›

As compared to Vi and Nano, Emacs is the most powerful, faster, and more reliable text editor used in Linux, macOS, and Windows operating systems. It is not only the text editor but also has a built-in web browser, calculator, etc. Emacs has tones of features such as: Built-in file manager.

Why people still use Vim and Emacs? ›

When you use Emacs or Vim and live on the command line every project has the same workflow. You don't need to install 10 different IDEs and learn 10 different workflows for 10 different projects. You don't need to go through 117 layers of menus to apply compilation options because your IDE invokes the compiler for you.

What is the downside of Emacs? ›

Emacs Cons:

If you want to customize Emacs you'll need to learn Emacs Lisp which introduces a whole new learning curve. Not available everywhere by default. If you need to edit files on a system that you don't have root access to and emacs isn't installed, then you'll end up using vim.

What are the disadvantages of Vim? ›

the cons :
  • The key bindings are kind of long to learn (but they really are worth the time)
  • It also takes time to get good settings (but they also are really interesting to learn)
  • you have to learn / know the UNIX environment to be able to really use some features.
Jul 12, 2023

What percentage of programmers use Vim? ›

If we look at the StackOverflow survey for 2019 about the most popular development environments, Vim is still there on the 5th place, with around 25% of Web Developers using it.

Should I learn Vi or nano? ›

Vim is a more capable editor that allows you to perform complex modifications quickly and easily. Making complex changes using Nano might be more difficult and time-consuming.

Which is easier to learn, Vim or emacs? ›

Emacs is easier to learn since it has a more natural interface (for users familiar with GUI-based text editors). Since Vim has different editing modes, beginners find it a little harder to learn. The main difference between the two is speed.

Is NeoVim better than Vim? ›

Vim's plugin API is restrictive and cumbersome. The plugin architecture of NeoVim is a lot better than Vim. Apart from plugin implementation in Vimscript (VimL), we can also use the Lua programming language. In addition, NeoVim has a lot more powerful plugins, which are not compatible with Vim.

Do programmers still use Emacs? ›

Vim and Emacs aren't going anywhere anytime soon, no matter their antiquated status in modern development environments. IDEs will keep improving, keep launching, and serve an ever-growing segment of young developers who were never forced to thrive in Vim or Emacs environments.

Why is Emacs slower than Vim? ›

It's because Emacs is more of a runtime for elisp applications. As such, it makes sense to have different behaviors for each key depending on context.

Why is Emacs so popular? ›

Emacs is Available Everywhere

Emacs can be easily installed on every system I know of. It can also be used over SSH, so you can use it to edit files and develop on remote machines. Additionally, you store practically all of the customization you do to Emacs in one text file.

Is Emacs the best text editor? ›

Emacs is one of the best text editors that let us edit and write source codes faster and easier. It might be very challenging to start using any editors like Emacs, but it is definitely worth to spend some time to learn the first steps.

Why is Emacs so great? ›

Once its navigation commands are baked into muscle memory, your cursor practically moves on its own. Routine editing tasks are a breeze, almost every development tool you could desire is right where you need it, and there are is no discernible lag or hangup in any part of the program.

Should I learn Emacs if I know Vim? ›

> Is learning emacs worth it? Yes. Especially now that you know vim. Using evil mode, in combination with leader keys (see Doom Emacs or Spacemacs) resolves the RSI issues that have caused emacs users so much trouble in the past.

Top Articles
What type of weapons can felons own?
How to Transfer ETH from Binance to Trust Wallet - DC
Jazmen Jafar Linkedin
Bloxburg Image Ids
T&G Pallet Liquidation
United Dual Complete Providers
Rochester Ny Missed Connections
Visustella Battle Core
83600 Block Of 11Th Street East Palmdale Ca
World of White Sturgeon Caviar: Origins, Taste & Culinary Uses
Pollen Count Central Islip
All Obituaries | Ashley's J H Williams & Sons, Inc. | Selma AL funeral home and cremation
Transformers Movie Wiki
Synq3 Reviews
Burn Ban Map Oklahoma
iLuv Aud Click: Tragbarer Wi-Fi-Lautsprecher für Amazons Alexa - Portable Echo Alternative
Unlv Mid Semester Classes
10-Day Weather Forecast for Santa Cruz, CA - The Weather Channel | weather.com
Alfie Liebel
91 East Freeway Accident Today 2022
Melissababy
John Chiv Words Worth
8000 Cranberry Springs Drive Suite 2M600
How To Tighten Lug Nuts Properly (Torque Specs) | TireGrades
6892697335
Bidrl.com Visalia
Summoners War Update Notes
John Philip Sousa Foundation
Little Einsteins Transcript
Kamzz Llc
Moses Lake Rv Show
El agente nocturno, actores y personajes: quién es quién en la serie de Netflix The Night Agent | MAG | EL COMERCIO PERÚ
Tenant Vs. Occupant: Is There Really A Difference Between Them?
Bitchinbubba Face
Ksu Sturgis Library
Dr Adj Redist Cadv Prin Amex Charge
Questions answered? Ducks say so in rivalry rout
How to Get a Better Signal on Your iPhone or Android Smartphone
Differential Diagnosis
Gotrax Scooter Error Code E2
Content Page
National Weather Service Richmond Va
Goats For Sale On Craigslist
Lawrence E. Moon Funeral Home | Flint, Michigan
Sinai Sdn 2023
New Zero Turn Mowers For Sale Near Me
Erespassrider Ual
Ewwwww Gif
Cryptoquote Solver For Today
Lux Nails & Spa
Texas 4A Baseball
Latest Posts
Article information

Author: Rev. Leonie Wyman

Last Updated:

Views: 5930

Rating: 4.9 / 5 (79 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Rev. Leonie Wyman

Birthday: 1993-07-01

Address: Suite 763 6272 Lang Bypass, New Xochitlport, VT 72704-3308

Phone: +22014484519944

Job: Banking Officer

Hobby: Sailing, Gaming, Basketball, Calligraphy, Mycology, Astronomy, Juggling

Introduction: My name is Rev. Leonie Wyman, I am a colorful, tasty, splendid, fair, witty, gorgeous, splendid person who loves writing and wants to share my knowledge and understanding with you.