summaryrefslogtreecommitdiff
path: root/vim/.vimrc
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2019-11-06 17:36:16 +0100
committerJulian T <julian@jtle.dk>2019-11-06 17:40:10 +0100
commit23e44db8566de12bcc85b690b4b31015c5476e69 (patch)
treea69d760e3cac1ab496029cdd044f04b15e2ee3a7 /vim/.vimrc
parentd68286fc99c629ceeb061fafdcf3f88f9de3261e (diff)
Rust path
Diffstat (limited to 'vim/.vimrc')
-rw-r--r--vim/.vimrc33
1 files changed, 24 insertions, 9 deletions
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 <F4> :TagbarToggle<CR>
-
nnoremap <C-b> :b
- nnoremap <silent> <Plug>QuickNext :cnext<CR> :call repeat#set("\<Plug>QuickNext")<CR>
- nnoremap <silent> <Plug>QuickPrev :cprev<CR> :call repeat#set("\<Plug>QuickPrev")<CR>
nnoremap ,, :copen<CR><c-w><c-p>
cnoreabbrev ln lnext
@@ -126,7 +123,10 @@ set hidden
nmap <C-j> <Plug>QuickNext
nmap <C-k> <Plug>QuickPrev
+ " nnoremap <C-h> :LspHover<CR>
nmap - :Exp<CR>
+ 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 <Plug>(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 <silent><C-J> <C-W><C-J>:call Splitresize()<CR>
+ nnoremap <silent><C-K> <C-W><C-K>:call Splitresize()<CR>
+ nnoremap <silent><C-L> <C-W><C-L>:call Splitresize()<CR>
+ nnoremap <silent><C-H> <C-W><C-H>:call Splitresize()<CR>
+
+
+
" 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))