dotfiles/.vimrc
2021-12-03 00:01:50 -05:00

59 lines
1.3 KiB
VimL

set nocompatible
filetype off
" Vundle shit
"set rtp+=~/.vim/bundle/Vundle.vim
"call vundle#begin()
"Plugin 'VundleVim/Vundle.vim'
"Plugin 'https://github.com/ycm-core/YouCompleteMe.git'
"call vundle#end() " required
call plug#begin('~/.vim/plugged')
Plug 'ms-jpq/coq_nvim', {'branch': 'coq'}
Plug 'ms-jpq/coq.artifacts', {'branch': 'artifacts'}
Plug 'ms-jpq/coq.thirdparty', {'branch': '3p'}
call plug#end()
" Indents
filetype plugin indent on " required
set tabstop=4
set shiftwidth=4
set softtabstop=4 expandtab
" Syntax hilighting and line numbers
syntax on
set encoding=utf-8
set number relativenumber
set wildmode=longest,list,full
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
nnoremap S :%s//g<Left><Left>
" Splits below and right
set splitbelow splitright
" Copy paste
vnoremap <C-c> "+y
map <C-p> "+P
" Get rid of extra whitespace
autocmd BufWritePre * %s/\s\+$//e
" Markers
inoremap <leader><leader> <Esc>/<++><Enter>"_c4l
vnoremap <leader><leader> <Esc>/<++><Enter>"_c4l
map <leader><leader> <Esc>/<++><Enter>"_c4l
command W :execute ':silent w !sudo tee % > /dev/null' | :edit!
" Run xrdb when Xresources or Xdefaults are changed
autocmd BufWritePost *Xresources,*Xdefaults !xrdb %
" Reload sxhkd when config is edited
autocmd BufWritePost sxhkdrc :silent !pkill sxhkd; sxhkd &