Friday, November 7, 2014

Re: avoiding visual mode

Tim Chase wrote:
> On 2014-11-07 15:42, john Culleton wrote:
>> As I work in gvim periodically it switches to
>> visual mode. Is there a way to just turn
>> off visual mode altogether?

Remap the V and v keys?

> Not particularly. I suppose you could theoretically build without
> visual mode as does list "+visual" in the output of
> ":version" (suggesting that it's possible to build without it).
> However, even vim.tiny includes visual mode and looking at the source
> code, it looks to me like visual mode can't be entirely disabled (just
> block-wise "-visualextra").

The visual.txt doc file implies visual can be disabled at compile time:

{not available when the |+visual| feature was disabled when compiling}

It does appear that you are correct and the code does not compile
without +visual. Working off the 7.4 tarball:

gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread
-I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include
-I/usr/include/atk-1.0 -I/usr/include/cairo
-I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0
-I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1
-I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/local/include
-g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -o objects/menu.o
menu.c
menu.c: In function 'ex_emenu':
menu.c:2258:13: error: 'buf_T' has no member named 'b_visual'
menu.c:2259:13: error: 'buf_T' has no member named 'b_visual'
menu.c:2262:6: error: 'VIsual_mode' undeclared (first use in this function)
menu.c:2262:6: note: each undeclared identifier is reported only once for each function it appears in
menu.c:2262:26: error: 'buf_T' has no member named 'b_visual'
menu.c:2263:19: error: 'buf_T' has no member named 'b_visual'
menu.c:2264:31: error: 'buf_T' has no member named 'b_visual'
menu.c:2265:33: error: 'buf_T' has no member named 'b_visual'
menu.c:2281:2: error: 'VIsual_active' undeclared (first use in this function)
menu.c:2282:2: error: 'VIsual_reselect' undeclared (first use in this function)
menu.c:2284:2: error: 'VIsual' undeclared (first use in this function)
menu.c:2291:7: error: 'p_sel' undeclared (first use in this function)
make: *** [objects/menu.o] Error 1

(I did a bare configure and then added #undefs for FEAT_VISUAL and
FEAT_VISUALEXTRA to the end of feature.h, since FEAT_VISUAL is set in a
couple of places in feature.h.)

Elijah

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