What is Vim? (2024)

Vim is a Unix text editor that's included in Linux, BSD, and macOS. It's known for being fast and efficient, in part because it's a small application that can run in a terminal (although it also has a graphical interface), but mostly because it can be controlled entirely with the keyboard with no need for menus or a mouse. For instance, to insert text into a file, you press I and type. To navigate or to issue a command (such as Save, Backspace, Home, End, and so on), you press Esc on your keyboard and then press whatever key or key combination corresponds with the action you want to take. It's a very different way of editing text compared to what modern computer users expect, but it's the way Unix admins all over the world edit config files, changelogs, scripts, and more.

Vim is also commonly referred to as Vi because when it was written by Bill Joy in the late 1970s, it was short for visual editor. Before Vi, few people even imagined that a computer could act as a sort of interactive typewriter. Text files were edited with commands (like ed) that would find a specific line and either insert or remove text; literally all text was manipulated with what amounted to a rudimentary version of your favorite office application's find-and-replace menu (but without the office application). Vi was a breath of fresh air, enabling users to enter a screen session that showed them their entire file and allowed them to edit it live.

[Download our Vim cheat sheet]

While many people claim to love and use Vi, few people use Vi over Vim on a daily basis. In casual conversation, Vi and Vim are interchangeable and usually refer to Vim (Vi Improved). On some POSIX systems, the vi command is a pointer to Vim (or else Vim is just called Vi). However, some systems ship just with Vi and you have to install Vim separately.

To verify whether you have Vim installed, use this command:

which vim

If you get nothing in return, you don't have Vim installed. Install Vim from the project's homepage.

Furthermore, some distributions offer a few different builds of Vim. Usually, this means there's a minimal build that mimics the old Vi, with just enough Vim-isms included to make it usable, and an enhanced build that offers a truly modern Vim experience. The best way to determine what's available is to search your package manager for any package containing the string "vim" and then install the one with the most features (like vim-enhanced on Fedora).

Why use Vim?

Vim is the default fallback editor on all POSIX systems. Whether you've just installed the operating system, or you've booted into a minimal environment to repair a system, or you're unable to access any other editor, Vim is sure to be available. While you can swap out other small editors, such as GNU Nano or Jove, on your system, it's Vim that's all but guaranteed to be on every other system in the world.

Its efficiency in both design and function is hard to ignore, too. Vim's native terminal-based interface doesn't rely upon menus or fancy peripherals or even "extra" keys like Ctrl or Alt. Vim (mostly) uses keys common to any keyboard, regardless of language, layout, or device (and those that aren't common can be remapped pretty easily).

Vim on mobile devices

If you run a terminal on your mobile phone, Vim is a great choice for editing except for one problem: You probably don't have an Esc key. While there are alternate keyboards available for download, they often add extra keys at the expense of key size. If that's not a change you're willing to make, then you can set Vim to map Escto some other key sequence. Add this imap command to your environment's .vimrc (this example uses two commas as the escape sequence, but you can use anything that you don't anticipate usually typing in quick succession, like qq or yy):

imap ,, <Esc>

How to use Vim

There's no illusion that Vim is intuitive, so its developers have created vimtutor, a simple, interactive walkthrough of the basics. Although Vim is bursting with potential, there are only a few controls you need to know in order to use it. Paraphrasing vimtutor's first lesson, here are the essentials:

  • Start Vim from a terminal by typing vim or on your desktop by launching gvim.
  • Press I to enter insert text mode. When in insert mode, all you can do is type text into your document. There are no commands in insert mode.
  • Press Esc to enter normal mode, used for commands.
  • In normal mode, you can move your cursor with h (left), j (down), k (up), and l (right). It might help to remember that j is down by equating it, visually, with a Down arrow.
  • To exit Vim, type :wq if you want to save your work or :q! to discard unsaved changes.

Beyond these basics, all other Vim commands are arguably for convenience and efficiency.

What is Vim? (1)

When you first launch Vim, you create and open a temporary and empty text file, just as you would when opening any other text editor. Unlike other text editors, however, you can't type anything into the file at first. That's because you're in normal mode, which is used to issue commands to Vim. It expects that your first action will be opening a file or saving an empty one as something with a sensible name. If your intent is to type without opening a file or saving your current one, enter insert mode by pressing I on your keyboard. After entering this mode, you can enter text as you'd expect.

Using Vim is a constant dance between insert and normal modes, but once you're used to it, it becomes so fluid that you don't think about it. It's a little like pressing the Caps Lock key (instead of Shift) to get a series of capital letters or like a press-and-hold on a mobile keyboard to get an alternate character. We don't call these actions "modes," but that's what they are: they're toggles that you flip on or off to change the context of some action. For instance, when you want to move back a word in Vim, you press (and then release) Esc to enter normal mode and then b to move your cursor to the left one word. It's different from other text editors, but if you think about it, the concept of changing modes isn't foreign.

Vim plugins

Vim is extensible, meaning that you can add features to it through plugins. With a history spanning decades, Vim has are plenty of useful plugins to choose from and even entire sites, like Vim Awesome, dedicated to Vim plugins.

You can install plugins manually or with a Vim package manager like Vim-plug. If you're a casual Vim user, you can easily become dependent upon Vim through plugins. From simple color schemes to file managers, plugins are Vim's way of keeping you coming back for more.

Become a Vim pro

Getting good at Vim takes some practice, and for the first week or so, it'll feel like someone secretly rearranged the keys on your keyboard (and stole your mouse). However, working through vimtutor helps get you started with a solid foundation, and our Vim cheatsheet goes a long way to relieve the stress of remembering important commands. In no time, you'll find yourself using Vim as second nature, and eventually, you'll catch yourself absent-mindedly hitting Esc in all your favorite applications.

What is Vim? (2)This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.

What is Vim? (2024)

FAQs

What is Vim used for? ›

What is Vim? Vim is a text editor for Unix that comes with Linux, BSD, and macOS. It is known to be fast and powerful, partly because it is a small program that can run in a terminal (although it has a graphical interface). It is mainly because it can be managed entirely without menus or a mouse with a keyboard.

What is so special about Vim? ›

Vim is the only editor that optimizes editing text instead of writing from a blank page. That's another reason Vim makes you so efficient: you have different modes for each phase of your current work or task. Normal mode is for reading code and navigating quickly.

What does the acronym Vim stand for? ›

The name Vim is an acronym for Vi Improved. This editor is an enhanced version of the Vi text editor that we all know and love, and is normally seen in a CLI form; however, it does have a GUI version available for standard desktop use.

What is Vim script used for? ›

Vim script is a programming language built in to Vim. It basically allows us to do cool stuff with Vim. Put more formally, Vim script allows us to define and trigger desired Vim behavior with code consisting of Ex-commands, functions, variables, certain data structures, etc.

Is Vim still popular? ›

While sophisticated editors like Visual Studio Code (VS Code) have come a long way, there's still no great replacement for Vim. Furthermore, because Vim has stood the test of time, it is now widely available as an add-on in many applications.

What is Vim called now? ›

Name. Cif is sold under the names Jif, Vim, Viss and Handy Andy, depending on which of the 51 countries it is sold in. In Sweden, and South Africa, the products were originally sold under the name Vim before this was changed to Jif, the launch name in the United Kingdom, Ireland, the Netherlands and Hong Kong.

What is the disadvantage of Vim? ›

Since it is so customizable, the user needs to maintain his or her development setup over time and make sure all the plugins work well together. This can be more challenging if many plugins and customizations are used. Once you learn Vim well, any text entry field that doesn't use Vim keybindings will feel broken.

Does Facebook use Vim? ›

Facebook engineers have written millions of lines of code. There is no mandated development environment. Some developers use vim. Some use Emacs.

Why would anyone use Vim reddit? ›

Vim's undo/redo system is unbeatable. Type something, undo, type something else, and you can still get back the first thing you typed because Vim uses an undo tree rather than a stack. In almost every other program, the history of the first thing you typed is lost in this circ*mstance.

What is Vim slang? ›

lively or energetic spirit; enthusiasm; vitality. Synonyms: dash, energy, pep, vigor.

Why is it called Vim? ›

In 1988, a Dutch software developer named Bram Moolenaar got a new Amiga computer and wanted to start editing in vi. Stevie was buggy and unsatisfying, so Moolenaar began writing a new vi port, based on its source code. He named the project 'Vi IMitation', or 'Vim' for short.

What does D mean in Vim? ›

Key 4: d (delete)

d is a command, and d {motion} will delete the text from the cursor to where the cursor would end up if we preformed the motion. A little confusing? Let's see an example with the motion we've already seen. The w key. d tells Vim to delete something.

Who owns Vim? ›

In December 2004, it was sold to the group Guaber, based in Italy. Vim is currently owned by Henkel Group after its acquisition of Spotless Group in 2015, although it is still marketed by Unilever in Canada and Sri Lanka, where it has a 90% market share. Vim is also sold as a Unilever brand in South Africa and India.

Is Vim actually useful? ›

While the path to mastering Vim may seem daunting, the endless possibilities it offers in terms of speed, health benefits, and adaptability make it a skill worth acquiring. The worst that can happen is you find out you don't like it!

Is Vim free to use? ›

Vim is an acronym for Vi IMproved. It is a free and open-source cross-platform text editor.

What is the function of Vim? ›

Vim has a built-in function function() that returns a funcref when you pass it a function name (string). In Vim, if you want to assign a function to a variable, you can't just run assign it directly like let MyVar = MyFunc .

What is Vim cleaner good for? ›

This surface cleaner works as a bathroom cleaner and kitchen cleaner, which means it is a must in your cleaning supplies. Made with micro-crystals, this cleaner is tough on dirt, scum, watermarks, tough grease and burnt-on food. Add this to your cleaning products as it contains 100% naturally derived descaling agent.

Why do people use Vim over IDE? ›

Understanding the Underlying Processes: While IDEs provide powerful debugging and automation features, they often abstract away the intricate details of program execution. Vim, being a lightweight text editor, encourages a deeper understanding of the underlying processes.

Can I uninstall Vim? ›

Method 2: Uninstall Vim via Apps and Features/Programs and Features. Look for Vim in the list and click on it. The next step is to click on uninstall, so you can initiate the uninstallation.

Top Articles
30 Old Fashioned Jello Salad Recipes
Healthy Parsnip Soup Recipe with Crispy Sage | Low FODMAP Soups
Woodward Avenue (M-1) - Automotive Heritage Trail - National Scenic Byway Foundation
Is Paige Vanzant Related To Ronnie Van Zant
Knoxville Tennessee White Pages
Loves Employee Pay Stub
Winston Salem Nc Craigslist
Chambersburg star athlete JJ Kelly makes his college decision, and he’s going DI
Boomerang Media Group: Quality Media Solutions
Crocodile Tears - Quest
Apnetv.con
Ncaaf Reference
Edgar And Herschel Trivia Questions
Detroit Lions 50 50
Urban Dictionary Fov
Cvs Learnet Modules
Steamy Afternoon With Handsome Fernando
My.tcctrack
Kitty Piggy Ssbbw
Bnsf.com/Workforce Hub
Billionaire Ken Griffin Doesn’t Like His Portrayal In GameStop Movie ‘Dumb Money,’ So He’s Throwing A Tantrum: Report
Mals Crazy Crab
Yakimacraigslist
Plan Z - Nazi Shipbuilding Plans
Vrachtwagens in Nederland kopen - gebruikt en nieuw - TrucksNL
Culver's Flavor Of The Day Taylor Dr
How To Find Free Stuff On Craigslist San Diego | Tips, Popular Items, Safety Precautions | RoamBliss
Is Holly Warlick Married To Susan Patton
Umn Biology
30+ useful Dutch apps for new expats in the Netherlands
Craigslist Boerne Tx
Cars And Trucks Facebook
24 slang words teens and Gen Zers are using in 2020, and what they really mean
Rogers Centre is getting a $300M reno. Here's what the Blue Jays ballpark will look like | CBC News
Shoreone Insurance A.m. Best Rating
Best Restaurants In Blacksburg
Wisconsin Women's Volleyball Team Leaked Pictures
Barber Gym Quantico Hours
San Bernardino Pick A Part Inventory
Lonely Wife Dating Club בקורות וחוות דעת משתמשים 2021
Royals Yankees Score
Academic Notice and Subject to Dismissal
Mynord
The Horn Of Plenty Figgerits
Streameast Io Soccer
R/Gnv
Air Sculpt Houston
Tropical Smoothie Address
Is Chanel West Coast Pregnant Due Date
Chitterlings (Chitlins)
Convert Celsius to Kelvin
Ihop Deliver
Latest Posts
Article information

Author: Terence Hammes MD

Last Updated:

Views: 6489

Rating: 4.9 / 5 (49 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Terence Hammes MD

Birthday: 1992-04-11

Address: Suite 408 9446 Mercy Mews, West Roxie, CT 04904

Phone: +50312511349175

Job: Product Consulting Liaison

Hobby: Jogging, Motor sports, Nordic skating, Jigsaw puzzles, Bird watching, Nordic skating, Sculpting

Introduction: My name is Terence Hammes MD, I am a inexpensive, energetic, jolly, faithful, cheerful, proud, rich person who loves writing and wants to share my knowledge and understanding with you.