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
8 " Last Change: Wed Apr 26 11:00 PM 2006 P
11 if exists("b:did_ftplugin")
15 let b:did_ftplugin = 1 " Don't load another plugin for this buffer
17 " Reset the following options to undo this plugin.
18 let b:undo_ftplugin = "setl tw< wrap< lbr< et< ts< fenc< bomb< ff<"
20 " Allow lines of unlimited length. Do NOT want automatic linebreaks,
21 " as a newline starts a new paragraph in FlexWiki.
23 " Wrap long lines, rather than using horizontal scrolling.
25 " Wrap at a character in 'breakat' rather than at last char on screen
27 " Don't transform <TAB> characters into spaces, as they are significant
28 " at the beginning of the line for numbered and bulleted lists.
30 " 4-char tabstops, per flexwiki.el
32 " Save *.wiki files in UTF-8
33 setlocal fileencoding=utf-8
34 " Add the UTF-8 Byte Order Mark to the beginning of the file
36 " Save <EOL>s as \n, not \r\n
37 setlocal fileformat=unix
39 if exists("g:flexwiki_maps")
40 " Move up and down by display lines, to account for screen wrapping
47 nmap <buffer> <Down> gj
49 vmap <buffer> <Down> gj
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
56 imap <buffer> <Down> <C-o>gj
57 imap <buffer> <Up> <C-o>gk