From 00ba6dc9945928158181920fcff153f7e563c2d2 Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Wed, 12 Apr 2017 15:54:04 +0200 Subject: [PATCH] Update vimrc --- editors/vim/plugins.vim | 15 ++++----------- editors/vim/vimrc | 11 +++++++---- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/editors/vim/plugins.vim b/editors/vim/plugins.vim index 58ca2b3..15fba7e 100644 --- a/editors/vim/plugins.vim +++ b/editors/vim/plugins.vim @@ -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 : diff --git a/editors/vim/vimrc b/editors/vim/vimrc index 1b67604..33b00c7 100644 --- a/editors/vim/vimrc +++ b/editors/vim/vimrc @@ -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 = "\[38;2;%lu;%lu;%lum" let &t_8b = "\[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 k :NERDTreeToggle " expand to the path of the file in the current buffer @@ -375,4 +376,6 @@ map vs :VimuxInterruptRunner " 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 :