gtkvim.tgz


Ⅰ. 插件描述

GTK+ widget interface to gvim

Ⅱ. 基本信息

创建日期:  2001-12-03
使用用户:  1
Github星:  1
插件作者:  Neil Bird

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin '/gtkvim-tgz'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle '/gtkvim-tgz'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug '/gtkvim-tgz'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/vim-scripts/gtkvim.tgz

Ⅳ. 文档说明

C source to 'GtkVim' widget, which embeds a gvim into your application as if it were a normal widget (actually runs a gvim as another process, displaying in your widget via a GtkSocket).

The current version is for GTK2, and unfortunately requires a pached vim.  This is pending, should make it into vim 7.0 in some fashion, and may even make it into 6.4.  I'll update this note as and when a decision is made.

Next step I guess is to extend GtkVim to be a full Bonobo (?) widget to allow more flexible use in applications which support that (like evolution, I think).

==== Old GTK1 notes ====

Versions 1.x require a GTK+ gvim 6.0 and probably GTK+ 1.2.8 or later.

If you have focusing problems, you may also require the following patch to your GTK libraries (inc. the latest [at time of writing] 1.2.10) for automatic focusing (e.g., upon <Tab>) to work correctly.  Point-and-click activation will still work OK without this patch.

Currently still /not/ working is the ability to set the GtkVim widget's focus at startup (gtk_widget_grab_focus() or gtk_window_set_focus()).

--- gtk/gtkwindow.c.focus Fri Mar  9 18:39:16 2001
+++ gtk/gtkwindow.c Thu Jul  5 10:34:00 2001
@@ -985,7 +985,13 @@
       break;
     case EnterNotify:
     case LeaveNotify:
-      if (xev->xcrossing.detail != NotifyInferior &&
+      /* We only track the actual destination of keyboard events for real
+       * toplevels, not for embedded toplevels such as GtkPlug. The reason for
+       * this is that GtkPlug redirects events so the widget may effectively not
+       * have the focus even if it actually has the focus.
+       */
+      if (gdk_window_get_parent (GTK_WIDGET (window)->window) == GDK_ROOT_PARENT () &&

  •   xev->xcrossing.detail != NotifyInferior &&

       xev->xcrossing.focus && !window->window_has_focus)
     {
       window->window_has_pointer_focus = (xev->xany.type == EnterNotify) ? TRUE : FALSE;

添加新评论