Monday, March 23, 2015

Vim mapping clobbered by distro change. And compile barfs.

This mapping has worked flawlessly on Ubuntu 10.04 for quite a while:

noremap <A-s> ^[/^-- ^M+dGA^M^["+p

I've switched to Debian 7.8.0. Subsequently finding the mapping
inoperable, and trying a ":map" while I'm here in vim, editing this
post, I see:

ó * <Esc>/^-- <CR>+dGA<CR><Esc>"+p

But the missing <A-s> is evidently not a sign of trouble, since
<A-e> and <A-d> are similarly munged on display, but work fine:

å * <Esc>:set spell spelllang=en<CR>
ä * <Esc>:set spell spelllang=da<CR>

Maybe we need to ditch Debian stable's out of date Vim:

$ vim --version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Feb 10 2013 06:46:29)
Included patches: 1-547
Modified by pkg-vim-maintainers@lists.alioth.debian.org

Ugh. Let's try:

$ cd /usr/local/src/
$ hg clone https://vim.googlecode.com/hg/ vim
...
$ cd vim
$ make
...
checking for tgetent in -ltinfo... no
checking for tgetent in -lncurses... no
checking for tgetent in -ltermlib... no
checking for tgetent in -ltermcap... no
checking for tgetent in -lcurses... no
no terminal library found
checking for tgetent()... configure: error: NOT FOUND!
You need to install a terminal library; for example ncurses.
Or specify the name of the library with --with-tlib.

That's funny. Let's see:

$ dpkg -l *ncurses*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Tri
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==================-=======-======-==================================
ii libncurses5:i386 5.9-10 i386 shared libraries for terminal hand
ii libncursesw5:i386 5.9-10 i386 shared libraries for terminal hand
un ncurses <none> (no description available)
ii ncurses-base 5.9-10 all basic terminal type definitions
ii ncurses-bin 5.9-10 i386 terminal-related programs and man
ii ncurses-examples 5.9-10 i386 test programs and examples for ncu
ii ncurses-hexedit 0.9.7-14.1 i386 Edit files/disks in hex, ASCII and
un ncurses-runtime <none> (no description available)
ii ncurses-term 5.9-10 all additional terminal type definitio


Mutt is using one of the libs without trouble:

$ ldd /usr/bin/mutt
...
libncursesw.so.5 => /lib/i386-linux-gnu/libncursesw.so.5 (0xb779a000)

and needs that to handle UTF8, IIRC. Can we get vim to do that too?

Alternatively ... what am I doing wrong?

Erik

--
If you understand what you're doing, you're not learning anything.
- A. L.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment