mirror of
https://github.com/vbrandl/dotfiles
synced 2024-11-23 00:13:49 +01:00
Update vimrc
This commit is contained in:
parent
9fff99c240
commit
00ba6dc994
@ -1,7 +1,3 @@
|
|||||||
function! Has_tmux()
|
|
||||||
return $TMUX != ""
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! Cond(cond, ...)
|
function! Cond(cond, ...)
|
||||||
let opts = get(a:000, 0, {})
|
let opts = get(a:000, 0, {})
|
||||||
return a:cond ? opts : extend(opts, { 'on': [], 'for': [] })
|
return a:cond ? opts : extend(opts, { 'on': [], 'for': [] })
|
||||||
@ -23,8 +19,6 @@ Plug 'xolox/vim-notes'
|
|||||||
|
|
||||||
Plug 'Rykka/riv.vim', { 'for': 'rst' } " reStructuredText
|
Plug 'Rykka/riv.vim', { 'for': 'rst' } " reStructuredText
|
||||||
|
|
||||||
Plug 'cespare/vim-toml', { 'for': 'toml' } " toml highlighting
|
|
||||||
|
|
||||||
Plug 'ervandew/supertab' " simple autocomplete
|
Plug 'ervandew/supertab' " simple autocomplete
|
||||||
Plug 'tpope/vim-commentary' " (un)comment
|
Plug 'tpope/vim-commentary' " (un)comment
|
||||||
Plug 'tpope/vim-surround' " handle surroundings
|
Plug 'tpope/vim-surround' " handle surroundings
|
||||||
@ -39,24 +33,23 @@ Plug 'Xuyuanp/nerdtree-git-plugin', { 'on': ['NERDTreeToggle', 'NERDTreeFind'] }
|
|||||||
Plug 'ryanoasis/vim-devicons' " icons
|
Plug 'ryanoasis/vim-devicons' " icons
|
||||||
Plug 'ctrlpvim/ctrlp.vim' " fuzzy file finder
|
Plug 'ctrlpvim/ctrlp.vim' " fuzzy file finder
|
||||||
Plug 'neomake/neomake' " async linting and making
|
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 'sickill/vim-pasta' " context aware pasting
|
||||||
Plug 'junegunn/goyo.vim' " distraction free writing
|
Plug 'junegunn/goyo.vim' " distraction free writing
|
||||||
|
|
||||||
Plug 'elzr/vim-json', { 'for': 'json' } " better JSON support
|
|
||||||
|
|
||||||
" Python
|
" Python
|
||||||
Plug 'davidhalter/jedi-vim', { 'for': 'python' } " python autocomplete
|
Plug 'davidhalter/jedi-vim', { 'for': 'python' } " python autocomplete
|
||||||
|
|
||||||
" Rust plugins
|
" Rust plugins
|
||||||
Plug 'racer-rust/vim-racer', { 'for': 'rust' } " rust autocomplete
|
Plug 'racer-rust/vim-racer', { 'for': 'rust' } " rust autocomplete
|
||||||
Plug 'rust-lang/rust.vim', { 'for': 'rust' } " rust syntax, error checking, etc
|
if !empty($TMUX)
|
||||||
if Has_tmux()
|
|
||||||
Plug 'jtdowney/vimux-cargo', { 'for': 'rust' } " run cargo in tmux using vimux
|
Plug 'jtdowney/vimux-cargo', { 'for': 'rust' } " run cargo in tmux using vimux
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" LaTeX
|
" LaTeX
|
||||||
Plug 'lervag/vimtex', { 'for': ['tex', 'plaintex'] }
|
Plug 'lervag/vimtex', { 'for': ['tex', 'plaintex'] }
|
||||||
|
|
||||||
|
Plug 'sheerun/vim-polyglot' " syntax support for many languages
|
||||||
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
" vim: set filetype=vim ts=4 sw=4 tw=120 noet :
|
" vim: set filetype=vim ts=4 sw=4 tw=120 noet :
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
" vundle
|
" vundle
|
||||||
" set vIM mode
|
" set vIM mode
|
||||||
set nocompatible
|
set nocompatible
|
||||||
filetype plugin indent on
|
|
||||||
|
|
||||||
source ~/.vim/plugins.vim
|
source ~/.vim/plugins.vim
|
||||||
|
|
||||||
|
filetype plugin indent on
|
||||||
|
|
||||||
" Get the defaults that most users want.
|
" Get the defaults that most users want.
|
||||||
source $VIMRUNTIME/defaults.vim
|
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_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)
|
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
|
" true color
|
||||||
set termguicolors
|
set termguicolors
|
||||||
|
" make true colors in tmux work
|
||||||
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
|
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
|
||||||
let &t_8b = "\<Esc>[48;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_buffers = 0 " do not show open buffers in tabline
|
||||||
let g:airline#extensions#tabline#show_splits = 0
|
let g:airline#extensions#tabline#show_splits = 0
|
||||||
|
|
||||||
|
let g:onedark_terminal_italics = 1 " italics for onedark
|
||||||
|
|
||||||
" Toggle NERDTree
|
" Toggle NERDTree
|
||||||
nmap <silent> <leader>k :NERDTreeToggle<cr>
|
nmap <silent> <leader>k :NERDTreeToggle<cr>
|
||||||
" expand to the path of the file in the current buffer
|
" expand to the path of the file in the current buffer
|
||||||
@ -375,4 +376,6 @@ map <Leader>vs :VimuxInterruptRunner<CR>
|
|||||||
" vim-notes
|
" vim-notes
|
||||||
let g:notes_directories = ['~/Dokumente/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 :
|
" vim: set filetype=vim ts=8 sw=2 tw=120 noet :
|
||||||
|
Loading…
Reference in New Issue
Block a user