Skip to content

Commit a53fde9

Browse files
committed
Update formatting for JS/Vue files.
1 parent 30bdc0b commit a53fde9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

vimrc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,11 +283,15 @@ if !exists("mm_filetype_config")
283283
" source code gets wrapped
284284
autocmd FileType javascript,php,html,python,actionscript set autoindent
285285

286+
autocmd FileType ruby,javascript,vue set tabstop=2 " number of spaces for a tab
287+
autocmd FileType ruby,javascript,vue set softtabstop=2 " using 2 spaces
288+
autocmd FileType ruby,javascript,vue set shiftwidth=2 " number of spaces to autoindent
289+
286290
" Thor classes are just Ruby
287291
autocmd BufNewFile,BufRead *.thor set filetype=ruby
288-
autocmd BufNewFile,BufRead *.thor set tabstop=2 " number of spaces for a tab
289-
autocmd BufNewFile,BufRead *.thor set softtabstop=2 " using 2 spaces
290-
autocmd BufNewFile,BufRead *.thor set shiftwidth=2 " number of spaces to autoindent
292+
293+
" fix highlighting wonkiness in Vue files
294+
autocmd FileType vue syntax sync fromstart
291295
endif
292296

293297
" setup PHP Code Sniffer

0 commit comments

Comments
 (0)