All Projects → polachok → gtk-vikb

polachok / gtk-vikb

Licence: other
vi keybindings for gtk2 TextView & Entry

Programming Languages

c
50402 projects - #5 most used programming language
Makefile
30231 projects
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, libgtk3.0-dev or equivalent is required for successful building.

    $ make

Or limit the build to GTK version of your choice:

    $ make libvi-2
    $ make libvi-3

Don't expect version for GTK4 any time soon though, as gtk_key_snooper_install
was removed from the toolkit without providing any alternative.
("Key snooping should not be done. Events should be handled by widgets.")

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
-------------
GTK2_MODULES=<path-to-libvi-2.so> GTK3_MODULES=<path-to-libvi-3.so> [your-application]

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

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

	mkdir -p ~/.gtk-modules/3.0.0/modules
	cp libvi-3.so ~/.gtk-modules/3.0.0/modules/libvi.so

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

	export GTK_PATH=$HOME/.gtk-modules
	export GTK_MODULES=vi
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].