58 lines
1.4 KiB
VimL
58 lines
1.4 KiB
VimL
" Colorscheme
|
|
" Tell Neovim to use 256 colors
|
|
set termguicolors
|
|
" Set colorscheme
|
|
colorscheme flattened_dark
|
|
|
|
" Line numbers
|
|
" Show absolute line number on current line
|
|
set number
|
|
" Show relative line number on all other lines
|
|
set relativenumber
|
|
|
|
" Splits
|
|
" Make horizontal splits appear below active window
|
|
set splitbelow
|
|
" Same for vertical splits, but to the right of active window
|
|
set splitright
|
|
|
|
" Indentation
|
|
" Replace tabs with spaces
|
|
set expandtab
|
|
" Width of a tab; with expandtab on, this sets by how many spaces it should be
|
|
" replaced
|
|
set tabstop=4
|
|
" Number of spaces that should be used for auto indentation
|
|
set shiftwidth=4
|
|
|
|
" Search functionality
|
|
" Show matches as pattern is being typed
|
|
set incsearch
|
|
" Ignore case as long as there are no capital letters in the pattern
|
|
set smartcase
|
|
" Don't hightlight search results after search is finished
|
|
set nohlsearch
|
|
|
|
function SetDirs()
|
|
let filedir = expand('%:h')
|
|
let &l:directory = filedir . '/.vim/swap'
|
|
let &l:undodir = filedir . '/.vim/undo'
|
|
endfunction
|
|
|
|
" autocmd BufReadPre * call SetDirs()
|
|
" Turn on swap files
|
|
set swapfile
|
|
set directory=./.vim/swap//
|
|
" Create file backups
|
|
" set backup
|
|
" Store backups in .vim directory, next to swap files
|
|
" set backupdir=./.vim/backup/,
|
|
" Temporary, until I've found a fix
|
|
set nobackup
|
|
" Create an undo file for each file; this makes undo persistent
|
|
set undofile
|
|
set undodir=./.vim/undo//
|
|
|
|
" Increases speed of CoC and Gitgutter
|
|
set updatetime=250
|