I am interested in what people use as their text editor, and would specifically like to know what is the feature of vim that you like the most?

In answering, please state what you mostly use vim to do, sysadmin tasks, programming, and in what language you mostly program in.


I enjoy the ability to type and save text.

John Millikin
+5  A: 

I use vim for editting source code. Its best feature in my opinion is the regex search and replace stuff.

+11  A: 

I like the flame wars it start with emacs.

+2  A: 




Scott Evernden
+1  A: 

I use vim (or vi) for every text editing task I do -- programming (php, perl, bash, html, javascript, java), sysadmin, e-mail composition, etc. I'm not proud of that, but it's the editor I know and my fingers are too set in their ways to change.

As for favorite features, I like the vim (and vi) command that likely has the highest power-to-pixel ratio.



+10  A: 

I suppose the best feature of Vim is the modal paradigm to using a text editor.

There are many editors that have as many features as Vim, but there are not many that use the modal way of editing/performing commands that Vim has, and although I could use TetxMate, BBEdit or Emacs that are three of the most powerful editors for the Mac, I always end returning to Vim just because it's easier on the fingers and fits my way of editing better.

Sergio Acosta
+1  A: 

I use vim for all text editing: sys admin tasks, programming, taking notes, writing e-mails etc.

Compared to vi the multi-level undo is a killer feature, but features such as window splitting and visual selection are quite nice. Also the way the extended features can be combined with original vi command set; one of my favorites is using the visual block selection (Ctrl-V) combined with "c" which allows you to change columns of text.

+5  A: 

"*" command - search for the word under your cursor. If I can go for a few more then: easy to record and play macros, multiple buffers, bookmarks and "." command. The last one is one of my favorites. It repeats the last changes that you've made. For example, if i replace one word with another, then pressing "." will do the same thing again. Another example, if i add another argument to a function by typing something like ", int i", then pressing "." will do it again.

Philip Derbeko
+2  A: 

I use Vim most for programming, I love recording macros, they are very useful in some occasions as well regexp's, I also like the text identation features, for example =iB (ident inner { ... } block) or gg=G to ident the entire file.

Find useful also [ Shift-i to see all the occurrences of the word under the cursor in the current file.

I like tag-block motions (I edit HTML and XML also), for example dit will delete the inner content of an markup tag or dat will delete the tag under the cursor...

+13  A: 

Ctrl + v -- row visual mode

shift + i -- insert before

type text

(Inserting stuff in multiple lines at the same time)

as for the second part of the question:

I use vim mostly for editing single file stuff of every kind... scripts, proof of concept code, documents, lists ...


I use Vim for all text-editing and programming (primarily Python) tasks. Its best feature is the steep learning curve which allows one to feel superior once it's mastered.

Ben Hoffstein
+1  A: 

I like that you can use it in telnet, ssh, and other terminals, and that you can completely control all it's functions using standard ASCII character keys.

+1  A: 
  • Folds are really handy.
  • Its script language is also cool.
  • Ctrl-n and ctrl-p for showing a popup menu of terms from the current file that match the word under the cursor (basically just autocomplete) is really nice, too.

For the most part, I do programming in PHP and Ruby. I also keep track of to-do lists etc.

Lucas Oman

Visual Blocks and all the text manipulations you can do with them. Incredibly powerful.

brian newman

I like so many of VIM's features, but I can sum them up with this statement: almost everything can be done with less than 3 keystrokes. Furthermore, there is no real drawback over not having a pointing device such as a mouse. Even the most complicated tasks can be assigned to macros.

J D OConal
+5  A: 

@ macros.

< Do stuff>

@a to repeat what I just did in the buffer.


The ability to navigate word to word with w, sentence by sentence with ) and section by section with ].


I really like branch undo (yes, that's right... branch undo (and redo)). The dot, and macros, and plugins, and three letter keystrokes, and... and... etc etc.

I use it for programming. Primarily PHP/SQL/HTML/JS/etc


It works everywhere. However crippled, single user, tiny embedded, 20year old or damaged the machine - you can still use vi.

Martin Beckett


I can quickly jump to any file, line, block, expression I want to fix errors. Without the use of a mouse.

I can quickly use both regex and macros to fix my code.

+1  A: 

vim 7.0 has tabs! I didn't know that until recently and now vim has become my editor of choice for ruby/php/java programming and linux sysadmin work.

:tabe foo

note: I don't like having to type :tabp and :tabn to switch between tabs... any suggestions?

You could map the commands to some keys, e.g. F5 and F6. See http://www.ph.unimelb.edu.au/~ssk/vim/map.html#key_mapping.
Cristian Ciupitu
gvim comes preconfigured with the familiar Ctrl-PgUp and Ctrl-PgDn bindings for tab switching.
Sam Stokes
`gt` switches to the tab to the right, `gT` switches to the tab to the left

@mgb Not only does it work everywhere, but it is everywhere. There isn't a linux distribution on the planet that doens't come with some sort of vi. Knowing it allows one to instantly have an extremely powerful editor that one is familiar with on any *nix computer anywhere. Not too fan the flames too much, but the same cannot be said of emacs.

Other good features?

  • plugins
  • easy to customize in a single file (vim.rc)
  • split screen editing.
Paul Wicks

Reflow the current paragraph according to the current textwidth (tw) setting.

Ted Percival
+1  A: 

The ability to use tags file: man ctags

By using the <ctrl>-] key you can jump the the definition of the identifier under the cursor. What takes this beyond most IDE's that the previous location is pushed onto a stack. So you can ":pop" yourself back to your old location.

Martin York

With VIM editor it's easy to do code indentation, I like the regexp and tag based replace machanism and visual block mode is just one of good features, just select stuff horizontally or vertically, do what ever u want like indentation, cut, copy or replace all of them with something else. Added to this Macro's are damn powerfull, they reduce my typing work a lot. All in all just one awesome editor for developers.


Scriptability (which is not a word). Not only does VIM have it's own scripting language, but if compiled with +python, VIM scripts can be written in python. This opens up insane possibilities and is demonstrated well by the user submitted scripts.

Martin W

I was raised on Emacs, but the feature I like best about it is shared with Vim - ubiquity. I HATE switching editors. If you find one that can fit your needs AND that is popular enough that other editors (Visual Studio for example) actually have MODES to emulate it, then your can learn that editor well and not worry about having wasted your time.

And unfortunately for me, Emacs is too heavy, and vi wins in the ubiquity department. If you want to effectively administer Linux, for example, and not rely on nano/pico to save you, then you should learn vi. That is, I should learn vi. Sigh...

+1  A: 

d[number]d -- Deletes that many lines.

Ryan Bigg
I always find myself wanting to use 'dd' when writing code in another editor.
David Barry

Being an embedded linux programmer, I would say that the best feature of Vim is the fact that it's predecessor, vi, is nearly 100% gauranteed to be available on any unix platform. So knowing even the basic editing commands will enable you to edit files nearly anywhere (personally I use other editors for the programming-intensive work).

Are you running vi on (consumer-level) embedded hardware? :-)
Cristian Ciupitu
+1  A: 
  • Not having to use the mouse
  • Ctrl-V to select a rectangular area
  • . command to repeat
  • Easy to record little macros for one-time use.
Mike Kantor

Fantastic documentation.

To use simply type:

:help <search phrase>

Apart from many tricks like '.' and recording macros... the list goes on, I think the other major vim 'feature' is not having to leave the keyboard to use it. Including moving around with h, j, k and l. Jumping by word, paragraph, sentence, section, matching braces...

Greg Sexton

One of my favorites are buffers/windows

I program and did system administration for years.

Aaron H.

I can't live without syntax highlighting and vim is the most lightweight editor I know with it. I also really love being able to delete lines, move to the start or end of a document or line, find and replace with regex, all with a few key strokes.

Also, emacs users can suck it. ;-)

Just so you know, some jerk flagged your post as offensive (possibly the same one who downvoted). I think this is totally unmerited. You might want to make it a bit softer. I know there's a wink-smiley, and I believe you're saying it in jest, but some people can't take a joke.
Chris Lutz
+1  A: 

I can't believe there are two pages of answers and nobody has mentioned vimdiff yet.

  • interactive diffing and merging
  • all the editing power of vim
  • syntax highlighting of the files being diffed
  • line diffs (i.e. shows you what characters changed on a given line, making it very easy to track down typos etc)
  • supports diffing as many files as you can fit on your screen (I've used it to resolve three-way merge conflicts from source control)

... and it's built into vim!

I use vim for sysadmin tasks and software development in every language under the sun (except Java, where Eclipse is just too useful to give up).

Sam Stokes

It's not exactly a vim feature, but It's All Text! lets me use vim to edit the contents of text fields in Firefox. (It works with other, inferior editors too ;))

Sam Stokes

I'm a former user of TextPad, and had memorized many of that program's accelerator keys. One of the first things I did in Vim was learning the map function to keep consistency (F5 search, F8 replace, etc.). I created my personal colorscheme, and borrowed alot from others' vimrc files. Viva Vim! Configurable to any degree.

+1  A: 

Text Object (type :h text-objects in vim for a complete description)

This feature allows to operate on a block of text where the cursor is.

This is typically used with the 'd' or 'c' commands (delete, change), followed by 'i' or 'a' (inside a block or a whole block) and ended by a block description.

Examples of use cases:

  • ca{ : Delete a block of code delimited by curly braces.
  • ci( : Change the content inside parenthesis.
  • ci" : Change the content inside a string
  • da< : Delete an html tag
  • dap : Delete current paragraph (handy to delete a whole function).
  • daw : Delete a word

I use vim for anything text-editor wise, which is mostly source-code.

f key. Pressing f then any character brings you to the next instance of that character on the line (F to go to an instance before the cursor).


The incremental search and the ability to access the search and command histories.

Jesse Collins

Simply the easyness and the ergonomics of the modality system. Accessing the whole file system with hands on the home row is easily the best thing about vim.