summaryrefslogtreecommitdiff
path: root/.vim
diff options
context:
space:
mode:
authorMike Crute <mike@crute.us>2020-09-28 21:34:09 -0700
committerMike Crute <mike@crute.us>2020-09-28 21:35:27 -0700
commitbe40f2d3f13b7a44560efb6b97e5466864a58152 (patch)
tree3dc2099ebe9eed094ced6d80319b3b7bf73b8120 /.vim
parenta50241114aa81accef4a2ef22e9f33fd1724ea17 (diff)
downloaddotfiles-be40f2d3f13b7a44560efb6b97e5466864a58152.tar.bz2
dotfiles-be40f2d3f13b7a44560efb6b97e5466864a58152.tar.xz
dotfiles-be40f2d3f13b7a44560efb6b97e5466864a58152.zip
Support X11 cut/paste
Diffstat (limited to '.vim')
-rw-r--r--.vim/vimrc11
1 files changed, 11 insertions, 0 deletions
diff --git a/.vim/vimrc b/.vim/vimrc
index e3ff978..eea840a 100644
--- a/.vim/vimrc
+++ b/.vim/vimrc
@@ -163,6 +163,17 @@ function! SetColumnHighlighting(set_on)
163endfunction 163endfunction
164" }}} 164" }}}
165" Key Bindings {{{ 165" Key Bindings {{{
166" Copy and Paste to X11 Clipboard
167"
168" This is required because the terminal version of VIM often isn't compiled
169" with support for the xterm clipboard and I don't typically use an xterm
170" compatible terminal anyhow. Will read and write the X11 clipboard (C-c, C-v)
171" using the xclip command instead.
172if executable("xclip")
173 nnoremap <silent> <leader>cp :read !xclip -o -selection CLIPBOARD<CR>
174 vnoremap <silent> <leader>cc :'<,'>w !xclip -selection clipboard -i<CR><CR>
175endif
176
166" Tab Key Bindings 177" Tab Key Bindings
167nnoremap tm :tabmove<CR> 178nnoremap tm :tabmove<CR>
168nnoremap tc :tabclose<CR> 179nnoremap tc :tabclose<CR>