Skip to content

Commit

Permalink
Merge pull request #651 from globin/rust_puppet
Browse files Browse the repository at this point in the history
improve rust and puppet support
  • Loading branch information
spf13 committed Aug 17, 2014
2 parents 928195c + a570c9b commit ab42a6f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -217,18 +217,18 @@
" To disable the stripping of whitespace, add the following to your
" .vimrc.before.local file:
" let g:spf13_keep_trailing_whitespace = 1
autocmd FileType c,cpp,java,go,php,javascript,python,twig,xml,yml,perl autocmd BufWritePre <buffer> if !exists('g:spf13_keep_trailing_whitespace') | call StripTrailingWhitespace() | endif
autocmd FileType c,cpp,java,go,php,javascript,puppet,python,rust,twig,xml,yml,perl autocmd BufWritePre <buffer> if !exists('g:spf13_keep_trailing_whitespace') | call StripTrailingWhitespace() | endif
"autocmd FileType go autocmd BufWritePre <buffer> Fmt
autocmd BufNewFile,BufRead *.html.twig set filetype=html.twig
autocmd FileType haskell setlocal expandtab shiftwidth=2 softtabstop=2
autocmd FileType haskell,puppet,ruby,yml setlocal expandtab shiftwidth=2 softtabstop=2
" preceding line best in a plugin but here for now.

autocmd BufNewFile,BufRead *.coffee set filetype=coffee

" Workaround vim-commentary for Haskell
autocmd FileType haskell setlocal commentstring=--\ %s
" Workaround broken colour highlighting in Haskell
autocmd FileType haskell setlocal nospell
autocmd FileType haskell,rust setlocal nospell

" }

Expand Down Expand Up @@ -520,6 +520,8 @@
vmap <Leader>a& :Tabularize /&<CR>
nmap <Leader>a= :Tabularize /=<CR>
vmap <Leader>a= :Tabularize /=<CR>
nmap <Leader>a=> :Tabularize /=><CR>
vmap <Leader>a=> :Tabularize /=><CR>
nmap <Leader>a: :Tabularize /:<CR>
vmap <Leader>a: :Tabularize /:<CR>
nmap <Leader>a:: :Tabularize /:\zs<CR>
Expand All @@ -544,7 +546,7 @@

" JSON {
nmap <leader>jt <Esc>:%!python -m json.tool<CR><Esc>:set filetype=json<CR>
let g:vim_json_syntax_conceal = 0
let g:vim_json_syntax_conceal = 0
" }

" PyMode {
Expand Down Expand Up @@ -766,7 +768,7 @@
function! CleverTab()
if pumvisible()
return "\<C-n>"
endif
endif
let substr = strpart(getline('.'), 0, col('.') - 1)
let substr = matchstr(substr, '[^ \t]*$')
if strlen(substr) == 0
Expand Down
1 change: 1 addition & 0 deletions .vimrc.bundles
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@

" Misc {
if count(g:spf13_bundle_groups, 'misc')
Bundle 'wting/rust.vim'
Bundle 'tpope/vim-markdown'
Bundle 'spf13/vim-preview'
Bundle 'tpope/vim-cucumber'
Expand Down

0 comments on commit ab42a6f

Please sign in to comment.