2019-12-26 19:59:01 +00:00
|
|
|
set runtimepath+=~/.config/vim,~/.config/vim/after
|
|
|
|
set viminfo+=n~/.cache/viminfo
|
|
|
|
|
2019-12-20 13:06:42 +00:00
|
|
|
set number relativenumber
|
|
|
|
|
|
|
|
augroup numbertoggle
|
|
|
|
autocmd!
|
|
|
|
autocmd WinEnter * set relativenumber
|
|
|
|
autocmd WinLeave * set norelativenumber
|
|
|
|
augroup END
|
|
|
|
|
|
|
|
syntax on
|
|
|
|
|
|
|
|
set tabstop=4
|
|
|
|
set shiftwidth=4
|
|
|
|
set expandtab
|
|
|
|
|
|
|
|
set encoding=utf-8
|
|
|
|
|
|
|
|
set nowrap
|
|
|
|
|
2020-01-07 11:02:43 +00:00
|
|
|
" Save cursor position. I don't understand this part
|
2019-12-20 13:06:42 +00:00
|
|
|
if has("autocmd")
|
|
|
|
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g`\"" | endif
|
|
|
|
endif
|
2019-12-26 19:59:01 +00:00
|
|
|
|
2020-01-07 11:02:43 +00:00
|
|
|
" Plug plugins using VimPlug
|
2019-12-26 19:59:01 +00:00
|
|
|
call plug#begin('~/.config/vim/plugged')
|
2019-12-27 00:22:42 +00:00
|
|
|
Plug 'editorconfig/editorconfig-vim'
|
|
|
|
Plug 'airblade/vim-gitgutter'
|
2020-01-07 11:02:43 +00:00
|
|
|
Plug 'fidian/hexmode'
|
|
|
|
Plug 'scrooloose/nerdtree'
|
2019-12-26 19:59:01 +00:00
|
|
|
call plug#end()
|
2020-01-07 11:02:43 +00:00
|
|
|
|
|
|
|
" Nerd Tree Configuration
|
|
|
|
map <C-n> :NERDTreeToggle<CR>
|
|
|
|
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
|