[SATLUG] vi bug in Ubuntu

Bruce Dubbs bruce.dubbs at gmail.com
Sun Sep 30 20:25:20 CDT 2007


Tom Weeks wrote:
> On Sunday 30 September 2007 02:53:36 Luis Garza wrote:
> [...]
>> Sadly, I use the hjkl because I hate for my hand to leave the key
>> board.  Using the arrow keys means that
>> I would have to move my right hand off the home row keys, 
> 
> That's actually the best reason sited for knowing/using lkjh vi/vim navigation 
> thus far.  It's makes you super fast... especially if you have some of the 
> cool features that vim-enhanced offers (visual editing, columnar editing, 
> etc).  If you've never seen a vim wizard at full speed... it's a thing to 
> behold.
> 
> 
> On Sunday 30 September 2007 02:57:52 Brad Knowles wrote:
> [...]
>> But again, I will say that you shouldn't be using vi as a
>> general-purpose text editor, if you've got better options available
>> to you. 
> 
> Well Brad.. as I'm sure you know.. most all Linux distributions use vim 
> nowadays, not vi.  Vim, invented in the 80's on the Amiga, is now the 
> defactor editor in all Linux-es.  
> 	# rpm -qf /bin/vi              # What package owns bin/vi?
> 	vim-minimal-7.1.12-1.fc7
> 
> Viva Amiga! :)
> 
> Most distros come with at least one or two of the following vim related 
> packages installed by default:
> 	vim-common-7.1.12-1.fc7
> 	vim-X11-7.1.12-1.fc7
> 	vim-enhanced-7.1.12-1.fc7
> 	vim-minimal-7.1.12-1.fc7
> 
> not "vi".

If you really get into it, vim can be customized quite a bit.  You can
pick and choose what you features want installed quite in quite a bit
more detail detail than above.  The source code is at
http://ftp.at.vim.org/pub/vim/unix/vim-7.1.tar.bz2.  One problem that I
have run into is that some distros have built in X11 so that if you
build or install a system without X (something I recommend for servers),
vim won't load because it is looking for libX11.

There are some who want vim-minimal or plain plain vi for /bin in the
case of a shared /usr/bin directory.  I really don't think this is
necessary any more because disk space for executables is not the same
constraint it used to be.  For instance vim on my system is 1.6M with
the following libraries:

        linux-gate.so.1 =>  (0xffffe000)
        libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0xb7c73000)
        libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0xb7bf2000)
        libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0xb7bd8000)
        libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0
(0xb7bc2000)
        libm.so.6 => /lib/libm.so.6 (0xb7b9d000)
        libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0
(0xb7b96000)
        libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0xb7b58000)
        libcairo.so.2 => /usr/lib/libcairo.so.2 (0xb7ae1000)
        libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0xb7aa7000)
        libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0xb7aa4000)
        libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xb7a10000)
        libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0xb79bf000)
        libncurses.so.5 => /lib/libncurses.so.5 (0xb797b000)
        libc.so.6 => /lib/libc.so.6 (0xb785a000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0xb7790000)
        libdl.so.2 => /lib/libdl.so.2 (0xb778c000)
        libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0xb7783000)
        libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0xb776b000)
        libXrender.so.1 => /usr/X11R6/lib/libXrender.so.1 (0xb7762000)
        libXfixes.so.3 => /usr/X11R6/lib/libXfixes.so.3 (0xb775d000)
        libXrandr.so.2 => /usr/X11R6/lib/libXrandr.so.2 (0xb7759000)
        libXinerama.so.1 => /usr/X11R6/lib/libXinerama.so.1 (0xb7756000)
        libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb7727000)
        libXcursor.so.1 => /usr/X11R6/lib/libXcursor.so.1 (0xb771d000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0xb770f000)
        /lib/ld-linux.so.2 (0xb7fd4000)
        libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0xb76e4000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb7676000)
        libz.so.1 => /lib/libz.so.1 (0xb7662000)
        libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb7626000)
        libexpat.so.0 => /usr/lib/libexpat.so.0 (0xb7606000)
        libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb75e6000)


On the other hand, the vim I built for a server is 857K and is only
dependent on:

        libncurses.so.5 => /lib/libncurses.so.5 (0x40018000)
        libdl.so.2 => /lib/libdl.so.2 (0x40058000)
        libc.so.6 => /lib/libc.so.6 (0x4005b000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

Note that is it libcurses that make the arrow keys, etc work.

For details on building vim for yourself, see
http://www.linuxfromscratch.org/lfs/view/stable/chapter06/vim.html

  -- Bruce


More information about the SATLUG mailing list