update nvim config

This commit is contained in:
Santiago Forero 2021-08-24 10:36:05 -05:00
parent 5d4f620232
commit 8d68fbcb64
1 changed files with 19 additions and 32 deletions

View File

@ -1,35 +1,22 @@
if &compatible
set nocompatible
endif
" Tabs
set tabstop=4
set softtabstop=4
set expandtab
set backspace=indent,eol,start
set ruler
set suffixes+=.aux,.bbl,.blg,.brf,.cb,.dvi,.idx,.ilg,.ind,.inx,.jpg,.log,.out,.png,.toc
set suffixes-=.h
set suffixes-=.obj
" UI
set number
set showcmd
set nowrap
set mouse=a
" Move temporary files to a secure location to protect against CVE-2017-1000382
if exists('$XDG_CACHE_HOME')
let &g:directory=$XDG_CACHE_HOME
else
let &g:directory=$HOME . '/.cache'
endif
let &g:undodir=&g:directory . '/vim/undo//'
let &g:backupdir=&g:directory . '/vim/backup//'
let &g:directory.='/vim/swap//'
" Create directories if they doesn't exist
if ! isdirectory(expand(&g:directory))
silent! call mkdir(expand(&g:directory), 'p', 0700)
endif
if ! isdirectory(expand(&g:backupdir))
silent! call mkdir(expand(&g:backupdir), 'p', 0700)
endif
if ! isdirectory(expand(&g:undodir))
silent! call mkdir(expand(&g:undodir), 'p', 0700)
endif
set lazyredraw
set cursorline
" Make shift-insert work like in Xterm
if has('gui_running')
map <S-Insert> <MiddleMouse>
map! <S-Insert> <MiddleMouse>
endif
" Syntax
syntax on
set autoindent
filetype indent on
set wildmenu
set showmatch