Are you sure you are running "vim"/"vim-enhanced" and not
"vim-tiny"/"vim-minimal" (Debian/Fedora)?
--
Anurag Priyam,
3rd Year Undergraduate,
Department of Mechanical Engineering,
IIT Kharagpur.
+91-9775550642
Use your package manager. On Ubuntu, "sudo aptitude show vim" will
bring up all the vim packages. An 'i' on the first column indicates
that the package is installed on your system. So you could very well
do "sudo aptitude show vim | grep '^i'". See if vim, appears in that
list or vim-tiny.
Don't know about Fedora.
vim-tiny should already installed. choose either vim-gtk (with gvim) or
vim-nox (without gvim) should provide big or huge feature.
and please don't top post.
--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
On Wed, November 24, 2010 9:40 am, KasperH wrote:
> for completeness, CygWin:
> $ vi -k
> VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Feb 11 2010 17:36:58)
> Unknown option argument: "-k"
> More info with: "vim -h"
There is no option -k.
Please show the output of :version. That should give us some
information, which vi clone is installed and in case of vim,
how it was compiled. For vim, to support -x, it needs at least
a normal build (that is no small or tiny version, see output of
:version)
> root@my-ubuntu:~# aptitude show vim
On a Debian derived distribution, use something like
~$ dpkg -l 'vim*' |grep '^ii'
I don't know for rpm-based distributions.
regards,
Christian
Ah, clever.
> I 've looked at the output of "vi --version" on all three,
> turns out:
>
> Cygwin:
> VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Feb 11 2010 17:36:58)
> Included patches: 1-264
> Compiled by http://cygwin.com/
> Huge version without GUI. Features included (+) or not (-):
> <...>
>
> Ubuntu 8.04:
> VIM - Vi IMproved 7.1 (2007 May 12, compiled Jan 8 2009 02:12:14)
> Included patches: 1-138
> Compiled by bui...@rothera.buildd
> Small version without GUI. Features included (+) or not (-):
Try apt-get install vim-gtk or vim-nox for huge versions,
or simply vim for a standard (I believe a normal) build.
> Fedora 14:
> VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Nov 16 2010 17:05:33)
> Included patches: 1-56
> Modified by <bugz...@redhat.com>
> Compiled by <bugz...@redhat.com>
> Small version without GUI. Features included (+) or not (-):
I think, fedoras version is called vim-enhanced or vim-x11 for the
gui support.
> So I have the Small versions on Ubuntu and Fedora
> I do not want to polute this thread with all the +'s and -'s, too bad
> I cannot attach a text file with the whole script(1) output.
Attaching files should work here.
> I'll have a look at vim.org for the "Huge" versions
You should prefer using packages provided by your distribution.
regards,
Christian
Get source and compile it. AFAIK, vim-tiy, vim-nox, or vim-gui are
compiled from the same source with different flags. So, different vim
exists only in a distribution's package system. I might be wrong on
this though.
Unfortunately, the process generally runs exactly as it played
out here for you.
1) You discover "why doesn't vim's $USEFUL_FEATURE work"?
2) you take a look at the output of :version
3) you see it's missing LOTS of stuff in the compile-time flags
(lots of "-option" entries)
4) you note that the description contains something like "small
version, compiled without GUI"
5) you go rummage around in your package-manager for other
possible "non-small" versions of vim & install it
Additionally, on my Debian-lineage boxes, the update-alternatives
script allows me to have multiple versions of vim installed
(vim.tiny, vim.gtk, etc) and then specify which one is executed
when I run "vi". So sometimes when I've done an upgrade,
something usurps my preference (vim.gtk in this case) and rebinds
it to vim.tiny so I have to re-run "update-alternatives" (as root
or under sudo) to restore my preference.
Most distros come with a stripped-down version, leaving more room
on the install-media for other stuff. They figure that if you're
a power-vi-user, you'll either use it as vi or download a
souped-up version of vim if you want it. Especially as fewer
folks know vi/vim these days (with other editors like nano, kate,
jed, etc that are kinder to beginners).
-tim
That was pretty easy. I was googling for vim packages fedora
and the first link was somewhere on admin.fedoraproject.org
Then on the left side, I clicked on "Packages" and followed
the navigation to vim.
regards,
Christian
YES! vim-enhanced is the package for Fedora 14, I've got the Huge
version on both systems now, and can decrypt my crypted file with "vi -x"
To use the vim executable by default:
cd /usr/bin
ln -sv vim view
ln -sv vim vimdiff
etc., see :help ex
(don't link gvim, gview, etc. unless your vim is GUI-enabled of course).
This way, /usr/bin/view (-> vim in the same directory) will be found
before /bin/view (-> vi in the same directory), so no need to remove the
other symlink.
Best regards,
Tony.
--
"When you have to kill a man it costs nothing to be polite."
-- Winston Curchill, On formal declarations of war
What you you mean, "it didn't work"?
- Do you mean you tried to make the link as I said (yes, destination
first, and then link name) and got an error
- Do you mean that you forgot to cd to /usr/bin before running the ln
command?
- Do you mean that you did set the links and "which" couldn't see them?
- Do you mean that you made the links in the wrong direction (with "ln
-s view vim" where "ls -sv vim view", with the spaces, and of course
after cd to the correct /usr/bindirectory, would have answered: `view'
-> `vim')?
- Do you mean that your non-root $PATH doesn't include /usr/bin ?
So now it works IIUC? I would have left these aliases out (finding them
in your shell startup files and deleting them if necessary) leaving the
job to the softlinks. But if it works, it works: if it ain't broke
(anymore), don' fix it.
Also, "which" doesn't know about shell builtins or aliases, but "type"
(a bash builtin, with optional -a switch for "all") does, e.g.:
linux:~ # which ll
which: no ll in
(/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/lib64/jvm/java-1.6.0-openjdk-1.6.0/jre/bin)
linux:~ # type ll
ll is aliased to `ls -l'
linux:~ # which -a kill
/bin/kill
linux:~ # type -a kill
kill is a shell builtin
kill is /bin/kill
Best regards,
Tony.
--
"Right now I'm having amnesia and /d�ja vu/ at the same time."
-- Steven Wright