notes/basic.vimrc

40 lines
1.1 KiB
Plaintext
Raw Normal View History

2021-08-22 19:37:09 +00:00
" my basic minimal vimrc for easy installation:
2021-08-22 19:38:44 +00:00
" curl https://notes.alv.cx/notes/basic.vimrc > ~/.vimrc
2021-08-22 19:37:09 +00:00
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