This repository has been archived on 2021-12-21. You can view files and clone it, but cannot push or open issues/pull-requests.
neovim-config/init/settings.vim

61 lines
1.8 KiB
VimL

" Colorscheme
" This forces (Neo)Vim to assume the terminal supports 256 colors.
" Without this, some colorschemes (including mine) don't work properly.
set termguicolors
" Set colorscheme
colorscheme flattened_dark
hi Normal guibg=NONE ctermbg=NONE
hi LineNr ctermfg=NONE ctermbg=NONE
" Line numbers
" I use the combination of absolute and relative line numbers. On the
" current line, it shows the absolute; on all the others, the relative.
" This shows the absolute line number
set number
" This shows the relative line numbers
set relativenumber
" Splits
" I prefer the logic of 'open your main window first, and all other
" afterwards'.
" Make horizontal splits appear below active window
set splitbelow
" Same for vertical splits, but to the right of active window
set splitright
" Indentation
" This makes Vim use spaces instead of tabs for indentation
set expandtab
" This sets each indent to be 4 characters wide (4 spaces with expandtab on)
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
" 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
" Make Vim use pipes instead of temp files when running commands
" set noshelltemp