2019-07-22 18:07:59 +00:00
|
|
|
|
" Enable syntax highlighting
|
2019-03-01 10:14:29 +00:00
|
|
|
|
syntax on
|
2019-07-22 18:07:59 +00:00
|
|
|
|
" Enable line numbers
|
2019-03-01 21:17:53 +00:00
|
|
|
|
set number
|
2019-07-22 18:07:59 +00:00
|
|
|
|
" Enable desert theme
|
2019-03-01 21:17:53 +00:00
|
|
|
|
colorscheme desert
|
2019-07-22 18:07:59 +00:00
|
|
|
|
" Always show status line
|
2019-03-01 21:17:53 +00:00
|
|
|
|
set laststatus=2
|
2019-07-22 18:07:59 +00:00
|
|
|
|
|
|
|
|
|
" Highlight unwanted spaces :
|
|
|
|
|
" 1. highlight trailing whitespace in red
|
|
|
|
|
" 2. have this highlighting not appear whilst you are typing in insert mode
|
|
|
|
|
" 3. have the highlighting of whitespace apply when you open new buffers
|
2019-06-23 09:00:54 +00:00
|
|
|
|
highlight ExtraWhitespace ctermbg=red guibg=red
|
|
|
|
|
match ExtraWhitespace /\s\+$/
|
|
|
|
|
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
|
|
|
|
|
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
|
|
|
|
|
autocmd InsertLeave * match ExtraWhitespace /\s\+$/
|
2019-07-22 18:07:59 +00:00
|
|
|
|
autocmd BufWinLeave * call clearmatches()
|
|
|
|
|
|
|
|
|
|
" Don’t create backups when editing files in certain directories
|
|
|
|
|
set backupskip=/tmp/*,/private/tmp/*
|
|
|
|
|
" Ignore case of searches
|
|
|
|
|
set ignorecase
|
|
|
|
|
" Highlight current line
|
|
|
|
|
set cursorline
|
|
|
|
|
" Highlight dynamically as pattern is typed
|
|
|
|
|
set incsearch
|
|
|
|
|
" Highlight searches
|
|
|
|
|
set hlsearch
|
|
|
|
|
" Disable error bells
|
|
|
|
|
set noerrorbells
|
|
|
|
|
" Don’t show the intro message when starting Vim
|
|
|
|
|
set shortmess=atI
|
|
|
|
|
" Show the filename in the window titlebar
|
|
|
|
|
set title
|
|
|
|
|
" Start scrolling three lines before the horizontal window border
|
|
|
|
|
set scrolloff=3
|
|
|
|
|
|
|
|
|
|
" Default colors for highlighting search result
|
|
|
|
|
hi Search ctermfg=White
|
|
|
|
|
hi Search ctermbg=DarkMagenta
|