lib/soywiki.vim in soywiki-0.0.4 vs lib/soywiki.vim in soywiki-0.0.5

- old
+ new

@@ -479,13 +479,13 @@ split new setlocal buftype=nofile "scratch buffer for viewing; user can write silent! put =res silent! 1delete silent! normal 1G + call s:highlight_wikiwords() redraw echom "Expanded " . (a:seamless == 0 ? 'seamfully' : 'seamlessly') . "." - endfunc "------------------------------------------------------------------------ func! s:open_href() @@ -516,10 +516,13 @@ command! -bar -nargs=1 -range -complete=file SWInsert :<line1>,<line2>call s:extract(<f-args>, 'insert', 0) command! -bar -nargs=1 -range -complete=file SWLinkAppend :<line1>,<line2>call s:extract(<f-args>, 'append', 1) command! -bar -nargs=1 -range -complete=file SWLinkInsert :<line1>,<line2>call s:extract(<f-args>, 'insert', 1) command! -bar -nargs=1 SWSearch :call s:wiki_search(<f-args>) + + autocmd BufReadPost,BufNewFile,WinEnter,BufEnter,BufNew * call s:highlight_wikiwords() + autocmd BufEnter * call s:prep_buffer() endfunc " this checks if the buffer is a SoyWiki file (from firstline) " and then turns on syntax coloring and mappings as necessary func! s:prep_buffer() @@ -566,12 +569,9 @@ match none " not sure if this works endif endfunc call s:global_mappings() - -autocmd BufReadPost,BufNewFile,WinEnter * call s:highlight_wikiwords() -autocmd BufEnter * call s:prep_buffer() if (!isdirectory(".git")) call system("git init") echom "Created .git repository to store revisions" endif