Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$HOME/.ctags not used #1582

Closed
Fmajor opened this issue Oct 21, 2017 · 7 comments
Closed

$HOME/.ctags not used #1582

Fmajor opened this issue Oct 21, 2017 · 7 comments

Comments

@Fmajor
Copy link

Fmajor commented Oct 21, 2017

i'm trying different version of ctags to test some features (8465ce7 in the master and 8330eea in pull #1581)

but now i find that my .ctags are not used

e.g ctags --list-languages does not include 'mvue' type, but i think several days before when i use the latest version in the master branch, i can see my 'mvue' type

my .ctags file in $HOME

--exclude=*.hg*
--exclude=*.json*
--exclude=*.cvs*
--exclude=*.svn*
--exclude=*.git*
--exclude=*compiled*
--exclude=*public_html*
--exclude=*.idea*
--exclude=*bower_components*
--exclude=*images*
--exclude=*.DS_Store*
--exclude=*log*
--exclude=*.min.js
--exclude=*.min.css
--exclude=*.pack.js
--exclude=*.log
--exclude=*vender*
--exclude=*.sql
--exclude=*.html
--exclude=*.sass
--exclude=*.ftl
--exclude=tags
--exclude=TAGS
--exclude=GTAGS
--exclude=GPATH
--exclude=*node_modules*
--exclude=GRTAGS
--exclude=*doc*
--exclude=*tmp*
--exclude=.#*

--langdef=mvue
--langmap=mvue:.vue
--regex-mvue=/^(<template>)$/\1/t,template/{scope=set}{exclusive}
--regex-mvue=/^\S*(.*(v-if=|v-for=|v-show=)"[^"]*")/\1/c,vue-command/{scope=ref}
--regex-mvue=/^(<\/template>)$/\1//{scope=pop}{exclusive}

--regex-mvue=/^(<script>)$/\1/s,script/{scope=set}{exclusive}
--regex-mvue=/^(<\/script>)$/\1//{scope=clear}
--regex-mvue=/^function +([a-zA-Z_][a-zA-Z0-9_]*)/\1/f,function/{scope=ref}

--regex-mvue=/^ {2}((name|'name')[^,]*)/\1/p,property/{scope=ref}
--regex-mvue=/^ {2}((data) \(|('data'):|(data):)/\2\3\4/p,property/{scope=set}
--regex-mvue=/^ {2}((props) \(|('props'):|(props):)/\2\3\4/p,property/{scope=set}
--regex-mvue=/^ {2}((computed) \(|('computed'):|(computed):)/\2\3\4/p,property/{scope=set}
--regex-mvue=/^ {2}((methods) \(|('methods'):|(methods):)/\2\3\4/p,property/{scope=set}
--regex-mvue=/^ {2}((created) \(|('created'):|(created):)/\2\3\4/p,property/{scope=set}
--regex-mvue=/^ {2}((components) \(|('components'):|(components):)/\2\3\4/p,property/{scope=set}
--regex-mvue=/^ {4}(([a-zA-Z0-9_]*) \(|('[a-zA-Z0-9_]*'):|([a-zA-Z0-9_]*):)/\2\3\4/p,property/{scope=ref}
@k-takata
Copy link
Member

It was changed recently. See #1519 for detail.
Use ~/.ctags.d/*.ctags instead.

@Fmajor
Copy link
Author

Fmajor commented Oct 21, 2017

using git blame, i also just found the reason...

ce0617a7be7a4d33a09ac60f21b8a9ce26690853 is the first bad commit
commit ce0617a7be7a4d33a09ac60f21b8a9ce26690853
Author: Masatake YAMATO <yamato@redhat.com>
Date:   Mon Oct 2 14:40:14 2017 +0900

    [SELF INCOMPATIBLE][INCOMPATIBLE] main: rewrite code for loading configuration files in starting up

    Configuration files loading at starting up time are changed.

    * loading $HOME/.ctags.d/*.ctags if $HOME is defined as environment variable,
    * loading  $HOMEDRIVE$HOMEPATH/ctags.d/*.ctags if both $HOMEDRIVE and $HOMEPATH
      are defined as environment variables,
    * loading .ctags.d/*.ctags, and
    * loading ctags.d/*.ctags

    Universal-ctags doesn't refer system configuration directories like /etc/ctags.

    TODO: These things should be written in docs/*.rst and man pages.

    Signed-off-by: Masatake YAMATO <yamato@redhat.com>

i think you should highlight the changes in the documents...

@Fmajor Fmajor closed this as completed Oct 21, 2017
@trevordmiller
Copy link

trevordmiller commented Feb 24, 2018

So we need to rename .ctags to .ctags.d?

@masatake
Copy link
Member

No, you need to rename your .ctags to .ctagd.d/foo.ctags where foo is any string your file system accepts.

@k-takata
Copy link
Member

.ctagd.d/foo.ctags -> .ctags.d/foo.ctags

@ericktucto
Copy link

@Fmajor Hello, I am using your configuration, but I have the following error

imagen

@masatake
Copy link
Member

--regex-mvue=/^\S*(.*(v-if=|v-for=|v-show=)"[^"]*")/\1/c,vue-command/{scope=ref}

You cannot use - in a kind name. You can rewrite the line like this:

--regex-mvue=/^\S*(.*(v-if=|v-for=|v-show=)"[^"]*")/\1/c,vueCommand/{scope=ref}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants