Created
July 22, 2008 19:03
-
-
Save tsukkee/1207 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" reference | |
" http://subtech.g.hatena.ne.jp/cho45/20061010/1160459376 | |
" http://vim.wikia.com/wiki/Mac_OS_X_clipboard_sharing | |
" | |
" need 'set enc=utf-8' and | |
" below shell environment variable for UTF-8 characters | |
" export __CF_USER_TEXT_ENCODING='0x1F5:0x08000100:14' | |
" | |
" Vim(Mac) | |
if has('mac') && !has('gui') | |
nnoremap <silent> <Space>y :.w !pbcopy<CR><CR> | |
vnoremap <silent> <Space>y :w !pbcopy<CR><CR> | |
nnoremap <silent> <Space>p :r !pbpaste<CR> | |
vnoremap <silent> <Space>p :r !pbpaste<CR> | |
" GVim(Mac & Win) | |
else | |
noremap <Space>y "+y | |
noremap <Space>p "+p | |
endif | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment