t9md / vim-ezbar

&statusline configuration helper for minimalist.
25 stars 2 forks source link

Error detected while processing function ezbar#string #7

Open stobenski opened 9 years ago

stobenski commented 9 years ago

I can change themes by :EzbarTheme 'theme name', everything works fine.

But when I try to configure theme name in ~/.vimrc:

" ezbar:

Plug 't9md/vim-ezbar'

let g:ezbar = {}
let g:ezbar.theme = 'fancy'

I get an error when VIM starts:

Error detected while processing function ezbar#string:
line    2:
E716: Key not present in Dictionary: parts
Press ENTER or type command to continue
Error detected while processing function ezbar#string:
line    2:
E15: Invalid expression: s:EB.parts
Press ENTER or type command to continue
Error detected while processing function ezbar#string..39:
line    2:
E716: Key not present in Dictionary: parts
Press ENTER or type command to continue
Error detected while processing function ezbar#string..39:
line    2:
E15: Invalid expression: g:ezbar.parts
Press ENTER or type command to continue
Vim(call):E121: Undefined variable: s:PARTS
Press ENTER or type command to continue

and as a result I can't see either any theme or ezbar.

Also, when I try to configure default settings I have similar error when VIM starts:

cp ~/.vim/plugged/vim-ezbar/autoload/ezbar/config/default.vim ~/.vim/my_ezbar.vim

~/.vimrc:

" ezbar:

Plug 't9md/vim-ezbar'
let g:ezbar_enable = 1
source ~/.vim/my_ezbar.vim
Error detected while processing /home/sev/.vim/my_ezbar.vim:
line   47:
E117: Unknown function: ezbar#parts#use
E15: Invalid expression: ezbar#parts#use('default', {'parts': s:features })
line   50:
E121: Undefined variable: s:u
line   54:
E121: Undefined variable: self
E15: Invalid expression: self.__width < 90 ? -15 : self.__width < 45 ? -10 : 0
line   55:
E133: :return not inside a function
line   56:
E193: :endfunction not inside a function
line   58:
E121: Undefined variable: s:u
line   60:
E121: Undefined variable: self
E15: Invalid expression: self.__width < 70
line   63:
E121: Undefined variable: self
E116: Invalid arguments for function filter
line   64:
E193: :endfunction not inside a function
line   67:
E121: Undefined variable: s:u
E15: Invalid expression: s:u
line   68:
E108: No such variable: "s:u"

:version

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Feb 21 2015 13:56:22)
Included patches: 1-640
Modified by Gentoo-9999
Compiled by portage@workstation
Huge version without GUI.  Features included (+) or not (-):
+acl             +comments        +ex_extra        +jumplist        -mouseshape      +path_extra      +signs           +textobjects     +writebackup
+arabic          +conceal         +extra_search    +keymap          +mouse_dec       +perl            +smartindent     +title           +X11
+autocmd         +cryptv          +farsi           +langmap         +mouse_gpm       +persistent_undo -sniff           -toolbar         +xfontset
-balloon_eval    +cscope          +file_in_path    +libcall         -mouse_jsbterm   +postscript      +startuptime     +user_commands   -xim
-browse          +cursorbind      +find_in_path    +linebreak       +mouse_netterm   +printer         +statusline      +vertsplit       +xsmp_interact
++builtin_terms  +cursorshape     +float           +lispindent      +mouse_sgr       +profile         -sun_workshop    +virtualedit     +xterm_clipboard
+byte_offset     +dialog_con      +folding         +listcmds        -mouse_sysmouse  +python/dyn      +syntax          +visual          -xterm_save
+cindent         +diff            -footer          +localmap        +mouse_urxvt     +python3/dyn     +tag_binary      +visualextra     -xpm
+clientserver    +digraphs        +fork()          +lua             +mouse_xterm     +quickfix        +tag_old_static  +viminfo
+clipboard       -dnd             +gettext         +menu            +multi_byte      +reltime         -tag_any_white   +vreplace
+cmdline_compl   -ebcdic          -hangul_input    +mksession       +multi_lang      +rightleft       +tcl             +wildignore
+cmdline_hist    +emacs_tags      +iconv           +modify_fname    -mzscheme        +ruby            +terminfo        +wildmenu
+cmdline_info    +eval            +insert_expand   +mouse           +netbeans_intg   +scrollbind      +termresponse    +windows
   system vimrc file: "/etc/vim/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: x86_64-pc-linux-gnu-gcc -c -I. -Iproto -DHAVE_CONFIG_H     -march=bdver2 -O2 -pipe -fno-stack-protector -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
-I/usr/include  -D_REENTRANT=1  -D_THREAD_SAFE=1  -D_LARGEFILE64_SOURCE=1
Linking: x86_64-pc-linux-gnu-gcc   -L. -Wl,-O1 -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,--no-undefined -Wl,-E  -Wl,-O1 -L/usr/local/lib -Wl,--as-nee
ded -o vim    -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE  -lm -lncurses -lelf -lnsl    -lacl -lattr -lgpm -ldl  -L/usr/lib -lluajit-5.1 -Wl,-E -Wl,-O1 -Wl,
--as-needed  -L/usr/lib64/perl5/5.20.2/x86_64-linux/CORE -lperl -lnsl -ldl -lm -lcrypt -lutil -lc   -ltcl8.6 -ldl -lz -lpthread -lieee -lm -lruby22 -lpthread -
lgmp -ldl -lcrypt -lm  -L/usr/lib64
t9md commented 9 years ago

@barwinco For first error, It's my fault sorry. Currently It's not work, you need to copy entire default config and change theme, as you did int next question.

For second error, its should work but strangely your environment seem to not be able to find ezbar#parts#use function. this is the cause of error.

Anyway I will improve ezbar more ready-to-use, till know it was mainly for my personal use.

t9md commented 9 years ago

Now your first issue (error in color theme was configured) should be fixed. And you customization in g:ezbar is now merged with default configuration. You can disable by g:ezbar_enable_default_config = 0 if you want.