Bug#784268: vim-tiny should provide vim alternative

James McCoy jamessan at debian.org
Tue May 5 00:56:05 UTC 2015


On Mon, May 04, 2015 at 03:41:38PM -0400, Lennart Sorensen wrote:
> On Mon, May 04, 2015 at 03:18:09PM -0400, James McCoy wrote:
> > This isn't going to change.  I've explained the reasoning fairly
> > thoroughly in #681012 (which I'm merging this into).
> 
> I just read that, and I don't agree with the explanation.  It has lots
> of vim features that work great, even if some of the more obscure ones
> do not.  I am sure someone could find features that exist in the vim-nox
> that are obviously not in vim, and who says those missing vim features
> are not expected by some people?

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'
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.

> > Then setup an alias or ~/bin/vim instead.  vim-tiny has an explicit
> > purpose and that's not going to change.
> 
> Perhaps that explicit purpose ought to be in the package description then.

True.  I should add some more detail there.

> 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.

> 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.

> 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
EOF
$ chmod a+x ~/bin/vim

> > In the various support channels I'm a part of, I've seen far less
> > confusion about vim-tiny providing vi than the other way around.
> 
> Well running vim.tiny gives different (and better) behaviour than running
> it with the vi symlink.

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.

> I think you should write a better package description instead warning
> people what they are in fact getting and put back the vim link.  Most
> people won't install vim-tiny, but at least those that have a reason to
> will get something that works.

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.

> My only other option is to manually maintain patches to the package and
> keep rebuilding it every update.  That would be a pain in the ass but
> I guess I may not have a choice if the package isn't going to do the
> right thing.
> 
> Clearly this isn't the first time this request is being made.  I think
> this indicates the current state is wrong.

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”…

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.

> I think the problem is that there are in fact people that would like vim
> without the disk space cost of vim-runtime,

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.

Cheers,
-- 
James
GPG Key: 4096R/331BA3DB 2011-12-05 James McCoy <jamessan at debian.org>



More information about the pkg-vim-maintainers mailing list