summaryrefslogtreecommitdiffstats
path: root/debian/patches/debian/Detect-the-rst-filetype-using-the-contents-of-the-file.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/debian/Detect-the-rst-filetype-using-the-contents-of-the-file.patch')
-rw-r--r--debian/patches/debian/Detect-the-rst-filetype-using-the-contents-of-the-file.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/debian/patches/debian/Detect-the-rst-filetype-using-the-contents-of-the-file.patch b/debian/patches/debian/Detect-the-rst-filetype-using-the-contents-of-the-file.patch
new file mode 100644
index 0000000..f535de8
--- /dev/null
+++ b/debian/patches/debian/Detect-the-rst-filetype-using-the-contents-of-the-file.patch
@@ -0,0 +1,28 @@
+From: James Vega <jamessan@debian.org>
+Date: Fri, 18 Aug 2006 09:06:20 -0400
+Subject: Detect the rst filetype using the contents of the file
+
+Closes: #382541
+---
+ runtime/autoload/dist/script.vim | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/runtime/autoload/dist/script.vim b/runtime/autoload/dist/script.vim
+index f86c428..a1162b1 100644
+--- a/runtime/autoload/dist/script.vim
++++ b/runtime/autoload/dist/script.vim
+@@ -380,6 +380,14 @@ def DetectFromText(line1: string)
+ elseif line1 =~ 'exec\s\+\S*scheme' || line2 =~ 'exec\s\+\S*scheme'
+ set ft=scheme
+
++ # rst files
++ elseif line1 =~ '^\.\.\s\|^\s*restindex\s*$'
++ || line2 =~ '^\.\.\s\|^\s*restindex\s*$'
++ || line3 =~ '^\.\.\s\|^\s*restindex\s*$'
++ || line4 =~ '^\.\.\s\|^\s*restindex\s*$'
++ || line5 =~ '^\.\.\s\|^\s*restindex\s*$'
++ set ft=rst
++
+ # Git output
+ elseif line1 =~ '^\(commit\|tree\|object\) \x\{40,\}\>\|^tag \S\+$'
+ set ft=git