summaryrefslogtreecommitdiff
path: root/runtime/ftplugin
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2012-04-30 15:56:52 +0200
committerBram Moolenaar <Bram@vim.org>2012-04-30 15:56:52 +0200
commit9a7224b5a0639c26c843c10afcafa5bf149271fd (patch)
tree9cafda4f3dd87f3ba177401248d65aa241f63ced /runtime/ftplugin
parente8938e507e5dbeea25accd3586cd9aca13e5bf64 (diff)
downloadvim-git-9a7224b5a0639c26c843c10afcafa5bf149271fd.tar.gz
Fixed compatible mode in most runtime files.
Diffstat (limited to 'runtime/ftplugin')
-rw-r--r--runtime/ftplugin/abaqus.vim13
-rw-r--r--runtime/ftplugin/php.vim8
-rw-r--r--runtime/ftplugin/python.vim5
3 files changed, 19 insertions, 7 deletions
diff --git a/runtime/ftplugin/abaqus.vim b/runtime/ftplugin/abaqus.vim
index cbebcbfa4..b263d0c31 100644
--- a/runtime/ftplugin/abaqus.vim
+++ b/runtime/ftplugin/abaqus.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Abaqus finite element input file (www.abaqus.com)
" Maintainer: Carl Osterwisch <osterwischc@asme.org>
-" Last Change: 2012 Mar 11
+" Last Change: 2012 Apr 30
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin") | finish | endif
@@ -51,7 +51,7 @@ if has("gui_win32") && !exists("b:browsefilter")
\ "Abaqus Results (*.dat)\t*.dat\n" .
\ "Abaqus Messages (*.pre *.msg *.sta)\t*.pre;*.msg;*.sta\n" .
\ "All Files (*.*)\t*.*\n"
- let b:undo_ftplugin .= "|unlet b:browsefilter"
+ let b:undo_ftplugin .= "|unlet! b:browsefilter"
endif
" Define patterns for the matchit plugin
@@ -62,7 +62,7 @@ if exists("loaded_matchit") && !exists("b:match_words")
\ '\*assembly:\*end\s*assembly,' .
\ '\*instance:\*end\s*instance,' .
\ '\*step:\*end\s*step'
- let b:undo_ftplugin .= "|unlet b:match_ignorecase b:match_words"
+ let b:undo_ftplugin .= "|unlet! b:match_ignorecase b:match_words"
endif
" Define keys used to move [count] keywords backward or forward.
@@ -85,6 +85,13 @@ endfunction
let b:undo_ftplugin .= "|unmap <buffer> [[|unmap <buffer> ]]"
\ . "|unmap <buffer> <LocalLeader><LocalLeader>"
+" Undo must be done in nocompatible mode for <LocalLeader>.
+let b:undo_ftplugin = "let s:cpo_save = &cpoptions|"
+ \ . "set cpoptions&vim|"
+ \ . b:undo_ftplugin
+ \ . "|let &cpoptions = s:cpo_save"
+ \ . "|unlet s:cpo_save"
+
" Restore saved compatibility options
let &cpoptions = s:cpo_save
unlet s:cpo_save
diff --git a/runtime/ftplugin/php.vim b/runtime/ftplugin/php.vim
index 93de5b90f..a2f8b4d8d 100644
--- a/runtime/ftplugin/php.vim
+++ b/runtime/ftplugin/php.vim
@@ -8,8 +8,8 @@ if exists("b:did_ftplugin") | finish | endif
" Make sure the continuation lines below do not cause problems in
" compatibility mode.
-let s:save_cpo = &cpo
-set cpo-=C
+let s:keepcpo= &cpo
+set cpo&vim
" Define some defaults in case the included ftplugins don't set them.
let s:undo_ftplugin = ""
@@ -79,5 +79,5 @@ let b:undo_ftplugin = "setlocal commentstring< include< omnifunc<" .
\ s:undo_ftplugin
" Restore the saved compatibility options.
-let &cpo = s:save_cpo
-unlet s:save_cpo
+let &cpo = s:keepcpo
+unlet s:keepcpo
diff --git a/runtime/ftplugin/python.vim b/runtime/ftplugin/python.vim
index e7c6d6b01..2b091a174 100644
--- a/runtime/ftplugin/python.vim
+++ b/runtime/ftplugin/python.vim
@@ -5,6 +5,8 @@
if exists("b:did_ftplugin") | finish | endif
let b:did_ftplugin = 1
+let s:keepcpo= &cpo
+set cpo&vim
setlocal cinkeys-=0#
setlocal indentkeys-=0#
@@ -41,3 +43,6 @@ if has("gui_win32") && !exists("b:browsefilter")
let b:browsefilter = "Python Files (*.py)\t*.py\n" .
\ "All Files (*.*)\t*.*\n"
endif
+
+let &cpo = s:keepcpo
+unlet s:keepcpo