summaryrefslogtreecommitdiffstats
path: root/runtime/ftplugin/flexwiki.vim
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 08:50:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 08:50:31 +0000
commitaed8ce9da277f5ecffe968b324f242c41c3b752a (patch)
treed2e538394cb7a8a7c42a4aac6ccf1a8e3256999b /runtime/ftplugin/flexwiki.vim
parentInitial commit. (diff)
downloadvim-aed8ce9da277f5ecffe968b324f242c41c3b752a.tar.xz
vim-aed8ce9da277f5ecffe968b324f242c41c3b752a.zip
Adding upstream version 2:9.0.1378.upstream/2%9.0.1378upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'runtime/ftplugin/flexwiki.vim')
-rw-r--r--runtime/ftplugin/flexwiki.vim59
1 files changed, 59 insertions, 0 deletions
diff --git a/runtime/ftplugin/flexwiki.vim b/runtime/ftplugin/flexwiki.vim
new file mode 100644
index 0000000..7513e66
--- /dev/null
+++ b/runtime/ftplugin/flexwiki.vim
@@ -0,0 +1,59 @@
+" Vim filetype plugin file
+" Language: FlexWiki, http://www.flexwiki.com/
+" Maintainer: George V. Reilly <george@reilly.org>
+" Home: http://www.georgevreilly.com/vim/flexwiki/
+" Other Home: http://www.vim.org/scripts/script.php?script_id=1529
+" Author: George V. Reilly
+" Filenames: *.wiki
+" Last Change: Wed Apr 26 11:00 PM 2006 P
+" Version: 0.3
+
+if exists("b:did_ftplugin")
+ finish
+endif
+
+let b:did_ftplugin = 1 " Don't load another plugin for this buffer
+
+" Reset the following options to undo this plugin.
+let b:undo_ftplugin = "setl tw< wrap< lbr< et< ts< fenc< bomb< ff<"
+
+" Allow lines of unlimited length. Do NOT want automatic linebreaks,
+" as a newline starts a new paragraph in FlexWiki.
+setlocal textwidth=0
+" Wrap long lines, rather than using horizontal scrolling.
+setlocal wrap
+" Wrap at a character in 'breakat' rather than at last char on screen
+setlocal linebreak
+" Don't transform <TAB> characters into spaces, as they are significant
+" at the beginning of the line for numbered and bulleted lists.
+setlocal noexpandtab
+" 4-char tabstops, per flexwiki.el
+setlocal tabstop=4
+" Save *.wiki files in UTF-8
+setlocal fileencoding=utf-8
+" Add the UTF-8 Byte Order Mark to the beginning of the file
+setlocal bomb
+" Save <EOL>s as \n, not \r\n
+setlocal fileformat=unix
+
+if exists("g:flexwiki_maps")
+ " Move up and down by display lines, to account for screen wrapping
+ " of very long lines
+ nmap <buffer> <Up> gk
+ nmap <buffer> k gk
+ vmap <buffer> <Up> gk
+ vmap <buffer> k gk
+
+ nmap <buffer> <Down> gj
+ nmap <buffer> j gj
+ vmap <buffer> <Down> gj
+ vmap <buffer> j gj
+
+ " for earlier versions - for when 'wrap' is set
+ imap <buffer> <S-Down> <C-o>gj
+ imap <buffer> <S-Up> <C-o>gk
+ if v:version >= 700
+ imap <buffer> <Down> <C-o>gj
+ imap <buffer> <Up> <C-o>gk
+ endif
+endif