xaizek / vim-qthelp (License: Unspecified) (since 2018-12-07)
This plugin opens Qt help pages in browser from C++ source code.
Commit 3d50a43053acbb59d42895fff8df35595bab72e8

Add support of tags files without apple_refs
Thanks to Dmitry Frank.
Author: xaizek
Author date (UTC): 2013-03-09 14:44
Committer name: xaizek
Committer date (UTC): 2013-03-09 14:44
Parent(s): 64ef715552b502534f1095e223ca87b6f2927db6
Signing key:
Tree: 69944b68b27908f5a24bd8845e6b34e33e8bb2c0
File Lines added Lines deleted
plugin/qthelp.vim 20 0
File plugin/qthelp.vim changed (mode: 100644) (index 541cd67..bf75a4c)
... ... endfunction
115 115 function! s:QHGetTagsListUC() function! s:QHGetTagsListUC()
116 116 " wuc is for Word Underneath the Cursor " wuc is for Word Underneath the Cursor
117 117 let l:wuc = expand('<cword>') let l:wuc = expand('<cword>')
118
118 119 let l:lst = taglist('//apple_ref/cpp/cl//'.l:wuc.'$') let l:lst = taglist('//apple_ref/cpp/cl//'.l:wuc.'$')
120 if empty(l:lst)
121 let l:lst = taglist('^'.l:wuc.'$')
122 call filter(l:lst, 'v:val["filename"] =~? "[/\]'.l:wuc.'.html$"')
123 endif
124
119 125 if empty(l:lst) " if WUC is var_name if empty(l:lst) " if WUC is var_name
120 126 let [l:class, b:membername] = QHGetVUCInfo() let [l:class, b:membername] = QHGetVUCInfo()
121 127 if empty(b:membername) if empty(b:membername)
122 128 let l:lst = taglist('//apple_ref/cpp/cl//'.l:class.'$') let l:lst = taglist('//apple_ref/cpp/cl//'.l:class.'$')
129 if empty(l:lst)
130 let l:lst = taglist('^'.l:class.'$')
131 endif
123 132 else else
124 133 let l:lst = s:QHGetTagsListOnMember(l:class, b:membername) let l:lst = s:QHGetTagsListOnMember(l:class, b:membername)
125 134 if empty(l:lst) if empty(l:lst)
126 135 let b:membername = '' let b:membername = ''
127 136 let l:lst = taglist('//apple_ref/cpp/cl//'.l:class.'$') let l:lst = taglist('//apple_ref/cpp/cl//'.l:class.'$')
128 137 endif endif
138 if empty(l:lst)
139 let b:membername = ''
140 let l:lst = taglist('^'.l:class.'$')
141 endif
129 142 endif endif
130 143 else else
131 144 let b:membername = '' let b:membername = ''
132 145 endif endif
146
133 147 return l:lst return l:lst
134 148 endfunction endfunction
135 149
 
... ... endfunction
137 151 " modify it last " modify it last
138 152 function! s:QHGetTagsListOnMember(class, member) function! s:QHGetTagsListOnMember(class, member)
139 153 let l:lst = taglist('^'.a:member.'-typedef$') let l:lst = taglist('^'.a:member.'-typedef$')
154 call filter(l:lst, 'v:val["filename"] =~? "[/\]'.a:class.'.html$"')
140 155 if len(l:lst) != 0 if len(l:lst) != 0
141 156 let b:membername = a:member.'-typedef' let b:membername = a:member.'-typedef'
142 157 return l:lst return l:lst
143 158 endif endif
144 159 let l:lst = taglist('^'.a:member.'-enum$') let l:lst = taglist('^'.a:member.'-enum$')
160 call filter(l:lst, 'v:val["filename"] =~? "[/\]'.a:class.'.html$"')
145 161 if len(l:lst) != 0 if len(l:lst) != 0
146 162 let b:membername = a:member.'-enum' let b:membername = a:member.'-enum'
147 163 return l:lst return l:lst
 
... ... function! s:QHGetTagsListOnMember(class, member)
159 175 if empty(l:lst) if empty(l:lst)
160 176 let l:lst = taglist('//apple_ref/cpp/tag/'.a:class.'/'.a:member.'$') let l:lst = taglist('//apple_ref/cpp/tag/'.a:class.'/'.a:member.'$')
161 177 endif endif
178 if empty(l:lst)
179 let l:lst = taglist('^'.a:member.'$')
180 call filter(l:lst, 'v:val["filename"] =~? "[/\]'.a:class.'\.html$"')
181 endif
162 182 return l:lst return l:lst
163 183 endfunction endfunction
164 184
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/vim-qthelp

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/vim-qthelp

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master