annotate runtime/ftplugin/flexwiki.vim @ 0:76efa0be13f1

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