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

Calling tagbar#autoopen(0) on line 129 causes errors when editing python files #34

Closed
dbrill opened this issue Apr 5, 2018 · 5 comments
Assignees
Labels

Comments

@dbrill
Copy link

dbrill commented Apr 5, 2018

Line 129 causes errors
129: autocmd BufEnter *.py :call tagbar#autoopen(0)

Here are the errors I'm getting

Exit code: 1 
Error detected while processing function tagbar#autoopen[9]..<SNR>113_IsValidFile:
line   29: 
E121: Undefined variable: s:known_types 
E116: Invalid arguments for function has_key(s:known_types, a:ftype) 
E15: Invalid expression: !has_key(s:known_types, a:ftype
@rmk135 rmk135 self-assigned this Apr 6, 2018
@rmk135 rmk135 added the bug label Apr 6, 2018
@rmk135
Copy link
Member

rmk135 commented Apr 6, 2018

HI @dbrill ,

What type of file do you open? What version of Vim do you you?

@dbrill
Copy link
Author

dbrill commented Apr 6, 2018

I'm running Vim 8.0 and I opened a python file.

@rmk135
Copy link
Member

rmk135 commented Apr 7, 2018

It's very strange that you see an error. Can you, please, run vim --version and ctags --version and post it here?

It should be looking like this:

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Oct 26 2017 19:54:02)
MacOS X (unix) version
Included patches: 1-1220
Compiled by [email protected]
Huge version without GUI.  Features included (+) or not (-):
+acl             +file_in_path    +mouse_sgr       +tag_old_static
+arabic          +find_in_path    -mouse_sysmouse  -tag_any_white
+autocmd         +float           +mouse_urxvt     -tcl
-balloon_eval    +folding         +mouse_xterm     +termguicolors
-browse          -footer          +multi_byte      +terminal
++builtin_terms  +fork()          +multi_lang      +terminfo
+byte_offset     -gettext         -mzscheme        +termresponse
+channel         -hangul_input    +netbeans_intg   +textobjects
+cindent         +iconv           +num64           +timers
-clientserver    +insert_expand   +packages        +title
+clipboard       +job             +path_extra      -toolbar
+cmdline_compl   +jumplist        +perl            +user_commands
+cmdline_hist    +keymap          +persistent_undo +vertsplit
+cmdline_info    +lambda          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       -python          +viminfo
-cscope          +lispindent      +python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con      -lua             +rightleft       +windows
+diff            +menu            +ruby            +writebackup
+digraphs        +mksession       +scrollbind      -X11
-dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     -xim
+emacs_tags      -mouseshape      +startuptime     -xpm
+eval            +mouse_dec       +statusline      -xsmp
+ex_extra        -mouse_gpm       -sun_workshop    -xterm_clipboard
+extra_search    -mouse_jsbterm   +syntax          -xterm_save
+farsi           +mouse_netterm   +tag_binary
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H   -DMACOS_X_UNIX  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc   -L. -fstack-protector -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib  -L/usr/local/lib -o vim        -lncurses -liconv -framework Cocoa   -mmacosx-version-min=10.12 -fstack-protector-strong -L/usr/local/lib  -L/usr/local/Cellar/perl/5.26.1/lib/perl5/5.26.1/darwin-thread-multi-2level/CORE -lperl -lm -lutil -lc  -L/usr/local/opt/python3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/config-3.6m-darwin -lpython3.6m -framework CoreFoundation  -lruby.2.4.2 -lobjc
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Sep 16 2017, 13:24:32
  Addresses: <[email protected]>, http://ctags.sourceforge.net
  Optional compiled features: +wildcards, +regex

@dbrill
Copy link
Author

dbrill commented Apr 10, 2018

Hey I figured out the problem. When installing xcode it copied its BSD version of ctags to /usr/bin/ which was found and executed before my brew installed version of ctags at /usr/local/bin. For some reason xcode's version of ctags was causing trouble. Thanks for the responses!

@dbrill dbrill closed this as completed Apr 10, 2018
@rmk135
Copy link
Member

rmk135 commented Apr 11, 2018

Great! Good to know that it's figured out! Thanks!

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

No branches or pull requests

2 participants