fix undo file and clipboard for vim

This commit is contained in:
Tyler Starr 2023-12-28 22:37:11 -08:00
parent 4766d8b16b
commit 305b4dc63d

View File

@ -14,12 +14,22 @@ set shiftwidth=4
set expandtab
" undos
set undodir="~/.vim/undodir"
if !isdirectory($HOME."/.vim")
call mkdir($HOME."/.vim", "", 0770)
endif
if !isdirectory($HOME."/.vim/undo-dir")
call mkdir($HOME."/.vim/undo-dir", "", 0700)
endif
set undodir=~/.vim/undo-dir
set undofile
" map leader to Space
let mapleader = " "
" clipboard
set clipboard=unnamedplus
set clipboard+=unnamed
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" ui
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
@ -113,6 +123,10 @@ map <leader>pc :lnext<CR>
" misc keys
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" yank and paste from system clipboard
map <leader>y :"+y <cr>
map <leader>p :"+p <cr>p
" open help with word under cursor
map <leader>oh :execute "help " . expand("<cword>")<CR>