summaryrefslogtreecommitdiff
path: root/runtime/ftplugin
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-07-28 22:30:00 +0200
committerBram Moolenaar <Bram@vim.org>2010-07-28 22:30:00 +0200
commit92048a3110836593aa63c5263a4cc7cec68d7856 (patch)
tree24943a8f33dd511072f58ec341eb62f25b8d0ed5 /runtime/ftplugin
parent162bd9156413218784cf4c362bc8d64d529f21fe (diff)
downloadvim-git-92048a3110836593aa63c5263a4cc7cec68d7856.tar.gz
Remove Mupad indent and ftplugin files, they are not useful.
Diffstat (limited to 'runtime/ftplugin')
-rw-r--r--runtime/ftplugin/AppendMatchGroup.vim125
-rw-r--r--runtime/ftplugin/mupad.vim30
2 files changed, 0 insertions, 155 deletions
diff --git a/runtime/ftplugin/AppendMatchGroup.vim b/runtime/ftplugin/AppendMatchGroup.vim
deleted file mode 100644
index 34e80b5f8..000000000
--- a/runtime/ftplugin/AppendMatchGroup.vim
+++ /dev/null
@@ -1,125 +0,0 @@
-" Vim filetype plugin file utility
-" Language: * (various)
-" Maintainer: Dave Silvia <dsilvia@mchsi.com>
-" Date: 6/30/2004
-
-" The start of match (b:SOM) default is:
-" '\<'
-" The end of match (b:EOM) default is:
-" '\>'
-"
-" If you want to use some other start/end of match, just assign the
-" value to the b:SOM|EOM variable in your filetype script.
-"
-" SEE: :h pattern.txt
-" :h pattern-searches
-" :h regular-expression
-" :h matchit
-
-let s:myName=expand("<sfile>:t")
-
-" matchit.vim not loaded -- don't do anyting
-if !exists("loaded_matchit")
- echomsg s:myName.": matchit.vim not loaded -- finishing without loading"
- finish
-endif
-
-" already been here -- don't redefine
-if exists("*AppendMatchGroup")
- finish
-endif
-
-" Function To Build b:match_words
-" The following function, 'AppendMatchGroup', helps to increase
-" readability of your filetype script if you choose to use matchit.
-" It also precludes many construction errors, reducing the
-" construction to simply invoking the function with the match words.
-" As an example, let's take the ubiquitous if/then/else/endif type
-" of construct. This is how the entry in your filetype script would look.
-"
-" " source the AppendMatchGroup function file
-" runtime ftplugin/AppendMatchGroup.vim
-"
-" " fill b:match_words
-" call AppendMatchGroup('if,then,else,endif')
-"
-" And the b:match_words constructed would look like:
-"
-" \<if\>:\<then\>:\<else\>:\<endif\>
-"
-" Use of AppendMatchGroup makes your filetype script is a little
-" less busy and a lot more readable. Additionally, it
-" checks three critical things:
-"
-" 1) Do you have at least 2 entries in your match group.
-"
-" 2) Does the buffer variable 'b:match_words' exist? if not, create it.
-"
-" 3) If the buffer variable 'b:match_words' does exist, is the last
-" character a ','? If not, add it before appending.
-"
-" You should now be able to match 'if/then/else/endif' in succession
-" in your source file, in just about any construction you may have
-" chosen for them.
-"
-" To add another group, simply call 'AppendMatchGroup again. E.G.:
-"
-" call AppendMatchGroup('while,do,endwhile')
-
-function AppendMatchGroup(mwordList)
- let List=a:mwordList
- let Comma=match(List,',')
- if Comma == -1 || Comma == strlen(List)-1
- echoerr "Must supply a comma separated list of at least 2 entries."
- echoerr "Supplied list: <".List.">"
- return
- endif
- let listEntryBegin=0
- let listEntryEnd=Comma
- let listEntry=strpart(List,listEntryBegin,listEntryEnd-listEntryBegin)
- let List=strpart(List,Comma+1)
- let Comma=match(List,',')
- " if listEntry is all spaces || List is empty || List is all spaces
- if (match(listEntry,'\s\+') == 0 && match(listEntry,'\S\+') == -1)
- \ || List == '' || (match(List,'\s\+') == 0 && match(List,'\S\+') == -1)
- echoerr "Can't use all spaces for an entry <".listEntry.">"
- echoerr "Remaining supplied list: <".List.">"
- return
- endif
-
- if !exists("b:SOM")
- let b:SOM='\<'
- endif
- if !exists("b:EOM")
- let b:EOM='\>'
- endif
- if !exists("b:match_words")
- let b:match_words=''
- endif
- if b:match_words != '' && match(b:match_words,',$') == -1
- let b:match_words=b:match_words.','
- endif
- " okay, all set add first entry in this list
- let b:match_words=b:match_words.b:SOM.listEntry.b:EOM.':'
- while Comma != -1
- let listEntryEnd=Comma
- let listEntry=strpart(List,listEntryBegin,listEntryEnd-listEntryBegin)
- let List=strpart(List,Comma+1)
- let Comma=match(List,',')
- " if listEntry is all spaces
- if match(listEntry,'\s\+') == 0 && match(listEntry,'\S\+') == -1
- echoerr "Can't use all spaces for an entry <".listEntry."> - skipping"
- echoerr "Remaining supplied list: <".List.">"
- continue
- endif
- let b:match_words=b:match_words.b:SOM.listEntry.b:EOM.':'
- endwhile
- let listEntry=List
- let b:match_words=b:match_words.b:SOM.listEntry.b:EOM
-endfunction
-
-" TODO: Write a wrapper to handle multiple groups in one function call.
-" Don't see a lot of utility in this as it would undoubtedly warrant
-" continuation lines in the filetype script and it would be a toss
-" up as to which is more readable: individual calls one to a line or
-" a single call with continuation lines. I vote for the former.
diff --git a/runtime/ftplugin/mupad.vim b/runtime/ftplugin/mupad.vim
deleted file mode 100644
index ef3a4fe28..000000000
--- a/runtime/ftplugin/mupad.vim
+++ /dev/null
@@ -1,30 +0,0 @@
-" Vim filetype plugin file
-" Language: MuPAD source files
-" Maintainer: Dave Silvia <dsilvia@mchsi.com>
-" Filenames: *.mu
-" Date: 6/30/2004
-
-if exists("b:did_ftplugin") | finish | endif
-let b:did_ftplugin = 1
-
-" Change the :browse e filter to primarily show MuPAD source files.
-if has("gui_win32")
- let b:browsefilter=
- \ "MuPAD source (*.mu)\t*.mu\n" .
- \ "All Files (*.*)\t*.*\n"
-endif
-
-" matchit.vim not loaded -- don't do anyting below
-if !exists("loaded_matchit")
- " echomsg "matchit.vim not loaded -- finishing"
- finish
-endif
-
-" source the AppendMatchGroup function file
-runtime ftplugin/AppendMatchGroup.vim
-
-" fill b:match_words for MuPAD
-call AppendMatchGroup('domain,end_domain')
-call AppendMatchGroup('proc,begin,end_proc')
-call AppendMatchGroup('if,then,elif,else,end_if')
-call AppendMatchGroup('\%(for\|while\|repeat\|case\),of,do,break,next,until,\%(end_for\|end_while\|end_repeat\|end_case\)')