diff options
author | Mike Crute <mike@crute.us> | 2020-09-28 21:34:09 -0700 |
---|---|---|
committer | Mike Crute <mike@crute.us> | 2020-09-28 21:35:27 -0700 |
commit | be40f2d3f13b7a44560efb6b97e5466864a58152 (patch) | |
tree | 3dc2099ebe9eed094ced6d80319b3b7bf73b8120 /.vim | |
parent | a50241114aa81accef4a2ef22e9f33fd1724ea17 (diff) | |
download | dotfiles-be40f2d3f13b7a44560efb6b97e5466864a58152.tar.bz2 dotfiles-be40f2d3f13b7a44560efb6b97e5466864a58152.tar.xz dotfiles-be40f2d3f13b7a44560efb6b97e5466864a58152.zip |
Support X11 cut/paste
Diffstat (limited to '.vim')
-rw-r--r-- | .vim/vimrc | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -163,6 +163,17 @@ function! SetColumnHighlighting(set_on) | |||
163 | endfunction | 163 | endfunction |
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. | ||
172 | if 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> | ||
175 | endif | ||
176 | |||
166 | " Tab Key Bindings | 177 | " Tab Key Bindings |
167 | nnoremap tm :tabmove<CR> | 178 | nnoremap tm :tabmove<CR> |
168 | nnoremap tc :tabclose<CR> | 179 | nnoremap tc :tabclose<CR> |