Mercurial > vim
comparison runtime/doc/usr_29.txt @ 28141:dce918af0c00
Update runtime files
Commit: https://github.com/vim/vim/commit/47c532e2bc55e8a48f7f47e1fae1ed30144f2fa1
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Mar 19 15:18:53 2022 +0000
Update runtime files
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 19 Mar 2022 16:30:05 +0100 |
parents | af69c9335223 |
children | f8116058ca76 |
comparison
equal
deleted
inserted
replaced
28140:4511c6ef2893 | 28141:dce918af0c00 |
---|---|
1 *usr_29.txt* For Vim version 8.2. Last change: 2016 Feb 27 | 1 *usr_29.txt* For Vim version 8.2. Last change: 2022 Mar 13 |
2 | 2 |
3 VIM USER MANUAL - by Bram Moolenaar | 3 VIM USER MANUAL - by Bram Moolenaar |
4 | 4 |
5 Moving through programs | 5 Moving through programs |
6 | 6 |
31 following command: > | 31 following command: > |
32 | 32 |
33 ctags *.c | 33 ctags *.c |
34 | 34 |
35 "ctags" is a separate program. Most Unix systems already have it installed. | 35 "ctags" is a separate program. Most Unix systems already have it installed. |
36 If you do not have it yet, you can find Exuberant ctags here: | 36 If you do not have it yet, you can find Universal/Exuberant ctags at: |
37 | 37 http://ctags.io ~ |
38 http://ctags.sf.net ~ | 38 http://ctags.sf.net ~ |
39 | |
40 Universal ctags is preferred, Exuberant ctags is no longer being developed. | |
39 | 41 |
40 Now when you are in Vim and you want to go to a function definition, you can | 42 Now when you are in Vim and you want to go to a function definition, you can |
41 jump to it by using the following command: > | 43 jump to it by using the following command: > |
42 | 44 |
43 :tag startlist | 45 :tag startlist |
140 ONE TAGS FILE | 142 ONE TAGS FILE |
141 | 143 |
142 When Vim has to search many places for tags files, you can hear the disk | 144 When Vim has to search many places for tags files, you can hear the disk |
143 rattling. It may get a bit slow. In that case it's better to spend this | 145 rattling. It may get a bit slow. In that case it's better to spend this |
144 time while generating one big tags file. You might do this overnight. | 146 time while generating one big tags file. You might do this overnight. |
145 This requires the Exuberant ctags program, mentioned above. It offers an | 147 This requires the Universal or Exuberant ctags program, mentioned above. |
146 argument to search a whole directory tree: > | 148 It offers an argument to search a whole directory tree: > |
147 | 149 |
148 cd ~/proj | 150 cd ~/proj |
149 ctags -R . | 151 ctags -R . |
150 | 152 |
151 The nice thing about this is that Exuberant ctags recognizes various file | 153 The nice thing about this is that Universal/Exuberant ctags recognizes various |
152 types. Thus this doesn't work just for C and C++ programs, also for Eiffel | 154 file types. Thus this doesn't work just for C and C++ programs, also for |
153 and even Vim scripts. See the ctags documentation to tune this. | 155 Eiffel and even Vim scripts. See the ctags documentation to tune this. |
154 Now you only need to tell Vim where your big tags file is: > | 156 Now you only need to tell Vim where your big tags file is: > |
155 | 157 |
156 :set tags=~/proj/tags | 158 :set tags=~/proj/tags |
157 | 159 |
158 | 160 |
230 A TAGS BROWSER | 232 A TAGS BROWSER |
231 | 233 |
232 Since CTRL-] takes you to the definition of the identifier under the cursor, | 234 Since CTRL-] takes you to the definition of the identifier under the cursor, |
233 you can use a list of identifier names as a table of contents. Here is an | 235 you can use a list of identifier names as a table of contents. Here is an |
234 example. | 236 example. |
235 First create a list of identifiers (this requires Exuberant ctags): > | 237 First create a list of identifiers (this requires Universal or Exuberant |
238 ctags): > | |
236 | 239 |
237 ctags --c-types=f -f functions *.c | 240 ctags --c-types=f -f functions *.c |
238 | 241 |
239 Now start Vim without a file, and edit this file in Vim, in a vertically split | 242 Now start Vim without a file, and edit this file in Vim, in a vertically split |
240 window: > | 243 window: > |