-
Notifications
You must be signed in to change notification settings - Fork 1
/
filetype.vim
30 lines (21 loc) · 1.11 KB
/
filetype.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
"=========================================================================
" File Name : filetype.vim
" Author : AlanDing
" description : ftdetect
" Created Time : Tue 02 Apr 2019 06:59:07 AM CST
"=========================================================================
scriptencoding utf-8
augroup my_filetype_detection
autocmd!
" autocmd BufNewFile,BufRead *.ps1 setlocal filetype=powershell
autocmd BufNewFile,BufRead *.spacemacs setlocal filetype=lisp
autocmd FileType c,cpp setlocal commentstring=//\ %s tabstop=4 softtabstop=4 shiftwidth=4
autocmd FileType markdown setlocal nowrap textwidth=120
autocmd FileType qf setlocal nonumber
autocmd FileType java,rust,html,css,styl,vue,xml
\ setlocal tabstop=4 softtabstop=4 shiftwidth=4
" plantuml
" autocmd BufRead,BufNewFile * if !did_filetype() && getline(1) =~# '@startuml\>'| setfiletype plantuml | endif
" autocmd BufRead,BufNewFile *.pu,*.uml,*.plantuml,*.puml,*.iuml set filetype=plantuml
augroup END
" vim:set sw=2 ts=2 sts=2 et tw=78