lib/soywiki.vim in soywiki-0.2.3 vs lib/soywiki.vim in soywiki-0.2.7
- old
+ new
@@ -290,17 +290,19 @@
" This function both sets a script variable and returns the value.
func! s:get_page_list()
" no file current in buffer
if len(bufname('')) == 0
- return split(system(s:ls_command), "\n")
+ let pages = split(system(s:ls_command), "\n")
elseif bufname('') == 'pages-linking-in'
" this needs refactoring to rely less on state
- return s:pages_linking_in
+ let pages = s:pages_linking_in
else
- return s:omit_this_page(split(system(s:ls_command), "\n"))
+ "let pages = s:omit_this_page(split(system(s:ls_command), "\n"))
+ let pages = split(system(s:ls_command), "\n")
endif
+ return pages
endfunction
func! s:pages_in_this_namespace(pages)
let namespace = s:page_namespace()
@@ -387,16 +389,15 @@
return res
endif
endif
endfun
-
function! s:select_page()
let page = s:trimString( get(split(getline(line('.')), ": "), 1) )
close
exe s:return_to_winnr . "wincmd w"
- if (page == '0' || page == '') " no selection
+ if (page == '') " no selection
return
end
let match = ""
for item in s:matching_pages
if (item == page)
@@ -597,12 +598,12 @@
command! -buffer SWBlame :call s:show_blame()
noremap <buffer> <leader>b :call <SID>show_blame()<CR>
noremap <buffer> <leader>x :call <SID>expand(0,1)<CR>
noremap <buffer> <leader>X :call <SID>expand(1,1)<CR>
- noremap <buffer> <leader>nx :call <SID>expand(0,0)<CR>
- noremap <buffer> <leader>nX :call <SID>expand(1,0)<CR>
+ noremap <buffer> <leader>hx :call <SID>expand(0,0)<CR>
+ noremap <buffer> <leader>hX :call <SID>expand(1,0)<CR>
noremap <silent> <leader>? :call <SID>show_help()<cr>
set nu
setlocal completefunc=CompletePageTitle
@@ -613,11 +614,11 @@
endif
endfunc
func! s:highlight_wikiwords()
if (s:is_wiki_page())
- syntax clear
+" syntax clear
exe "syn match Comment /". s:wiki_link_pattern. "/"
exe "syn match Constant /". s:http_link_pattern . "/"
endif
endfunc
@@ -648,5 +649,7 @@
call s:load_page(bufname("%"), 0)
endif
syntax enable
let mapleader = ','
call s:highlight_wikiwords()
+
+