" 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: (02.06.2008 12:58) " Version: 0.4 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 gk nmap k gk vmap gk vmap k gk nmap gj nmap j gj vmap gj vmap j gj imap gj imap gk nmap :call vimwiki#WikiFollowWord('nosplit') nmap :call vimwiki#WikiFollowWord('split') nmap :call vimwiki#WikiFollowWord('vsplit') nmap nmap noremap <2-LeftMouse> :call vimwiki#WikiFollowWord('nosplit') noremap :call vimwiki#WikiFollowWord('split') noremap :call vimwiki#WikiFollowWord('vsplit') nmap :call vimwiki#WikiGoBackWord() " mapping doesn't work in vim console nmap :call vimwiki#WikiGoBackWord() nmap :call vimwiki#WikiGoBackWord() nmap :call vimwiki#WikiNextWord() nmap :call vimwiki#WikiPrevWord() nmap wd :call vimwiki#WikiDeleteWord() nmap wr :call vimwiki#WikiRenameWord() if g:vimwiki_smartCR==1 inoremap :call vimwiki#WikiNewLine('checkup') noremap o o:call vimwiki#WikiNewLine('checkup') noremap O O:call vimwiki#WikiNewLine('checkdown') endif " keybindings }}} "" commands {{{2 " command! -nargs=1 Wiki2HTML call WikiExportHTML(expand()) command! Wiki2HTML call vimwiki#Wiki2HTML(g:vimwiki_home_html, expand('%')) command! WikiAll2HTML call vimwiki#WikiAll2HTML(g:vimwiki_home_html) "" commands 2}}}