summaryrefslogtreecommitdiff
path: root/runtime/ftplugin
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2007-05-05 18:24:42 +0000
committerBram Moolenaar <Bram@vim.org>2007-05-05 18:24:42 +0000
commitc81e5e79a0f2f5c2ac1896fa51cbe47e2e2a8d97 (patch)
tree5211ea86daed8e43c3dd25458e808c3d32100097 /runtime/ftplugin
parent9aae141a6bcfc26bcce352deb8bf34566a3e1be2 (diff)
downloadvim-c81e5e79a0f2f5c2ac1896fa51cbe47e2e2a8d97.zip
updated for version 7.1a
Diffstat (limited to 'runtime/ftplugin')
-rw-r--r--runtime/ftplugin/fvwm.vim14
-rw-r--r--runtime/ftplugin/help.vim2
-rw-r--r--runtime/ftplugin/htmldjango.vim13
-rw-r--r--runtime/ftplugin/javascript.vim31
-rw-r--r--runtime/ftplugin/man.vim11
-rw-r--r--runtime/ftplugin/php.vim8
-rw-r--r--runtime/ftplugin/vim.vim3
7 files changed, 70 insertions, 12 deletions
diff --git a/runtime/ftplugin/fvwm.vim b/runtime/ftplugin/fvwm.vim
new file mode 100644
index 000000000..89e1a8317
--- /dev/null
+++ b/runtime/ftplugin/fvwm.vim
@@ -0,0 +1,14 @@
+" Created : Tue 09 May 2006 02:07:31 PM CDT
+" Modified : Tue 09 May 2006 02:07:31 PM CDT
+" Author : Gautam Iyer <gi1242@users.sourceforge.net>
+" Description : ftplugin for fvwm config files
+
+if exists("b:did_ftplugin")
+ finish
+endif
+let b:did_ftplugin = 1
+
+let b:undo_ftplugin = "setl com< cms< fo<"
+
+setlocal comments=:# commentstring=#\ %s
+setlocal formatoptions-=t formatoptions+=croql
diff --git a/runtime/ftplugin/help.vim b/runtime/ftplugin/help.vim
index 7e82081a5..46c844ca2 100644
--- a/runtime/ftplugin/help.vim
+++ b/runtime/ftplugin/help.vim
@@ -8,6 +8,6 @@ if exists("b:did_ftplugin")
endif
let b:did_ftplugin = 1
-let b:undo_plugin = "setl fo< tw<"
+let b:undo_ftplugin = "setl fo< tw<"
setlocal formatoptions+=tcroql textwidth=78
diff --git a/runtime/ftplugin/htmldjango.vim b/runtime/ftplugin/htmldjango.vim
new file mode 100644
index 000000000..40e9429f3
--- /dev/null
+++ b/runtime/ftplugin/htmldjango.vim
@@ -0,0 +1,13 @@
+" Vim filetype plugin file
+" Language: Django HTML template
+" Maintainer: Dave Hodder <dmh@dmh.org.uk>
+" Last Change: 2007 Jan 25
+
+" Only use this filetype plugin when no other was loaded.
+if exists("b:did_ftplugin")
+ finish
+endif
+
+" Use HTML and Django template ftplugins.
+runtime! ftplugin/html.vim
+runtime! ftplugin/django.vim
diff --git a/runtime/ftplugin/javascript.vim b/runtime/ftplugin/javascript.vim
index 3ac4bbf9d..1ba440041 100644
--- a/runtime/ftplugin/javascript.vim
+++ b/runtime/ftplugin/javascript.vim
@@ -1,13 +1,38 @@
" Vim filetype plugin file
" Language: Javascript
-" Maintainer: Bram Moolenaar (for now)
-" Last Change: 2006 Jan 30
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Last Change: 2007 Feb 21
+" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/ftplugin/javascript.vim
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
+let s:cpo_save = &cpo
+set cpo-=C
+
+" Set 'formatoptions' to break comment lines but not other lines,
+" " and insert the comment leader when hitting <CR> or using "o".
+setlocal formatoptions-=t formatoptions+=croql
+
+" Set completion with CTRL-X CTRL-O to autoloaded function.
if exists('&ofu')
- setlocal ofu=javascriptcomplete#CompleteJS
+ setlocal omnifunc=javascriptcomplete#CompleteJS
endif
+
+" Set 'comments' to format dashed lists in comments.
+setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
+
+setlocal commentstring=//%s
+
+" Change the :browse e filter to primarily show Java-related files.
+if has("gui_win32")
+ let b:browsefilter="Javascript Files (*.js)\t*.js\n"
+ \ "All Files (*.*)\t*.*\n"
+endif
+
+let b:undo_ftplugin = "setl fo< ofu< com< cms<"
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/runtime/ftplugin/man.vim b/runtime/ftplugin/man.vim
index 04964a549..88d7bca25 100644
--- a/runtime/ftplugin/man.vim
+++ b/runtime/ftplugin/man.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: man
" Maintainer: Nam SungHyun <namsh@kldp.org>
-" Last Change: 2006 Mar 28
+" Last Change: 2006 Dec 04
" To make the ":Man" command available before editing a manual page, source
" this script from your startup vimrc file.
@@ -119,9 +119,7 @@ func <SID>GetPage(...)
if &filetype != "man"
let thiswin = winnr()
exe "norm! \<C-W>b"
- if winnr() == 1
- new
- else
+ if winnr() > 1
exe "norm! " . thiswin . "\<C-W>w"
while 1
if &filetype == "man"
@@ -129,11 +127,14 @@ func <SID>GetPage(...)
endif
exe "norm! \<C-W>w"
if thiswin == winnr()
- new
break
endif
endwhile
endif
+ if &filetype != "man"
+ new
+ setl nonu fdc=0
+ endif
endif
silent exec "edit $HOME/".page.".".sect."~"
" Avoid warning for editing the dummy file twice
diff --git a/runtime/ftplugin/php.vim b/runtime/ftplugin/php.vim
index f0b3e02c7..86cf89c08 100644
--- a/runtime/ftplugin/php.vim
+++ b/runtime/ftplugin/php.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: php
" Maintainer: Dan Sharp <dwsharp at hotmail dot com>
-" Last Changed: 2005 Sep 05
+" Last Changed: 2006 Jul 15
" URL: http://mywebpage.netscape.com/sharppeople/vim/ftplugin
if exists("b:did_ftplugin") | finish | endif
@@ -30,6 +30,9 @@ endif
if exists("b:match_words")
let s:match_words = b:match_words
endif
+if exists("b:match_skip")
+ unlet b:match_skip
+endif
" Change the :browse e filter to primarily show PHP-related files.
if has("gui_win32")
@@ -41,12 +44,13 @@ endif
setlocal include=\\\(require\\\|include\\\)\\\(_once\\\)\\\?
setlocal iskeyword+=$
if exists("loaded_matchit")
- let b:match_words = '<php?:?>,\<switch\>:\<endswitch\>,' .
+ let b:match_words = '<?php:?>,\<switch\>:\<endswitch\>,' .
\ '\<if\>:\<elseif\>:\<else\>:\<endif\>,' .
\ '\<while\>:\<endwhile\>,' .
\ '\<do\>:\<while\>,' .
\ '\<for\>:\<endfor\>,' .
\ '\<foreach\>:\<endforeach\>,' .
+ \ '(:),[:],{:},' .
\ s:match_words
endif
" ###
diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim
index 698d3ee87..78fb6ec3a 100644
--- a/runtime/ftplugin/vim.vim
+++ b/runtime/ftplugin/vim.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin
" Language: Vim
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2005 Feb 14
+" Last Change: 2006 Sep 26
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -48,6 +48,7 @@ if exists("loaded_matchit")
let b:match_words =
\ '\<fu\%[nction]\>:\<retu\%[rn]\>:\<endf\%[unction]\>,' .
\ '\<wh\%[ile]\>:\<brea\%[k]\>:\<con\%[tinue]\>:\<endw\%[hile]\>,' .
+ \ '\<for\>:\<brea\%[k]\>:\<con\%[tinue]\>:\<endfo\%[r]\>,' .
\ '\<if\>:\<el\%[seif]\>:\<en\%[dif]\>,' .
\ '\<try\>:\<cat\%[ch]\>:\<fina\%[lly]\>:\<endt\%[ry]\>,' .
\ '\<aug\%[roup]\s\+\%(END\>\)\@!\S:\<aug\%[roup]\s\+END\>,' .