psoxizsh/vimrc

114 lines
2.7 KiB
VimL
Raw Permalink Normal View History

2017-12-13 13:08:26 +00:00
" Function to source only if file exists {
function! SourceIfExists(file)
if filereadable(expand(a:file))
exe 'source' a:file
endif
endfunction
" }
2017-12-13 13:08:26 +00:00
exec "set rtp=$VIMHOME," . &rtp
call SourceIfExists("~/.config/vim/early.vimrc")
2017-12-13 13:08:26 +00:00
set encoding=utf-8
2018-05-02 12:51:32 +00:00
call plug#begin("$VIMHOME/plugged")
2017-12-13 13:08:26 +00:00
Plug 'junegunn/vim-easy-align'
2019-10-03 11:27:02 +00:00
Plug 'majutsushi/tagbar'
2017-12-13 13:08:26 +00:00
Plug 'tpope/vim-sensible'
Plug 'tpope/vim-fugitive'
Plug 'scrooloose/nerdtree'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'scrooloose/syntastic'
Plug 'scrooloose/nerdcommenter'
Plug 'scrooloose/vim-statline'
Plug 'vim-perl/vim-perl', { 'for': 'perl', 'do': 'make clean carp dancer highlight-all-pragmas moose test-more try-tiny' }
Plug 'rust-lang/rust.vim'
Plug 'vim-scripts/taglist.vim'
Plug 'pearofducks/ansible-vim'
2019-01-15 11:36:11 +00:00
Plug 'luochen1990/rainbow'
2019-09-11 09:09:50 +00:00
Plug 'jremmen/vim-ripgrep'
call SourceIfExists("~/.config/vim/plug.vimrc")
2017-12-13 13:08:26 +00:00
if v:version > 704
Plug 'Valloric/YouCompleteMe'
2018-08-09 19:22:57 +00:00
Plug 'prabirshrestha/async.vim'
2017-12-13 13:08:26 +00:00
endif
2018-08-09 19:22:57 +00:00
if has('nvim')
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
else
Plug 'Shougo/deoplete.nvim'
Plug 'roxma/nvim-yarp'
Plug 'roxma/vim-hug-neovim-rpc'
endif
2017-12-13 13:08:26 +00:00
call plug#end()
set number
set relativenumber
execute ':silent !mkdir -p ~/.vimbackup'
set backupdir=~/.vimbackup
set directory=~/.vimbackup
set hlsearch
" Commenting
let g:NERDSpaceDelims = 1
let g:NERDCompactSexyComs = 1
let g:NERDDefaultAlign = 'left'
let g:NERDCommentEmptyLines = 1
let g:NERDTrimTrailingWhitespace = 1
" Syntastic Settings
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_enable_signs = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
" Syntastic enable specific checkers
" let g:syntastic_perl_checkers = ["perl"]
" let g:syntastic_enable_perl_checker = 1
let g:syntastic_enable_zsh_checker = 1
let g:syntastic_enable_bash_checker = 1
2018-05-14 08:19:59 +00:00
" rust lang
2018-08-09 19:22:57 +00:00
autocmd FileType rust let g:autofmt_autosave = 1
autocmd FileType rust let g:deoplete#enable_at_startup = 1
let g:ycm_rust_src_path = expand('~/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc')
2018-05-14 08:19:59 +00:00
" Other
2019-01-15 11:36:11 +00:00
let g:rainbow_active = 1
2018-05-14 10:54:28 +00:00
set shiftwidth=2
set tabstop=8
set softtabstop=2
set expandtab
filetype plugin indent on
autocmd FileType yaml setl indentkeys-=<:>
2018-05-14 10:54:28 +00:00
autocmd FileType yaml setlocal ts=8 sts=2 sw=2 expandtab
2017-12-13 13:08:26 +00:00
colorscheme murphy
2018-03-30 13:45:24 +00:00
cmap w!! w !sudo tee % > /dev/null
2018-09-10 13:19:57 +00:00
let g:ycm_server_keep_logfiles = 1
let g:ycm_server_log_level = 'debug'
2019-09-11 09:09:50 +00:00
" ripgrep settings
2019-09-11 09:51:26 +00:00
let g:rg_highlight = 'true'
let g:rg_derive_root = 'true'
2019-09-11 09:09:50 +00:00
2019-10-03 11:27:02 +00:00
nmap <F8> :TagbarToggle<CR>
call SourceIfExists("~/.config/vim/late.vimrc")
2018-06-14 13:58:34 +00:00
set modeline
set modelines=7
2017-12-13 13:08:26 +00:00
" vim: ts=8 sw=2 si