[buug] vim annoyances

Michael Paoli Michael.Paoli at cal.berkeley.edu
Wed Apr 6 19:51:22 PDT 2011


Yes, vim bit me again today,
:q! wouldn't quit,
and it quite repeatedly forgot the name of the file I was editing.
And all that even with its "compatible" mode.

 From my vim annoyances collection (at least what I bothered to note,
anyway):

vim never ceases to annoy me:

I edit a series of files using their full pathnames - given as command
line arguments, I use ^G to note which file I'm editing - vim displays
only a partial relative pathname - omitting the portion which allows me
to distinguish which of two files I might be editing that have the last
to parts of their pathname that are identical.  To make it worse, "Ah,
workaround; :!echo %<CR> ... no go, it still only tells me that
relative pathname tail component!  ARRRRGH!
This causes various problems, e.g. things like this don't behave as one
would expect:
:!cd / && ls -ld %<CR>
vim should never have the arrogance to presume it's smarter than those
using it or knows better what they want than they do

bloody .swp files!

When one does an operation that happens to take a long time in vim, e.g.
deleting a bunch of lines:
:1,BIGNUMd
It's darn near impossible to interrupt/stop vim!
interrupt (e.g. control-C) doesn't stop it, neither does:
quit (e.g. control-\)
and it doesn't even let one use job control to suspend (e.g. control-Z)
so that one can manually kill the sucker with some appropriate
signal(s).  One typically has to resort to killing the sucker via some
other login session on the host.

Dark blue on black?  You've got to be kidding!  If I wanted comments to
be bloody invisible I wouldn't have written them!

Colors?  Ewwww, ... yuck!  Distracting!  Makes it much harder for the
eyeballs to scan and see what I want to identify.

Oh my gosh, something went horribly wrong!  I invoked vi with no
arguments, and there's a whole lot more on the screen than just the
tildie (~) characters in the leftmost column.  Must be some
catastrophic error.  Oh, yes, it is ... vim.

~
~                              VIM - Vi IMproved
~
~                               version 7.1.314
~                           by Bram Moolenaar et al.
~                 Vim is open source and freely distributable
~
~                           Sponsor Vim development!
~                type  :help sponsor<Enter>    for information
~
~                type  :q<Enter>               to exit
~                type  :help<Enter>  or  <F1>  for on-line help
~                type  :help version7<Enter>   for version info

"Oh, you can change that in vim, just configure ..." - bloody heck, it
should do the right thing by default!  And yes, I've tried vim's :se
compatible - it's not very compatible, and it's also not the default
either.

bloody .sw[o-z] files

bloody non-FHS compliant doesn't know where to properly write temporary
files!  I did mention .sw[o-z] files, right?  I don't think I mentioned
them enough yet.

regular expressions, there's shell metasyntax, there's Basic Regular
Expressions, there's Extended Regular Expressions, there's Perl Regular
Expressions, and damn near everyone does it exactly or almost exactly
like one of those, but vim, no, you couldn't do like those with one or
two or three or so exceptions, but you add a whole bunch of stuff in
vim regular expressions that matches no one else's regular expressions
- highly incompatible.  And yes I tried vim's compatible option, and
not it's not compatible.

I've used (classic UNIX) vi and BSD vi / nvi for decades, my fingers
fly on the keyboard issuing vi commands - it works, and works damn
well.  I know what to expect and it does what I expect.  Vim does not,
and repeatedly slows me down, frustrates me, and causes significant
errors.  And yes I tried vim's compatible mode - it's not compatible.

:se all
Though shallt fit complete full output of :se all within a single 80x24
window, ... not 3 bloody screenfulls of 80x24.

vim is bloated:
$ ls -lLs /usr/bin/nvi /usr/bin/vim /usr/bin/vim.tiny | sort -bn
  372 -rwxr-xr-x 3 root root  372740 Jan 28  2010 /usr/bin/nvi
  624 -rwxr-xr-x 1 root root  632884 Jul 11  2010 /usr/bin/vim.tiny
1480 -rwxr-xr-x 1 root root 1510796 Jul 11  2010 /usr/bin/vim
$
Yes, even it's tiny version is bloated

can't recover cleanly without tracking down all the bloody .sw[o-z]  
files - oh, did I mention the bloody .sw[o-z] files?

:q! fails to quit!!!!
:se
--- Options ---
nobuflisted           shelltemp           ttyfast
   fileencoding=utf-8
   fileencodings=ucs-bom,utf-8,default,latin1
Press ENTER or type command to continue
:q!
E37: No write since last change (add ! to override)
E162: No write since last change for buffer "[No Name]"
Press ENTER or type command to continue
:q!!
E488: Trailing characters
:!kill -1 $PPID
[No write since last change]

Vim: Caught deadly signal HUP
Vim: preserving files...

Vim: Finished.
Hangup
$ rm .swp
$

vim repeatedly bloody annoyingly forgets what file I'm working on.  Yes,
I've tried it's compatible mode, it's not.  It also very annoyingly
tells me the permissions on the file have changed - duh, of course they
have, I did it - stupid annoying vim:

$ vi foo
"foo" [New File]
//i - go into insert mode
//insert a bunch of stuff
//<ESC>
:w
"foo" [New] 73L, 1254C written
:!chmod a+rx %
Press ENTER or type command to continue
//Bloody hell - and compatible doesn't shut this stupidity off:
W16: Warning: Mode of file "foo" has changed since editing st
artedSee ":help W16" for more info.
Press ENTER or type command to continue
:!ls -ld %
//Now you're really pissing me off!  You forgot what file I'm working on!
E499: Empty file name for '%' or '#', only works with ":p:h"
Press ENTER or type command to continue
:w
E32: No file name
//bloody hell!  I'll tell the damn poor excuse for an editor!:
:f foo
"foo" [Not edited] line 1 of 73 --1%-- col 1
//yeah, right, whatever ...
:w
E13: File exists (add ! to override)
:w!
"foo" 73L, 1254C written
:!chmod go=r %
Press ENTER or type command to continue
W16: Warning: Mode of file "foo" has changed since editing st
artedSee ":help W16" for more info.
:!ls -ld %
E499: Empty file name for '%' or '#', only works with ":p:h"
Press ENTER or type command to continue
:help W16
E433: No tags file
E149: Sorry, no help for W16
Press ENTER or type command to continue
//bloody tell this retarded editor again
:f foo
//make an edit change, then change permissions again:
:!chmod go=r %
[No write since last change]

Press ENTER or type command to continue
W16: Warning: Mode of file "foo" has changed since editing st
artedSee ":help W16" for more info.
:w
E32: No file name
:w!
E32: No file name
:q!
E37: No write since last change (add ! to override)
E162: No write since last change for buffer "foo"
Press ENTER or type command to continue
:!kill -1 $PPID
[No write since last change]

Vim: Caught deadly signal HUP
Vim: preserving files...

Vim: Finished.
Hangup
$ rm .swp
$




More information about the buug mailing list