Add clipboard support in non-GUI mode
[MacVim.git] / runtime / ftplugin / flexwiki.vim
blob7513e66142e893dc4249a911a95b0daa197658a4
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
11 if exists("b:did_ftplugin")
12   finish
13 endif
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.
22 setlocal textwidth=0
23 " Wrap long lines, rather than using horizontal scrolling.
24 setlocal wrap
25 " Wrap at a character in 'breakat' rather than at last char on screen
26 setlocal 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.
29 setlocal noexpandtab
30 " 4-char tabstops, per flexwiki.el
31 setlocal tabstop=4
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
35 setlocal bomb
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
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
47   nmap <buffer> <Down> gj
48   nmap <buffer> j      gj
49   vmap <buffer> <Down> gj
50   vmap <buffer> j      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
55   if v:version >= 700
56       imap <buffer> <Down>   <C-o>gj
57       imap <buffer> <Up>     <C-o>gk
58   endif
59 endif