5 ms·
The most valuable two settings I know for this are: set ttymouse=xterm2 set mouse=n Now you can use the mouse to resize buffers and click on tabs. You can ev
by kristopolous 14y ago
The most valuable two settings I know for this are:
set ttymouse=xterm2
set mouse=n
Now you can use the mouse to resize buffers and click on tabs. You can even click to focus on a buffer and don't need to meta-press your way around when you just want to browse things. Go on, click on topics inside of the help, assign the right click to supertab[1], navigate NerdTree[2] like the explorer clone it is. Collapse and expand code folds[3] like a 21st century digital boy.[4]
Furthermore, your scrollwheel all of a sudden now scrolls through your document in putty, xterm, screen, rxvt, tmux, iterm; all of them. Yes, total heresy, I know.
The only thing more important than this is doing a visual selection[5] and then doing a :!(any program) like say: fmt, sort, mail, python, rdoc, indent, bc ...
I know what you are thinking; "But kristopolous, this is so easy; it is not possible". Relax my friend, this is unix, you know this.
PS: Here's my custom vim builder/environment maker: https://github.com/kristopolous/vimbuild https://github.com/kristopolous/vimbuild
[1] http://www.vim.org/scripts/script.php?script_id=1658 http://www.vim.org/scripts/script.php?script_id=1658
[2] http://www.vim.org/scripts/script.php?script_id=1643 http://www.vim.org/scripts/script.php?script_id=1643
[3] http://vimdoc.sourceforge.net/htmldoc/fold.html http://vimdoc.sourceforge.net/htmldoc/fold.html
[4] http://www.youtube.com/watch?v=ZN6kCgMUjFw http://www.youtube.com/watch?v=ZN6kCgMUjFw
[5] http://vimdoc.sourceforge.net/htmldoc/visual.html http://vimdoc.sourceforge.net/htmldoc/visual.html
- jlgreco 14y agoDo you mean `set mouse=a`? `n` just makes it work while in normal mode iirc, while `a` should work in any mode.
- deleted 14y ago[deleted]
- deleted 14y ago[deleted]
- michaelmior 14y agoI was excited for a minute, but the ttymouse change did nothing for me on Mac OS Terminal with vim 7.3.
- notJim 14y agoI thought this was fixed in Lion, but I believe it used to be the case that OS X terminal didn't support mouse. Check out iTerm 2 instead.
- michaelmior 14y agoThanks :) That seems to have done the trick. Now I just need to get my color scheme working right in iTerm. Still pretty new to Mac OS. I'm really a Linux guy.
- dillona 14y agoiTerm 2 and Homebrew really make OS X a lot more bearable for me Switching to zsh and oh-my-zsh has helped a lot too
- ehsanu1 14y agoI always used terminal vim when on Linux, but after I got a macbook (from work - I'd never buy one), I'm pretty happy with MacVim. Give it a shot. Pretty much everything works out of the box as with the terminal version, you just get a few usability improvements (OS-integrated clipboard, mouse selections create vim selections and vice versa, etc).
- lloeki 14y ago> OS X terminal didn't support mouse It does not, you have to use the MouseTerm SIMBL plugin.
- graywh 14y agottymouse=xterm2 doesn't work with tmux. And generally, vim will set 'ttym' correctly for you.
- spolu 14y agoThe mouse?? But what for?