aboutsummaryrefslogtreecommitdiff
path: root/files/.vimrc
diff options
context:
space:
mode:
authorAnton Bobov <abobov@gmail.com>2014-07-09 15:29:44 +0600
committerAnton Bobov <abobov@gmail.com>2014-07-09 22:17:43 +0600
commitc82f91eff5edd473875689e20237add1d9bc4db3 (patch)
tree1f9eede40ea332e580bc5d0762d7f818ea46f345 /files/.vimrc
parentcd757d30dd3553f09b17d8db70bc2073a526def2 (diff)
Add vim scratch plugin.
Diffstat (limited to 'files/.vimrc')
-rw-r--r--files/.vimrc17
1 files changed, 17 insertions, 0 deletions
diff --git a/files/.vimrc b/files/.vimrc
index 73a1c69..75b1239 100644
--- a/files/.vimrc
+++ b/files/.vimrc
@@ -295,6 +295,23 @@ let NERDTreeChDirMode = 2
" Sparkup{{{2
let g:sparkupNextMapping = '<c-x>'
+
+" Scratch {{{
+
+function! ScratchToggle()
+ if exists("w:is_scratch_window")
+ unlet w:is_scratch_window
+ exec "q"
+ else
+ exec "norm! :Sscratch\<cr>\<c-w>l"
+ let w:is_scratch_window = 1
+ endif
+endfunction
+command! ScratchToggle call ScratchToggle()
+
+nnoremap <silent> <Leader><Tab> :ScratchToggle<cr>
+
+" }}}
" Load custom local config{{{1
let s:local_vimrc=$MYVIMRC . ".local"
if filereadable(s:local_vimrc)