0

I find my directories littered with files named ; (semicolon) because I keep pressing :w; by accident. What's the easiest way to prevent this?

dan
  • 43,914
  • 47
  • 153
  • 254

1 Answers1

4

You can use the following:

:cabbr w; w

This will correct occurences of "w;" with "w" inside the command line.

See :h abbreviations for details.

yolenoyer
  • 8,797
  • 2
  • 27
  • 61
  • 1
    Note: this will expand when searching as well. See [vim change :x function to delete buffer instead of save & quit](http://stackoverflow.com/q/7513380/438329) – Peter Rincker Feb 24 '16 at 22:10