mirror of https://tildegit.org/ben/dotfiles
some vim tips from begriffs' vim history post
parent
d38bddff8a
commit
22ee872d52
3
Makefile
3
Makefile
|
@ -82,7 +82,8 @@ sublime:
|
|||
|
||||
vim:
|
||||
@printf "$(YELLOW)--- vim ------------------------------------------------\n$(RESET)"
|
||||
mkdir -p ~/.vim/undodir
|
||||
mkdir -p ~/.vim/{undodir,swap,backup}
|
||||
chmod 700 ~/.vim/{undodir,swap,backup}
|
||||
git submodule update --init -- vim/.vim/bundle
|
||||
stow -t "$$HOME" vim
|
||||
|
||||
|
|
2
fzf/.fzf
2
fzf/.fzf
|
@ -1 +1 @@
|
|||
Subproject commit 315e568de006e80138f79c77d5508c7e4853e6b2
|
||||
Subproject commit 5c7dcaffe892dad764d0130ee49198646cd8fd73
|
|
@ -36,3 +36,8 @@
|
|||
upstream = log --oneline --no-merges HEAD..${1-$(git branch -lvv | perl -ne '/^\\\\*.*\\\\[(.*?)\\\\]/ and print \"$1\\n\"')}
|
||||
[rerere]
|
||||
enabled = true
|
||||
[merge]
|
||||
tool = vimdiff
|
||||
conflictstyle = diff3
|
||||
[mergetool]
|
||||
prompt = false
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 10029708ee50d300d4b5e3475610210d4b29c74d
|
||||
Subproject commit 994576d997a52b4c7828149e9f1325d1c4691ae2
|
|
@ -1 +1 @@
|
|||
Subproject commit bd0b87d36ad80e8acd94f22028d15ebb441b1c28
|
||||
Subproject commit 08a9a45dbc3cce0af3f246013240d71aa2519ac0
|
|
@ -1 +1 @@
|
|||
Subproject commit 7eeea63e62b1cc088a75c7a7c244fc774d82e5bb
|
||||
Subproject commit 71bbe88525c0b36f4f3843a2a577442bbd7fd957
|
|
@ -1 +1 @@
|
|||
Subproject commit 597068870b8f093a8b2d11536c62ff31222ee8d0
|
||||
Subproject commit fab8621670f71637e9960003af28365129b1dfd0
|
21
vim/.vimrc
21
vim/.vimrc
|
@ -12,6 +12,18 @@ set smarttab
|
|||
set tabstop=4
|
||||
set shiftwidth=4
|
||||
set expandtab
|
||||
|
||||
" swap settings
|
||||
set swapfile
|
||||
set directory^=~/.vim/swap//
|
||||
set writebackup
|
||||
set nobackup
|
||||
set backupcopy=auto
|
||||
" patch required to honor double slash
|
||||
if has("patch-8.1.0251")
|
||||
" consolidate writebackups
|
||||
set backupdir^=~/.vim/backup//
|
||||
end
|
||||
set undofile
|
||||
set undodir=~/.vim/undodir
|
||||
|
||||
|
@ -38,6 +50,15 @@ set tabpagemax=50
|
|||
noremap 0 ^
|
||||
noremap ^ 0
|
||||
|
||||
" shortcuts for 3way merge
|
||||
map <Leader>1 :diffget LOCAL<CR>
|
||||
map <Leader>2 :diffget BASE<CR>
|
||||
map <Leader>3 :diffget REMOTE<CR>
|
||||
|
||||
if has("patch-8.1.0360")
|
||||
set diffopt+=internal,algorithm:patience
|
||||
end
|
||||
|
||||
inoremap <C-U> <C-G>u<C-U>
|
||||
|
||||
cmap w!! w !sudo tee % >/dev/null
|
||||
|
|
Loading…
Reference in New Issue