annotate README.md @ 18:b13e1141aa5c

Fix wording in `README`.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 21 Aug 2014 13:25:03 -0700
parents ec87439fc784
children 4e1b0253f71a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
1
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
2 # Autotags
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
3
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
4 Autotags is a plugin that takes care of the much needed management of tags
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
5 files in Vim. It will (re)generate tag files as you work while staying
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
6 completely out of your way. It will even do its best to keep those tag files
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
7 out of your way too. It has no dependencies and just works.
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
8
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
9 ## How?
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
10
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
11 Install Autotags like any other Vim plugin. I recommend something like
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
12 [Pathogen][], so you can go:
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
13
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
14 cd ~/.vim/bundle
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
15 hg clone https://bitbucket.org/ludovicchabant/vim-autotags
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
16
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
17 Then you only need to do a `:call pathogen#helptags()` to generate the
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
18 documentation tags (how ironic, eh?) and you can access Autotag's help pages
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
19 with `help autotags`.
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
20
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
21
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
22 ## What?
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
23
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
24 In order to generate tag files, Autotags will have to figure out what's in
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
25 your project. To do this, it will locate well-known project root markers like
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
26 SCM folders (`.git`, `.hg`, etc.), any custom tags you define (with
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
27 `autotags_project_root`), and even things you may have defined already with
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
28 other plugins, like [CtrlP][].
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
29
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
30 If the current file you're editing is found to be in such a project, Autotags
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
31 will make sure the tag file for that project is up to date. Then, as you work
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
32 in files in that project, it will partially re-generate the tag file. Every
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
33 time you save, it will silently, in the background, update the tags for that
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
34 file.
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
35
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
36 Usually, ctags can only append tags to an existing tag file, so Autotags
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
37 removes the tags for the current file first, to make sure the tag file is
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
38 always consistent with the source code.
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
39
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
40 Also, Autotags is clever enough to not stumble upon itself by triggering
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
41 multiple ctags processes if you save files to fast, or your project is really
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
42 big.
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
43
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
44
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
45 ## Why?
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
46
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
47 There are some similar Vim plugins out there ("vim-tags", "vim-autotag",
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
48 "vim-automatic-ctags", etc.). They all fail on one or more of the requirements
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
49 I set for myself with Autotags:
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
50
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
51 * No other dependency than running Vim: no Python, Ruby, or whatever.
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
52 * Cross-platform: should work on at least Mac and Windows.
18
b13e1141aa5c Fix wording in `README`.
Ludovic Chabant <ludovic@chabant.com>
parents: 6
diff changeset
53 * Incremental tags generation: don't re-generate the whole project all the time.
b13e1141aa5c Fix wording in `README`.
Ludovic Chabant <ludovic@chabant.com>
parents: 6
diff changeset
54 This may be fine for small projects, but it doesn't scale.
b13e1141aa5c Fix wording in `README`.
Ludovic Chabant <ludovic@chabant.com>
parents: 6
diff changeset
55 * External process management: if the ctags process is taking a long time, don't
b13e1141aa5c Fix wording in `README`.
Ludovic Chabant <ludovic@chabant.com>
parents: 6
diff changeset
56 run another one because I saved the file again.
b13e1141aa5c Fix wording in `README`.
Ludovic Chabant <ludovic@chabant.com>
parents: 6
diff changeset
57 * Keep the tag file consistent: don't just append the current file's tags to the
b13e1141aa5c Fix wording in `README`.
Ludovic Chabant <ludovic@chabant.com>
parents: 6
diff changeset
58 tag file, otherwise you will still "see" tags for deleted or renamed classes
b13e1141aa5c Fix wording in `README`.
Ludovic Chabant <ludovic@chabant.com>
parents: 6
diff changeset
59 and functions.
6
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
60 * Automatically create the tag file: you open something from a freshly forked
18
b13e1141aa5c Fix wording in `README`.
Ludovic Chabant <ludovic@chabant.com>
parents: 6
diff changeset
61 project, it should start indexing it automatically, just like in Sublime Text
b13e1141aa5c Fix wording in `README`.
Ludovic Chabant <ludovic@chabant.com>
parents: 6
diff changeset
62 or Visual Studio or any other IDE.
6
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
63
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
64 I hope Autotags will bring you as much closure as me regarding tag files. I know
18
b13e1141aa5c Fix wording in `README`.
Ludovic Chabant <ludovic@chabant.com>
parents: 6
diff changeset
65 I don't want to have to think about it, and probably neither do you.
6
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
66
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
67
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
68 [ctrlp]: https://github.com/kien/ctrlp.vim
ec87439fc784 Add README file.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
69