Bug#784268: vim-tiny should provide vim alternative

Lennart Sorensen lsorense at csclub.uwaterloo.ca
Tue May 5 18:09:14 UTC 2015

On Mon, May 04, 2015 at 08:56:05PM -0400, James McCoy wrote:
> We're not talking about vim vs. vim-nox here.  We're talking about
> vim-tiny vs. anything else.  Below are the list of features that aren't
> included in vim-tiny, many of which aren't “obscure” features:
> B  *+arabic*		|Arabic| language support
> N  *+autocmd*		|:autocmd|, automatic commands
> N  *+browse*		|:browse| command
> N  *+builtin_terms*	some terminals builtin |builtin-terms|
> B  *++builtin_terms*	maximal terminals builtin |builtin-terms|
> N  *+byte_offset*	support for 'o' flag in 'statusline' option, "go"
> N  *+cindent*		|'cindent'|, C indenting
> N  *+clientserver*	Unix and Win32: Remote invocation |clientserver|
> N  *+cmdline_compl*	command line completion |cmdline-completion|
> N  *+cmdline_hist*	command line history |cmdline-history|
> N  *+cmdline_info*	|'showcmd'| and |'ruler'|
> N  *+comments*		|'comments'| support
> B  *+conceal*		"conceal" support, see |conceal| |:syn-conceal| etc.
> N  *+cryptv*		encryption support |encryption|
> B  *+cscope*		|cscope| support
> N  *+dialog_gui*	Support for |:confirm| with GUI dialog.
> N  *+dialog_con*	Support for |:confirm| with console dialog.
> N  *+dialog_con_gui*	Support for |:confirm| with GUI and console dialog.
> N  *+diff*		|vimdiff| and 'diff'

I can imagine some people would miss vimdiff.

> N  *+digraphs*		|digraphs| *E196*
> B  *+emacs_tags*	|emacs-tags| files
> N  *+eval*		expression evaluation |eval.txt|
> N  *+ex_extra*		Vim's extra Ex commands: |:center|, |:left|,
> N  *+extra_search*	|'hlsearch'| and |'incsearch'| options.
> B  *+farsi*		|farsi| language
> N  *+file_in_path*	|gf|, |CTRL-W_f| and |<cfile>|
> N  *+find_in_path*	include file searches: |[I|, |:isearch|,
> N  *+folding*		|folding|
> N  *+gettext*		message translations |multi-lang|
> N  *+insert_expand*	|insert_expand| Insert mode completion
> N  *+jumplist*		|jumplist|
> B  *+keymap*		|'keymap'|
> B  *+langmap*		|'langmap'|
> N  *+libcall*		|libcall()|
> N  *+linebreak*		|'linebreak'|, |'breakat'| and |'showbreak'|
> N  *+lispindent*	|'lisp'|
> N  *+listcmds*		Vim commands for the list of buffers |buffer-hidden|
> N  *+localmap*		Support for mappings local to a buffer |:map-local|
> N  *+menu*		|:menu|
> N  *+mksession*		|:mksession|
> N  *+modify_fname*	|filename-modifiers|
> N  *+mouse*		Mouse handling |mouse-using|
> N  *+mouseshape*	|'mouseshape'|
> B  *+mouse_dec*		Unix only: Dec terminal mouse handling |dec-mouse|
> N  *+mouse_gpm*		Unix only: Linux console mouse handling |gpm-mouse|
> N  *+mouse_jsbterm*	JSB mouse handling |jsbterm-mouse|
> B  *+mouse_netterm*	Unix only: netterm mouse handling |netterm-mouse|
> N  *+mouse_pterm*	QNX only: pterm mouse handling |qnx-terminal|
> N  *+mouse_sysmouse*	Unix only: *BSD console mouse handling |sysmouse|
> B  *+mouse_sgr*		Unix only: sgr mouse handling |sgr-mouse|
> B  *+mouse_urxvt*	Unix only: urxvt mouse handling |urxvt-mouse|
> N  *+mouse_xterm*	Unix only: xterm mouse handling |xterm-mouse|
> N  *+path_extra*	Up/downwards search in 'path' and 'tags'
> N  *+persistent_undo*	Persistent undo |undo-persistence|
> N  *+printer*		|:hardcopy| command
> H  *+profile*		|:profile| command
> N  *+quickfix*		|:make| and |quickfix| commands
> N  *+reltime*		|reltime()| function, 'hlsearch'/'incsearch' timeout,
> B  *+rightleft*		Right to left typing |'rightleft'|
> N  *+scrollbind*	|'scrollbind'|
> B  *+signs*		|:sign|
> N  *+smartindent*	|'smartindent'|
> N  *+startuptime*	|--startuptime| argument
> N  *+statusline*	Options 'statusline', 'rulerformat' and special
> N  *+syntax*		Syntax highlighting |syntax|
> N  *+tag_binary*	binary searching in tags file |tag-binary-search|
> N  *+tag_old_static*	old method for static tags |tag-old-static|
> N  *+termresponse*	support for |t_RV| and |v:termresponse|
> N  *+textobjects*	|text-objects| selection
> N  *+title*		Setting the window 'title' and 'icon'
> N  *+toolbar*		|gui-toolbar|
> N  *+user_commands*	User-defined commands. |user-commands|
> N  *+viminfo*		|'viminfo'|
> N  *+vertsplit*		Vertically split windows |:vsplit|
> N  *+virtualedit*	|'virtualedit'|
> N  *+visualextra*	extra Visual mode commands |blockwise-operators|
> N  *+vreplace*		|gR| and |gr|
> N  *+wildignore*	|'wildignore'|
> N  *+wildmenu*		|'wildmenu'|
> N  *+xterm_clipboard*	Unix only: xterm clipboard handling
> N  *+X11*		Unix only: can restore window title |X11|
> Some of the obvious features that people expect from a typical vim build
> are: +autocmd, +eval, +syntax, +quickfix, +textobjects, +viminfo,
> +vertsplit.

I think I have only used two of those personally. :)  So many features
to pick from.

> True.  I should add some more detail there.

That I think would help reduce confusion.

> > The current description rather matches what it actually provides, which
> > is a minimal nice to use vim that is much more than just vi.
> > The description does not give any indication that vim-tiny does NOT
> > provide vim.
> Well, the lack of “Provides: vim” indicates that, although I can see
> people missing that.

Sure, after all the description says it is a stripped down vim, not a
package only to provide a vi like editor.

> > And if something expects /usr/vim
> > to work, it won't
> Of course, because vim isn't being provided.  If something expects vim,
> it should Depend on it.

Yes but as someone used to typing vim, but not needing all the extra
fluff of full vim...  I am not a package. :)

I am certainly not going to suggest vim being installed by default
in debian.  That would be silly.  Vi and vim are insane user interfaces
to an editor that only some of us for some reason like using.

> > and I don't want to go creating a file there that
> > could later conflict with teh alternatives system.
> You can do it without usurping system-provided functionality.  Just
> check for that first.  I've had to setup similar scripts for other
> things.
> $ cat > ~/bin/vim <<EOF
> #!/bin/sh
> if command -v vim >/dev/null 2>&1; then
>   exec vim "$@"
> elif command -v vim.tiny >/dev/null 2>&1; then
>   exec vim.tiny -N "$@"
> else
>   exec vi "$@"
> fi
> $ chmod a+x ~/bin/vim

Still a hack.  I really wish to have a way to just install packages
and have things work well.  Sure most systems are not tight enough on
disk space that full vim iS a problem, but some smaller systems it can
become relevant.

> Yes, running it as vi defaults it to running with 'compatible' set so
> that it acts more like vi.  You can simply add “set nocompatible” to
> your ~/.vimrc to have behavior more like you're expecting.

Doesn't solve the problem that after 2 decades of typing vim because
typing vi on many systems does NOT give me vim is rather close to
impossible to fix.

> Everyone has vim-tiny installed by default.  The only reason the package
> was created was to provide the vi binary for the base image, as expected
> on a Unix system.

I thought it was created to provide a smaller vim, and only later took
over the job of providing vi.  I thought something else used to do that
job in Debian in the past.  Like nvi or elvis or something.

> Two requests in the past 7 years about not being able to type “vim” when
> vim-tiny is installed vs. the dozen or so bugs and numerous IRC
> complaints about plugins/vim configurations not working when vim-tiny
> provided “vim”…

Only 2?  Wow.

> You've been able to figure out a lot more about the situation than many
> people that have had problems with the opposite setup, so yes, I'm going
> to favor the configuration that helps people who aren't as resourceful.


> > Is the problem really that vim-tiny comes on all debian systems until
> > someone installs a bigger version of vim explicitly and that having vim
> > work before you install vim could confuse people?
> Yes.

Somehow that never was apparent from the previous bug report answers,
or the changelog, or the package description, or anything else.
Adding something like 'The purpose of this package is only to provide
a vi compatible editor in a base system.  It does not provide vim.' would
probably help a lot.

I do agree that having vim exist by default but not work properly until
you do 'apt-get install vim' can cause a lot of confusion.

I just wish there was a package doing what vim-tiny does (and it's package
name implies, it isn't vim-vi after all), that would launch as vim.
The vim-tiny binary is great from my point of view, except for the mising
vim symlink.

> You can build/install a fake vim-runtime using the equivs package or use
> a dpkg filter (--path-exclude) to tell dpkg not to unpack files into
> Vim's runtime directory.

Well I think the simplest is to do a tiny patch to vim-variants.postinst
and rebuild the package locally to make it add alternatives for vim from
vim-tiny.  That seems to be working OK for my case, so about the only
real issue I have is that the description is very misleading on vim-tiny.
I think fixing that at least means you are less likely to get another
bug report in 3 years.  After all if it explicitly states in the
description that the purpose is to provide vi and not vim, then it
becomes a lot clearer why it doesn't provide vim.

Len Sorensen

More information about the pkg-vim-maintainers mailing list