2

I like vim. I think touching mice is dirty. But sometimes when my hand is already on a mouse, it sure would be nice to be able to scroll the text or click a location in the text and have the cursor jump there. Also, I wish I could copy and paste with command-c, command-v. Is there any software out there that answers this desire? How about for the Mac?

8

For linux (or at least the Debian family of distributions, e.g Ubuntu) there are the vim-gnome and vim-gtk packages.

For Mac there is MacVim, for Windows gvim. Both are linked from the vim download page.

12

On most systems :set mouse=a will enable your mouse inside vim even on the console.

I personally prefer using the vim keybindings, but some variant on:

:vmap <C-c> "*y
:imap <C-v> <ESC>"*gPa
:nmap <C-v> "*gP

Will probably do what you want for ctrl-c and ctrl-v

  • Hmm... maybe I'm doing something wrong, but I couldn't get the :set command to work. To experiment, I opened vim to trash.txt, inserted some text, and then pushed <esc>:set mouse=a – John Berryman Feb 3 '11 at 23:30
  • @John you put set mouse=a in the file ~/.vimrc. Read more here vim.wikia.com/wiki/Open_vimrc_file – phunehehe Feb 4 '11 at 2:45
  • 2
    @John If you are on Mac, the default Terminal.app does not support the mouse. Use iTerm. – Josh Lee Feb 4 '11 at 5:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.