summaryrefslogtreecommitdiff
path: root/vim/.vim/ftdetect
diff options
context:
space:
mode:
authorMaciej Sobkowski <maciej.sobkowski@nokia.com>2015-07-02 10:41:08 +0200
committerMaciej Sobkowski <maciej.sobkowski@nokia.com>2015-07-02 10:41:08 +0200
commit09c373075e20ff002ec08d09a939117b86f35900 (patch)
tree73b9a105cfce95593808989b80471511cae9efa7 /vim/.vim/ftdetect
Added dotfiles for Vim
My vimrc along with other files used in my configuration
Diffstat (limited to 'vim/.vim/ftdetect')
-rw-r--r--vim/.vim/ftdetect/pentadactyl.vim6
-rw-r--r--vim/.vim/ftdetect/robot.vim43
2 files changed, 49 insertions, 0 deletions
diff --git a/vim/.vim/ftdetect/pentadactyl.vim b/vim/.vim/ftdetect/pentadactyl.vim
new file mode 100644
index 0000000..50766d7
--- /dev/null
+++ b/vim/.vim/ftdetect/pentadactyl.vim
@@ -0,0 +1,6 @@
+" Vim filetype detection file
+" Language: Pentadactyl configuration file
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" Version: 1.1
+
+au BufNewFile,BufRead *pentadactylrc*,*.penta set filetype=pentadactyl
diff --git a/vim/.vim/ftdetect/robot.vim b/vim/.vim/ftdetect/robot.vim
new file mode 100644
index 0000000..b8ef126
--- /dev/null
+++ b/vim/.vim/ftdetect/robot.vim
@@ -0,0 +1,43 @@
+"=============================================================================
+" File: ftdetect/robot.vim
+" Author: Michael Foukarakis
+" Version: 0.2
+" Created: Tue 21 Dec 2010 09:08:35 AM EET
+" Last Update: Sat Sep 14, 2013 10:53 BST
+"------------------------------------------------------------------------
+" Description:
+" Filetype detection plugin for Robot files.
+" WARNING:
+" Overrides all default file type checks.
+"------------------------------------------------------------------------
+" Installation:
+" - Requires Vim7+
+" - Drop this file into {rtp}/ftdetect
+" - Use the '# -*- coding: robot -*-' in the first line of robot files
+" or set the g:robot_syntax_for_txt global variable
+" to explicitly tell vim about filetype.
+" History: - Replaced setf with setlocal filetype, much more sane.
+" TODO: Missing features go here.
+"=============================================================================
+let s:cpo_save=&cpo
+set cpo&vim
+
+" Try to guess when dealing with .html, .txt, or .rst files:
+au BufNewFile,BufRead *.txt call s:FTrobot()
+au BufNewFile,BufRead *.rst call s:FTrobot()
+au BufNewFile,BufRead *.html call s:FTrobot()
+" No resorting to heuristics for .robot files:
+au BufNewFile,BufRead *.robot setlocal filetype=robot
+
+func! s:FTrobot()
+ let b:topl = getline(1)
+ if (exists("g:robot_syntax_for_txt") && g:robot_syntax_for_txt)
+ \ || b:topl =~ '\*\*\*.\{-}\*\*\*'
+ \ || b:topl =~ '^# -\*- coding: robot -\*-$'
+ setlocal filetype=robot
+ endif
+endfunc
+
+"------------------------------------------------------------------------
+let &cpo=s:cpo_save
+" vim700: set fdm=marker: