From 23e44db8566de12bcc85b690b4b31015c5476e69 Mon Sep 17 00:00:00 2001 From: Julian T Date: Wed, 6 Nov 2019 17:36:16 +0100 Subject: Rust path --- vim/.vimrc | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) (limited to 'vim') diff --git a/vim/.vimrc b/vim/.vimrc index 3a91ff4..c618fef 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -38,8 +38,8 @@ set shellslash " Plugin 'tpope/vim-vinegar' " Git - Plugin 'jreybert/vimagit' - Plugin 'tpope/vim-fugitive' + " Plugin 'jreybert/vimagit' + " Plugin 'tpope/vim-fugitive' " File support Plugin 'cespare/vim-toml' @@ -49,7 +49,6 @@ set shellslash " Plugin 'rust-lang/rust.vim' " Plugin 'racer-rust/vim-racer' - Plugin 'junegunn/vim-easy-align' call vundle#end() " required filetype plugin indent on " required @@ -68,6 +67,7 @@ set shellslash let g:go_info_mode='gopls' " let g:rustfmt_autosave = 1 + " autocmd FileType c let b:vcm_tab_complete = 'omni' autocmd FileType c let b:vcm_tab_complete = 'omni' autocmd FileType go let b:vcm_tab_complete = 'omni' autocmd FileType vim let b:vcm_tab_complete = 'vim' @@ -75,7 +75,8 @@ set shellslash set completeopt=menuone syntax enable -set number relativenumber +set number +set relativenumber set tabstop=4 set shiftwidth=4 @@ -111,12 +112,8 @@ set hidden " let g:ncm2#auto_popup = 0 " Keymapping - map :TagbarToggle - nnoremap :b - nnoremap QuickNext :cnext :call repeat#set("\QuickNext") - nnoremap QuickPrev :cprev :call repeat#set("\QuickPrev") nnoremap ,, :copen cnoreabbrev ln lnext @@ -126,7 +123,10 @@ set hidden nmap QuickNext nmap QuickPrev + " nnoremap :LspHover nmap - :Exp + cnoreabbrev instime put =strftime('%Y-%m-%dT%I%M') + " When moving more lines make it a jump. If couns i 2 it will run m'2j, " thus storing it on the jumplist and then jumping @@ -149,10 +149,25 @@ set hidden " Start interactive EasyAlign for a motion/text object (e.g. gaip) nmap ga (EasyAlign) + " Split stuff https://janneinosaka.blogspot.com/2014/10/automatically-resize-vim-splits.html + function Splitresize() + let hmax = max([winwidth(0), float2nr(&columns*0.66), 90]) + let vmax = max([winheight(0), float2nr(&lines*0.66), 25]) + exe "vertical resize" . (min([hmax, 140])) + exe "resize" . (min([vmax, 60])) + endfunction + " move between splits without the ctrl-w prefix + + nnoremap :call Splitresize() + nnoremap :call Splitresize() + nnoremap :call Splitresize() + nnoremap :call Splitresize() + + + " Enforcing filetypes autocmd BufRead,BufNewFile *.ino set filetype=c autocmd BufRead,BufNewFile *.asc set filetype=asciidoc - autocmd FileType python setlocal completeopt-=preview " Highlightning if (empty($TMUX)) -- cgit v1.2.3