The name given to the OS X port of gVim, the popular editor.

learn more… | top users | synonyms

1
vote
1answer
897 views

How do you set up MacVim to compile and run Java?

I'm reading loads of great things about Vim and MacVim, so I've downloaded it and I've been using it for writing HTML and CSS. I figure that since I'm new to this whole area, I might as well learn ...
2
votes
1answer
4k views

Change default settings in MacVim

I want to do some changes in MacVim to suit my needs. I'm new in it, so stick with me. The basic changes I want to do is to start the program with the following settings: Line numbers activated Top ...
0
votes
1answer
453 views

Reformat line breaks in Vim markdown file

I recently converted from TextMate to MacVim with Janus for editing my markdown files. How can I reformat an old markdown file so that lines longer than 79 characters are converted from a single ...
0
votes
1answer
231 views

Permanently change defult application for a file type?

How can I open all files of a certain type with a specific application? For instance, MacVim? Selecting open with --> other --> select MacVim and checking "always open with" works for individual ...
7
votes
2answers
2k 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, ...
2
votes
1answer
364 views

“Illegal starting char” error whenever opening MacVim

Whenever I start MacVim, through Finder or through Terminal, I receive the following error: E575: viminfo: Illegal starting char in line: c/gui_mac.txt Press ENTER or type command to continue I ...
12
votes
1answer
3k 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 ...
4
votes
1answer
5k 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: ...
2
votes
2answers
1k 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). ...
16
votes
3answers
3k 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?
3
votes
1answer
226 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 ...
1
vote
1answer
114 views

MacVim does not pick up global mappings from plugins?

I'm trying to figure out why MacVim does not pick up global mappings from installed plugins. I am using MacVim 7.3.87 under OS X 10.6. I created a file ~/.vim/plugin/testplugin.vim containing the ...
1
vote
1answer
537 views

How do I disable middle-click-pasting functionality in MacVim?

I've been accidentally pasting lately in MacVim, and would like to remove this functionality. How can I disable the middle-click-to-paste action? Bonus points if I can re-assign the input to another ...
3
votes
1answer
351 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 ...
0
votes
0answers
423 views

MacVim with Mac Keyboard: Where Is the Right CTRL Key? [duplicate]

Possible Duplicate: Emulating the ‘right ctrl’ key on MacBook Pro keyboard (which lacks an actual ‘right ctrl’ key) I can't seem to find it... and I want to use it for MacVim to facilitate ...
2
votes
1answer
69 views

Removing @'s in wordwrapped VIM text

Lines in VIM that wordwrapped on show @ on that line instead of the text if any part of the text is off-screen. How do I get it so I can see partial wordwrapped text like other editors? Before: ...
1
vote
1answer
651 views

Get OS X Terminal.app to accept Ctrl-+ for Vim

I am trying to bind Ctrl-+ and Ctrl-- in Vim to resize the current window. However, Terminal does not seem to pass anything when I press Ctrl-+. Ctrl-- does work. I checked in Vim itself using Ctrl-V ...
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 ...
11
votes
3answers
9k 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 ...
1
vote
1answer
256 views

How can I speed up the first file open from NERDTree in MacVim?

Tried on both macvim snapshot 53 and the recent 55. When I open a Rails directory with "mvim .", it starts up NERD_Tree. When I open any file, it takes about 5 secs to load on my macbook pro intel ...
19
votes
6answers
1k 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, ...
27
votes
3answers
13k 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.
1
vote
2answers
2k views

Macvim color scheme conflicting with .vimrc

In my .vimrc, I specify that when I do a search, I want the terms to be highlighted - background color yellow, foreground black. Here's how I specify that: " Settings for terminal version of vim ...
1
vote
1answer
854 views

In MacVim, how do I disable arrow keys in insert mode?

I have added this to my .vimrc: nnoremap <up> <nop> nnoremap <down> <nop> nnoremap <left> <nop> nnoremap <right> <nop> inoremap <up> <nop> ...
4
votes
2answers
1k 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).
0
votes
1answer
198 views

Setting active window on Vim startup

I'm using MacVim with the Taglist plugin, which I want to be open all the time when I start MacVim. So in my .gvimrc I have the following :TlistToggle Which opens the sidebar when I load my MacVim ...
15
votes
1answer
4k 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 ...
0
votes
3answers
410 views

Mac OSX: opening .cc files with MacVim instead of Xcode by default

In Mac OSX 10.6.4, I'm trying to change the default application for opening .cc files from Xcode to MacVim, but Xcode or OSX won't abide. Here's a screenshot: Notice how the clicking "Change ...
1
vote
1answer
786 views

How to trigger VIM's autocmd key mappings for .js or .pl files

Using VIM (MacVim to be specific) I've been trying to add a number of shortcuts to my .vimrc file that have different syntax in different languages. I'm using autocmd to add different keymappings ...
0
votes
1answer
337 views

NERDTree does not open in the directory from which macvim was opened

I upgraded my macvim to 7.3 recently and I can no longer open nerdtree or netw in the directory in which macvim was opened, it always opens in my home directory. For example, If I open macvim in ...
1
vote
1answer
376 views

special characters in MacVim

I added the Vim plugins and such from this page http://github.com/akitaonrails/vimfiles. I followed the instructions on the page and it all worked out fine, except the part on getting Command-T to ...
2
votes
1answer
519 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 ...
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 ...
7
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 ...
4
votes
4answers
2k 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 ...
8
votes
3answers
780 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 ...
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 ...
1
vote
1answer
131 views

Starting vim at top of the screen

I'm an avid MacVim user and every time I launch it the window starts about 2 rows too far down on the screen to where I have to drag it up to the top of my screen every time. Is there anything I can ...
9
votes
8answers
5k 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, ...
2
votes
4answers
2k views

Snippets in Vim not working

I've been trying to get snippets to work with Vim (specifically, MacVim). I have tried both snippetsEmu and snipMate (preferred). Other plugins are working fine. I have been able to get snippetsEmu ...
13
votes
1answer
4k 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?