Questions tagged [macvim]

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

MacVim is the Mac port of the editor, adding, most notably, a native Cocoa interface and conventional Mac OS keybindings.

187 questions
132
votes
4 answers

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 window switching in VIM, found a lot of default…
Naatan
  • 1,415
  • 2
  • 14
  • 13
104
votes
9 answers

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 (/Users/user/Applications/MacVim.app/Contents/MacOS/Vim) instead of the system's…
77
votes
5 answers

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 when the MacBook ran out of juice and powered…
davur
  • 927
70
votes
9 answers

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 line If it matters, I primarily use MacVim, but I'd…
Joe Mornin
  • 1,707
69
votes
3 answers

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 I create a horizontal split that, say, spans the…
hakanensari
  • 2,237
46
votes
4 answers

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 (doesn't scroll inside the vim file, but scrolls…
TCSGrad
  • 619
42
votes
4 answers

How to use vimium to select text from a page

Background I'm a religious fanatical devoted believer of vimium. It speeds up my internet usage like nothing else. I'm also (naturally) a heavy user of vim itself. Question How can I actually select a certain text in a screen using vimium without…
36
votes
3 answers

How do I only dp or do just the lines, not the entire block in Vim diff?

I'm currently using MacVim (Snapshot 64) "Split Diff by..." menu option. The file is Django's my settings.py from version 1.3.1 to a fresh file from version 1.4. I know two basic commands do to "obtain" (and replace) a block from the other…
hobbes3
  • 1,041
  • 5
  • 14
  • 22
32
votes
6 answers

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, this might be when I last committed.) One way to…
Nathan Long
  • 27,435
28
votes
3 answers

Vim scrolls very slowly when a line is too long

I would never have thought that Vim would be so slow. All I have is the following long line: (Click image to enlarge) I run Vim (MacVim) under Mac OS X with the terminal app. Here is my vimrc. I hope that it has nothing to do with some of my…
22
votes
3 answers

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?
nohat
  • 1,265
20
votes
5 answers

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 browser tabs. edit: i'm back to working on linux. Not…
Ye Lin Aung
  • 5,700
20
votes
2 answers

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?
neezer
  • 733
19
votes
3 answers

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?
Lisa
  • 193
  • 1
  • 4
18
votes
1 answer

MacVim: Re-map command key combinations like

I can remap unused combinations like (Cmd+1) in MacVim, but there are many combinations like , or that are already bound to MacVim menu items. If I try to remap those inside my .vimrc, nothing changes. Is there some way I can…
Jo Liss
  • 4,518
1
2 3
12 13