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?

2 Answers 2

13

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

3
  • 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 Feb 3, 2011 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, 2011 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, 2011 at 5:17
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.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .