Skip to content
This repository
Browse code

Always scan C sources for prototypes

Dynamic highlighting supports C/C++ function prototypes to enable
highlighting of library functions based on just the headers, but until
now the easytags.vim plug-in didn't request ctags to include function
prototypes. Now it does so automatically.
  • Loading branch information...
commit 7b041bd0ae8c65e80c84d20727b1eafaf04327bd 1 parent 2f73c57
Peter Odding authored August 11, 2010
25  TODO.md
Source Rendered
@@ -2,20 +2,15 @@
2 2
 
3 3
  * Automatically index C headers when /usr/include/$name.h exists?
4 4
 
5  
- * Integration with my unreleased project plug-in so that when you edit any
6  
-   file in a project, all related files are automatically scanned for tags?
  5
+ * It seems that Exuberant Ctags doesn't support Objective-C which makes the file type mapping between C and Objective-C useless. Maybe the plug-in should just treat Objective-C source code as C?
7 6
 
8  
- * Use separate tags files for each language stored in ~/.vim/tags/ to increase
9  
-   performance because a single, global tags file quickly grows to a megabyte?
  7
+ * Integration with my unreleased project plug-in so that when you edit any file in a project, all related files are automatically scanned for tags?
10 8
 
11  
- * On Microsoft Windows (tested on XP) GVim loses focus while `ctags` is
12  
-   running because Vim opens a command prompt window. Also the CursorHold event
13  
-   seems to fire repeatedly, contradicting my understanding of the autocmd and
14  
-   its behavior on UNIX?!
  9
+ * Use separate tags files for each language stored in ~/.vim/tags/ to increase performance because a single, global tags file quickly grows to a megabyte?
15 10
 
16  
- * I might have found a bug in Vim: The tag `easytags#highlight_cmd` was
17  
-   correctly being highlighted by my plug-in (and was indeed included in my
18  
-   tags file) even though I couldn't jump to it using `Ctrl-]`, which caused:
  11
+ * On Microsoft Windows (tested on XP) GVim loses focus while `ctags` is running because Vim opens a command prompt window. Also the CursorHold event seems to fire repeatedly, contradicting my understanding of the autocmd and its behavior on UNIX?!
  12
+
  13
+ * I might have found a bug in Vim: The tag `easytags#highlight_cmd` was correctly being highlighted by my plug-in (and was indeed included in my tags file) even though I couldn't jump to it using `Ctrl-]`, which caused:
19 14
 
20 15
     E426: tag not found: easytags#highlight_cmd
21 16
 
@@ -26,12 +21,6 @@
26 21
     \ 'name': 'easytags#highlight_cmd', 'language': 'Vim', 'kind': 'f',
27 22
     \ 'filename': '/home/peter/Development/Vim/vim-easytags/autoload.vim'}]
28 23
 
29  
-   It just works?! Some relevant context:
30  
-   I was editing `~/.vim/plugin/easytags.vim` at the time (a symbolic link to
31  
-   `~/Development/Vim/vim-easytags/easytags.vim`) and wanted to jump to the
32  
-   definition of the function `easytags#highlight_cmd` in
33  
-   `~/.vim/autoload/easytags.vim` (a symbolic link to
34  
-   `~/Development/Vim/vim-easytags/autoload.vim`). I was already editing
35  
-   `~/.vim/autoload/easytags.vim` in another Vim buffer.
  24
+   It just works?! Some relevant context: I was editing `~/.vim/plugin/easytags.vim` at the time (a symbolic link to `~/Development/Vim/vim-easytags/easytags.vim`) and wanted to jump to the definition of the function `easytags#highlight_cmd` in `~/.vim/autoload/easytags.vim` (a symbolic link to `~/Development/Vim/vim-easytags/autoload.vim`). I was already editing `~/.vim/autoload/easytags.vim` in another Vim buffer.
36 25
 
37 26
 vim: ai nofen
2  autoload.vim
@@ -91,7 +91,7 @@ function! s:check_cfile(silent, filter_tags, have_args) " {{{3
91 91
 endfunction
92 92
 
93 93
 function! s:prep_cmdline(cfile, tagsfile, firstrun, arguments) " {{{3
94  
-  let cmdline = [g:easytags_cmd, '--fields=+l']
  94
+  let cmdline = [g:easytags_cmd, '--fields=+l', '--c-kinds=+p', '--c++-kinds=+p']
95 95
   if a:firstrun
96 96
     call add(cmdline, shellescape('-f' . a:tagsfile))
97 97
     call add(cmdline, '--sort=' . (&ic ? 'foldcase' : 'yes'))
2  easytags.vim
@@ -4,7 +4,7 @@
4 4
 " URL: http://peterodding.com/code/vim/easytags/
5 5
 " Requires: Exuberant Ctags (http://ctags.sf.net)
6 6
 " License: MIT
7  
-" Version: 2.1.2
  7
+" Version: 2.1.3
8 8
 
9 9
 " Support for automatic update using the GLVS plug-in.
10 10
 " GetLatestVimScripts: 3114 1 :AutoInstall: easytags.zip

0 notes on commit 7b041bd

Please sign in to comment.
Something went wrong with that request. Please try again.