From a570c9b1a8d79c82fc2d693b3f0b08d106e03367 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Sun, 3 Aug 2014 14:51:11 +0200 Subject: [PATCH] improve rust and puppet support --- .vimrc | 12 +++++++----- .vimrc.bundles | 1 + 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.vimrc b/.vimrc index b969a618c..e14a71bf8 100644 --- a/.vimrc +++ b/.vimrc @@ -217,10 +217,10 @@ " 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 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 if !exists('g:spf13_keep_trailing_whitespace') | call StripTrailingWhitespace() | endif "autocmd FileType go autocmd BufWritePre 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 @@ -228,7 +228,7 @@ " 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 " } @@ -518,6 +518,8 @@ vmap a& :Tabularize /& nmap a= :Tabularize /= vmap a= :Tabularize /= + nmap a=> :Tabularize /=> + vmap a=> :Tabularize /=> nmap a: :Tabularize /: vmap a: :Tabularize /: nmap a:: :Tabularize /:\zs @@ -542,7 +544,7 @@ " JSON { nmap jt :%!python -m json.tool:set filetype=json - let g:vim_json_syntax_conceal = 0 + let g:vim_json_syntax_conceal = 0 " } " PyMode { @@ -764,7 +766,7 @@ function! CleverTab() if pumvisible() return "\" - endif + endif let substr = strpart(getline('.'), 0, col('.') - 1) let substr = matchstr(substr, '[^ \t]*$') if strlen(substr) == 0 diff --git a/.vimrc.bundles b/.vimrc.bundles index 880538731..98a1b6e92 100644 --- a/.vimrc.bundles +++ b/.vimrc.bundles @@ -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'