1" Vim filetype plugin file 2" Language: FlexWiki, http://www.flexwiki.com/ 3" Maintainer: George V. Reilly <george@reilly.org> 4" Home: http://www.georgevreilly.com/vim/flexwiki/ 5" Other Home: http://www.vim.org/scripts/script.php?script_id=1529 6" Author: George V. Reilly 7" Filenames: *.wiki 8" Last Change: Wed Apr 26 11:00 PM 2006 P 9" Version: 0.3 10 11if exists("b:did_ftplugin") 12 finish 13endif 14 15let b:did_ftplugin = 1 " Don't load another plugin for this buffer 16 17" Reset the following options to undo this plugin. 18let b:undo_ftplugin = "setl tw< wrap< lbr< et< ts< fenc< bomb< ff<" 19 20" Allow lines of unlimited length. Do NOT want automatic linebreaks, 21" as a newline starts a new paragraph in FlexWiki. 22setlocal textwidth=0 23" Wrap long lines, rather than using horizontal scrolling. 24setlocal wrap 25" Wrap at a character in 'breakat' rather than at last char on screen 26setlocal linebreak 27" Don't transform <TAB> characters into spaces, as they are significant 28" at the beginning of the line for numbered and bulleted lists. 29setlocal noexpandtab 30" 4-char tabstops, per flexwiki.el 31setlocal tabstop=4 32" Save *.wiki files in UTF-8 33setlocal fileencoding=utf-8 34" Add the UTF-8 Byte Order Mark to the beginning of the file 35setlocal bomb 36" Save <EOL>s as \n, not \r\n 37setlocal fileformat=unix 38 39if exists("g:flexwiki_maps") 40 " Move up and down by display lines, to account for screen wrapping 41 " of very long lines 42 nmap <buffer> <Up> gk 43 nmap <buffer> k gk 44 vmap <buffer> <Up> gk 45 vmap <buffer> k gk 46 47 nmap <buffer> <Down> gj 48 nmap <buffer> j gj 49 vmap <buffer> <Down> gj 50 vmap <buffer> j gj 51 52 " for earlier versions - for when 'wrap' is set 53 imap <buffer> <S-Down> <C-o>gj 54 imap <buffer> <S-Up> <C-o>gk 55 if v:version >= 700 56 imap <buffer> <Down> <C-o>gj 57 imap <buffer> <Up> <C-o>gk 58 endif 59endif 60