config/nvim: enable backups & small fixes
This commit is contained in:
parent
e2faef48d6
commit
a25edaf163
|
@ -1,7 +1,15 @@
|
||||||
set termguicolors
|
set termguicolors
|
||||||
set mouse=a " Enable mouse in all modes
|
set mouse=a " Enable mouse in all modes
|
||||||
|
|
||||||
|
" persist undo & backup files
|
||||||
set undofile
|
set undofile
|
||||||
|
set backup
|
||||||
|
let &backupdir=expand(stdpath('data') . '/backup')
|
||||||
|
if !isdirectory(&backupdir)
|
||||||
|
execute "!mkdir " . &backupdir
|
||||||
|
endif
|
||||||
|
let &backupext="_" . strftime("%y%m%dT%H%M")
|
||||||
|
|
||||||
set wildmode=longest,list,full " Auto-completion for cmdline
|
set wildmode=longest,list,full " Auto-completion for cmdline
|
||||||
set clipboard+=unnamedplus " Merge with system clipboard
|
set clipboard+=unnamedplus " Merge with system clipboard
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ command! WS write <bar> source $MYVIMRC
|
||||||
|
|
||||||
command! FormatJSON %!python -m json.tool
|
command! FormatJSON %!python -m json.tool
|
||||||
command! DiffSwap :diffsp % " Diff for swap - replaced by 'chrisbra/Recover.vim'
|
command! DiffSwap :diffsp % " Diff for swap - replaced by 'chrisbra/Recover.vim'
|
||||||
|
"command! for dictcc
|
||||||
|
|
||||||
" Sane yanking
|
" Sane yanking
|
||||||
map Y y$
|
map Y y$
|
||||||
|
@ -15,7 +16,7 @@ nnoremap Q @q
|
||||||
|
|
||||||
let mapleader=" "
|
let mapleader=" "
|
||||||
|
|
||||||
nnoremap <leader>" ysiW"
|
nmap <leader>" ysiW"
|
||||||
|
|
||||||
" Alias write and quit to leader
|
" Alias write and quit to leader
|
||||||
nnoremap <leader>q :wq<CR>
|
nnoremap <leader>q :wq<CR>
|
||||||
|
|
|
@ -38,6 +38,7 @@ Plug 'junegunn/fzf' " File selection with :FZF
|
||||||
" Browse
|
" Browse
|
||||||
Plug 'tyru/open-browser.vim' " :OpenBrowser, :OpenBrowserSearch
|
Plug 'tyru/open-browser.vim' " :OpenBrowser, :OpenBrowserSearch
|
||||||
Plug 'tyru/open-browser-github.vim'
|
Plug 'tyru/open-browser-github.vim'
|
||||||
|
Plug 'KabbAmine/zeavim.vim' " Integrate with Zeal (Dash) offline documentation
|
||||||
|
|
||||||
" QOL
|
" QOL
|
||||||
Plug 'farmergreg/vim-lastplace' " Automatically jump to last edit position
|
Plug 'farmergreg/vim-lastplace' " Automatically jump to last edit position
|
||||||
|
|
Loading…
Reference in New Issue