From 456232000cc2a5f20b5eb87f268ffea2e3667ac6 Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 19 Sep 2021 15:27:34 +0530 Subject: cool new search mapping --- ftplugin/rust.vim | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'ftplugin') diff --git a/ftplugin/rust.vim b/ftplugin/rust.vim index 5007055..fce69b4 100644 --- a/ftplugin/rust.vim +++ b/ftplugin/rust.vim @@ -1,8 +1,6 @@ setlocal ts=4 sts=4 sw=4 expandtab set formatprg=rustfmt - -" set makeprg=cargo\ clippy set errorformat= \%-G, \%-Gerror:\ aborting\ %.%#, @@ -22,19 +20,3 @@ function! RustMake() abort endfunction nnoremap r :call RustMake() silent! redraw cwindow - -if exists('*RustFmtSimple') - finish -endif - -function! RustFmtSimple() abort - let s = winsaveview() - bufdo! silent! !rustfmt % - bufdo! edit - call winrestview(s) -endfunction - -augroup SimpleRustFmt - autocmd! - autocmd BufWritePost *.rs call RustFmtSimple() -augroup END -- cgit v1.2.3