aboutsummaryrefslogtreecommitdiff
path: root/vim/ftplugin
diff options
context:
space:
mode:
Diffstat (limited to 'vim/ftplugin')
-rw-r--r--vim/ftplugin/html.vim36
-rw-r--r--vim/ftplugin/mail.vim6
-rw-r--r--vim/ftplugin/markdown.vim8
-rw-r--r--vim/ftplugin/perl.vim20
-rw-r--r--vim/ftplugin/sh.vim53
-rw-r--r--vim/ftplugin/text.vim8
-rw-r--r--vim/ftplugin/vim.vim10
7 files changed, 0 insertions, 141 deletions
diff --git a/vim/ftplugin/html.vim b/vim/ftplugin/html.vim
deleted file mode 100644
index d2c6a3e3..00000000
--- a/vim/ftplugin/html.vim
+++ /dev/null
@@ -1,36 +0,0 @@
-" Run `tidy -errors -quiet` over buffer
-nnoremap <buffer> <silent>
- \ <LocalLeader>c
- \ :<C-U>write !tidy -errors -quiet<CR>
-
-" Filter buffer through `tidy`
-nnoremap <buffer> <silent>
- \ <LocalLeader>t
- \ :<C-U>%!tidy -quiet<CR>
-
-" Make a bare URL into a link to itself
-function! s:UrlLink()
-
- " Yank this whole whitespace-separated word
- normal! yiW
- " Open a link tag
- normal! i<a href="">
- " Paste the URL into the quotes
- normal! hP
- " Move to the end of the link text URL
- normal! E
- " Close the link tag
- normal! a</a>
-
-endfunction
-
-" Mapping for the function above
-nnoremap <buffer> <silent>
- \ <LocalLeader>r
- \ :<C-U>call <SID>UrlLink()<CR>
-
-" Unload this filetype plugin
-let b:undo_user_ftplugin
- \ = 'silent! nunmap <LocalLeader>c'
- \ . '|silent! nunmap <LocalLeader>t'
- \ . '|silent! nunmap <LocalLeader>r'
diff --git a/vim/ftplugin/mail.vim b/vim/ftplugin/mail.vim
deleted file mode 100644
index 697ce499..00000000
--- a/vim/ftplugin/mail.vim
+++ /dev/null
@@ -1,6 +0,0 @@
-" Use trailing whitespace to denote continued paragraph
-setlocal formatoptions+=w
-
-" Unload this filetype plugin
-let b:undo_user_ftplugin
- \ = 'setlocal formatoptions<'
diff --git a/vim/ftplugin/markdown.vim b/vim/ftplugin/markdown.vim
deleted file mode 100644
index f26fb156..00000000
--- a/vim/ftplugin/markdown.vim
+++ /dev/null
@@ -1,8 +0,0 @@
-" Spellcheck documents by default
-if has('syntax')
- setlocal spell
-endif
-
-" Unload this filetype plugin
-let b:undo_user_ftplugin
- \ = 'silent! setlocal spell<'
diff --git a/vim/ftplugin/perl.vim b/vim/ftplugin/perl.vim
deleted file mode 100644
index 5549e33d..00000000
--- a/vim/ftplugin/perl.vim
+++ /dev/null
@@ -1,20 +0,0 @@
-" Run `perl -c` over buffer
-nnoremap <buffer> <silent>
- \ <LocalLeader>c
- \ :<C-U>write !perl -c<CR>
-
-" Run `perlcritic` over buffer
-nnoremap <buffer> <silent>
- \ <LocalLeader>l
- \ :<C-U>write !perlcritic<CR>
-
-" Filter buffer through `perltidy`
-nnoremap <buffer> <silent>
- \ <LocalLeader>t
- \ :<C-U>%!perltidy<CR>
-
-" Unload this filetype plugin
-let b:undo_user_ftplugin
- \ = 'silent! nunmap <LocalLeader>c'
- \ . '|silent! nunmap <LocalLeader>l'
- \ . '|silent! nunmap <LocalLeader>t'
diff --git a/vim/ftplugin/sh.vim b/vim/ftplugin/sh.vim
deleted file mode 100644
index 60e8b6c4..00000000
--- a/vim/ftplugin/sh.vim
+++ /dev/null
@@ -1,53 +0,0 @@
-"
-" If we have a #!/bin/sh shebang and filetype.vim determined we were neither
-" POSIX nor Bash nor Korn shell, we'll guess POSIX, just because it's far more
-" likely that's what I want to write than plain Bourne shell.
-"
-" You're supposed to be able to do this by setting g:is_posix, but if that's
-" set, the syntax file ends up setting g:is_kornshell for you too, for reasons
-" I don't really understand. This method works though, and is cleaner than
-" the other workaround I had been trying.
-"
-if exists('b:is_sh')
- unlet b:is_sh
- if !exists('b:is_bash') && !exists('b:is_kornshell')
- let b:is_posix = 1
- endif
-endif
-
-" Use han(1df) as a man(1) wrapper for Bash files if available
-if exists('b:is_bash')
- \ && executable('han')
- setlocal keywordprg=han
-endif
-
-" Map checker based on shell family
-if exists('b:is_bash')
- let b:sh_check = 'write !bash -n'
-elseif exists('b:is_kornshell')
- let b:sh_check = 'write !ksh -n'
-else
- let b:sh_check = 'write !sh -n'
-endif
-nnoremap <buffer> <silent>
- \ <LocalLeader>c
- \ :<C-U>execute b:sh_check<CR>
-
-" Map linter based on shell family
-if exists('b:is_bash')
- let b:sh_lint = 'write !shellcheck -s bash -'
-elseif exists('b:is_kornshell')
- let b:sh_lint = 'write !shellcheck -s ksh -'
-else
- let b:sh_lint = 'write !shellcheck -s sh -'
-endif
-nnoremap <buffer> <silent>
- \ <LocalLeader>l
- \ :<C-U>execute b:sh_lint<CR>
-
-" Unload this filetype plugin
-let b:undo_user_ftplugin
- \ = 'setlocal keywordprg<'
- \ . '|unlet! b:sh_check b:sh_lint'
- \ . '|silent! nunmap <LocalLeader>c'
- \ . '|silent! nunmap <LocalLeader>l'
diff --git a/vim/ftplugin/text.vim b/vim/ftplugin/text.vim
deleted file mode 100644
index f26fb156..00000000
--- a/vim/ftplugin/text.vim
+++ /dev/null
@@ -1,8 +0,0 @@
-" Spellcheck documents by default
-if has('syntax')
- setlocal spell
-endif
-
-" Unload this filetype plugin
-let b:undo_user_ftplugin
- \ = 'silent! setlocal spell<'
diff --git a/vim/ftplugin/vim.vim b/vim/ftplugin/vim.vim
deleted file mode 100644
index e8113134..00000000
--- a/vim/ftplugin/vim.vim
+++ /dev/null
@@ -1,10 +0,0 @@
-" Run `vint` over buffer
-" /dev/stdin is not optimal here; it's widely implemented, but not POSIX.
-" `vint` does not seem to have another way to parse standard input.
-nnoremap <buffer> <silent>
- \ <LocalLeader>l
- \ :<C-U>write !vint -s /dev/stdin<CR>
-
-" Unload this filetype plugin
-let b:undo_user_ftplugin
- \ = 'silent! nunmap <LocalLeader>l'