Questions tagged [macvim]

MacVim is a version of the Vim text editor for Mac OS X.

https://web.archive.org/web/20160827085726/http://macvim.googlecode.com/files/MacVim-screenshot-10-detail.jpg

MacVim supports multiple windows with tabbed editing and a host of other features such as:

  • bindings to standard OS X keyboard shortcuts (⌘Z, ⌘V, ⌘A, ⌘G, etc.),
  • transparent backgrounds,
  • full-screen mode,
  • multibyte editing with OS X input methods and automatic font substitution,
  • ODB editor support,

and more. Most importantly, MacVim brings you the full power of Vim 7.3 to Mac OS X.

Legacy versions are available for OS X 10.4, 10.5 and 10.6. Current build is available for "Lion".

For further details see the MacVim website.

959 questions
21
votes
2 answers

What is the equivalent of emacs's fill-paragraph in MacVim?

I'm familiar with solutions that will automatically wrap to 80 characters, etc. But fill-paragraph lets me wrap things to 80 characters (or whatever) when I want to, which is convenient.
aresnick
  • 1,635
  • 12
  • 24
21
votes
3 answers

Using SHIFT+Arrows to select text in vim / MacVim

One of the nicer features in MacVim is that it is possible to use the usual OS commands for copying and pasting text (namely command+C and command+V) in it. This is especially nice in situations when you’ve worked in another editor just a minute…
Debilski
  • 66,976
  • 12
  • 110
  • 133
20
votes
5 answers

Open only the first few lines of a file in Vim

I'm working with a CSV that's just shy of 1 GB. I want to see the the file's structure and a sample of the data, but I don't want to open the entire file. How can I load the first few rows in Vim? If it makes a difference, I'm using MacVim.
Joe Mornin
  • 8,766
  • 18
  • 57
  • 82
20
votes
6 answers

Set python virtualenv in vim

I use vim for coding and for python coding in particular. Often I want to execute the current buffer with python interpreter. (for example to run unittests), usually I do this with :!python % This scenatio will work works fine with global…
ak.
  • 3,329
  • 3
  • 38
  • 50
20
votes
7 answers

Is there a quick way with macvim/NERDtree plugin to find a file?

What's the fastest way to find and open a file with MacVim? NERDtree is a great plugin, but I still have to navigate (sometimes very deep) directory trees in order to get to the file I want to get to. Is there any functionality that allows me to…
randombits
  • 47,058
  • 76
  • 251
  • 433
20
votes
3 answers

Disable bell in MacVim

I know this topic has been asked multiple times. But I don't seem to be able to disable the acoustic bell in MacVim. What I have in my .vimrc: set noerrorbells set novisualbell set t_vb= Am I missing anything?
Saucier
  • 4,200
  • 1
  • 25
  • 46
19
votes
5 answers

git rebase -i presents an empty MacVim file

I'm trying to rebase a commit. However, any time I run git rebase -i f83eff3ffc8, for example, a MacVim window opens, that's empty (there is no information in the file). Then once I write and close the file (even though it's empty), I get a…
Kevin Burke
  • 61,194
  • 76
  • 188
  • 305
19
votes
4 answers

vim: delete all whitespace characters up to my cursor

is there anyway to delete every character on the same line as a cursor, all the way up to the cursor? for instance, I might have a line of code that looks like the following: foo = [cursor] Bar.new If my cursor is at the place holder…
randombits
  • 47,058
  • 76
  • 251
  • 433
19
votes
3 answers

Jump with Ctrl-I doesn't work in my MacVim, but Ctrl-O works?

Jump with CtrlI doesn't work in my Vim, but CtrlO works. It's weird, verbose map or verbose map shows below: s snipMateNextOrTrigger Last set from ~/.vim/bundle/vim-snipmate/after/plugin/snipMate.vim x
dfang
  • 1,366
  • 15
  • 41
19
votes
1 answer

How to re-index CtrlP Vim plugin?

I've been using CtrlP for a while now, but I still haven't figured out how to re-index it. So whenever I want to create a new file I have to close all existing vim sessions, create the file, and then re-open them back. Otherwise the new file won't…
Vlad
  • 8,038
  • 14
  • 60
  • 92
18
votes
4 answers

$PATH variable not properly set in gvim/MacVim when it is opened from the finder

I am using MacVim (basically gvim for the mac). If I open macvim from the command line then my $PATH variable will be properly set. If I open macvim via point and click with the finder, the $PATH variable will NOT be properly set. Can anyone…
sixtyfootersdude
  • 25,859
  • 43
  • 145
  • 213
18
votes
3 answers

Can vim commands be mapped to key combinations with >1 modifier (e.g. ctrl-alt-v)

Is it possible to map a vim command to a combination of keys involving more than one modifier? For example: ctrl-alt-v. As far as I can tell, the only modifier key that can be used in combination with another is shift. e.g. and . Or am I…
nelstrom
  • 18,802
  • 13
  • 54
  • 70
18
votes
2 answers

Make Vim only do a soft word-wrap, not hard word-wrap

I've been using Vim for a week now. And I've noticed something. I have textwidth unset, and I have wrap set. Now, my question is. Currently whenever I line longer than 120 characters (window width), it takes the last character, and just like that,…
greduan
  • 4,770
  • 6
  • 45
  • 73
17
votes
3 answers

MacVim: how do I set a left gutter (margin) for my buffers?

In MacVim the text that I'm editing in all buffers is jammed up hard against the left hand side of the buffer. I find this quite visually jarring, especially if I'm looking at a vertical split. It looks like there is only one pixel between my text…
Scott
  • 17,127
  • 5
  • 53
  • 64
17
votes
3 answers

VIM: exit insert mode with :normal command

When I go into insert mode with the :normal command (:normal i) for example, how do I exit insert mode? If I press , or , or , VIM exits command mode and I can't run my :normal command. I put imap in my .vimrc but when I…
Jay
  • 9,314
  • 7
  • 33
  • 40