rosshadden / gtk-vikb

vi keybindings for gtk2 TextView & Entry

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gtk-vikb
--------
This is an attempt to add vi keybindings to gtk text areas,
GtkTextView and GtkEntry.

The project was started 16 Jul 2012, so don't expect a lot
to work.

Building
--------
libgtk2.0-dev or equivalent is required for successful building

    $ gcc -shared -fPIC `pkg-config gtk+-x11-2.0 --cflags --libs` -o libvi.so vi.c

or

    $ make

If you prefer, you can keep ESC behaving normally (closing dialogs, etc) and
have ALT-SPACE to leave insert mode to normal mode instead. This is
accomplished by compiling with:

	$ make "ALT_SPACE=1"

To try it out
-------------
GTK_MODULES=<path-to-libvi.so> [your-application]

For permanent use
-----------------
1) install module somewhere

	mkdir -p ~/.gtk-2.0/modules
	cp libvi.so ~/.gtk-2.0/modules/

2) add this to startup script (~/.xinitrc or whatever)

	export GTK_PATH=$HOME/.gtk-2.0/modules
	export GTK_MODULES=vi

About

vi keybindings for gtk2 TextView & Entry


Languages

Language:C 95.1%Language:Makefile 4.9%