1
0
mirror of https://github.com/vbrandl/dotfiles synced 2024-11-26 17:35:12 +01:00

Update vimrc

This commit is contained in:
Valentin Brandl 2017-04-12 15:54:04 +02:00
parent 9fff99c240
commit 00ba6dc994
Signed by: vbrandl
GPG Key ID: CAD4DA1A789125F9
2 changed files with 11 additions and 15 deletions

View File

@ -1,7 +1,3 @@
function! Has_tmux()
return $TMUX != ""
endfunction
function! Cond(cond, ...)
let opts = get(a:000, 0, {})
return a:cond ? opts : extend(opts, { 'on': [], 'for': [] })
@ -23,8 +19,6 @@ Plug 'xolox/vim-notes'
Plug 'Rykka/riv.vim', { 'for': 'rst' } " reStructuredText
Plug 'cespare/vim-toml', { 'for': 'toml' } " toml highlighting
Plug 'ervandew/supertab' " simple autocomplete
Plug 'tpope/vim-commentary' " (un)comment
Plug 'tpope/vim-surround' " handle surroundings
@ -39,24 +33,23 @@ Plug 'Xuyuanp/nerdtree-git-plugin', { 'on': ['NERDTreeToggle', 'NERDTreeFind'] }
Plug 'ryanoasis/vim-devicons' " icons
Plug 'ctrlpvim/ctrlp.vim' " fuzzy file finder
Plug 'neomake/neomake' " async linting and making
Plug 'benmills/vimux', Cond(Has_tmux()) " tmux support
Plug 'benmills/vimux', Cond(!empty($TMUX)) " tmux support
Plug 'sickill/vim-pasta' " context aware pasting
Plug 'junegunn/goyo.vim' " distraction free writing
Plug 'elzr/vim-json', { 'for': 'json' } " better JSON support
" Python
Plug 'davidhalter/jedi-vim', { 'for': 'python' } " python autocomplete
" Rust plugins
Plug 'racer-rust/vim-racer', { 'for': 'rust' } " rust autocomplete
Plug 'rust-lang/rust.vim', { 'for': 'rust' } " rust syntax, error checking, etc
if Has_tmux()
if !empty($TMUX)
Plug 'jtdowney/vimux-cargo', { 'for': 'rust' } " run cargo in tmux using vimux
endif
" LaTeX
Plug 'lervag/vimtex', { 'for': ['tex', 'plaintex'] }
Plug 'sheerun/vim-polyglot' " syntax support for many languages
call plug#end()
" vim: set filetype=vim ts=4 sw=4 tw=120 noet :

View File

@ -1,10 +1,11 @@
" vundle
" set vIM mode
set nocompatible
filetype plugin indent on
source ~/.vim/plugins.vim
filetype plugin indent on
" Get the defaults that most users want.
source $VIMRUNTIME/defaults.vim
@ -260,11 +261,9 @@ let g:ctrlp_switch_buffer = 0 " open files in new buffer
let g:ctrlp_working_path_mode = 0 " honor working path changes in vim session
let g:ctrlp_user_command = 'ag %s -l --nocolor --hidden -g ""' " use ag to search for files (faster)
" make true colors in tmux work
" set t_8f=[38;2;%lu;%lu;%lum
" set t_8b=[48;2;%lu;%lu;%lum
" true color
set termguicolors
" make true colors in tmux work
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
@ -289,6 +288,8 @@ let g:airline#extensions#tabline#tab_min_count = 2 " only show tabline if tabs a
let g:airline#extensions#tabline#show_buffers = 0 " do not show open buffers in tabline
let g:airline#extensions#tabline#show_splits = 0
let g:onedark_terminal_italics = 1 " italics for onedark
" Toggle NERDTree
nmap <silent> <leader>k :NERDTreeToggle<cr>
" expand to the path of the file in the current buffer
@ -375,4 +376,6 @@ map <Leader>vs :VimuxInterruptRunner<CR>
" vim-notes
let g:notes_directories = ['~/Dokumente/Notes']
let g:LatexBox_split_type="new" " open TOC in horizontal split
" vim: set filetype=vim ts=8 sw=2 tw=120 noet :