Clean up vim config
This commit is contained in:
parent
6a8db9df8d
commit
48a11a0e02
21 changed files with 0 additions and 2114 deletions
|
@ -1,8 +0,0 @@
|
|||
" Language: CoffeeScript
|
||||
" Maintainer: Mick Koch <kchmck@gmail.com>
|
||||
" URL: http://github.com/kchmck/vim-coffee-script
|
||||
" License: WTFPL
|
||||
|
||||
autocmd BufNewFile,BufRead *.coffee set filetype=coffee
|
||||
autocmd BufNewFile,BufRead *Cakefile set filetype=coffee
|
||||
autocmd BufNewFile,BufRead *.coffeekup set filetype=coffee
|
|
@ -1,23 +0,0 @@
|
|||
autocmd BufRead,BufNewFile *.fish setfiletype fish
|
||||
|
||||
" Detect fish scripts by the shebang line.
|
||||
autocmd BufRead *
|
||||
\ if getline(1) =~# '\v^#!%(\f*/|/usr/bin/env\s*<)fish>' |
|
||||
\ setlocal filetype=fish |
|
||||
\ endif
|
||||
|
||||
" Move cursor to first empty line when using funced.
|
||||
autocmd BufRead fish_funced_*_*.fish call search('^$')
|
||||
|
||||
" Fish histories are YAML documents.
|
||||
autocmd BufRead,BufNewFile ~/.config/fish/fish_{read_,}history setfiletype yaml
|
||||
|
||||
" Universal variable storages should not be hand edited.
|
||||
autocmd BufRead,BufNewFile ~/.config/fish/fishd.* setlocal readonly
|
||||
|
||||
" Mimic `funced` when manually creating functions.
|
||||
autocmd BufNewFile ~/.config/fish/functions/*.fish
|
||||
\ call append(0, ['function '.expand('%:t:r'),
|
||||
\'',
|
||||
\'end']) |
|
||||
\ 2
|
|
@ -1,23 +0,0 @@
|
|||
" We take care to preserve the user's fileencodings and fileformats,
|
||||
" because those settings are global (not buffer local), yet we want
|
||||
" to override them for loading Go files, which are defined to be UTF-8.
|
||||
let s:current_fileformats = ''
|
||||
let s:current_fileencodings = ''
|
||||
|
||||
" define fileencodings to open as utf-8 encoding even if it's ascii.
|
||||
function! s:gofiletype_pre()
|
||||
let s:current_fileformats = &g:fileformats
|
||||
let s:current_fileencodings = &g:fileencodings
|
||||
set fileencodings=utf-8 fileformats=unix
|
||||
setlocal filetype=go
|
||||
endfunction
|
||||
|
||||
" restore fileencodings as others
|
||||
function! s:gofiletype_post()
|
||||
let &g:fileformats = s:current_fileformats
|
||||
let &g:fileencodings = s:current_fileencodings
|
||||
endfunction
|
||||
|
||||
au BufNewFile *.go setlocal filetype=go fileencoding=utf-8 fileformat=unix
|
||||
au BufRead *.go call s:gofiletype_pre()
|
||||
au BufReadPost *.go call s:gofiletype_post()
|
|
@ -1,12 +0,0 @@
|
|||
autocmd BufNewFile,BufRead *.swift set filetype=swift
|
||||
autocmd BufRead * call s:Swift()
|
||||
function! s:Swift()
|
||||
if !empty(&filetype)
|
||||
return
|
||||
endif
|
||||
|
||||
let line = getline(1)
|
||||
if line =~ "^#!.*swift"
|
||||
setfiletype swift
|
||||
endif
|
||||
endfunction
|
Loading…
Add table
Add a link
Reference in a new issue