Bug#681012: vim-tiny should install vim alternative

Tim Gokcen hexetic at gmail.com
Mon Jul 9 22:10:04 UTC 2012


Package: vim-tiny
Version: 2:7.2.445+hg~cb94c42c0e1a-1
Severity: wishlist

In vim 2:7.2.049-1, uploaded by James Vega <jamessan at debian.org> on Tue, 
25 Nov 2008 23:38:38 -0500 I see that the following change was made:

* [f7bfa57] Don't install vim alternatives for vim-tiny. vim-tiny is 
built to act like vi, so the vim alternative just causes more confusion 
than it's worth (by default).

Realizing that the change was made some time ago, I would like to argue 
for reversing it. All of the 'vim' packages automatically set 
'compatible' mode when invoked with 'vi' whereas they present their full 
feature set when invoked with 'vim'. Even with vim-tiny, the difference 
between invoking it as 'vi' vs. running /usr/bin/vim.tiny is substantial.

According to what I see in debian/rules, vim-tiny is built by passing 
--with-features=small to the configure script, whereas vim-full is built 
with with-features=huge. A list of what these features are can be 
obtained by doing :help version. Building vim with 'small' provides two 
features on top of 'tiny' (remember: vim-tiny is 'small', not 'tiny') 
'normal' adds 66 features and 'huge' adds one more. On the basis of 
'number of features' alone, it certainly would appear that vim-tiny is 
merely a shadow of vim.

However, look at :help vim-aditions. This section of the help docs is 
composed of a list of 33 features that the vim authors found to be 
significant changes from 'vi'. 12 of these features are available in 
vim-tiny. Here is the breakdown, with numbers indicating the order in 
which the feature is presented in vim-additions:

In vim-tiny:
#1 Multiple level undo
#3 Multiple windows and buffers (multiple files open, screen split)
#9 Repeat a series of commands (recording macros with q)
#10 Flexible insert mode (arrow keys in insert mode)
#11 Visual mode
#12 Block operators
#13 help system in a window
#14 Command-line editing and history
#17 Long line support
#18 Text formatting
#19 Extended search patterns
#31 Editing of binary files (don't break binary files when saving them)

Not in vim-tiny:
#2 Graphical User Interface
#4 Syntax highlighting
#5 Spell Checking
#6 Folding
#7 Diff mode
#8 Plugins
#15 Command-line completion
#16 Insert-mode completion
#20 Directory, remote, and archive browsing
#21 Edit-compile-edit speedup (:make)
#22 Finding matches in files (:vimgrep)
#23 Improved indenting for programs (cindent)
#24 Searching for words in included files
#25 Automatic commands
#26 Scripts and Expressions
#27 Viminfo
#28 Printing
#29 Mouse support
#30 Usage of key names
#32 Multi-language support
#33 Move cursor beyond lines (virtualedit)

The list of features is not alphabetical, so we can assume that the 
author put what they felt was most important at the top. vim-tiny 
includes features #1, #3, and #9 on that list.

I think that vim-tiny includes the most fundamental 'vim' features. 
Multiple-level undo is all but essential, being able to open multiple 
windows (e.g. :vsplit) & buffers aids tremendously, recording macros can 
be very useful when making large numbers of edits, and visual mode makes 
deleting or changing text very straightforward.

In other words, 'vim-tiny' is not "built to act like vi" as James Vega 
said, but is just a smaller, simpler vim.

When a user tries to access a feature that is not available in vim-tiny, 
vim does warn them with a helpful message

:vimgrep
E319: Sorry, the command is not available in this version

Doing
:help version (only works if vim-runtime is installed)
or even just
:version
will explain why.

The original justification for vim-tiny not installing a 'vim' 
alternative was because, according to James Vega, it "just causes more 
confusion than it's worth". Given vim's extensive built-in docs I'm not 
sure how anyone could be confused about vim-tiny for very long. I 
checked the pkg-vim-maintainers mailing list but I couldn't find anyone 
complaining about being confused, nor is there a bug about this.


Because vim-tiny actually includes many essential vim features, and 
because vim helpfully tells users when features are not available, I do 
not agree with the original justification for change f7bfa57, and I 
believe it should be reversed. Users who install vim-tiny should be able 
to type 'vim' and get the improved version of vi that they want.

-- 
Tim Gokcen





More information about the pkg-vim-maintainers mailing list