aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2014-11-15 16:02:17 -0500
committerTeddy Wing2014-11-15 16:02:17 -0500
commit86b481a79e92bc50b2bd9031ff585b7ab5795f1c (patch)
tree1175314cf1a9d792e56b250cafa42899a2009729
parentcde8cf577babc5675909dc61c2f2e9eb0eaee8b4 (diff)
downloaddotvim-86b481a79e92bc50b2bd9031ff585b7ab5795f1c.tar.bz2
vimrc: Add <leader>p mapping
Add a mapping to read from the OS X pasteboard. Pasting directly in insert mode is excessively slow when dealing with a lot of text. Likely caused by too much redrawing. Reading directly from the OS X pasteboard is much faster, so add a mapping for that.
-rw-r--r--vimrc7
1 files changed, 7 insertions, 0 deletions
diff --git a/vimrc b/vimrc
index a62bd61..4d32cd7 100644
--- a/vimrc
+++ b/vimrc
@@ -262,6 +262,10 @@
" * Set sessionoptions-=options so that options and mappings are not
" saved in vim sessions.
"
+" 2014.11.15:
+" * Add <leader>p mapping to read from the OS X pasteboard. Much faster
+" than pasting directly if you're dealing with a lot of text.
+"
" Pathogen
@@ -573,6 +577,9 @@ nnoremap <leader>r :edit!<cr>
cnoremap <Esc>b <S-Left>
cnoremap <Esc>f <S-Right>
+" Read from OS X pasteboard for faster pasting
+nnoremap <leader>p :read !pbpaste<cr>
+
" Commands