Authoring GTK Source-level vim Help document tags
Reason
That only see the source code. On the Linux source has a website http://lxr.linux.no/+trees, can be very aspects to find out the corresponding version of the code implementation, GTK did not. Then do it yourself.
I have been using VIM, I think of Ctags + vim + gtk3 corresponding source package to create a source-level help document.
SOURCE Package Preparation
Working directory:/ROOT/GTK/SRC
Select the download link on the official download page (http://www.gtk.org/download/index.php) to save the document Packages.url
|
#cat packages.url#------------http://ftp.gnome.org/pub/gnome/sources/gtk+/3.6/gtk+-3.6.4.tar.xzhttp://ftp.gnome.org/pub/gnome/sources/glib/2.34/glib-2.34.3.tar.xzhttp://ftp.gnome.org/pub/gnome/sources/pango/1.32/pango-1.32.6.tar.xzhttp://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.26/gdk-pixbuf-2.26.5.tar.xzhttp://ftp.gnome.org/pub/gnome/sources/atk/2.6/atk-2.6.0.tar.xz#------------ |
Make tags Script
After the script mkhelp.sh executes, the tags file is generated in the current directory
|
#cat mkhelp.sh#----------------------------------#!/bin/bash# by haijie# modified NO. : 001wget -i packages.urlcf=tag.files> $cfforfin$(<packages.url) ;=""do=""tf="${f##*/}"tar=""xjvf=""$tf=""p="${tf%%.tar*}/`echo"${tf%-*}|=""tr=""-d="""+"`=""[="""$p"=""]=""&&=""find=""$pwd=""$p=""-name="""*.[ch]"="">> $cfdonectags -L $cf#------------------------------------------</packages.url)> |
Integration into VIM
Writing directly to ~/.VIMRC is silly, because every time I do it, I'm going to write a function that calls are only introduced. The code in ~/.VIMRC is as follows
|
“--------------------------function! Set_work_tag() settags+=/root/gtk/src/tagsendfunctionnmap <silent> <c-j>w : call Set_work_tag()<cr>”--------------------------</cr></c-j></silent> |
Use
When viewing files about GTK, the shortcut keys for introducing tags are: Ctrl + J W;
The functions, macros, and data types of GTK that you want to view use Vim's commands and their shortcut keys,
I love to use
Superfluous words
This is just a ctags, and adding cscope in mkhelp.sh can make better code hints using the Tag.files file list.
Authoring GTK Source-level vim Help document tags