config/nvim: enable backups & small fixes
This commit is contained in:
parent
e2faef48d6
commit
a25edaf163
|
@ -1,7 +1,15 @@
|
|||
set termguicolors
|
||||
set mouse=a " Enable mouse in all modes
|
||||
|
||||
" persist undo & backup files
|
||||
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 clipboard+=unnamedplus " Merge with system clipboard
|
||||
|
||||
|
|
|
@ -7,15 +7,16 @@ command! WS write <bar> source $MYVIMRC
|
|||
|
||||
command! FormatJSON %!python -m json.tool
|
||||
command! DiffSwap :diffsp % " Diff for swap - replaced by 'chrisbra/Recover.vim'
|
||||
"command! for dictcc
|
||||
|
||||
" Sane yanking
|
||||
map Y y$
|
||||
" Disable Ex mode - https://vi.stackexchange.com/q/457
|
||||
nnoremap Q @q
|
||||
|
||||
|
||||
let mapleader=" "
|
||||
|
||||
nnoremap <leader>" ysiW"
|
||||
nmap <leader>" ysiW"
|
||||
|
||||
" Alias write and quit to leader
|
||||
nnoremap <leader>q :wq<CR>
|
||||
|
|
|
@ -38,6 +38,7 @@ Plug 'junegunn/fzf' " File selection with :FZF
|
|||
" Browse
|
||||
Plug 'tyru/open-browser.vim' " :OpenBrowser, :OpenBrowserSearch
|
||||
Plug 'tyru/open-browser-github.vim'
|
||||
Plug 'KabbAmine/zeavim.vim' " Integrate with Zeal (Dash) offline documentation
|
||||
|
||||
" QOL
|
||||
Plug 'farmergreg/vim-lastplace' " Automatically jump to last edit position
|
||||
|
|
Loading…
Reference in New Issue