agelessdummy / vimwiki

Automatically exported from code.google.com/p/vimwiki
0 stars 1 forks source link

Undefined variable when using a different extension #380

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Change the syntax to markdown. (let g:vimwiki_list = [{'path':'...', 
'syntax':'markdown', 'ext':'.md'}])
2. Set global_ext to 0 (let g:vimwiki_global_ext = 0)
3. Open a markdown file (vim test.md)
4. Go from normal mode to insert mode

What is the expected output? What do you see instead?

I expect no errors, but I get the following:

Error detected while processing 
/Users/alpha/Dropbox/conf_dir/.vim/bundle/vimwiki/autoload/vimwiki/tbl.vim:     

line   19:                                                                      

E121: Undefined variable: g:vimwiki_rxTableSep                                  

Press ENTER or type command to continue

Error detected while processing 
/Users/alpha/Dropbox/conf_dir/.vim/bundle/vimwiki/autoload/vimwiki/tbl.vim:     

line   19:                                                                      

E15: Invalid expression: g:vimwiki_rxTableSep

Error detected while processing function 
vimwiki#tbl#reset_tw..<SNR>84_is_table..<SNR>84_is_separator:                   

line    1:                                                                      

E121: Undefined variable: s:rxSep                                               

Press ENTER or type command to continue  

Error detected while processing function 
vimwiki#tbl#reset_tw..<SNR>84_is_table..<SNR>84_is_separator:                   

line    1:                                                                      

E15: Invalid expression: a:line =~ '^\s*'.s:rxSep.'\(--\+'.s:rxSep.'\)\+\s*$'   

Press ENTER or type command to continue 
Error detected while processing function 
vimwiki#tbl#reset_tw..<SNR>84_is_table:                                         

line    1:                                                                      

E121: Undefined variable: s:rxSep                                               

Press ENTER or type command to continue                                         

Error detected while processing function 
vimwiki#tbl#reset_tw..<SNR>84_is_table:                                         

line    1:                                                                      

E15: Invalid expression: s:is_separator(a:line) || (a:line !~ s:rxSep.s:rxSep 
&& a:line =~ '^\s*'.s:rxSep.'.\+'.s:rxSep.'\s*$')   
Press ENTER or type command to continue    

What version of the product are you using? On what operating system?

This is on OS X 10.8, with the latest download of vimwiki.

Please provide any additional information below.

Original issue reported on code.google.com by alpha.c...@gmail.com on 17 Oct 2012 at 5:13

GoogleCodeExporter commented 8 years ago
There have been previous difficulties with bundler installations ensuring they 
are using an up to date version of vimwiki.

This sort of error leads me to suspect you have an older version of vimwiki, or 
perhaps you have files leftover from a previous version.  What does it say at 
the top of the help file (e.g. type ":help vimwiki").

To ensure that you have no leftover files from a previous or incorrect 
installation, please search for and remove all files containing "vimwiki" from 
your .vim directory  CAVEAT: you may wish to keep certain files that you are 
confident are not part of vimwiki, and yet still mention "vimwiki".

Also, your path variable is set to "..." !?  This does not appear to be a valid 
path.  Please try again with a fully expanded and resolved path.

- Stu

Original comment by stu.andrews on 17 Oct 2012 at 4:01

GoogleCodeExporter commented 8 years ago
:help vimwiki reports that I'm on version 2.0.1.

~/.vim$ ack -ail vimwiki
after/ftplugin/vimwiki.vim
bundle/vimwiki/.VimballRecord
bundle/vimwiki/autoload/vimwiki/base.vim
bundle/vimwiki/autoload/vimwiki/diary.vim
bundle/vimwiki/autoload/vimwiki/html.vim
bundle/vimwiki/autoload/vimwiki/lst.vim
bundle/vimwiki/autoload/vimwiki/markdown_base.vim
bundle/vimwiki/autoload/vimwiki/tbl.vim
bundle/vimwiki/autoload/vimwiki/u.vim
bundle/vimwiki/doc/tags
bundle/vimwiki/doc/vimwiki.txt
bundle/vimwiki/ftplugin/vimwiki.vim
bundle/vimwiki/plugin/vimwiki.vim
bundle/vimwiki/syntax/vimwiki.vim
bundle/vimwiki/syntax/vimwiki_default.vim
bundle/vimwiki/syntax/vimwiki_markdown.vim
bundle/vimwiki/syntax/vimwiki_markdown_custom.vim
bundle/vimwiki/syntax/vimwiki_media.vim

The path is actually ~/Dropbox/vimwiki, but I figured that wasn't really useful 
information.

This only happens when I have "let g:vimwiki_global_ext = 0" in my .vimrc.

Original comment by alpha.c...@gmail.com on 17 Oct 2012 at 6:05

GoogleCodeExporter commented 8 years ago
Were you able to resolve or work-around this issue?

Original comment by stu.andrews on 28 Dec 2012 at 5:07

GoogleCodeExporter commented 8 years ago
Nope, but I cleared out my vim settings and I'm seeing the same thing with only 
vimwiki installed:

http://codestre.am/2732395d58e45a7f60bfb626f

Original comment by alpha.c...@gmail.com on 28 Dec 2012 at 8:30

GoogleCodeExporter commented 8 years ago
I am having trouble reproducing this result ... 

Please ensure the following lines appear in your vimrc, as well :
    set nocompatible
    filetype plugin on
    syntax on

Original comment by stu.andrews on 29 Dec 2012 at 8:52

GoogleCodeExporter commented 8 years ago
I added those lines, and am still getting the same result. Also seeing this on 
Ubuntu with vim 7.3. (These messages only show up if you go into insert mode.) 
Any other info I could provide?

Original comment by alpha.c...@gmail.com on 29 Dec 2012 at 2:58

GoogleCodeExporter commented 8 years ago
Ok, a little headway.  I've reproduced this error.  Looking into it ...

Original comment by stu.andrews on 31 Dec 2012 at 2:18

GoogleCodeExporter commented 8 years ago
Should be fixed now.  Please try r62089485bed6

Thanks!

Original comment by stu.andrews on 31 Dec 2012 at 3:13

GoogleCodeExporter commented 8 years ago
Awesome, much thanks!

Original comment by alpha.c...@gmail.com on 31 Dec 2012 at 5:37