The name given to the OS X port of gVim, the popular editor.
28
votes
4answers
10k views
The best way to make MacVim's vim (console, not mvim) the default instead of Mac OS X's vim?
I installed MacVim using homebrew. (brew install macvim). If I call mvim from cmd, it opens the GUI MacVim.
I would like to make vim call the MacVim's Vim ...
14
votes
3answers
2k views
copy-paste not working in MacVim when launched in tmux
MacVim's copy-paste stops working when I launch it from a tmux terminal (on zsh). If I exit tmux and then launch MacVim copy-past works. Any idea how to fix this?
13
votes
2answers
2k views
How can I use the Homebrew Python with Homebrew MacVim on Mountain Lion?
I originally asked and answered this question: How can I use the Homebrew Python version with Homebrew MacVim?
These instructions worked on Snow Leopard using Xcode 4.0.1 and associated developer ...
13
votes
1answer
3k views
How do you set the default window size in MacVim?
The default window size appears to be 24x80 but I'd prefer to set it so new windows appear in the size 50x90. Is there a way to set this default?
13
votes
5answers
758 views
How can I discard my undo history in vim?
Undo is nice to have in Vim. But sometimes, at a known good point, I want to erase my undo history - to be able to use u to undo individual changes, but only back to a certain point. (For instance, ...
12
votes
1answer
2k views
MacVim: Re-map command key combinations like <d-f>
I can remap unused combinations like <d-1> (Cmd+1) in MacVim, but there are many combinations like <d-f>, <d-o> or <d-b> that are already bound to MacVim menu items. If I try ...
11
votes
3answers
5k views
How do I open a blank new file in a split in Vim?
Must be something super obvious, but I can't figure out, and Google is not helping out either.
11
votes
1answer
1k views
How can I use the Homebrew Python version with Homebrew MacVim on Snow Leopard?
Note: For Mountain Lion, see: How can I use the Homebrew Python with Homebrew MacVim on Mountain Lion?
I've installed Python 2.7 with Homebrew on Mac OS X Snow Leopard. When I install MacVim ...
11
votes
1answer
2k views
Where does VIM (gvim/macvim) keep swap files for unsaved/unnamed buffers?
Where does VIM (gvim/macvim) keep swap files for unsaved/unnamed buffers? (If it does so at all).
Background:
Throughout a semi intense seminar I was taking notes in an unnamed/unsaved MacVim buffer ...
8
votes
1answer
3k views
How does one switch between windows on VIM?
I'm using both Vim and MacVim (or well, trying to). I installed the Tagbar plugin but find it impossible to switch to the actual Tagbar window to make my selection.
I've been reading loads about ...
8
votes
3answers
636 views
Is there a way to “lock” the viewport in vim?
I recently started using Vim with NERDTree. The annoying thing is when I close the buffer, NERDTree expands to fill the rest of the screen, and I have to open another file and reopen NERDTree to get ...
7
votes
7answers
3k views
$PATH in Vim doesn't match Terminal
I'm using MacVim and when I don't launch it from the Terminal (mvim) its $PATH does not include what I have set in my .bash_profile. It only seems to have the default values, ...
7
votes
3answers
285 views
Vim across multiple monitors
Does anyone have an elegant solution for having MacVim or gvim span across multiple(potentially different resolution) monitors? Having 2 sessions doesn't work well due to separate buffers and swap ...
6
votes
3answers
5k views
How do I move around and otherwise rearrange splits in vim?
So far, I've figured out swapping splits laterally via CTRL+W x, and that's pretty much it.
How do I move a split anywhere in a viewport that contains multiple vertical and horizontal splits?
How do ...
6
votes
4answers
2k views
VIM - leaves .swp files after crash
I use MacVim (snapshot 51) to edit a the Python/HTML/etc files in moderately sized project. Every few months my system locks up or crashes, and Vim leaves a plethora of .*.swp files around. When I go ...
6
votes
2answers
2k views
Vim - Displaying Code Output in a New Window á la Textmate?
A few months back I switched from Textmate to Vim. Overall I really love Vim, but one of the things I miss from Textmate is using the ⌘R command to run Ruby code and having the results neatly ...
5
votes
2answers
1k views
vim scrolls very slow when a line is to long
I would never have thought that vim would be so slow. All I have is the following long line:
I run vim (MacVim) under Mac OSX with the terminal app. Here is my vimrc. Hope that it has nothing to do ...
4
votes
2answers
1k views
textwidth=0 and wrapwidth=0 in .vimrc.local not being respected
I have the following lines at the bottom of my .vimrc.local:
set textwidth=0
set wrapmargin=0
However, whenever I open a new file, both these values are set to their defaults (72 and 2, ...
4
votes
1answer
466 views
How can I open the current HTML file in a web browser from MacVim?
From MacVim is there a command to open the currently edited HTML file in a web browser?
4
votes
2answers
888 views
How can I add some padding to the macvim text area
I would like to add some padding between my text and the left edge of the window (or the right edge of the line numbers).
4
votes
1answer
3k views
How do you install plugins for MacVim?
Specifically, I'm trying to install NERDtree. I downloaded the 4.10 package from github, unzipped it into ~/.vim/, and restarted MacVim (version 7.3).
Typing :nerdtree results in the following error:
...
4
votes
1answer
1k views
MacVim + tmux or: The Copy Paste Riddle [duplicate]
Possible Duplicate:
copy-paste not working in MacVim when launched in tmux
Now this is weird.
Copied a chunk of a text from somewhere into clipboard.
Ran mvim from a tmux buffer.
Opened a ...
4
votes
2answers
1k views
How can I make terminal Vim look as good as MacVim?
I'm using the same color scheme for Vim both in the Terminal and in MacVim, but they end up getting totally different colors.
Terminal:
and MacVim:
Why is this happening? It does this with ...
4
votes
3answers
770 views
How can I automatically adjust the Gvim/MacVim window to the width of my vertical splits?
My overall goal here is simple, but the specifics are complex:
I want to maintain each vertical split in my MacVim window at exactly 115 columns, regardless of how many splits I add.
The story: I’m ...
3
votes
2answers
1k views
Switch buffers in MacVim
I want to be able to switch buffers (:bn! / :bp!) in MacVim, using shortcuts like
Alt (Option) - Left Arrow Key/Right Arrow Key
So far I wasn't able to do that.
Here's my mapping for the keys, ...
3
votes
3answers
964 views
Is there a way to forward-delete in insert-mode in vim?
Is there a way to forward-delete in insert-mode in vim? I'm using a MacVim. I tried "Control-D", but it obviously doesn't work. I'm searching the official documentation, but cannot find. Any help ...
3
votes
3answers
834 views
MacVim is not found by Spotlight
I'm a Mac Noob but generally a power Linux user. My new job handed me a fresh MacBook Pro with Lion installed.
I installed MacVim successfully using homebrew. I'd love for it to be the default app ...
3
votes
1answer
551 views
How to configure MacVim to quit on exit?
When I close MacVim using the standard vim command :q, the MacVim window closes, but the program is still running. This causes trouble when other processes try to spawn an instance of MacVim, because ...
3
votes
3answers
511 views
Minimizing the toolbar in MacVim on OSX Lion
In previous versions of OS X it was possible to minimize the top toolbar of most applications due to a small button in the top right of the window. In Lion however it seems that this has been replaced ...
3
votes
1answer
126 views
Is there any way to use multiple fonts simultaneously in Vim?
I'm looking to use Consolas and Helvetica (for example) within the same buffer.
3
votes
1answer
193 views
Vim - Viewing Command line history
Is there a way in vim to view the output of old commands.
For example, if I do:
:! ls
Gemfile Gemfile.lock Rakefile autotest config.ru doc log ...
3
votes
1answer
288 views
Change to normal mode when MacVim goes background
Is there any way to leave insert mode automatically once MacVim is put in background, so when I came back it's in normal mode?
Often I change the foremost application an once I come back to MacVim I ...
3
votes
1answer
1k views
Getting (Mac)Vim to Work With RVM
I'm using RVM to manage Ruby installs and Gems, and MacVim to create and edit Ruby files.
I have a key command in my ~/.vimrc mapped to evaluate a loaded Ruby file and print the output. It looks ...
2
votes
3answers
811 views
Shortcut to switch tabs in MacVim
Are there any shortcuts to switch the Tabs from one to another in MacVim?
Any tips to bind the shortcuts myself in .vimrc like ⌘ + 1 for Tab 1 and ⌘ + 2 for Tab 2. For example, like switching ...
2
votes
2answers
364 views
Move cursor to beginning of non-whitespace characters in a line in Vim
In Vim, is there a way to move the cursor to the beginning of non-whitespace characters in a line? For instance, how can I move the cursor to the "S" in the second line below?
First line
Second ...
2
votes
1answer
267 views
Emulate Typewriter Scrolling in Vim
I've been using WriteRoom for a while for all my distraction free writing needs. But since I recently decided to move to Vim (or more specifically, MacVim) I've tried to reduce my usage of other text ...
2
votes
2answers
207 views
Prevent MacVim copying every visual selection to clipboard
Every time the visual selection changes in MacVim, it is copied to the system clipboard. Is this normal and can it be disabled?
2
votes
2answers
3k views
Vim in OSX: How to do page-up/page-down/go to EOL through a vim file opened in terminal?
In putty, which is how I primarily used VIM, I could do the following:
Page up/down : Using the native Page up/down key. In Mac, the alternative is Fn + Up/Down, which doesn't work in the terminal ...
2
votes
1answer
885 views
Installing Command-T breaks MacVim
I am trying to install Command-T on MacVim. I followed the installation instructions exactly but I get this error when trying to start MacVim (from a terminal via the mvim command line utility).
...
2
votes
1answer
321 views
How to specify shell for vim?
Can I specify my shell for vim? I'm running OS X and have zsh installed via Homebrew and am using MacVim. When I type shell in MacVim, the shell opens up as bash. How can I have it open as zsh?
2
votes
1answer
179 views
Height of window resizing on tab close for Vim
The tab bar automatically appear when there is more than 1 tab. When down to just 1 tab, the tab bar would disappear and the window resizes in height. The height is shorter by height of the ...
2
votes
1answer
263 views
Map MacVim (mvim) movement keys in iTerm2
This question has been asked in various forms and there are a few blog posts around the net but I can't seem to find one that works consistently. I'm going to ask it for my (and perhaps other's) ...
2
votes
1answer
61 views
MacVim erases file color labels
This might be more suited for apple.SE, but here is my question anyway.
When editing with MacVim a file that has a color label, the color label disappears when the file is saved.
I have the feeling ...
2
votes
1answer
298 views
why doesn't my .gitconfig work? (for external diff)
I added this in ~/.gitconfig:
[diff]
external = mvimdiff
[difftool]
prompt = false
and made a 755 /bin/mvimdiff that:
#!/bin/sh
mvim -d "$2" "$5"
in order to invoke MacVim as my git ...
2
votes
1answer
149 views
Is it possible to show gridlines in the background in vim?
Is it possible to show gridlines in the background in vim (ideally each four characters)? Or, if not possible in vim, is it possible in MacVim?
2
votes
1answer
182 views
Self Built MacVim on OSX 10.6 doesn't open a GUI window
I've noticed the MacVim downloads page has stopped uploading pre-compiled snapshots for OSX 10.6 (only 10.7 is supported now, with 10.6 considered LEGACY). I'm still using 10.6 and wanted to build it ...
2
votes
1answer
591 views
How do you use snipMate HTML snippets in a PHP file without changing filetype?
Is it possible to use HTML snippets with Vim's snipMate plugin in a PHP file without changing the filetype? I'd like to be able to use the HTML snippets in my PHP files because a lot of times I am ...
2
votes
2answers
103 views
Vim + iTerm2 color issues
I have trouble with the right Vim configuration. I'm using the latest version of Vim as well as the latest version of iTerm2.
I try to get the solarized colorscheme working, but without luck so far.
...
2
votes
1answer
373 views
How can I stop MacVim showing a whole screen of extra scroll?
Whenever I load files into MacVim it seems to retain the full screen full of ~ lines.
This means that scroll is always out by a complete screen which is fairly annoying. Is there a way to avoid this ...
1
vote
3answers
468 views
MacVim <K> not working correctly: WARNING: terminal is not fully functional
(This question is posted in vim_mac user group in Google, but I did not get a solution)
When pressing <K> on keyword, in terminal vim it will produce the man
page correctly.
However, in ...