diff --git a/.config/.gitignore b/.config/.gitignore new file mode 100644 index 0000000..e4d69c1 --- /dev/null +++ b/.config/.gitignore @@ -0,0 +1,8 @@ +* + +# This file +!.gitignore + +# .config folder +!nvim/ +!nvim/** diff --git a/.config/nvim/.gitignore b/.config/nvim/.gitignore new file mode 100644 index 0000000..6dea524 --- /dev/null +++ b/.config/nvim/.gitignore @@ -0,0 +1,7 @@ +* + +# This file +!.gitignore + +# .config folder +!init.vim diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim new file mode 100644 index 0000000..c654d6e --- /dev/null +++ b/.config/nvim/init.vim @@ -0,0 +1,69 @@ +set nocompatible +filetype off + +" ----[Plugins]---- +call plug#begin() + +Plug 'ms-jpq/coq_nvim', {'branch': 'coq'} + +Plug 'ms-jpq/coq.artifacts', {'branch': 'artifacts'} + +Plug 'ms-jpq/coq.thirdparty', {'branch': '3p'} + +call plug#end() + +" ----[Look and Feel]---- +" 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 + +set title + +" Indents +filetype plugin indent on + +" Tabbing +set tabstop=4 +set shiftwidth=4 +set softtabstop=4 expandtab + +" Splits below and right +set splitbelow splitright + +" Block cursor +set guicursor=i:block + +" ----[File Specific Stuff]---- +" yml +autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab +autocmd FileType yml setlocal ts=2 sts=2 sw=2 expandtab + +" ----[Macros]---- +" Find and replace macro +nnoremap S :%s//g + +" Copy paste +vnoremap "+y +map "+P + +" Markers +inoremap /<++>"_c4l +vnoremap /<++>"_c4l +map /<++>"_c4l + +" sudo write, TODO: make this not fuck things up +" command W :execute ':silent w !sudo tee % > /dev/null' | :edit! + +" ----[Pre / Post Write]---- +" Get rid of extra whitespace +autocmd BufWritePre * %s/\s\+$//e + +" 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 &