aboutsummaryrefslogtreecommitdiff
path: root/vim/ftdetect
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-06-06 14:54:23 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-06-06 14:54:23 +1200
commit6dbda3419aeada6c31a1083af198de4e38ee31b4 (patch)
tree03e505d334f80cc97c7b11e84f553c127dfb1058 /vim/ftdetect
parent6778c97d343049cb72f6b89fa0827755c6890002 (diff)
downloaddotfiles-6dbda3419aeada6c31a1083af198de4e38ee31b4.tar.gz
dotfiles-6dbda3419aeada6c31a1083af198de4e38ee31b4.zip
Consolidate .vimrc and .vim/filetype.vim
And add .vim/script.vim, to be composed in the next commit
Diffstat (limited to 'vim/ftdetect')
-rw-r--r--vim/ftdetect/awk.vim9
-rw-r--r--vim/ftdetect/c.vim4
-rw-r--r--vim/ftdetect/cpp.vim4
-rw-r--r--vim/ftdetect/css.vim4
-rw-r--r--vim/ftdetect/csv.vim4
-rw-r--r--vim/ftdetect/diff.vim4
-rw-r--r--vim/ftdetect/gitcommit.vim4
-rw-r--r--vim/ftdetect/gitconfig.vim4
-rw-r--r--vim/ftdetect/gpg.vim4
-rw-r--r--vim/ftdetect/html.vim4
-rw-r--r--vim/ftdetect/java.vim4
-rw-r--r--vim/ftdetect/javascript.vim4
-rw-r--r--vim/ftdetect/json.vim4
-rw-r--r--vim/ftdetect/lex.vim4
-rw-r--r--vim/ftdetect/lua.vim4
-rw-r--r--vim/ftdetect/m4.vim4
-rw-r--r--vim/ftdetect/mail.vim4
-rw-r--r--vim/ftdetect/make.vim4
-rw-r--r--vim/ftdetect/markdown.vim4
-rw-r--r--vim/ftdetect/muttrc.vim4
-rw-r--r--vim/ftdetect/perl.vim9
-rw-r--r--vim/ftdetect/perl6.vim9
-rw-r--r--vim/ftdetect/php.vim12
-rw-r--r--vim/ftdetect/pod.vim4
-rw-r--r--vim/ftdetect/pod6.vim4
-rw-r--r--vim/ftdetect/python.vim9
-rw-r--r--vim/ftdetect/readline.vim4
-rw-r--r--vim/ftdetect/remind.vim4
-rw-r--r--vim/ftdetect/sh.vim55
-rw-r--r--vim/ftdetect/tmux.vim4
-rw-r--r--vim/ftdetect/troff.vim4
-rw-r--r--vim/ftdetect/tsv.vim4
-rw-r--r--vim/ftdetect/vim.vim4
-rw-r--r--vim/ftdetect/viminfo.vim4
-rw-r--r--vim/ftdetect/xdefaults.vim4
-rw-r--r--vim/ftdetect/xhtml.vim4
-rw-r--r--vim/ftdetect/xml.vim4
-rw-r--r--vim/ftdetect/yacc.vim4
-rw-r--r--vim/ftdetect/yaml.vim4
-rw-r--r--vim/ftdetect/zsh.vim9
40 files changed, 0 insertions, 244 deletions
diff --git a/vim/ftdetect/awk.vim b/vim/ftdetect/awk.vim
deleted file mode 100644
index 9965235e..00000000
--- a/vim/ftdetect/awk.vim
+++ /dev/null
@@ -1,9 +0,0 @@
-" AWK files
-autocmd BufNewFile,BufRead
- \ *.awk
- \ setfiletype awk
-autocmd BufNewFile,BufRead
- \ *
- \ if getline(1) =~# '\m^#!.*\<[gm]\?awk\>'
- \ | setfiletype awk
- \ | endif
diff --git a/vim/ftdetect/c.vim b/vim/ftdetect/c.vim
deleted file mode 100644
index 77a73cb6..00000000
--- a/vim/ftdetect/c.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" C files
-autocmd BufNewFile,BufRead
- \ *.c,*.h
- \ setfiletype c
diff --git a/vim/ftdetect/cpp.vim b/vim/ftdetect/cpp.vim
deleted file mode 100644
index 71dc59e5..00000000
--- a/vim/ftdetect/cpp.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" C++ files
-autocmd BufNewFile,BufRead
- \ *.c++,*.cpp,*.cxx,*.hh
- \ setfiletype cpp
diff --git a/vim/ftdetect/css.vim b/vim/ftdetect/css.vim
deleted file mode 100644
index bd98aa8e..00000000
--- a/vim/ftdetect/css.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" CSS files
-autocmd BufNewFile,BufRead
- \ *.css
- \ setfiletype css
diff --git a/vim/ftdetect/csv.vim b/vim/ftdetect/csv.vim
deleted file mode 100644
index 33468496..00000000
--- a/vim/ftdetect/csv.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" CSV files
-autocmd BufNewFile,BufRead
- \ *.csv
- \ setfiletype csv
diff --git a/vim/ftdetect/diff.vim b/vim/ftdetect/diff.vim
deleted file mode 100644
index d19fc450..00000000
--- a/vim/ftdetect/diff.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" Diff and patch files
-autocmd BufNewFile,BufRead
- \ *.diff,*.patch,*.rej
- \ setfiletype diff
diff --git a/vim/ftdetect/gitcommit.vim b/vim/ftdetect/gitcommit.vim
deleted file mode 100644
index 1c21544a..00000000
--- a/vim/ftdetect/gitcommit.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" Git commit messages
-autocmd BufNewFile,BufRead
- \ COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG
- \ setfiletype gitcommit
diff --git a/vim/ftdetect/gitconfig.vim b/vim/ftdetect/gitconfig.vim
deleted file mode 100644
index 780e89b0..00000000
--- a/vim/ftdetect/gitconfig.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" Git config files
-autocmd BufNewFile,BufRead
- \ *.git*/config,.gitconfig,.gitmodules
- \ setfiletype gitconfig
diff --git a/vim/ftdetect/gpg.vim b/vim/ftdetect/gpg.vim
deleted file mode 100644
index ea6ec2f6..00000000
--- a/vim/ftdetect/gpg.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" GnuPG configuration files
-autocmd BufNewFile,BufRead
- \ *gnupg/options,*gnupg/gpg.conf
- \ setfiletype gpg
diff --git a/vim/ftdetect/html.vim b/vim/ftdetect/html.vim
deleted file mode 100644
index f8ab7ac5..00000000
--- a/vim/ftdetect/html.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" HTML files
-autocmd BufNewFile,BufRead
- \ *.html,*.htm
- \ setfiletype html
diff --git a/vim/ftdetect/java.vim b/vim/ftdetect/java.vim
deleted file mode 100644
index 101816ea..00000000
--- a/vim/ftdetect/java.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" Java files
-autocmd BufNewFile,BufRead
- \ *.java,*.jav
- \ setfiletype java
diff --git a/vim/ftdetect/javascript.vim b/vim/ftdetect/javascript.vim
deleted file mode 100644
index 6f129960..00000000
--- a/vim/ftdetect/javascript.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" JSON files
-autocmd BufNewFile,BufRead
- \ *.js
- \ setfiletype javascript
diff --git a/vim/ftdetect/json.vim b/vim/ftdetect/json.vim
deleted file mode 100644
index fd27c845..00000000
--- a/vim/ftdetect/json.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" JSON files
-autocmd BufNewFile,BufRead
- \ *.json
- \ setfiletype json
diff --git a/vim/ftdetect/lex.vim b/vim/ftdetect/lex.vim
deleted file mode 100644
index 23118468..00000000
--- a/vim/ftdetect/lex.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" Lex files
-autocmd BufNewFile,BufRead
- \ *.l,*.lex
- \ setfiletype lex
diff --git a/vim/ftdetect/lua.vim b/vim/ftdetect/lua.vim
deleted file mode 100644
index d6c635a0..00000000
--- a/vim/ftdetect/lua.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" Lua files
-autocmd BufNewFile,BufRead
- \ *.lua
- \ setfiletype lua
diff --git a/vim/ftdetect/m4.vim b/vim/ftdetect/m4.vim
deleted file mode 100644
index c7d97e80..00000000
--- a/vim/ftdetect/m4.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" m4 files
-autocmd BufNewFile,BufRead
- \ *.m4
- \ setfiletype m4
diff --git a/vim/ftdetect/mail.vim b/vim/ftdetect/mail.vim
deleted file mode 100644
index 62113230..00000000
--- a/vim/ftdetect/mail.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" Mail messages
-autocmd BufNewFile,BufRead
- \ *.msg,mutt-*-*-*
- \ setfiletype mail
diff --git a/vim/ftdetect/make.vim b/vim/ftdetect/make.vim
deleted file mode 100644
index 0ce0514b..00000000
--- a/vim/ftdetect/make.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" Makefiles
-autocmd BufNewFile,BufRead
- \ Makefile,makefile
- \ setfiletype make
diff --git a/vim/ftdetect/markdown.vim b/vim/ftdetect/markdown.vim
deleted file mode 100644
index 21ff2dcb..00000000
--- a/vim/ftdetect/markdown.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" Markdown files
-autocmd BufNewFile,BufRead
- \ *.markdown,*.md
- \ setfiletype markdown
diff --git a/vim/ftdetect/muttrc.vim b/vim/ftdetect/muttrc.vim
deleted file mode 100644
index 48468b30..00000000
--- a/vim/ftdetect/muttrc.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" Add automatic commands to detect .muttrc files
-autocmd BufNewFile,BufRead
- \ Muttrc,.muttrc,*muttrc.d/*.rc
- \ setfiletype muttrc
diff --git a/vim/ftdetect/perl.vim b/vim/ftdetect/perl.vim
deleted file mode 100644
index 571e4f58..00000000
--- a/vim/ftdetect/perl.vim
+++ /dev/null
@@ -1,9 +0,0 @@
-" Perl 5 files
-autocmd BufNewFile,BufRead
- \ *.pl,*.pm,*.t,Makefile.PL
- \ setfiletype perl
-autocmd BufNewFile,BufRead
- \ *
- \ if getline(1) =~# '\m^#!.*\<perl\>'
- \ | setfiletype perl
- \ | endif
diff --git a/vim/ftdetect/perl6.vim b/vim/ftdetect/perl6.vim
deleted file mode 100644
index 67e62c7c..00000000
--- a/vim/ftdetect/perl6.vim
+++ /dev/null
@@ -1,9 +0,0 @@
-" Perl 6 files
-autocmd BufNewFile,BufRead
- \ *.p6,*.pl6,*.pm6
- \ setfiletype perl6
-autocmd BufNewFile,BufRead
- \ *
- \ if getline(1) =~# '\m^#!.\<perl6\>'
- \ | setfiletype perl6
- \ | endif
diff --git a/vim/ftdetect/php.vim b/vim/ftdetect/php.vim
deleted file mode 100644
index f57ba0e6..00000000
--- a/vim/ftdetect/php.vim
+++ /dev/null
@@ -1,12 +0,0 @@
-" PHP files
-autocmd BufNewFile,BufRead
- \ *.php
- \ setfiletype php
-autocmd BufNewFile,BufRead
- \ *
- \ if getline(1) =~# '\m^#!.\<php\>'
- \ | setfiletype php
- \ | endif
- \ | if getline(1) =~? '\m^<?php\>'
- \ | setfiletype php
- \ | endif
diff --git a/vim/ftdetect/pod.vim b/vim/ftdetect/pod.vim
deleted file mode 100644
index 6817b3b4..00000000
--- a/vim/ftdetect/pod.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" Perl 5 POD files
-autocmd BufNewFile,BufRead
- \ *.pod
- \ setfiletype pod
diff --git a/vim/ftdetect/pod6.vim b/vim/ftdetect/pod6.vim
deleted file mode 100644
index 4ae980a1..00000000
--- a/vim/ftdetect/pod6.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" Perl 6 POD files
-autocmd BufNewFile,BufRead
- \ *.pod6
- \ setfiletype pod6
diff --git a/vim/ftdetect/python.vim b/vim/ftdetect/python.vim
deleted file mode 100644
index 5c4a4a6f..00000000
--- a/vim/ftdetect/python.vim
+++ /dev/null
@@ -1,9 +0,0 @@
-" Python files
-autocmd BufNewFile,BufRead
- \ *.py
- \ setfiletype python
-autocmd BufNewFile,BufRead
- \ *
- \ if getline(1) =~# '\m^#!.*\<python[23]\?\>'
- \ | setfiletype python
- \ | endif
diff --git a/vim/ftdetect/readline.vim b/vim/ftdetect/readline.vim
deleted file mode 100644
index be2565c3..00000000
--- a/vim/ftdetect/readline.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" Readline configuration file
-autocmd BufNewFile,BufRead
- \ .inputrc,inputrc
- \ setfiletype readline
diff --git a/vim/ftdetect/remind.vim b/vim/ftdetect/remind.vim
deleted file mode 100644
index f153ad25..00000000
--- a/vim/ftdetect/remind.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" Remind files
-autocmd BufNewFile,BufRead
- \ *.rem,*.remind,.reminders
- \ setfiletype remind
diff --git a/vim/ftdetect/sh.vim b/vim/ftdetect/sh.vim
deleted file mode 100644
index 1427bc03..00000000
--- a/vim/ftdetect/sh.vim
+++ /dev/null
@@ -1,55 +0,0 @@
-" Shell script files; these are hard to detect accurately
-
-" Bash filename patterns
-autocmd BufNewFile,BufRead
- \ *.bash,
- \.bash_aliases,
- \.bash_logout,
- \.bash_profile,
- \.bashrc,
- \bash-fc-*,
- \bash_profile,
- \bashrc
- \ let b:is_bash = 1
- \ | setfiletype sh
-
-" Korn shell filename patterns
-autocmd BufNewFile,BufRead
- \ *.ksh,
- \.kshrc,
- \kshrc
- \ let b:is_kornshell = 1
- \ | setfiletype sh
-
-" POSIX/Bourne shell filename patterns
-autocmd BufNewFile,BufRead
- \ *.sh,
- \.profile,
- \.shinit,
- \.shrc,
- \.xinitrc,
- \/etc/default/*,
- \configure,
- \profile,
- \shinit,
- \shrc,
- \xinitrc
- \ let b:is_posix = 1
- \ | setfiletype sh
-
-" If this file has a shebang, and we haven't already decided it's Bash or
-" Korn shell, use the shebang to decide
-autocmd BufNewFile,BufRead
- \ *
- \ if !exists('b:is_bash') && !exists('b:is_kornshell')
- \ | if getline(1) =~# '\m^#!.*\<bash\>'
- \ | let b:is_bash = 1
- \ | setfiletype sh
- \ | elseif getline(1) =~# '\m^#!.*\<ksh\>'
- \ | let b:is_ksh = 1
- \ | setfiletype sh
- \ | elseif getline(1) =~# '\m^#!.*\<sh\>'
- \ | let b:is_posix = 1
- \ | setfiletype sh
- \ | endif
- \ | endif
diff --git a/vim/ftdetect/tmux.vim b/vim/ftdetect/tmux.vim
deleted file mode 100644
index 4a245586..00000000
--- a/vim/ftdetect/tmux.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" tmux configuration files
-autocmd BufNewFile,BufRead
- \ .tmux.conf,tmux.conf
- \ setfiletype tmux
diff --git a/vim/ftdetect/troff.vim b/vim/ftdetect/troff.vim
deleted file mode 100644
index 4bd27f6a..00000000
--- a/vim/ftdetect/troff.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" roff files
-autocmd BufNewFile,BufRead
- \ *.[1-9],*.[1-9]df
- \ setfiletype nroff
diff --git a/vim/ftdetect/tsv.vim b/vim/ftdetect/tsv.vim
deleted file mode 100644
index d6a0a71d..00000000
--- a/vim/ftdetect/tsv.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" Tab-separated (TSV) files
-autocmd BufNewFile,BufRead
- \ *.tsv
- \ setfiletype tsv
diff --git a/vim/ftdetect/vim.vim b/vim/ftdetect/vim.vim
deleted file mode 100644
index ca1c26c4..00000000
--- a/vim/ftdetect/vim.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" VimL files
-autocmd BufNewFile,BufRead
- \ *.vim,vimrc,*[._]vimrc,exrc,*[._]exrc
- \ setfiletype vim
diff --git a/vim/ftdetect/viminfo.vim b/vim/ftdetect/viminfo.vim
deleted file mode 100644
index 31a8c704..00000000
--- a/vim/ftdetect/viminfo.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" .viminfo files
-autocmd BufNewFile,BufRead
- \ .viminfo
- \ setfiletype viminfo
diff --git a/vim/ftdetect/xdefaults.vim b/vim/ftdetect/xdefaults.vim
deleted file mode 100644
index 896b2e32..00000000
--- a/vim/ftdetect/xdefaults.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" Add automatic commands to find Xresources subfiles
-autocmd BufNewFile,BufRead
- \ .Xresources,*/.Xresources.d/*
- \ setfiletype xdefaults
diff --git a/vim/ftdetect/xhtml.vim b/vim/ftdetect/xhtml.vim
deleted file mode 100644
index adfb1cb5..00000000
--- a/vim/ftdetect/xhtml.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" XHTML files
-autocmd BufNewFile,BufRead
- \ *.xhtml,*.xht
- \ setfiletype xhtml
diff --git a/vim/ftdetect/xml.vim b/vim/ftdetect/xml.vim
deleted file mode 100644
index 7228e0f3..00000000
--- a/vim/ftdetect/xml.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" XML files
-autocmd BufNewFile,BufRead
- \ *.xml
- \ setfiletype xml
diff --git a/vim/ftdetect/yacc.vim b/vim/ftdetect/yacc.vim
deleted file mode 100644
index e3cb5ee8..00000000
--- a/vim/ftdetect/yacc.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" Yacc files
-autocmd BufNewFile,BufRead
- \ *.y,*.yy
- \ setfiletype yacc
diff --git a/vim/ftdetect/yaml.vim b/vim/ftdetect/yaml.vim
deleted file mode 100644
index 3bf32b53..00000000
--- a/vim/ftdetect/yaml.vim
+++ /dev/null
@@ -1,4 +0,0 @@
-" YAML files
-autocmd BufNewFile,BufRead
- \ *.yaml
- \ setfiletype yaml
diff --git a/vim/ftdetect/zsh.vim b/vim/ftdetect/zsh.vim
deleted file mode 100644
index 08556361..00000000
--- a/vim/ftdetect/zsh.vim
+++ /dev/null
@@ -1,9 +0,0 @@
-" Z shell files
-autocmd BufNewFile,BufRead
- \ *.zsh,.zprofile,zprofile,.zshrc,zshrc
- \ setfiletype zsh
-autocmd BufNewFile,BufRead
- \ *
- \ if getline(1) =~# '^#!.*\<zsh\>'
- \ | setfiletype zsh
- \ | endif