vimwiki/ftplugin/vimwiki.vim
Maxim Kim 0df6adccc3 Version 0.3
DONE: - Highlight non-existent WikiWords.
DONE: - delete current WikiWord (<Leader>wd)
DONE: - g:vimwiki_smartCR=2 => use vim comments (see :h comments :h formatoptions) feature to deal with list items. (thx - Dmitry Alexandrov)
DONE: Add highlighting to TODO:, DONE:, FIXED:.
DONE: Rename current WikiWord - be careful on Windows you cannot rename wikiword to WikiWord. After renaming update all links to that renamed WikiWord
FIXED: Bug - do not duplicate WikiWords in wiki history.
FIXED: after renaming [[wiki word]] twice buffers are not deleted
FIXED: when renaming from [[wiki word]] to WikiWord result is [[WikiWord]]
FIXED: more than one complex words on one line is bugging each other when try go to one of them. [[bla bla bla]] [[dodo dodo dodo]] becomes bla bla bla ]] [[dodo dodo dodo
0001-01-01 00:00:00 +00:00

67 lines
1.8 KiB
VimL

" Vim filetype plugin file
" Language: Wiki
" Author: Maxim Kim (habamax at gmail dot com)
" Home: http://code.google.com/p/vimwiki/
" Filenames: *.wiki
" Last Change: (14.05.2008 17:25)
" Version: 0.3pre
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1 " Don't load another plugin for this buffer
"" Defaults
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Reset the following options to undo this plugin.
let b:undo_ftplugin = "setl tw< wrap< lbr< fenc< ff< sua< isf< awa< com< fo<"
setlocal textwidth=0
setlocal wrap
setlocal linebreak
setlocal fileencoding=utf-8
setlocal fileformat=unix
setlocal autowriteall
" for gf
execute 'setlocal suffixesadd='.g:vimwiki_ext
setlocal isfname-=[,]
if g:vimwiki_smartCR>=2
setlocal comments=b:*,b:#
setlocal formatoptions=ctnqro
endif
"" Keybindings {{{
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
nmap <buffer> <Up> gk
nmap <buffer> k gk
vmap <buffer> <Up> gk
vmap <buffer> k gk
nmap <buffer> <Down> gj
nmap <buffer> j gj
vmap <buffer> <Down> gj
vmap <buffer> j gj
imap <buffer> <Down> <C-o>gj
imap <buffer> <Up> <C-o>gk
nmap <silent><buffer> <CR> :call WikiFollowWord('nosplit')<CR>
nmap <silent><buffer> <S-CR> :call WikiFollowWord('split')<CR>
nmap <silent><buffer> <C-CR> :call WikiFollowWord('vsplit')<CR>
nmap <silent><buffer> <BS> :call WikiGoBackWord()<CR>
nmap <silent><buffer> <TAB> :call WikiNextWord()<CR>
nmap <silent><buffer> <S-TAB> :call WikiPrevWord()<CR>
nmap <silent><buffer> <Leader>wd :call WikiDeleteWord()<CR>
nmap <silent><buffer> <Leader>wr :call WikiRenameWord()<CR>
if g:vimwiki_smartCR==1
inoremap <silent><buffer><CR> <CR><Space><C-O>:call WikiNewLine()<CR>
endif
" Keybindings }}}