Skip to content

Commit

Permalink
smarter use of the systems clipboard
Browse files Browse the repository at this point in the history
  • Loading branch information
paukul committed Feb 9, 2012
1 parent 8f80c28 commit aa5c994
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions vimrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
" are we on a mac?
if has("unix")
let s:uname = system("uname")
if s:uname == "Darwin\n"
let isMac = 1
else
let isMac = 0
endif
endif

" Pathogene
call pathogen#infect()

Expand Down Expand Up @@ -65,21 +75,13 @@ noremap <S-K> <C-W>k<C-W>_
noremap <S-L> <C-W>l<C-W>_
noremap <S-H> <C-W>h<C-W>_
if has("unix")
let s:uname = system("uname")
if s:uname == "Darwin\n"
let isMac = 1
else
let isMac = 0
endif
endif

" Filetypes
au BufRead,BufNewFile {Gemfile,Rakefile,Vagrantfile,Thorfile,config.ru} set ft=ruby
au BufNewFile,BufRead *.json set ft=javascript

if isMac
set clipboard=unnamed
" copy stuff to the macs clipboard
vmap <leader>c "+y
endif

" Mappings
Expand Down

0 comments on commit aa5c994

Please sign in to comment.