soywiki 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/soywiki-expand +3 -2
- data/lib/soywiki.rb +1 -1
- data/lib/soywiki.vim +4 -4
- metadata +2 -2
data/bin/soywiki-expand
CHANGED
@@ -37,11 +37,12 @@ def expand(file, mode, level=0)
|
|
37
37
|
if mode == 'seamful'
|
38
38
|
puts '.' * 10
|
39
39
|
end
|
40
|
-
|
41
40
|
elsif PROCESSED_FILES.include?(link)
|
42
41
|
puts indent("#{link} [[already expanded]]", level, mode)
|
43
|
-
|
42
|
+
elsif !File.file?(link.to_file_path)
|
44
43
|
puts indent("#{link} [[no file found]]", level, mode)
|
44
|
+
else
|
45
|
+
puts indent("#{link}", level, mode)
|
45
46
|
end
|
46
47
|
else
|
47
48
|
puts indent(line, level, mode)
|
data/lib/soywiki.rb
CHANGED
data/lib/soywiki.vim
CHANGED
@@ -481,9 +481,9 @@ func! s:expand(seamless)
|
|
481
481
|
silent! put =res
|
482
482
|
silent! 1delete
|
483
483
|
silent! normal 1G
|
484
|
+
call s:highlight_wikiwords()
|
484
485
|
redraw
|
485
486
|
echom "Expanded " . (a:seamless == 0 ? 'seamfully' : 'seamlessly') . "."
|
486
|
-
|
487
487
|
endfunc
|
488
488
|
|
489
489
|
"------------------------------------------------------------------------
|
@@ -518,6 +518,9 @@ func! s:global_mappings()
|
|
518
518
|
command! -bar -nargs=1 -range -complete=file SWLinkInsert :<line1>,<line2>call s:extract(<f-args>, 'insert', 1)
|
519
519
|
|
520
520
|
command! -bar -nargs=1 SWSearch :call s:wiki_search(<f-args>)
|
521
|
+
|
522
|
+
autocmd BufReadPost,BufNewFile,WinEnter,BufEnter,BufNew * call s:highlight_wikiwords()
|
523
|
+
autocmd BufEnter * call s:prep_buffer()
|
521
524
|
endfunc
|
522
525
|
|
523
526
|
" this checks if the buffer is a SoyWiki file (from firstline)
|
@@ -569,9 +572,6 @@ endfunc
|
|
569
572
|
|
570
573
|
call s:global_mappings()
|
571
574
|
|
572
|
-
autocmd BufReadPost,BufNewFile,WinEnter * call s:highlight_wikiwords()
|
573
|
-
autocmd BufEnter * call s:prep_buffer()
|
574
|
-
|
575
575
|
if (!isdirectory(".git"))
|
576
576
|
call system("git init")
|
577
577
|
echom "Created .git repository to store revisions"
|