aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authortypebrook <typebrook@gmail.com>2019-03-12 17:47:06 +0800
committertypebrook <typebrook@gmail.com>2019-03-12 17:47:06 +0800
commit2fddc277815b8e09ef80279d94578735481ec435 (patch)
treee73ad022e895cd6b6c41cc571c0ff51b6653d2e4
parentc738efc6a2022eff8cd9367dafe653f02bb0db4e (diff)
update
-rw-r--r--alias1
-rw-r--r--tigrc2
-rw-r--r--vimrc35
3 files changed, 36 insertions, 2 deletions
diff --git a/alias b/alias
index c667730..af563a1 100644
--- a/alias
+++ b/alias
@@ -71,6 +71,7 @@ alias tg='tig grep'
71alias tr='tig refs' 71alias tr='tig refs'
72alias tl='tig log' 72alias tl='tig log'
73alias ty='tig stash' 73alias ty='tig stash'
74alias rl='git reflog --pretty=raw | tig --pretty=raw'
74 75
75# Android 76# Android
76alias debug='./gradlew app:installDebug && adb shell am start -n adb shell am start -n com.geothings.geobingan/.MainActivity_' 77alias debug='./gradlew app:installDebug && adb shell am start -n adb shell am start -n com.geothings.geobingan/.MainActivity_'
diff --git a/tigrc b/tigrc
index 42919a2..fcdc1e0 100644
--- a/tigrc
+++ b/tigrc
@@ -49,7 +49,7 @@ set blame-view-line-number = yes,interval=5
49# status view 49# status view
50bind status s ?git stash 50bind status s ?git stash
51bind status S @git stash save "%(prompt Enter stash name: )" 51bind status S @git stash save "%(prompt Enter stash name: )"
52bind status p ?git stash pop 52bind status p !git checkout --patch -- %(file)
53bind status D ?rm %(file) 53bind status D ?rm %(file)
54bind status a ?git commit --amend 54bind status a ?git commit --amend
55bind status j :/^[MADRU?] 55bind status j :/^[MADRU?]
diff --git a/vimrc b/vimrc
index 78ce6ac..8d7a82a 100644
--- a/vimrc
+++ b/vimrc
@@ -13,9 +13,42 @@ set siso=999
13let g:vim_markdown_conceal = 0 13let g:vim_markdown_conceal = 0
14 14
15nmap <c-c> :q<cr> 15nmap <c-c> :q<cr>
16nnoremap <leader>r :.w !bash<cr> 16nnoremap <leader>t :.w !bash<cr>
17nnoremap <leader>tt :TableFormat<cr> 17nnoremap <leader>tt :TableFormat<cr>
18 18
19let g:vim_markdown_folding_disabled = 1
20source ~/.vim_runtime/vimrcs/redir.vim
21
22"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
23" => Redirect the output of a Vim or external command into a scratch buffer
24"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
25" Copy from : https://gist.github.com/romainl/eae0a260ab9c135390c30cd370c20cd7
26" Usage:
27" :Redir hi ............. show the full output of command ':hi' in a scratch window
28" :Redir !ls -al ........ show the full output of command ':!ls -al' in a scratch window
29"
30function! Redir(cmd)
31 for win in range(1, winnr('$'))
32 if getwinvar(win, 'scratch')
33 execute win . 'windo close'
34 endif
35 endfor
36 if a:cmd =~ '^!'
37 let output = system(matchstr(a:cmd, '^!\zs.*'))
38 else
39 redir => output
40 execute a:cmd
41 redir END
42 endif
43 vnew
44 let w:scratch = 1
45 setlocal buftype=nofile bufhidden=wipe nobuflisted noswapfile
46 call setline(1, split(output, "\n"))
47endfunction
48
49command! -nargs=1 -complete=command Redir silent call Redir(<q-args>)
50nnoremap <leader>r :Redir
51
19 52
20""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 53"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
21" => Make Alt key works on Gnome terminal 54" => Make Alt key works on Gnome terminal