Closed GoogleCodeExporter closed 8 years ago
Hmm ... It works perfectly for me!
I created two links in each wiki but did not create the corresponding files:
[[CamelCase]]
[[CamelCase2]]
And here's the vimrc file that I used. I put it in my repo, beside the src/,
and then ran 'vim -n -u vimrc'
-----------
" There options are required by vimwiki.
set nocompatible
filetype plugin on
syntax on
set encoding=utf-8
" Load only system and vimwiki's scripts.
set runtimepath=src,$VIMRUNTIME
" Build help tags.
" helptags src/doc
" Use directories within 'test' for storing wiki and html.
let wiki1 = {}
let wiki1.path = getcwd().'/wiki-maxhi1'
let wiki1.path_html = getcwd().'/html-maxhi1'
let wiki1.template_path = getcwd().'/tests'
let wiki1.template_default = 'empty'
let wiki1.template_ext = '.tpl'
let wiki1.maxhi = 1
"
let wiki0 = {}
let wiki0.path = getcwd().'/wiki-maxhi0'
let wiki0.path_html = getcwd().'/html-maxhi0'
let wiki0.template_path = getcwd().'/tests'
let wiki0.template_default = 'empty'
let wiki0.template_ext = '.tpl'
let wiki0.maxhi = 0
"
let g:vimwiki_list = [wiki1, wiki0]
let g:vimwiki_camel_case = 0
"let g:vimwiki_debug = 2
-----------
Original comment by stu.andrews
on 25 May 2012 at 2:06
Yes indeed!
Let me check my settings...
Original comment by habamax
on 25 May 2012 at 2:22
Found it!
add
set hidden
to your vimrc...
Original comment by habamax
on 25 May 2012 at 2:32
The problem is in base#validate_wiki_options.
Remove from that function:
let g:vimwiki_current_idx = a:idx
...
and
...
call vimwiki#base#cache_wiki_state()
end this issue is solved.
But I am not sure if this fix doesn't introduce other bugs.
Original comment by habamax
on 25 May 2012 at 3:34
A bit of caching stuff was commented out. Now it works for me with 'hidden'
Original comment by habamax
on 25 May 2012 at 3:53
Yup, removing the caching like that removes some important initialization in
validate_wiki_options().
The good news is that I have reproduced this bug. I am suspicious of
b:current_syntax ...
Original comment by stu.andrews
on 25 May 2012 at 6:38
Fixed with r52730b90da91 and "caching" restored. I'll clean up some of my
debugging stmts later ... it's worth taking a look to see what's going on with
events.
Original comment by stu.andrews
on 25 May 2012 at 10:19
I was in late evening traffic jam when I read your message about
b:current_syntax. But the problem was in combination of events and the way
g:vimwiki_current_idx is changed. It was clearly seen from syntax/vimwiki.vim
that g:vimwiki_current_idx is wrong there by the time VimwikiGet('maxhi') is
checked...
Sorry I couldn't write earlier.
Original comment by habamax
on 26 May 2012 at 9:17
make additional setup for your wiki0 (second wiki):
let wiki0.syntax='markdown'
1. now do the steps from initial post
2. try to normalize [[CamelCase]] link with '+'
it is normalized to [[CamelCase|CamelCase]]...
Wikilink separator is not reset to correct one
Original comment by habamax
on 26 May 2012 at 9:28
I assume you're trying the generic-links branch ... b/c I am getting
[[CamelCase][CamelCase]] with the default from late last night r40f3bd8145b8
The generic-links branch is in flux at the moment ... and remember not to code
and drive.
Original comment by stu.andrews
on 26 May 2012 at 1:08
nope, I use default branch.
Maybe I wasn't specific enough with the steps...
Original comment by habamax
on 26 May 2012 at 5:19
hmm, now I cannot reproduce it... :)
Original comment by habamax
on 26 May 2012 at 5:22
Original comment by habamax
on 28 May 2012 at 6:05
Original issue reported on code.google.com by
habamax
on 25 May 2012 at 4:29