17

Over the years, I thought I'm a Vim master! Recently I visited a real Vim master! oops! My knowledge is awfully superficial!

For example I didn't know it's possible to add a \c to make search case insensitive. (instead of :set ignorecase)

I clearly remember when how I'm surprised when I found SuperTab or TagList plugins first time. Vim's official site says "Vim isn't an editor designed to hold its users' hands. It is a tool, the use of which must be learned.", so naturally it should have many undiscovered features.

So I'm asking, what are your favorite features of Vim? What are things you can do with it that you can't or are more difficult in the other editors?

Of course there's some same topics about other editors:

Community
  • 1
  • 1
Ehsan
  • 1,937
  • 1
  • 17
  • 30

4 Answers4

8

About the "hidden" part... Try these:

:help 42

:help!

:o)

Community
  • 1
  • 1
KKovacs
  • 100
  • 3
  • 7
  • 4
    Cool!! That last one - what did it do exactly, looks like it just gave me a blank file named ")"? – poundifdef Jul 23 '10 at 01:49
  • 2
    @rascher: I think the last one isn't a vim command, just a smiley in this post. (look how it is not formatted the same as the first two) – Sergio Acosta Jul 24 '10 at 05:39
  • Yes of course, Sergio is right about that, that's supposed to be a smiley. Sorry for the confusion :o) – KKovacs Sep 08 '10 at 13:51
6

It took me a few years before I learned about text objects

:help text-object
:nmap cw ciw
:nmap cW ciW

Also nice are ci" and ci (when I want to change a string or function args).

bluish
  • 26,356
  • 27
  • 122
  • 180
mstearn
  • 4,156
  • 1
  • 19
  • 18
0

This is not exactly a hidden feature but it's a little known feature. If you type :X then you can encrypt your file with a password.

skywalker
  • 1,230
  • 14
  • 30
0

You can check the correctness of the text using line:

:set spell
Boken
  • 4,825
  • 10
  • 32
  • 42
ant_dev
  • 653
  • 8
  • 16