Version 0.3.1
DONE: Use mouse to follow links. Left double-click to follow WikiPage, Rightclick then Leftclick to go back. FIXED: Renaming - [[hello world?]] to [[hello? world]] links are not updated. FIXED: Buffers menu after renaming is the same as before renaming.
This commit is contained in:
parent
0df6adccc3
commit
c0582997a3
@ -3,8 +3,8 @@
|
|||||||
" Author: Maxim Kim (habamax at gmail dot com)
|
" Author: Maxim Kim (habamax at gmail dot com)
|
||||||
" Home: http://code.google.com/p/vimwiki/
|
" Home: http://code.google.com/p/vimwiki/
|
||||||
" Filenames: *.wiki
|
" Filenames: *.wiki
|
||||||
" Last Change: (14.05.2008 17:25)
|
" Last Change: (16.05.2008 14:28)
|
||||||
" Version: 0.3pre
|
" Version: 0.3.1
|
||||||
|
|
||||||
if exists("b:did_ftplugin")
|
if exists("b:did_ftplugin")
|
||||||
finish
|
finish
|
||||||
@ -52,7 +52,15 @@ imap <buffer> <Up> <C-o>gk
|
|||||||
nmap <silent><buffer> <CR> :call WikiFollowWord('nosplit')<CR>
|
nmap <silent><buffer> <CR> :call WikiFollowWord('nosplit')<CR>
|
||||||
nmap <silent><buffer> <S-CR> :call WikiFollowWord('split')<CR>
|
nmap <silent><buffer> <S-CR> :call WikiFollowWord('split')<CR>
|
||||||
nmap <silent><buffer> <C-CR> :call WikiFollowWord('vsplit')<CR>
|
nmap <silent><buffer> <C-CR> :call WikiFollowWord('vsplit')<CR>
|
||||||
|
|
||||||
|
nmap <buffer> <S-LeftMouse> <NOP>
|
||||||
|
nmap <buffer> <C-LeftMouse> <NOP>
|
||||||
|
noremap <silent><buffer> <2-LeftMouse> :call WikiFollowWord('nosplit')<CR>
|
||||||
|
noremap <silent><buffer> <S-2-LeftMouse> <LeftMouse>:call WikiFollowWord('split')<CR>
|
||||||
|
noremap <silent><buffer> <C-2-LeftMouse> <LeftMouse>:call WikiFollowWord('vsplit')<CR>
|
||||||
|
|
||||||
nmap <silent><buffer> <BS> :call WikiGoBackWord()<CR>
|
nmap <silent><buffer> <BS> :call WikiGoBackWord()<CR>
|
||||||
|
nmap <silent><buffer> <RightMouse><LeftMouse> :call WikiGoBackWord()<CR>
|
||||||
|
|
||||||
nmap <silent><buffer> <TAB> :call WikiNextWord()<CR>
|
nmap <silent><buffer> <TAB> :call WikiNextWord()<CR>
|
||||||
nmap <silent><buffer> <S-TAB> :call WikiPrevWord()<CR>
|
nmap <silent><buffer> <S-TAB> :call WikiPrevWord()<CR>
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
" Author: Maxim Kim (habamax at gmail dot com)
|
" Author: Maxim Kim (habamax at gmail dot com)
|
||||||
" Home: http://code.google.com/p/vimwiki/
|
" Home: http://code.google.com/p/vimwiki/
|
||||||
" Filenames: *.wiki
|
" Filenames: *.wiki
|
||||||
" Last Change: (14.05.2008 17:24)
|
" Last Change: (16.05.2008 14:28)
|
||||||
" Version: 0.3 pre
|
" Version: 0.3.1
|
||||||
|
|
||||||
|
|
||||||
if exists("loaded_vimwiki") || &cp
|
if exists("loaded_vimwiki") || &cp
|
||||||
@ -48,6 +48,9 @@ let g:vimwiki_word2 = '\[\[['.upp.low.oth.'[:punct:][:space:]]\{-}\]\]'
|
|||||||
let s:wiki_word = '\<'.g:vimwiki_word1.'\>\|'.g:vimwiki_word2
|
let s:wiki_word = '\<'.g:vimwiki_word1.'\>\|'.g:vimwiki_word2
|
||||||
let s:wiki_badsymbols = '[<>|?*/\:"]'
|
let s:wiki_badsymbols = '[<>|?*/\:"]'
|
||||||
|
|
||||||
|
"" need it to rename
|
||||||
|
let s:wiki_current_word = g:vimwiki_index
|
||||||
|
|
||||||
execute 'autocmd! BufNewFile,BufReadPost,BufEnter *'.g:vimwiki_ext.' set ft=vimwiki'
|
execute 'autocmd! BufNewFile,BufReadPost,BufEnter *'.g:vimwiki_ext.' set ft=vimwiki'
|
||||||
|
|
||||||
|
|
||||||
@ -226,6 +229,7 @@ function! WikiRenameWord() "{{{
|
|||||||
let wwtorename = expand('%:r')
|
let wwtorename = expand('%:r')
|
||||||
let isOldWordComplex = 0
|
let isOldWordComplex = 0
|
||||||
if wwtorename !~ g:vimwiki_word1
|
if wwtorename !~ g:vimwiki_word1
|
||||||
|
let wwtorename = substitute(wwtorename, g:vimwiki_stripsym, s:wiki_badsymbols, "g")
|
||||||
let isOldWordComplex = 1
|
let isOldWordComplex = 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -303,7 +307,8 @@ function! WikiRenameWord() "{{{
|
|||||||
endwhile
|
endwhile
|
||||||
|
|
||||||
"" DONE: after renaming GUI caption is a bit corrupted?
|
"" DONE: after renaming GUI caption is a bit corrupted?
|
||||||
"" FIXME: buffers menu is also not in the "normal" state, howto Refresh menu?
|
"" FIXED: buffers menu is also not in the "normal" state, howto Refresh menu?
|
||||||
|
execute "emenu Buffers.Refresh\ menu"
|
||||||
|
|
||||||
endfunction "}}}
|
endfunction "}}}
|
||||||
|
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
" Author: Maxim Kim (habamax at gmail dot com)
|
" Author: Maxim Kim (habamax at gmail dot com)
|
||||||
" Home: http://code.google.com/p/vimwiki/
|
" Home: http://code.google.com/p/vimwiki/
|
||||||
" Filenames: *.wiki
|
" Filenames: *.wiki
|
||||||
" Last Change: (14.05.2008 17:25)
|
" Last Change: (16.05.2008 14:28)
|
||||||
" Version: 0.3pre
|
" Version: 0.3.1
|
||||||
|
|
||||||
" Quit if syntax file is already loaded
|
" Quit if syntax file is already loaded
|
||||||
if version < 600
|
if version < 600
|
||||||
|
Loading…
Reference in New Issue
Block a user