Emacs and Vim - A Basic Overview For Beginners in Software Engineering (2024)

Emacs and Vim - A Basic Overview For Beginners in Software Engineering (1)

Emacs and Vim - A Basic Overview For Beginners in Software Engineering (2)

George Udonte

Posted on • Updated on

Emacs and Vim - A Basic Overview For Beginners in Software Engineering (3) Emacs and Vim - A Basic Overview For Beginners in Software Engineering (4) Emacs and Vim - A Basic Overview For Beginners in Software Engineering (5) Emacs and Vim - A Basic Overview For Beginners in Software Engineering (6) Emacs and Vim - A Basic Overview For Beginners in Software Engineering (7)

Introduction

You've probably never heard of emacs or Vim, especially if you're just starting out your career in software engineering.

It is also normal that as a windows Operating System user, you've only been working with the notepad, notepad++, sublime text, visual studio code, and all other common text editors.

In the Linux operating system, Emacs and vi are the major editors that are used to manipulate files. Both are the major gladiators in the popular editor wars that started in the late 90s.

Nowadays, the hottest contenders in tech software are web browsers. Internet Explorer, Firefox, and Chrome are competing for a larger market in the figurative browser war.

Holy wars are also existing in every sphere of life, especially in pop culture: iPhone vs Android, Marvel vs DC, co*ke vs Pepsi, and so on.

Emacs and Vim - A Basic Overview For Beginners in Software Engineering (8)

Text Editor Wars

The editor war is the rivalry between users of the Emacs and vi (now usually Vim, or more recently Neovim) text editors. The rivalry has become a lasting part of hacker culture and the free software community.

Since at least 1985, The Emacs versus vi debate was one of the original "holy wars" even before the internet. Many users insisted that their editor of choice is the paragon of editing perfection, and insulting the other. Similar tech battles have been fought over operating systems, programming languages, version control systems, and even source code indent style.

We are going to look at both editors and analyze their features and jargon.

Emacs

Emacs (Editor Macros) was developed by David A Moon in 1976 making it one of the oldest pieces of software which exists today. GNU Emacs, the most used variant(fork) of Emacs, was released in 1985 by Richard Stallman, the founder of GNU/Linux.

Emacs and Vim - A Basic Overview For Beginners in Software Engineering (9)

Emacsis a highly advanced, extensible, and customizable text editor that also offers an interpretation of the Lisp programming language at its core. Different extensions can be added to support text editing functionalities.

Emacs has the following features:

  • User documentation and tutorials
  • Syntax highlighting using colors even for plain text.
  • Unicode supports many natural languages.
  • Various extensions including mail and news, debugger interface, calendar, and many more.

Emacs and Vim - A Basic Overview For Beginners in Software Engineering (10)

You can find basic emac commands here

Vi(m)

Vim (Vi Improved), as the name suggests is an improved clone of thetext editor. Thetext editor was originally developed by Billy Joy in 1976 for the proprietary Unix operating system. Bram Moolenar later enhancedvi and released it asvimin 1991.

Emacs and Vim - A Basic Overview For Beginners in Software Engineering (11)

Vim is a powerful command-line-based text editor that has enhanced the functionalities of the old UnixVi text editor. It is one the most popular and widely used text editors among System Administrators and programmers that is why many users often refer to it as a programmer’s editor. Itenables syntax highlighting when writing code or editing configuration files.

The UNIXvieditor is a full-screen editor and has two modes of operation:

  1. Command modecommands which cause action to be taken on the file, and

  2. Insert modein which entered text is inserted into the file. In the command mode, every character typed is a command that does something to the text file being edited; a character typed in the command mode may even cause thevieditor to enter the insert mode.

In the insert mode, every character typed is added to the text in the file; pressing the(Escape) key turns off the Insert mode.

While there are severalvicommands, just a handful of these is usually sufficient for beginningviusers.

You can find basic vi commands here

Vim is also used with Kubernetes for Developer Operations (devops) expecially the Certified Kubernetes Application Developer Exam

Similarities between Emacs and Vi

  1. The buffer tabs are supported in both the command line and graphical user interface.
  2. Cross-platform text editors, including Unix, Linux, and Microsoft Windows.
  3. Available in English, Chinese, French, Italian, Polish, Russian, and even more languages.

Differences between Emacs and Vi

  1. User Interface and Environment

Vim uses editing modes - most commonly thecommand modeandinsert mode. Vim aims to minimize the number of keystrokes that a user has to press, becausevi, upon which Vim is based, was designed to be used over slow terminals.

Emacs uses modifier keys to enable shortcuts, which often involves pressing several keys simultaneously for a single function. This aspect of Emacs is often criticized.

As computer technology developed, new advancements like the GUI (Graphical User Interface) were developed. Emacs adapted and developed its own GUI to make it easier for people to learn and use the editor. In comparison, Vi did not develop its own GUI. This is partly due to the appearance of Vi variants that took over.

A good example is Vi iMproved, also known as Vim, which gradually became more popular than Vi as it added more features and improvements that are not found in Vi. There are also variants of Emacs, but those have not caused the software to fall by the wayside.

  1. Ease of Learning

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.

  1. Productivity and Editing Speed

The main difference between the two is speed. Vi has historicallybeenthe faster of the two starting up in lesstimeand is just generally the more responsive of the two.

Vim enthusiasts argue that once a user becomes familiar with the editing modes and commands of Vim, it enables far greater productivity and efficiency. File editing is usually faster with Vim than with Emacs because of Vim's purposely speed-driven interface. For example, cursor movement can be controlled through theH,J,K, andLkeys in thenormal mode. This means the user's hands do not need to leave the "home row" position, which improves efficiency but comes at the price of adding overhead as mode switching is required to choose between movement and text editing.

In Emacs (with the default configuration), the user moves the cursor with the Ctrl-B or Ctrl-F shortcuts, which might slow down the novice user since two keys need to be pressed. Productivity and efficiency improvements in Emacs depend upon the configuration of the editing environment rather than the editor itself.

  1. RAM usage of Emacs vs Vim

Vi also takes up much less memory than Emacs; this is at a time when 8MB is considered to be a huge amount of RAM. Vim is lighter than Emacs and uses less memory. Vim advocates criticize Emacs' resource consumption with the tongue-in-cheek suggestion that Emacs stands for "EightyMegabytesAnd Constantly Swapping".

However, with GNUclient, a single persistent Emacs process can be run that can support several clients simultaneously. This speeds startup time and decreases total memory usage, closing the gap between Emacs and Vim.

  1. Extensibility and Customization of Emacs vs Vim

Theadvantageof Emacs over Vi is its extensive customizability. Emacs lets the user choose from a wide variety of macros to integrate into his workflow and reduce the effort needed in his process.

Vi lacks this level of customizability and relies on its simplistic and straightforward process. Emacs is also capable of emulating Vi in what theycall“viper mode”; thereby making it easier for Vi users to use Emacs. Vi, with its simplicity, lacks such capabilities.

While both Vim and Emacs support plugins that enhance their functionality, Emacs supports a lot more customization of the editor environment. This is arguably the most important feature of emacs and is responsible for much of emacs' devoted following.

Emacs and Vim - A Basic Overview For Beginners in Software Engineering (12)

Emacs can be extended on the fly by redefining built-in elisp functions, either by typing the new definition into Emacs or by loading elisp files. Groups of related changes are called "modes" and can be easily configured to be automatically used for particular types of files (buffers). So it is easy to define modes for different programming languages or frameworks such as "lisp mode" or "Ruby on Rails mode" or "PHP mode". These modes can directly modify even core behaviors of Emacs, automatically format or colorize text and add standard template or "boilerplate" text such as function declarations and closures.

Programmers find Emacs to be far more customizable to their particular requirements than Vim. Yet some programmers may find Vim to ultimately be better suited to their programming environment due to its equally customizable and fully modal operation.

Emacs can be extended in elisp, while Vim has its own internal scripting language and supports the use of otherprogramming languagesfor plugin development.

While Emacs can be extended in elisp, Vim has its own internal scripting language and supports the use of otherprogramming languagesfor plugin development can also be extended on the fly by using the command mode. The command mode allows configuration options to be set, functions to be defined, and macros to be made. Configuration files for Vim are just commands that can be input through the command mode.

  1. Graphical User Interface (GUI)

Both Vim and Emacs have graphical user interfaces. Virtually all menu items on the graphical interface for both editors are simply ways to handle a shortcut command or quick configuration. The GUIs for the editors do not provide virtually any additional functions beyond those available in the CLI (command-line interface)

Emacs uses XDisplay or gtk2 for its GUI. Vim can use many other GUI libraries, such as gtk,gnome, gnome2, motif, athena, and neXtaw, in addition to gtk2.

Summary

  1. Vi is lighter and faster than Emacs.
  2. Emacs is more customizable than Vi.
  3. Emacs can emulate Vi but not the other way around.
  4. Emacs later developed a GUI while Vi did not.
  5. Emacs continued developing while Vi was succeeded by its variants.

Do we still have a war or a clear winner?

In 2020, Jake King the CEO of CMD decided to settle a long-time debate with his CTO Mike Sample, about which of the two editors is more popular in the Twitter tech space.

Emacs and Vim - A Basic Overview For Beginners in Software Engineering (13)

Jake

@jakeking

Emacs and Vim - A Basic Overview For Beginners in Software Engineering (14)

Want to settle a long term bet with @mikesample ... Vim or Emacs? Twitter, what do prefer? :wq! #Vim4life

23:56 PM - 31 Mar 2020

Emacs and Vim - A Basic Overview For Beginners in Software Engineering (15) Emacs and Vim - A Basic Overview For Beginners in Software Engineering (16) Emacs and Vim - A Basic Overview For Beginners in Software Engineering (17)

.

You should want to make some vim friends right now.

Further Readings

Introduction

As an expert and enthusiast, I have access to a wide range of information and can provide insights on various topics, including text editors like Emacs and Vim. I can help you understand the concepts and features of these editors, as well as the differences between them. Let's dive into the details!

Emacs and Vim: Overview and Features

Emacs and Vim are both popular text editors used in the Linux operating system for manipulating files. They have been at the center of a long-standing rivalry known as the "editor wars." Here's a brief overview of each editor:

  1. Emacs:

    • Developed by David A Moon in 1976, making it one of the oldest pieces of software still in use today.
    • GNU Emacs, the most widely used variant of Emacs, was released in 1985 by Richard Stallman, the founder of GNU/Linux.
    • Highly advanced, extensible, and customizable text editor.
    • Offers an interpretation of the Lisp programming language at its core.
    • Supports various extensions, including mail and news, debugger interface, calendar, and more.
    • Provides user documentation and tutorials, syntax highlighting, Unicode support, and more.
  2. Vim:

    • An improved clone of the original Vi text editor, which was developed by Billy Joy in 1976 for the proprietary Unix operating system.
    • Vim (Vi Improved) was released in 1991 by Bram Moolenar.
    • Powerful command-line-based text editor.
    • Widely used by system administrators and programmers, often referred to as a programmer's editor.
    • Supports syntax highlighting, has two modes of operation (command mode and insert mode), and offers a lighter and faster alternative to Emacs.
    • Can be extended through plugins and has its own internal scripting language.

Similarities and Differences between Emacs and Vim

While Emacs and Vim have their unique features, they also share some similarities. Here are the key points:

Similarities:

  • Both editors support buffer tabs in the command line and graphical user interface.
  • Available in multiple languages, including English, Chinese, French, Italian, Polish, Russian, and more.

Differences:

  1. User Interface and Environment:

    • Vim uses editing modes, such as command mode and insert mode, to minimize keystrokes and improve efficiency.
    • Emacs uses modifier keys for shortcuts, which can involve pressing multiple keys simultaneously, making it more complex for some users.
  2. Ease of Learning:

    • Emacs is generally considered easier to learn for users familiar with GUI-based text editors.
    • Vim's different editing modes can make it slightly more challenging for beginners.
  3. Productivity and Editing Speed:

    • Vim is known for its speed and responsiveness, making it faster to start up and generally more efficient for experienced users.
    • Emacs' productivity and efficiency depend on the configuration of the editing environment, but it offers extensive customization options.
  4. RAM Usage:

    • Vim consumes less memory compared to Emacs, making it lighter and more suitable for systems with limited resources.
  5. Extensibility and Customization:

    • Emacs excels in extensibility and customization, allowing users to choose from a wide variety of macros and define modes for different programming languages.
    • Vim also supports plugins and customization but may have fewer options compared to Emacs.
  6. Graphical User Interface (GUI):

    • Both Emacs and Vim have graphical user interfaces, but the GUIs mainly provide shortcuts and configurations without additional functions beyond the command-line interface.

The Editor Wars: Is There a Clear Winner?

The rivalry between Emacs and Vim, known as the "editor wars," has been a lasting part of hacker culture and the free software community. However, it's important to note that the choice between Emacs and Vim is subjective and depends on individual preferences and requirements.

While Vim is often praised for its speed and efficiency, Emacs offers extensive customization options and a more natural interface for users familiar with GUI-based text editors. Both editors have dedicated user communities and continue to be actively used and developed.

In conclusion, there is no clear winner in the editor wars, as the choice between Emacs and Vim ultimately depends on the user's needs, preferences, and familiarity with the editors.

I hope this information helps you understand the concepts and features of Emacs and Vim. If you have any further questions, feel free to ask!

Emacs and Vim - A Basic Overview For Beginners in Software Engineering (2024)
Top Articles
The Complete Guide To Hotel Status Matches
Microsoft 365 Vendor Management System | Power Apps and SharePoint
Riverrun Rv Park Middletown Photos
Overton Funeral Home Waterloo Iowa
Dlnet Retiree Login
Instructional Resources
Ret Paladin Phase 2 Bis Wotlk
Lifebridge Healthstream
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Chris wragge hi-res stock photography and images - Alamy
Truist Park Section 135
Google Jobs Denver
Rondale Moore Or Gabe Davis
Academic Integrity
Call Follower Osrs
THE 10 BEST River Retreats for 2024/2025
Derpixon Kemono
Pollen Count Central Islip
Pollen Count Los Altos
Full Range 10 Bar Selection Box
Void Touched Curio
Amc Flight Schedule
Gem City Surgeons Miami Valley South
Grayling Purnell Net Worth
Sizewise Stat Login
Quest: Broken Home | Sal's Realm of RuneScape
Xsensual Portland
Form F-1 - Registration statement for certain foreign private issuers
Thick Ebony Trans
Gina Wilson Angle Addition Postulate
2487872771
Cb2 South Coast Plaza
Amelia Chase Bank Murder
Sound Of Freedom Showtimes Near Movie Tavern Brookfield Square
Truvy Back Office Login
Bursar.okstate.edu
134 Paige St. Owego Ny
Smartfind Express Henrico
Truckers Report Forums
Quake Awakening Fragments
Captain Billy's Whiz Bang, Vol 1, No. 11, August, 1920
America's Magazine of Wit, Humor and Filosophy
Omaha Steaks Lava Cake Microwave Instructions
Weather Underground Corvallis
Trivago Sf
Gary Vandenheuvel Net Worth
Streameast Io Soccer
Youravon Com Mi Cuenta
Sky Dental Cartersville
Model Center Jasmin
Strawberry Lake Nd Cabins For Sale
Ippa 番号
Www Extramovies Com
Latest Posts
Article information

Author: Jerrold Considine

Last Updated:

Views: 5870

Rating: 4.8 / 5 (58 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Jerrold Considine

Birthday: 1993-11-03

Address: Suite 447 3463 Marybelle Circles, New Marlin, AL 20765

Phone: +5816749283868

Job: Sales Executive

Hobby: Air sports, Sand art, Electronics, LARPing, Baseball, Book restoration, Puzzles

Introduction: My name is Jerrold Considine, I am a combative, cheerful, encouraging, happy, enthusiastic, funny, kind person who loves writing and wants to share my knowledge and understanding with you.