Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Uncaught error while sourcing "color_coded", b:current_syntax undefined #33

Closed
tony opened this issue Apr 11, 2015 · 6 comments
Closed
Assignees
Labels
Milestone

Comments

@tony
Copy link
Contributor

tony commented Apr 11, 2015

Issue: #25 (comment)

[neobundle] Uncaught error while sourcing "color_coded": Vim(execute):E121: Undefined variable: b:current_syntax in function color_coded#enter, line 7

Here is the profile.log and vim version here from the error: https://gist.github.com/tony/a23eb36f188102120df6

Will follow up on what plugin / scheme is causing this issue and the workaround.

@jeaye jeaye added the bug label Apr 11, 2015
@jeaye jeaye self-assigned this Apr 11, 2015
@jeaye jeaye added this to the 0.1 milestone Apr 11, 2015
@tony
Copy link
Contributor Author

tony commented Apr 11, 2015

Current status: waiting on more info from me.

@markg85
Copy link

markg85 commented Jul 23, 2015

Hi,

I just tried to install color_coded on my machine (archlinux) and have the same error.
Small warning though, i'm very new to vim! So just in case, here are the steps i did to install this:

  1. install vim
  2. install vundle according to the github page (not via the archlinux packages since there is none)
  3. install color_coded and following the vundle docs, followed by the "all" section.
  4. then i also added the two config options to my .vimrc which are described under the "Options" section (the two let ... variables).

So now vim is setup, vundle is done, color_coded is done. Thus i open a cpp file. Then i get these errors:
Error detected while processing function color_coded#enter:
line 7:
E121: Undefined variable: b:current_syntax
E15: Invalid expression: 'ownsyntax ' . b:current_syntax
Press ENTER or type command to continue
Error detected while processing function color_coded#moved..color_coded#add_match:
line 2:
E28: No such highlight group name: Keyword
Press ENTER or type command to continue
Error detected while processing function color_coded#moved..color_coded#add_match:
line 2:
E28: No such highlight group name: Keyword
Press ENTER or type command to continue
Error detected while processing function color_coded#moved..color_coded#add_match:
line 2:
E28: No such highlight group name: Keyword
Press ENTER or type command to continue
Error detected while processing function color_coded#moved..color_coded#add_match:
line 2:
E28: No such highlight group name: Keyword
Press ENTER or type command to continue
Error detected while processing function color_coded#moved..color_coded#add_match:
line 2:
E28: No such highlight group name: Keyword
Press ENTER or type command to continue
Error detected while processing function color_coded#moved..color_coded#add_match:
line 2:
E28: No such highlight group name: Keyword

then the file opens with a very small bit of highlighting. Definitely not as shown in the screenshots :)
Toggling color_coded and executing :colorscheme twilighted doen't seem to help.

My vim --version output:
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jul 11 2015 08:44:21)
Included patches: 1-778
Compiled by Arch Linux
Huge version without GUI. Features included (+) or not (-):
+acl +farsi +mouse_netterm +syntax
+arabic +file_in_path +mouse_sgr +tag_binary
+autocmd +find_in_path -mouse_sysmouse +tag_old_static
-balloon_eval +float +mouse_urxvt -tag_any_white
-browse +folding +mouse_xterm -tcl
++builtin_terms -footer +multi_byte +terminfo
+byte_offset +fork() +multi_lang +termresponse
+cindent +gettext -mzscheme +textobjects
-clientserver -hangul_input +netbeans_intg +title
-clipboard +iconv +path_extra -toolbar
+cmdline_compl +insert_expand +perl +user_commands
+cmdline_hist +jumplist +persistent_undo +vertsplit
+cmdline_info +keymap +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 -sniff -xsmp
+eval +mouse_dec +startuptime -xterm_clipboard
+ex_extra +mouse_gpm +statusline -xterm_save
+extra_search -mouse_jsbterm -sun_workshop -xpm
system vimrc file: "/etc/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -L. -Wl,-O1,--sort-common,--as-needed,-z,relro -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro -L/usr/local/lib -Wl,--as-needed -o vim -lm -lncurses -lelf -lnsl -lacl -lattr -lgpm -ldl -L/usr/lib -llua -Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro -fstack-protector-strong -L/usr/local/lib -L/usr/lib/perl5/core_perl/CORE -lperl -lpthread -lnsl -ldl -lm -lcrypt -lutil -lc -L/usr/lib/python2.7/config -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -lruby -lpthread -lgmp -ldl -lcrypt -lm -L/usr/lib

The ldd output on the color coded library:
ldd color_coded.so
linux-vdso.so.1 (0x00007ffde35eb000)
liblua5.2.so.5.2 => /usr/lib/liblua5.2.so.5.2 (0x00007fdbb69a5000)
libncursesw.so.5 => /usr/lib/libncursesw.so.5 (0x00007fdbb6740000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007fdbb652a000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007fdbb630c000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007fdbb5f8a000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007fdbb5c86000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007fdbb5a6f000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007fdbb56cd000)
libdl.so.2 => /usr/lib/libdl.so.2 (0x00007fdbb54c9000)
/usr/lib64/ld-linux-x86-64.so.2 (0x0000559a70fbe000)

I'm not sure if the errors i mentioned come from the .so file, a lua file or a python file. In case it;s python, the version i use there is 3.4.3.

If you need more info? I'd be happy to try it out. Also, testing possible patches you might have won't be a problem.

@UnrealQuester
Copy link
Collaborator

Do you have syntax on in your vimrc? This is needed by color_coded to do highlighting. Seems like this is not documented.

@jeaye
Copy link
Owner

jeaye commented Oct 11, 2015

I've been able to reproduce this issue by using NeoBundle and lazy loading color_coded, as per the color_coded example in the README:

  NeoBundleLazy 'jeaye/color_coded', {
      \ 'build': {
      \   'unix': 'cmake . && make && make install',
      \ },
      \ 'autoload' : { 'filetypes' : ['c', 'cpp', 'objc', 'objcpp'] },
      \ 'build_commands' : ['cmake', 'make']
  \}

For now, the solution it to eagerly load color_coded; I'm looking into what the actual issue is.

@jeaye
Copy link
Owner

jeaye commented Oct 11, 2015

I've created an issue on neobundle's repo to hopefully get some more information about this.

@jeaye
Copy link
Owner

jeaye commented Oct 12, 2015

I've resolved this issue on the revamp branch, which I'm currently use to spice color_coded up with a number of fixes. The commit is 7b923cc and I encourage you all to give this a shot with neobundle's lazy loading.

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

No branches or pull requests

4 participants