dotfiles/nvim.configlink/init.vim
2020-07-27 13:00:26 -04:00

57 lines
1.7 KiB
VimL

" Vim Config
syntax enable " Syntax highlighting
set termguicolors " Set to truecolor
colorscheme gruvbox " Installed in autoload/ and colors/
set number " Show line numbers
set relativenumber " Relative numbers instead of absolute
set expandtab " Tabs into spaces
set shiftwidth=4 " Amount to shift with > key
set softtabstop=4 " Amount to shift with TAB key
set ignorecase " Ignore case when searching
set smartcase " Check case when using capitals in search
set incsearch " Search while typing
set pastetoggle=<F3>
set visualbell
set clipboard+=unnamedplus " Uses system clipboard for yanking
" Remember last position
if has("autocmd")
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g`\"" | endif
endif
" Terraform plugin
let g:terraform_align=1
let g:terraform_remap_spacebar=1
" Line type
let &t_ti.="\e[1 q"
let &t_SI.="\e[5 q"
let &t_EI.="\e[1 q"
let &t_te.="\e[0 q"
" Better backup, swap and undo storage
set noswapfile " Instead of swaps, create backups (less annoying)
set backup " Easier to recover and more secure
set undofile " Keeps undos after quit
set backupdir=~/.vim/dirs/backup
set undodir=~/.vim/dirs/undo
" Create backup directories if they don't exist
if !isdirectory(&backupdir)
call mkdir(&backupdir, "p")
endif
if !isdirectory(&undodir)
call mkdir(&undodir, "p")
endif
" Mouse interaction / scrolling
set mouse=nv
" Change title
let &titlestring = @%
set title