summaryrefslogtreecommitdiff
path: root/runtime/ftplugin/ocaml.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2007-05-05 17:54:07 +0000
committerBram Moolenaar <Bram@vim.org>2007-05-05 17:54:07 +0000
commit9964e468c0209f6b8286e0b08109817c845a3079 (patch)
tree3c53288cff0d4c2e32169d8eb4cd53cc343ad0bc /runtime/ftplugin/ocaml.vim
parentd5ab34bd5ecc748d5502f149c476968e5ec2b7c9 (diff)
downloadvim-git-9964e468c0209f6b8286e0b08109817c845a3079.tar.gz
updated for version 7.1a
Diffstat (limited to 'runtime/ftplugin/ocaml.vim')
-rw-r--r--runtime/ftplugin/ocaml.vim8
1 files changed, 5 insertions, 3 deletions
diff --git a/runtime/ftplugin/ocaml.vim b/runtime/ftplugin/ocaml.vim
index 0b9819a9b..10ead8a1e 100644
--- a/runtime/ftplugin/ocaml.vim
+++ b/runtime/ftplugin/ocaml.vim
@@ -4,7 +4,8 @@
" Markus Mottl <markus.mottl@gmail.com>
" Stefano Zacchiroli <zack@bononia.it>
" URL: http://www.ocaml.info/vim/ftplugin/ocaml.vim
-" Last Change: 2006 Apr 11 - Fixed an initialization bug; fixed ASS abbrev (MM)
+" Last Change: 2006 May 01 - Added .annot support for file.whateverext (SZ)
+" 2006 Apr 11 - Fixed an initialization bug; fixed ASS abbrev (MM)
" 2005 Oct 13 - removed GPL; better matchit support (MM, SZ)
"
if exists("b:did_ftplugin")
@@ -202,6 +203,7 @@ python << EOF
import re
import os
+import os.path
import string
import time
import vim
@@ -288,13 +290,13 @@ class Annotations:
line = f.readline() # position line
f.close()
self.__filename = fname
- self.__ml_filename = re.sub("\.annot$", ".ml", fname)
+ self.__ml_filename = vim.current.buffer.name
self.__timestamp = int(time.time())
except IOError:
raise no_annotations
def parse(self):
- annot_file = re.sub("\.ml$", ".annot", vim.current.buffer.name)
+ annot_file = os.path.splitext(vim.current.buffer.name)[0] + ".annot"
self.__parse(annot_file)
def get_type(self, (line1, col1), (line2, col2)):