GithubHelp home page GithubHelp logo

xolox / vim-easytags Goto Github PK

View Code? Open in Web Editor NEW
1.0K 1.0K 112.0 1.39 MB

Automated tag file generation and syntax highlighting of tags in Vim

Home Page: http://peterodding.com/code/vim/easytags/

Vim Script 91.79% Python 8.21%

vim-easytags's People

Contributors

blueyed avatar blukat29 avatar cornerman avatar inkarkat avatar jrean avatar juliantaylor avatar lstinson avatar tarmack avatar xolox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vim-easytags's Issues

windows .ctags / ctags.cnf problems

got a very weird bug in easytags, if i create a .ctags or ctags.cnf file in my windows user directory, easytags pops me a error on gvim start.

simply removing the file, and restarting vim fixes the problem, but i need to pass the .ctags to ctags since im defining a custom filetype for ctags.

easytags.vim 3.3.12: Plug-in not loaded because Exuberant Ctags isn't 
installed! Please download & install Exuberant Ctags from 
http://ctags.sf.net

list index out of range

I'm starting to see this error message a lot:

easytags.vim: Vim(let):E684: list index out of range: 1 (at function xolox#easytags#autoload..xolox#
easytags#file_has_tags..39_cache_tagged_files..39_cache_tagged_files_in, line 2)

I have the following settings in my .vimrc as I want each project to have its own tags file:

let g:easytags_cmd = '/usr/local/bin/ctags'
let g:eastags_dynamic_files = 1
let g:easytags_file='./.vimtags'

Please let me know if there's any other data I can provide.

~Shawn

Tags file growing too large

My *.js tags file grows absurdely huge the very first time I open any javascript file. I have g:easytags_by_filetype setted, but it doen's make a difference in this case, as my js tags file always end up with about 172mb size.

I took a look at the tags file and it has entries from many hidden directories like the .rvm folder and even from my music folder. I also tried to ignore some paths using the wildignore setting, but it didn't work.

Is there a way to prevent the file from growing so large?

[ERROR] (permission problem) tags file isn't writable !

I execute command :help eval.txt, and the press <C-]> on vim help tag, get an error:

Error detected while processing function xolox#easytags#register..xolox#easytags#get_tagsfile:                                                                                                 
line   21:                                                                                                                                                                                     
E605: Exception not caught: The tags file /usr/share/vim/vim73/doc/tags isn't writable! 

Then I press <C-t> to jump back, get error:

Error detected while processing /usr/share/vim/vim73/syntax/syntax.vim:                                                                                                                        
line   15:                                                                                                                                                                                     
E171: Missing :endif                                                                                                                                                                           
Error detected while processing function <SNR>120_Prev:                                                                                                                                        
line   10:                                                                                                                                                                                     
E171: Missing :endif                  

Easytags strips folds from shell scripts

Hi, thanks for the great extension. I have noticed a problem with folding.

I have syntax folding and Bash folding enabled in my .vimrc:

set foldmethod=syntax
let g:is_bash = 1
let g:sh_fold_enabled = 3

When I don't have Easytags syntax highlighting enabled the folds are correct:

http://i.imgur.com/aorit.png

When it is enabled after the first update (manual or automatic) all the folds disappear:

http://i.imgur.com/8P6pF.png

I'm brand new to Vim so don't really know how to go about diagnosing the problem further, but it doesn't seem to affect Ruby, which is the only other file type I tried.

ctags-exuberant

On my machine (Ubuntu 12.10), ctags turned out to be installed as ctags-exuberant (a ctags was installed, but apparently related to Emacs). I had to add the name 'ctags-exuberant' to the list of potential ctags executable otherwise it would complain that ctags is not installed. I may not be the only one having this issue.

Unable to tag struct/union member

Hi,
It was good at mark cmembers, but I when update easytags yesterday, my VIM cant mark cmember anymore.

here is my vimrc and plugin list, can anyone give me some tips? thx

set tags=./.easytags;,~/.vimtags
let g:easytags_dynamic_files=2
let g:easytags_include_members=1
highlight cMember term=italic ctermfg=31 gui=italic guifg=#80a0ff

'danro/rename.vim'
'huxiao/vim-bookmark'
'Valloric/YouCompleteMe'
'Townk/vim-autoclose'
'fholgado/minibufexpl.vim'
'cSyntaxAfter'
'taglist.vim'
'scrooloose/nerdcommenter'
'jistr/vim-nerdtree-tabs'

Easytags is making Vim's cursor very slow after a few minutes of use

Hi,

After a few minutes of use, my Vim is getting very slow, even when something as simple as moving the cursor.

I profiled the running function and got this result:

FUNCTIONS SORTED ON TOTAL TIME
count  total (s)   self (s)  function
    3   0.006288   0.002934  <SNR>79_AutoUpdate()
    3   0.003460   0.001882  xolox#easytags#autoload()
    3   0.002858   0.000117  <SNR>79_HighlightTag()
    3   0.002741   0.002732  <SNR>79_GetNearbyTag()
   15   0.001804             <SNR>44_Highlight_Matching_Pair()
    3   0.000657   0.000507  xolox#easytags#get_tagsfile()
   21   0.000559             xolox#misc#option#get()
    3   0.000361   0.000083  xolox#easytags#file_has_tags()
    6   0.000279   0.000088  <SNR>31_resolve()
    3   0.000252   0.000223  <SNR>79_IsValidFile()
   18   0.000191             <SNR>79_LogDebugMessage()
    3   0.000170             xolox#easytags#supported_filetypes()
    3   0.000157             <SNR>31_cache_tagged_files()
    9   0.000051             112()
    3   0.000017             114()
    3   0.000014             <SNR>31_create_context()
    3   0.000014             111()
    3   0.000009             110()

FUNCTIONS SORTED ON SELF TIME
count  total (s)   self (s)  function
    3   0.006288   0.002934  <SNR>79_AutoUpdate()
    3   0.002741   0.002732  <SNR>79_GetNearbyTag()
    3   0.003460   0.001882  xolox#easytags#autoload()
   15              0.001804  <SNR>44_Highlight_Matching_Pair()
   21              0.000559  xolox#misc#option#get()
    3   0.000657   0.000507  xolox#easytags#get_tagsfile()
    3   0.000252   0.000223  <SNR>79_IsValidFile()
   18              0.000191  <SNR>79_LogDebugMessage()
    3              0.000170  xolox#easytags#supported_filetypes()
    3              0.000157  <SNR>31_cache_tagged_files()
    3   0.002858   0.000117  <SNR>79_HighlightTag()
    6   0.000279   0.000088  <SNR>31_resolve()
    3   0.000361   0.000083  xolox#easytags#file_has_tags()
    9              0.000051  112()
    3              0.000017  114()
    3              0.000014  <SNR>31_create_context()

So apparently TagBar and EasyTags are causing most of the lag.

Any Python file will make Vim slow, especially big ones. My vim dotfiles are here: https://github.com/charlax/dotvim

Here are some settings that are related to the plugin:

" Disable automatic highlighting
let b:easytags_auto_highlight = 0

I did not change updatetime.

Thanks for your help!

Add option to wirte only to project specific tags, or stop easytags in certain directories

I frequently write little one-off scripts on my Desktop for which I do not want any tags files. In fact, I only really want project-specific tag files in all of my git repo roots. It would be nice if there were a way to have dynamic tag files enabled but to prevent easytags from writing a tags files when in:

  • All directories but project roots
  • Specific directories

Slow

Hi,

I notice slowdowns by easytag when it autoupdates tags/highlights.

I enabled vbs=1 and observed that highlighting takes >4 seconds, while updating the tags takes ~2 seconds. However, running a simple ctags from the command line only takes ~ 0.01s, so I wonder where easytags wastes it's time...

Any idea?

Error when generating helptags with pathogen

When updating the helptags via pathogen:

vim -c 'call pathogen#helptags()' -c 'q'

I get the following error:

Error detected while processing function <SNR>58_RegisterTagsFile:
line    3:
E117: Unknown function: xolox#misc#option#split_tags
E15: Invalid expression: xolox#misc#option#split_tags(&tags)
line    4:
E121: Undefined variable: tagfiles
E116: Invalid arguments for function copy(tagfiles), 'resolve(expand(v:val))')
E116: Invalid arguments for function map(copy(tagfiles), 'resolve(expand(v:val))')
E15: Invalid expression: map(copy(tagfiles), 'resolve(expand(v:val))')
line    6:
E121: Undefined variable: expanded
E116: Invalid arguments for function index(expanded, resolve(expand(g:easytags_file))) == -1
E15: Invalid expression: index(expanded, resolve(expand(g:easytags_file))) == -1
Press ENTER or type command to continue

This is on OS X 10.6.7 with MacVim

Error message regarding ctags file name

I've updated to the latest version and I'm getting an error message everytime easytags tries to update the ctags file.

easytags.vim 2.7.6: Failed to update tags file ~/Projects/SAA5: ctags: output file name may not begin with a '-'^@! (at function xolox#easytags#autoload..xolox#easytags#update..48_run_ctags, line 11)

My vimrc sets easytags_file as:

let g:easytags_file='./.vimtags'

~Shawn

Version "Development" should be considered recent enough

A ctags SVN snapshot will have version="Development", and easytags will claim that ctags is not installed.

  1. it should report that ctags is not recent enough (which is different from "not installed" of course).
  2. it should consider "Development" to be recent enough. It might check the timestamp of the binary (since the dev snapshot might be 5+ years old already), but that I would skip that.

Change git:// protocol in .gitmodules to https://

In some scenarios (like in some companies), the port which git protocol uses (9418 if I'm correct) is blocked by firewall policies. So, when I try to do a clone to your project (git clone --recursive), I can't receive the files in your submodule, so I receive a broken application.

My suggestion is to use https for the .gitsubmodule file. This submodule isn't that big to "justify" the use of git protocol, and would avoid a lot of problems in a lot of corporate machines/environments.

(Why am I doing a git clone? I'm using pathogen.)

problem with composed file types

The filetypes of my django projects are 'htmldjango' and 'python.django', and on :UpdateTags, it complains that they are not supported by Exuberant Ctags. I would be cool if easytags could handle that.

Failed to get supported languages!

If you create a ctag.cnf file in your home folder and exclude a language eg with this line:

--languages=-JavaScript

it upsets easytags.The error is

easytags.vim 3.4: Failed to get supported languages! (output: Ant^@Asm^@Asp^@Awk^@Basic^@BETA^@C^@C++^@C#^@Cobol^@DosBatch^@Eiffel^@Erlang^@Flex^@Fortran^@HTML^@Java^@JavaScript [disabled]^@Lisp^@Lua^@Make^@MatLab^@OCaml^@Pascal^@Perl^@PHP^@Python^@REXX^@Ruby^@Scheme^@Sh^@SLang^@SML^@SQL^@Tcl^@Tex^@Vera^@Verilog^@VHDL^@Vim^@YACC) (at function xolox#easytags#autoload..xolox#easytags#select_supported_filetypes..xolox#easytags#supported_filetypes..<SNR>55_check_filetype, line 3)

This could be caused by ctags introducing "[disabled]" in the output of

ctags --list-languages 

when you exclude a language.

Freshly installed plugin, getting 'unreasonably low value' even when setting it to 1000000

I just installed this plugin, and keep getting

easytags.vim 3.3: The 'updatetime' option has an unreasonably low value, so I'll start compensating (see the easytags_updatetime_min option).

I tried setting this:

let g:easytags_updatetime_min = 4000

Or to a even higher value, i.e. 100000 and what not, and I keep getting this warning every time.
This even happens I if disable the plugin using:

let g:easytags_auto_update = 0  " Disable auto-update.
let g:easytags_auto_highlight = 0

And idea what's wrong?

Sorting issue

I am facing a big issue with sort in tags files... The sort is not the same if I create the file from command line and if I use UpdateTags in easytags. The problem is how underscores are interpreted. I don't know if it is always reproducible, maybe it is because some deep hidden locale definition somewhere. I tried to play with LC_COLLATE, but I don't know if is understood by vim. BTW, here a comment extracted from help of sort command in vim (I know you use sort function, but it is maybe related)

The details about sorting depend on the library function used. There is no
guarantee that sorting is "stable" or obeys the current locale. You will have
to try it out.

I am using:

  • Exuberant Ctags 5.8
  • Vim 7.3
  • bash 4.1

The proble is that vim says to me that some tags files are not well sorted (and I want to keep binary search!)

I can reproduce it with the following:

create a test.c file:

int test_pe_init_params;
int test_pe_try_credits;    

void test_pending_credits_init();
void test_pending_try_credits();

Now, create a tags file from command line:

ctags --sort=foldcase -R --c++-kinds=+p --c-kinds=+p --fields=+liaS

Copy this first version, then open test.c, :UpdateTags, then check diff between two versions:

exuberant-ctags version

!_TAG_FILE_FORMAT   2   /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED   2   /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_PROGRAM_AUTHOR    Darren Hiebert  /[email protected]/
!_TAG_PROGRAM_NAME  Exuberant Ctags //
!_TAG_PROGRAM_URL   http://ctags.sourceforge.net    /official site/
!_TAG_PROGRAM_VERSION   5.8 //
test_pending_credits_init   test.c  /^void test_pending_credits_init();$/;" p   language:C  file:
test_pending_try_credits    test.c  /^void test_pending_try_credits();$/;"  p   language:C  file:
test_pe_init_params test.c  /^int test_pe_init_params;$/;"  v   language:C
test_pe_try_credits test.c  /^int test_pe_try_credits;  $/;"    v   language:C
!_TAG_FILE_FORMAT   2   /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED   2   /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_PROGRAM_AUTHOR    Darren Hiebert  /[email protected]/
!_TAG_PROGRAM_NAME  Exuberant Ctags //
!_TAG_PROGRAM_URL   http://ctags.sourceforge.net    /official site/
!_TAG_PROGRAM_VERSION   5.8 //
test_pe_init_params /nfs/home/jreybert/test/easytags/test.c /^int test_pe_init_params;$/;"  v   language:C
test_pe_try_credits /nfs/home/jreybert/test/easytags/test.c /^int test_pe_try_credits;  $/;"    v   language:C
test_pending_credits_init   /nfs/home/jreybert/test/easytags/test.c /^void test_pending_credits_init();$/;" p   language:C  file:
test_pending_try_credits    /nfs/home/jreybert/test/easytags/test.c /^void test_pending_try_credits();$/;"  p   language:C  file:

option to specify tags dir and create tags file if needed

related issue: #15
I'm using this option let g:easytags_dynamic_files = 2 since I like it being broken down and the file is auto created. However it slows vim down when the project is really big so I've been looking for a way to make easytags auto create tags file in the current dir. But it seems like the feature (#15) was removed in favor of project specific tags.

Is there a work around for my situation?

After the most recent update, easytags stops working.

Error detected while processing function 57_InitEasyTags..57_CheckCtags:
line 6:
E117: Unknown function: xolox#misc#os#exec
E15: Invalid expression: xolox#misc#os#exec({'command': command, 'check': 0})
line 7:
E121: Undefined variable: result
E15: Invalid expression: result['exit_code'] == 0
Error detected while processing function 57_InitEasyTags:
line 6:
E117: Unknown function: xolox#misc#os#is_win
E15: Invalid expression: xolox#misc#os#is_win()
Error detected while processing /Users/james/.vim/bundle/vim-easytags/autoload/xolox/easytags.vim:
line 859:
E117: Unknown function: xolox#misc#option#get
E15: Invalid expression: xolox#misc#option#get('easytags_include_members', 0)
easytags.vim 3.3.6: Plug-in not loaded because Exuberant Ctags isn't installed! Please download & install Exuberant Ctags from http://ctags.sf.net

$ which ctags

returns /usr/local/bin/ctags

$ ctags --version

Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
Compiled: May 25 2013, 15:43:34
Addresses: [email protected], http://ctags.sourceforge.net
Optional compiled features: +wildcards, +regex

Everything related to easytags in my vimrc.

" Easytags
let g:easytags_include_members = 1
let g:easytags_python_enabled = 1
let g:easytags_file = '~/.vim/tags/easytags'
let g:easytags_cmd = '/usr/local/bin/ctags'

osx, brew, and suggested --version

I've run on the command line "ctags --version" as the plugin should do based on the documentation, and it just gives an error: it seems that the option --version doesnt exist!
I installed the ctags from brew, it's the 5.8 version and I was making sure to run the ctags just installed not the one that ships with osx.

Any suggestions?

Async: stage 2 invocation fails when Vim command is shell-escaped.

This may need to be addressed in xolox#misc#os#exec(), but I raise this here because (apart from my patch #50) this prevented me from using the async branch.

The execution fails (silently; I just see in the task manager that no second gvim process is launched) when the command executable is enclosed in double quotes:

"C:\Program Files\vim\vim73\gvim.exe" -u NONE -U NONE --noplugin -N --cmd "let &rtp = 'D:/A/.vim,C:\Program Files\vim/vimfiles,C:\Program Files\vim\vim73,C:\Program Files\vim/vimfiles/after,D:/A/.vim/after' | call xolox#easytags#update_remote({'cmdline': 'ctags --fields=+l --c-kinds=+p --c++-kinds=+p --sort=no -f- ""--language-force=vim"" ""D:\A\Unixhome\.vim\autoload\xolox\misc\path.vim""', 'by_filetype': '', 'tagsfile': '\A\Unixhome\.vim\tags', 'servername': 'GVIM', 'verbose': 1, 'have_args': 0, 'starttime': [400, 326843564], 'silent': 1, 'filter_tags': 0, 'cache': {}})"

When I replace "C:\Program Files\vim\vim73\gvim.exe" with gvim, it works. Also, when the entire command line is additionally quoted: ""C:\Program Files\vim\vim73\gvim.exe" ... ". This has to do with the strange quoting rules of the Windows shell. The built-in system() suffered from this a long time, too (and I had to use the quote-all there), until patches starting with 7.3.443 made this better. I leave it to you whether you just double-quote the entire command (and whether you do that in the exec() function or its callers), or look into Vim's new quoting.

Easytags hangs when editing vimscript (files with the extension .local or .vim)

Anytime I open a file where ft=vim, easytags hangs after I stop typing. This of course would trigger the curshold event that's referenced in the documentation. It seems to always happen around that time. I usually have to switch modes to trigger it; for example:

  1. Switch to insert mode
  2. Press carriage return a few types and type so random characters
  3. Escape back out to normal mode
  4. Wait a few seconds
  5. My instance of vim hangs and renders the current tab in my terminal immobile

Other times I just have to open up some plugin with a .vim extension or .local extension and wait around. Vim eventually hangs.

I'm not sure if .local natively triggers the vim filetype. A plugin could be manually setting ft to vim on some event like:

BufEnter *.local set ft=vim

In any case, once ft=vim, trouble occurs.

It never takes more than about half a minute to reproduce; hangs within seconds.

What makes me so sure it's related to easytags?

Because when I disable the plugin, everything seems to work fine. Once I reenable it, things go haywire again.

What is ':HighlightTags' for?

Hey, I newly installed this plugin, the updating of tags automatically seems useful, but what does ':HightTags' do? I failed to get the use of it, are the tags already highlight by the vim itself?What is the use of this functionality? I dont't find any difference after executing the commad?

Duplicate tag ":HighlightTags" in vim-easytags/doc/easytags.txt

With the latest version receiving the following error when MacVim starts:

Error detected while processing function pathogen#helptags:
line 3:
E154: Duplicate tag ":HighlightTags" in file /Users/ssoriche/.vim/bundle/vim-easytags/doc/easytags.txt

MacVim version: 7.3

~Shawn

Getting 'Ctags isn't installed' even though it is (and set).

I have exuberant-ctags installed to /usr/bin/ctags and also /usr/bin/ctags-exuberant (same program). In addition I also set let g:easytags_cmd = '/usr/bin/ctags, but I'm still getting this upon Vim startup:

Error detected while processing function <SNR>61_InitEasyTags..<SNR>61_CheckCtags:
line    6:
E117: Unknown function: xolox#misc#os#exec
E15: Invalid expression: xolox#misc#os#exec({'command': command, 'check': 0})
line    7:
E121: Undefined variable: result
E15: Invalid expression: result['exit_code'] == 0
Error detected while processing function <SNR>61_InitEasyTags:
line    6:
E117: Unknown function: xolox#misc#os#is_win
E15: Invalid expression: xolox#misc#os#is_win()
Error detected while processing /freespace/stud/oryb/dotfiles/vim/bundle/vim-easytags/autoload/xolox/easytags.vim:
line  859:
E117: Unknown function: xolox#misc#option#get
E15: Invalid expression: xolox#misc#option#get('easytags_include_members', 0)
easytags.vim 3.3.6: Plug-in not loaded because Exuberant Ctags isn't installed! On Ubuntu & Debian you can install Exuberant Ctags by installing the package named `exuberant-ctags': sudo apt-get install exuberant-ctags

I'm working on a machine without admin privileages, so I can't specifically install exuberant-ctags, but it appears to be installed and can be called from the terminal, including Vim's terminal (:!ctags works).

And idea how to fix this?

A long, long time until cpp tags are updated

I know the plugin works for me because either I wait for a good 5 minutes before the tags are updated, or I just type in :HighlightTags myself

Easy tags used to update immediately (think less than a minute) and color in all my functions, but now it doesn't. I have tried setting the g:easytags_updatetime_min option to 4 minutes and was still out of luck.

Any help would be appreciated.

Use multiple tags files for hilighting

Hi,

I am using easytags with a big project. I set up easytags like:

let g:easytags_dynamic_files = 1
let g:easytags_include_members = 1
set tags=./tags;,~/.vimtags
set tags+=/path/to/project/sub1/tags,/path/to/project/sub2/tags

vim handle the multiple tags files very well, sorry. Let say I am in /path/to/project/sub1/, tselect myfunction_fromsub2 wroks like a charm.

But functions_fromsub2, define_frosub2 are not highlighted.

Cursor lag when navigating html files

I had to disable "on cursorhold" functionality due to the fact that it was causing every cursor movement to lag when navigating/editing HTML files. I used why_so_slow.py and my largest tags file was only 80kb; the files I were editing were very small. Do you have any idea what might be causing this?

ctags isn't installed (macintosh)

Hi xolox !

I use MacVim and i have installed ctags with the macports project, unfortunately when i open macvim with your plugin i have a message : easytags.vim 2.5.8: Plug-in not loaded because Exuberant Ctags isn't installed! Please download & install Exuberant Ctags from http://ctags.sf.net

macvim : https://github.com/b4winckler/macvim
macports : https://trac.macports.org/browser/trunk/dports/devel/ctags/Portfile

i hope you can fix this issue

Sorry for my poor english

Thanks for your work dude !

easytags.vim 2.4.11: Vim(let):E713: Cannot use empty key for Dictionary

Can anyone help for the following issue? Thanks.
Error Message:
easytags.vim 2.4.11: Vim(let):E713: Cannot use empty key for Dictionary (at function xolox#easytags#autoload..xolox#easytags#update..103_filter_merge_tags..103_find_tagged_files..103_canonicalize, line 5)

Configuration:

set tags=./tags;,$HOME/.vim/vimtags
let g:easytags_always_enabled = 1
let g:easytags_file = '/.vim/vimtags/easytags'
let g:easytags_dynamic_files = 1
let g:easytags_by_filetype = "
/.vim/vimtags/"
let g:easytags_auto_highlight = 1

if has("autocmd")
autocmd FileType cpp,python,java let g:easytags_include_members = 1
endif

" If you like one of the existing styles you can link them:
highlight link cMember Special

" You can also define your own style if you want:
highlight cMember gui=italic

" set this if you use symlinks
let g:easytags_resolve_links = 1

InitEasyTags failed

Got this error when starting vim: (latest commit: 7916b46)

Error detected while processing function 39_InitEasyTags:
line    6:
E117: Unknown function: xolox#misc#os#is_win
E15: Invalid expression: xolox#misc#os#is_win()
Press ENTER or type command to continue

very slow for big project

Hi
Be sorry to refer to this old topic again, but I can't find the answer in the posted issues.
When open a relative big(such as vim source code) project ,easytags makes cursor poor response,except I disable it manually.
I noticed that the tag files of the project is about 3Mb, so I wonder how to open a much larger project(eg Linux kernel) with easytags enabled.
Thanks.

All files listed in Tag File are relative to current directory, not Tag File Location

Action: Running :UpdateTags with a directory containing python files

Symptom: all file names referenced in my tag file have paths relative to the location where I executed :UpdateTags, e.g.

n_topics_test   run_crossval_nyt.py     /^def n_topics_test(n_topics):$/;"      f       language:Python
n_topics_test   run_crossval_synthetic.py       /^def n_topics_test(n_topics):$/;"      f       language:Python

Observed Output Vim interprets the file's location as relative to the tag file,

E433: No tags file
E426: tag not found: n_topics_test
tag 1 of 2 or more
File "/Users/dux/.vimetc/run_crossval_nyt.py" does not exist
tag 2 of 2 or more
tag 2 of 2
E429: File "/Users/dux/.vimetc/run_crossval_synthetic.py" does not exist 

Expected Output Jumping to the relevant file

Updatetime too low (clash with python mode)

Hi,

python-mode sets the update time to 1000 (1ms). Now I get all sorts of warnings from easytags. Sure I can adjust g:easytags_updatetime_min, but the help says that might break the plugin.

Since easytags is already noticing this, why don't you implement a workaround. I.e. you can check how often you are updated and only perform the actual work every n-th time (where n=g:easytags_updatetime_min/update_time)?

Regards
Jonas

easytags fails to create "tags" file in current file dir

In my vimrc I have

set tags=./tags,tags
let g:easytags_dynamic_files = 1

I now edit a file called foo/bar.cpp. There is no foo/tags file. In this case, easytags still uses ~/_vimtags. Instead, it should create the foo/tags file and use it.

If I manually create an empty foo/tags file, then easytags uses it without problems.

What I really want is for easytags to create the tags file if it doesn't exist, since in my tags variable I have clearly stated that I want to use this file. Also, the documentation for g:easytags_dynamic_files states that

If you've also enabled g:easytags_by_filetype the project specific tags file must exist, even if it's empty; otherwise g:easytags_by_filetype will take precedence.

which leads me to believe that if g:easytags_by_filetype is disabled, then with g:easytags_dynamic_files easytags should be creating the tags file I specified if it does not exist.

neocomplcache updatetime fiddling causing warning from easytags

I use neocomplcache, which seems to set updatetime to 300ms when in insert mode. When the user leaves insert mode, it sets updatetime back to 4000ms. So when I'm in insert mode, easytags complains about an unreasonable updatetime value.

The relevant code from neocomplcache is here. The default value for g:neocomplcache_cursor_hold_i_time is 300.

I see the relevant easytags code. Could we perhaps get a flag that we can set that will cause easytags to bail on such short updatetime events? Neo will set updatetime back to 4000 after the user leaves insert mode, so easytags can continue after that. Basically I'm asking for a flag that will cause easytags to silently skip these rapid events and resume when we get back to 4000ms.

Or some other solution. Anything that will remove those annoying messages will be fine. :)

Scrolling down in a file with Tag Highlighting on causes lag

Hi, I really like vim-easytags and just started using it, but I'm getting abnormal amounts of lag when I'm scrolling down a medium long file (160 lines). After scrolling down a bit, I start to get lag on vim. I'm using both gvim and vim, and the lag occurs on both.

I noticed it after I added another tag, called SDL2, which is basically a tags of SDL2, however, the size of the tag is only 1.6MB. And my project file tag is only 24KB. It shouldn't really give me lag should it? It's only 1.6 MB compared to +50 MB.

My settings related to this is:

let g:easytags_dynamic_files = 2
let g:easytags_python_script = "/.vim/bundle/vim-easytags/misc/easytags/why-so-slow.py"
set tags+=
/.vim/tags/sdl2

I disabled every plugin I have and it's easytags that's causing this. I tried not using python script and tried using highlight.py instead, but nothing different happens.

Is there a way I can fix this? Surely 1.6 MB can't be too much can it?

Problem with g:easytags_by_filetype

I encountered a problem with the g:easytags_by_filetype option.

When setting it and the scan proceed, I get the following error:

Command line: sh -c '(/usr/local/bin/ctags --fields=+l --c-kinds=+p --c++-kinds=+p '''-f/vim''' --sort=foldcase --extra=+q '''--language-force=vim''' '''/Users/abeaumet/.dotfiles/vim/vimrc''') 1>'''/var/folders/2w/y0kgsc6j7j1dwh_6v9lwf50h0000gn/T/vGwzlLn/18''' 2>'
''/var/folders/2w/y0kgsc6j7j1dwh_6v9lwf50h0000gn/T/vGwzlLn/19''''

Output on standard output stream:

ctags: cannot open tag file : Permission denied (at function xolox#easytags#autoload..xolox#easytags#update..89_run_ctags..xolox#misc#os#exec, line 150)

I also try the :TagsByFileType command to get more details. I get the error below followed by the previous error message.

easytags.vim 3.4: Vim(return):E482: Can't create file /vim.easytags.tmp (at function xolox#easytags#by_filetype..89_save_by_filetype..xolox#easytags#write_tagsfile, line 28)

Vim locks up with easytags plugin

When I use the plugin with a large project (linux kernel in my case) sometimes it just completely locks up after a few seconds. If I press CTRL-C it resumes and if verbose mode is set I can see in messages the following lines:

Messages maintainer: Bram Moolenaar <[email protected]>                                                                                                 
"af_unix.c" 2300L, 54010C                                                                                                                          
"~/kernel/include/net/af_unix.h" 71L, 1891C                                                                                                        
Reading viminfo file "/home/ldx/.viminfo" marks                                                                                                    
"af_unix.c" 2300L, 54010C                                                                                                                          
not found in 'runtimepath': "autoload/xolox/shell.vim"                                                                                             
easytags.vim 2.8.1: Retrieved 43 supported languages in 0.012 seconds.                                                                             
easytags.vim 2.8.1: Initialized cache of tagged files in 47 seconds.                                                                               
easytags.vim 2.8.1: Highlighted tags in ~/kernel/net/unix/af_unix.c in 8 seconds (using Python).                                                   
"~/kernel/include/net/af_unix.h" 71L, 1891C                                                                                                        
"~/kernel/include/net/af_unix.h" 71L, 1891C                                                                                                        
easytags.vim 2.8.1: Executing /usr/bin/ctags --fields=+l --c-kinds=+p --c++-kinds=+p --sort=no -f- '--language-force=c++' '/home/ldx/kernel/include/net/af_unix.h'.                                                                                                                                       
not found in 'runtimepath': "autoload/xolox/shell.vim"                                                                                             
easytags.vim 2.8.1: Updated tags for ~/kernel/include/net/af_unix.h in 2.82 seconds.                                                               
easytags.vim 2.8.1: Vim:Interrupt (at function xolox#easytags#autoload..xolox#easytags#highlight, line 31)                                         
Type  :quit<Enter>  to exit Vim                                                                                                                    
Press ENTER or type command to continue

I don't have any local settings for easytags.

Error - Failed to get supported languages!

After installing, when I load any file in gVim, after a few seconds, I get an error:

easytags.vim 2.4.9: Failed to get supported languages! (output: Ant^@ ... a whole bunch ... ^@yacc) (at function xolox#easytags#autoload..xolox#easytags#update..17_check_cfile..xolox#easytags#supported_filetypes, line 11)

Browsing the source, it seems this is a faulty error. The list I am getting shows that ctags.exe was found, and --list-languages returned data.

If I run ctags manually a few times on the command line with the --list-languages option, and then echo %ERRORLEVEL%, I get "0". Just before running it, it was returning "9009" (due to a bad command I entered). I am not sure this is reliable on Windows, but I think that means the process is returning 0.

I am using the latest version of github. I simply clicked "download", grabbed the zip archive, and extracted it to %UserProfile%\vimfiles.

I am using Exuberant Ctags 5.8 on Windows 7 x64, the build from the front page: http://ctags.sourceforge.net/

I am using a somewhat old version of the gVim Windows binaries (an older x64 compile, before I believe x64 compiles were provided on the main gVim site):

VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Feb 26 2010 12:56:39)
MS-Windows 64-bit GUI version with OLE support
Included patches: 1-376
Compiled by georger@COZIGROUP
...

InitEasyTags Fails

recently updated easytags, and misc from git and git this.

Error detected while processing function <SNR>34_InitEasyTags..<SNR>34
_CheckCtags:

line    9:

E684: list index out of range: 0

E116: Invalid arguments for function matchstr(result['stdout'][0], pattern)

E15: Invalid expression: matchstr(result['stdout'][0], pattern)

line   10:

E121: Undefined variable: g:easytags_ctags_version

E15: Invalid expression: g:easytags_ctags_version == 'Development'

easytags.vim 3.3.9: Plug-in not loaded because Exuberant Ctags isn't 
installed! Please download & install Exuberant Ctags from 
http://ctags.sf.net

Linking directories

Heres an idea for cross platform linking of files:

Get a dictionary of lists for each directory synced across platforms. Easytags checks the presence of each directory in the list and then substitutes the path in the tags file for each other item in the list.

For example:

You have a list like [''/testing","D:\My Project Test","/.vim/testing/testfiles"]

Depending on which directory is available (iterate through all and check, if more than 1, raise exception), replace all paths in your tags file with the present directory, maybe run an UpdateTags! afterwards to get rid of duplicates, but this shouldn't be an issue after the first conversion.

Let me know what you think, I have been doing this manually for a while and it works, especially if you have directories synced with git or with dropbox

Can't process function <SNR>76_InitEasyTags - Plugin Error

I have ctags installed, but after the last update the script doesnt work and i got the following error msg:

Erro detectado ao processar function 76_InitEasyTags:
linha 6:
E117: Função desconhecida: xolox#misc#os#is_win
E15: Expressão inválida: xolox#misc#os#is_win()
Erro detectado ao processar /home/helmuth/.vim/bundle/vim-easytags/autoload/xolox/easytags.vim:
linha 859:
E117: Função desconhecida: xolox#misc#option#get
E15: Expressão inválida: xolox#misc#option#get('easytags_include_members', 0)
easytags.vim 3.3.6: Plug-in not loaded because Exuberant Ctags isn't installed! Please download & install Exuberant Ctags from http://ctags.sf.net

My vimrc: github.com/helmuthdu/vim

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.