Add basic vimrc

This commit is contained in:
Akbar Rahman 2021-08-22 20:37:09 +01:00
parent 512282e379
commit 17319d9ac1
Signed by: alvierahman90
GPG Key ID: 20609519444A1269

39
basic.vimrc Normal file
View File

@ -0,0 +1,39 @@
" my basic minimal vimrc for easy installation:
" curl https://notes.alv.cx/basic.vimrc > ~/.vimrc
set number
set relativenumber
set lazyredraw
set undofile
set undodir=~/.undodir
set ignorecase
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
noremap H ^
noremap L $
noremap ^ H
noremap $ L
hi Normal ctermbg=None
highlight VertSplit cterm=None ctermfg=8 ctermbg=None
highlight StatusLine cterm=underline ctermfg=8 ctermbg=None
highlight StatusLineNC cterm=underline ctermfg=8 ctermbg=None
highlight LineNr ctermfg=8 ctermbg=None
highlight LineNrAbove ctermfg=8 ctermbg=None
highlight LineNrBelow ctermfg=8 ctermbg=None
highlight CursorLineNr ctermfg=8 ctermbg=None
highlight FoldColumn ctermfg=8 ctermbg=None
highlight SignColumn ctermfg=8 ctermbg=None
au VimEnter,WinEnter,BufWinEnter * setlocal cursorline
au VimEnter,WinEnter,BufWinEnter * setlocal cursorcolumn
au WinLeave,BufLeave,BufWinLeave * setlocal nocursorline
au WinLeave,BufLeave,BufWinLeave * setlocal nocursorcolumn
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
autocmd FileType yml setlocal ts=2 sts=2 sw=2 expandtab