" Open a new buffer in a vertical split with + v nnoremap v :vnew " Open a new buffer in a horizontal split with + h nnoremap - :new " Map + n to clear search highlights nnoremap n :nohlsearch " --- Line Numbers --- set number " show absolute line number on cursor line set relativenumber " show relative line numbers elsewhere " --- Color Scheme --- colorscheme darkblue " built-in Vim colorscheme " --- Show $ at end of each line --- set list " enable showing invisible characters set listchars=eol:$ " show '$' at end of each line " --- Highlight Current Line --- set cursorline " enable highlight highlight CursorLine cterm=underline " underline in terminal Vim " Light blue background for the current line highlight CursorLine cterm=none ctermbg=lightblue guibg=LightBlue " blue background (cterm color 19) OR 90 Purple looks GREAT highlight CursorLine cterm=underline ctermbg=90 ctermfg=226 gui=underline guibg=#add8e6 guifg=#ffff00 " ******* " Ensure cursor line highlight overrides colorscheme autocmd ColorScheme * highlight CursorLine cterm=none ctermbg=90 guibg=#00005f autocmd ColorScheme * highlight CursorLine cterm=underline ctermfg=226 gui=underline guifg=#ffff00 " better Searching options set ignorecase " case-insensitive search… set smartcase " …unless search contains uppercase set incsearch " show matches as you type set hlsearch " highlight all matches " Highlight trailing whitespace highlight ExtraWhitespace ctermbg=darkred guibg=#5f0000 " Use autocmd to apply the match for trailing whitespace autocmd BufRead,BufWrite * match ExtraWhitespace /\s\+$/ " Ensure highlight is set after colorscheme is loaded autocmd ColorScheme * highlight ExtraWhitespace ctermbg=darkred guibg=#5f0000 " Keep a visual column guide set colorcolumn=100 highlight ColorColumn ctermbg=90 guibg=#2c2c2c " This line is needed to OVERRIDE the plugins that mess with the colours. autocmd ColorScheme * highlight ColorColumn ctermbg=235 guibg=#2e2e2e " Show matching brackets set showmatch " VIM Status Bar set laststatus=2 set ruler set showcmd " Custom status line set statusline=%f\ %m\ %y\ %r\ %{&fileencoding}\ [%l,%c/%L]\ [%p%%] " Better sane window splitting positions. set splitbelow set splitright " --- Set leader key to Space --- let mapleader=" " " --- Custom split mappings --- " + s + v => vertical split nnoremap sv :vsplit " + s + h => horizontal split nnoremap sh :split " --- Split navigation mappings --- " Move to left/right/up/down split using + h/j/k/l nnoremap h h nnoremap j j nnoremap k k nnoremap l l " ZOOM windows splits " leader + and leader - to zoom in and out noremap + _ \| \| noremap - =