mirror of
https://github.com/starr-dusT/dotfiles.git
synced 2025-02-19 19:27:31 -08:00
fix undo file and clipboard for vim
This commit is contained in:
parent
4766d8b16b
commit
305b4dc63d
@ -14,12 +14,22 @@ set shiftwidth=4
|
|||||||
set expandtab
|
set expandtab
|
||||||
|
|
||||||
" undos
|
" 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
|
set undofile
|
||||||
|
|
||||||
" map leader to Space
|
" map leader to Space
|
||||||
let mapleader = " "
|
let mapleader = " "
|
||||||
|
|
||||||
|
" clipboard
|
||||||
|
set clipboard=unnamedplus
|
||||||
|
set clipboard+=unnamed
|
||||||
|
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
" ui
|
" ui
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
@ -113,6 +123,10 @@ map <leader>pc :lnext<CR>
|
|||||||
" misc keys
|
" 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
|
" open help with word under cursor
|
||||||
map <leader>oh :execute "help " . expand("<cword>")<CR>
|
map <leader>oh :execute "help " . expand("<cword>")<CR>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user