diff options
| author | bors <bors@rust-lang.org> | 2013-12-19 12:01:59 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-12-19 12:01:59 -0800 |
| commit | 3906823765b1ec241df4906527a990ec945c4392 (patch) | |
| tree | 0775ec33f569663fd2f92d8325563af4587ef97a | |
| parent | bc17e4fda71f85fcf63090499d81749942c7ddd4 (diff) | |
| parent | a1ca7458f1b622293bed1881366ddcc05de19f9e (diff) | |
| download | rust-3906823765b1ec241df4906527a990ec945c4392.tar.gz rust-3906823765b1ec241df4906527a990ec945c4392.zip | |
auto merge of #11072 : chris-morgan/rust/ctags-tweaks, r=cmr
Anchoring the keyword as the first non-whitespace on a line may mean that the occasional genuine-but-unconventionally-formatted tag is missed, but it avoids a large number of false positives. I changed the type descriptive texts about a bit too. That part's purely cosmetic. I also changed the ignored file list to use a filename matching the make rule, `TAGS.vi` instead of `TAGS.vim`.
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | src/etc/ctags.rust | 23 |
2 files changed, 13 insertions, 12 deletions
diff --git a/.gitignore b/.gitignore index 00dfeede99c..c7e83518db3 100644 --- a/.gitignore +++ b/.gitignore @@ -52,7 +52,7 @@ lexer.ml TAGS TAGS.emacs -TAGS.vim +TAGS.vi version.ml version.texi /Makefile diff --git a/src/etc/ctags.rust b/src/etc/ctags.rust index 5c2f4f82566..ee6f863aa50 100644 --- a/src/etc/ctags.rust +++ b/src/etc/ctags.rust @@ -1,11 +1,12 @@ ---langdef=rust ---langmap=rust:.rs ---regex-rust=/[ \t]*fn[ \t]+([a-zA-Z0-9_]+)/\1/f,function/ ---regex-rust=/[ \t]*type[ \t]+([a-zA-Z0-9_]+)/\1/T,types/ ---regex-rust=/[ \t]*enum[ \t]+([a-zA-Z0-9_]+)/\1/T,types/ ---regex-rust=/[ \t]*struct[ \t]+([a-zA-Z0-9_]+)/\1/m,types/ ---regex-rust=/[ \t]*mod[ \t]+([a-zA-Z0-9_]+)/\1/m,modules/ ---regex-rust=/[ \t]*static[ \t]+([a-zA-Z0-9_]+)/\1/m,consts/ ---regex-rust=/[ \t]*trait[ \t]+([a-zA-Z0-9_]+)/\1/m,traits/ ---regex-rust=/[ \t]*impl[ \t]+([a-zA-Z0-9_]+)/\1/m,impls/ ---regex-rust=/[ \t]*macro_rules![ \t]+([a-zA-Z0-9_]+)/\1/m,macros/ +--langdef=Rust +--langmap=Rust:.rs +--regex-Rust=/^[ \t]*(pub[ \t]+)?fn[ \t]+([a-zA-Z0-9_]+)/\2/f,functions,function definitions/ +--regex-Rust=/^[ \t]*(pub[ \t]+)?type[ \t]+([a-zA-Z0-9_]+)/\2/T,types,type definitions/ +--regex-Rust=/^[ \t]*(pub[ \t]+)?enum[ \t]+([a-zA-Z0-9_]+)/\2/g,enum,enumeration names/ +--regex-Rust=/^[ \t]*(pub[ \t]+)?enum[ \t]+([a-zA-Z0-9_]+)/\2/g,enum,enumeration names/ +--regex-Rust=/^[ \t]*(pub[ \t]+)?struct[ \t]+([a-zA-Z0-9_]+)/\2/s,structure names/ +--regex-Rust=/^[ \t]*(pub[ \t]+)?mod[ \t]+([a-zA-Z0-9_]+)/\2/m,modules,module names/ +--regex-Rust=/^[ \t]*(pub[ \t]+)?static[ \t]+([a-zA-Z0-9_]+)/\2/c,consts,static constants/ +--regex-Rust=/^[ \t]*(pub[ \t]+)?trait[ \t]+([a-zA-Z0-9_]+)/\2/t,traits,traits/ +--regex-Rust=/^[ \t]*(pub[ \t]+)?impl([ \t\n]+<.*>)?[ \t]+([a-zA-Z0-9_]+)/\3/i,impls,trait implementations/ +--regex-Rust=/^[ \t]*macro_rules![ \t]+([a-zA-Z0-9_]+)/\2/d,macros,macro definitions/ |
