mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2025-06-30 12:30:43 +00:00
Decentralize nvim config
This commit is contained in:
parent
5e0fcc415b
commit
cc74d65b0a
9 changed files with 192 additions and 140 deletions
15
home/.config/nvim/rc/autocmd.vim
Normal file
15
home/.config/nvim/rc/autocmd.vim
Normal file
|
@ -0,0 +1,15 @@
|
|||
" Move ~/.viminfo to XDG_CACHE_HOME
|
||||
"set viminfofile=$XDG_CACHE_HOME/vim/viminfo
|
||||
|
||||
" Disable automatic commenting on newline
|
||||
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
|
||||
|
||||
" Have Vim jump to the last position when reopening a file
|
||||
autocmd BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\""
|
||||
|
||||
" Automatically deletes all trailing whitespace on save
|
||||
autocmd BufWritePre * %s/\s\+$//e
|
||||
|
||||
" Vertically center document when entering insert mode
|
||||
"autocmd InsertEnter * norm zz
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue