commit beec66fea54098b73765367101cb47f3ecdd6c99
parent 2c4e8ebdd78427d749668ef5327a1d227ec8393f
Author: Bharatvaj H <bharatvaj@yahoo.com>
Date: Mon, 2 Aug 2021 16:57:44 +0530
Update .config/.gitignore
Add .config/vim/vimrc
Diffstat:
2 files changed, 74 insertions(+), 0 deletions(-)
diff --git a/.config/.gitignore b/.config/.gitignore
@@ -0,0 +1,11 @@
+Ignore everything by default.
+*
+
+!.gitignore
+!i3
+!nvim
+!vim/
+!vim/*
+!X11
+!wgetrc
+!user-dirs.dirs
diff --git a/.config/vim/vimrc b/.config/vim/vimrc
@@ -0,0 +1,63 @@
+" Use XDG Paths for vim
+set runtimepath^=$XDG_CONFIG_HOME/vim
+set runtimepath+=$XDG_DATA_HOME/vim
+set runtimepath+=$XDG_CONFIG_HOME/vim/after
+
+set packpath^=$XDG_DATA_HOME/vim,$XDG_CONFIG_HOME/vim
+set packpath+=$XDG_CONFIG_HOME/vim/after,$XDG_DATA_HOME/vim/after
+
+let g:netrw_home = $XDG_DATA_HOME."/vim"
+call mkdir($XDG_DATA_HOME."/vim/spell", 'p')
+set viewdir=$XDG_DATA_HOME/vim/view | call mkdir(&viewdir, 'p')
+
+set backupdir=$XDG_CACHE_HOME/vim/backup | call mkdir(&backupdir, 'p')
+set directory=$XDG_CACHE_HOME/vim/swap | call mkdir(&directory, 'p')
+set undodir=$XDG_CACHE_HOME/vim/undo | call mkdir(&undodir, 'p')
+
+if !has('nvim') | set viminfofile=$XDG_CACHE_HOME/vim/viminfo | endif
+
+set number
+set mouse=a
+syntax on
+set exrc
+
+" Search
+set hlsearch
+set incsearch
+
+" Anti-tab
+filetype plugin indent on
+set tabstop=4
+set shiftwidth=4
+set expandtab
+
+" Keybindings
+nnoremap <leader>t :tabnew<cr>
+
+" Netrw customization
+let g:netrw_banner = 0
+
+
+" Plugin Management
+call plug#begin($XDG_DATA_HOME."/vim/plugged")
+ Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
+ Plug 'junegunn/fzf.vim'
+ Plug 'cdelledonne/vim-cmake'
+ Plug 'editorconfig/editorconfig-vim'
+ Plug 'vim-airline/vim-airline'
+ Plug 'lifepillar/vim-solarized8'
+ Plug 'tpope/vim-fugitive'
+ Plug 'airblade/vim-gitgutter'
+call plug#end()
+
+
+" Plugin Keybindings
+nmap <Leader>f :GFiles<CR>
+nmap <Leader>F :Files<CR>
+
+" Theming
+highlight GitGutterAdd ctermfg=green
+highlight GitGutterChange ctermfg=yellow
+highlight GitGutterDelete ctermfg=red
+highlight GitGutterChangeDelete ctermfg=yellow
+