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
56
votes
8 answers

How to break a line in vim in normal mode?

I would like to break a line (at the location of the cursor) in to two lines without leaving normal mode (entering insert or command-line mode). Is this possible? I currently get to the location I want and hit 'i' to enter insert mode, 'enter' to…
Ted
  • 2,211
  • 2
  • 19
  • 27
52
votes
7 answers

MacVim Open File In Existing Window

Is there a way to set up MacVim to open a new file in the current window in a running MacVim instance? I currently have the MacVim preference "Open new files in a new tab in the current window" set, but ideally I'd just like to open new files the…
davertron
  • 1,427
  • 1
  • 14
  • 28
50
votes
2 answers

Shortcut to make all split screens have the same width?

When I open gvim -S (with a session) my split screens' widths are screwed up and I have to manually adjust them. Is there a shortcut to make all split screens the same width ? Thanks
Running Turtle
  • 12,360
  • 20
  • 55
  • 73
48
votes
9 answers

Execute a script directly within vim/mvim/gvim

TextMate has a nice feature that allows you to execute a script from within the current context and shows you the output in a separate window. This lets you write and test code on the go. I'm almost certain there is a similar feature with…
randombits
  • 47,058
  • 76
  • 251
  • 433
40
votes
7 answers

Is it possible to not display a ~ for blank lines in Vim/Neovim?

Is it possible to not display a ~ for blank lines in Vim? This confuses Mac Vim's scrollbar, and I quite don't like these tildes.
Ecco
  • 1,323
  • 1
  • 11
  • 15
40
votes
10 answers

VIM Color scheme not loading by default

When I do :colorscheme vilight it loads the color scheme fine. So I added colorscheme vilight to my .vimrc but its not loading it on start. Am I missing something? Also in my config set background=dark syntax on colorscheme vilight set…
kush
  • 16,408
  • 17
  • 48
  • 65
38
votes
4 answers

Move to start and end of search lookup

In vim/gvim I would like to be able to move to the front and end of the current search lookup. Is this possible? For example, with this file: A dog and a cat A hat and a bat I would like to be able to perform a search, for example /dog\sand and…
Pan Thomakos
  • 34,082
  • 9
  • 88
  • 85
38
votes
2 answers

Elegant way to check if a global plugin variable is set in a vim plugin

I used to use vim during the last years for editing configs and scripts on remote servers. A couple of weeks ago I decided to take the next step and try to use (Mac)vim as my regular editor besides Sublime Text 2. Now I reached a point where I would…
Saucier
  • 4,200
  • 1
  • 25
  • 46
36
votes
1 answer

Disable Scrollbar in NERDtree with MacVim

I have been able to fully disable scrollbars in MacVim. However, when I startup NERDtree, NERDtree brings up a scrollbar of its on the left. How can I disable NERDtree's scrollbar? Thank you in advance. I appreciate the help.
Amir Rustamzadeh
  • 4,302
  • 7
  • 35
  • 43
36
votes
6 answers

How do I increase the spacing of the line number margin in vim?

I have a problem with my colorscheme in vim: (source: tinygrab.com) The line numbers are too close to the code. How I can increase the width of the line numbers' right margin?
Sasha Koss
  • 15,129
  • 4
  • 20
  • 27
32
votes
7 answers

Matchit not working

I am using Macvim 7.3 snapshot 57. I can't seem to get matchit to work in any of my files. I press % on an opening tag. It doesn't take me to the closing tag... My vimrc file: " Pathogen settings call pathogen#runtime_append_all_bundles() call…
Christian Fazzini
  • 19,613
  • 21
  • 110
  • 215
32
votes
4 answers

Vim: Highlight keyword pairs in Ruby (def/end, do/end, etc)

In one of the Eclipse-based editors that I tried out recently (I think it was RubyMine), when a Ruby keyword that either opened or closed a method or block was selected, the corresponding open/close keyword was highlighted. Similar to the way that…
pakeha
  • 2,480
  • 3
  • 22
  • 24
31
votes
4 answers

vimdiff and MacVim

I'd like to run vimdiff on MacVim. Is there an easy way I'd be able to do it?
Antonio
  • 313
  • 1
  • 3
  • 7
30
votes
1 answer

MacVim+NERDTree: How to open a file as a split in furthest horizontal split

I've been browsing mvim docs and have tested out the various commands, but I can't seem to find one that solves my issue. Here is what I have: /========================================================\ | | | …
Tim
  • 1,199
  • 1
  • 8
  • 14
29
votes
4 answers

Format and Indent HTML in Vim

I currently have a huge HTML file which doesn't have line breaks and just appears in a single line. I want to format it in vim (macvim in particular). I tried the following options, but none of them has worked for me. Selected the text and pressed…
Sudar
  • 18,954
  • 30
  • 85
  • 131
1
2
3
63 64