More vimrc tweaks and cleanups (also a new color scheme)
This commit is contained in:
37
.vimrc
37
.vimrc
@@ -5,7 +5,7 @@ set nocompatible " be iMproved, required
|
||||
set number " turn on line numbers
|
||||
set relativenumber " lines are numbered relative to current line
|
||||
set scrolloff=8 " number of lines to keep above and below the cursor
|
||||
set noerrorbells visualbell t_vb= " no sound on errors
|
||||
set belloff=all " no sound/flash on errors
|
||||
|
||||
set autoread " set to auto read when a file is changed from the outside
|
||||
"set cursorcolumn " highlight current column
|
||||
@@ -19,6 +19,15 @@ set wildmenu
|
||||
|
||||
autocmd! bufwritepost .vimrc source ~/.vimrc " When vimrc is edited, reload it
|
||||
|
||||
" Turn line numbers on/off for active/inactive buffers
|
||||
augroup BgHighlight
|
||||
autocmd!
|
||||
autocmd WinEnter * set number
|
||||
autocmd WinEnter * set relativenumber
|
||||
autocmd WinLeave * set nonumber
|
||||
autocmd WinLeave * set norelativenumber
|
||||
augroup end
|
||||
|
||||
syntax enable
|
||||
filetype plugin on
|
||||
|
||||
@@ -85,22 +94,15 @@ call plug#end()
|
||||
"set termguicolors
|
||||
"colorscheme slate
|
||||
"colorscheme marklar
|
||||
colorscheme automation
|
||||
"colorscheme automation
|
||||
colorscheme advantage
|
||||
|
||||
highlight colorcolumn ctermbg=darkgray guibg=darkgray
|
||||
highlight VertSplit ctermbg=black guibg=black ctermfg=darkgray guifg=darkgray
|
||||
|
||||
" In split windows - active buffer status bar is red, inactive is gray
|
||||
highlight statuslinenc ctermbg=darkgray guibg=darkgray
|
||||
highlight statusline ctermbg=darkred guibg=darkred
|
||||
|
||||
" ---------------------------------------------------------------------------------------------------------------------
|
||||
" ==> Autocompletion
|
||||
|
||||
"let s:python_version=3
|
||||
"echomsg 'Using python'.s:python_version
|
||||
set completeopt=menuone,noinsert,noselect
|
||||
set shortmess+=c " Turn off completion messages
|
||||
" In split windows - active buffer status bar is yellow, inactive is black
|
||||
hi statuslinenc ctermbg=gray ctermfg=black
|
||||
hi statusline ctermbg=black ctermfg=green
|
||||
|
||||
" ---------------------------------------------------------------------------------------------------------------------
|
||||
" => Statusline
|
||||
@@ -188,12 +190,8 @@ hi clear SpellCap
|
||||
hi clear SpellErrors
|
||||
hi clear SpellLocal
|
||||
hi clear SpellRare
|
||||
"hi SpellBad cterm=underline,bold ctermfg=red
|
||||
hi SpellBad cterm=underline ctermbg=black ctermfg=darkred guibg=black guifg=darkred
|
||||
"hi SpellCap cterm=underline,bold ctermfg=blue
|
||||
hi SpellCap cterm=underline ctermbg=black ctermfg=darkred
|
||||
"hi SpellErrors cterm=underline,bold ctermfg=blue
|
||||
hi SpellErrors cterm=underline ctermbg=black ctermfg=darkred
|
||||
hi SpellBad cterm=underline ctermbg=black ctermfg=red
|
||||
hi SpellCap cterm=underline ctermbg=black ctermfg=red
|
||||
|
||||
" ---------------------------------------------------------------------------------------------------------------------
|
||||
" ==> Spellcheck: only certain file types https://robots.thoughtbot.com/vim-spell-checking
|
||||
@@ -204,7 +202,6 @@ autocmd BufRead,BufNewFile * setlocal nospell
|
||||
autocmd BufRead,BufNewFile *.* setlocal nospell
|
||||
" turn on for markdown files
|
||||
autocmd BufRead,BufNewFile *.md setlocal spell
|
||||
autocmd BufRead,BufNewFile *.mkd setlocal spell
|
||||
" turn on for text files
|
||||
autocmd BufRead,BufNewFile *.txt setlocal spell
|
||||
|
||||
|
||||
Reference in New Issue
Block a user