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

learn more… | top users | synonyms

11
votes
4answers
2k 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 ...
0
votes
1answer
210 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 ...
0
votes
0answers
21 views

Vim not loading ftplugins files

I added java_getset.vim as ~/.vim/ftplugins/java_getset.vim, but when I run :scriptnames I don't see it listed. I pared my .vimrc file down to: set nocompatible filetype plugin on to remove ...
7
votes
4answers
2k 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 ...
0
votes
3answers
63 views

mapping jj to escape in macvim works but not in terminal vim

In my vimrc I have: inoremap jj <ESC> Using the latest macvim I can hit jj and i'll jump from insert to command mode, but using the same vimrc with just regular vim in iterm2 it just inserts ...
2
votes
1answer
39 views

why is vim calling this script on startup?

I'm trying to use a custom color scheme. On startup, I can see that vim is loading my scheme, but after that it loads another scheme, overwriting mine. Here's the output of :scriptnames: 1: ...
0
votes
1answer
507 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 ...
1
vote
1answer
22 views

How to adjust statusline height in MacVim?

I just installed powerline for mvim. It works fine except my statusline is a bit too big which makes it look weird: How can I fix this?
0
votes
1answer
281 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 ...
0
votes
1answer
57 views

VIM Crashes/Freezes on specific files Mac OSX Mavericks

I've recently switched over to using VIM and use a friends .vimrc that works well for him https://github.com/dtothefp/dotfilesv2/blob/master/vim/vimrc.symlink I first installed vim through Homebrew ...
18
votes
2answers
3k views

vim scrolls very slow 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: I run vim (MacVim) under Mac OSX with the terminal app. Here is my vimrc. Hope that it has nothing to do ...
0
votes
1answer
71 views

Inconsolata font with powerline support and italics

Is there an Inconsolata font package with italics and support for powerline? I have only been able to find: powerline-fonts - has powerline support but no italics Inconsolata-LGC - has italics but ...
0
votes
1answer
69 views

Vim conceal feature is applied to active line

I am using MacVim with the vim-latex plugin. There is a conceal feature turned on by default that converts LaTeX symbols to unicode in vim itself so the source is easier to read. I think this is ...
7
votes
2answers
3k views

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. (Open the image on a separate ...
0
votes
1answer
138 views

Open Macvim within terminal without opening a new window

Every time I try to edit a file, I do mvim file.txt in the terminal then a new MacVim window pops up. But if I do vim file.txt, it will not open a new window. Instead, it will initialise vim within ...
0
votes
0answers
13 views

Seeing output of `make` in MacVim GUI

I recently switched to using MacVim gui and I'm really enjoying it. One of the issues I'm currently facing, however, is that when I run a command (such as make), I see the output of the command in ...
0
votes
1answer
64 views

MacVim always return focus to terminal upon leaving

I'm running Mavericks and I recently started playing around with sshfs to try to boost my productivity by using MacVim (I've been using in-terminal vim for a few years now). I really like MacVim. I ...
1
vote
1answer
150 views

Vim - How Recognize Spaces as Tabs (set listchars=tab)

I wonder if it is possible to use a configuration for that command "set listchars=tab:▒░,trail:·" to "see" 4 spaces as tabs and get the effect of the picture below (using real tabs)... I use the ...
0
votes
0answers
10 views

Keep window size when resizing font in MacVim

When changing the font size in MacVim on OSX (Cmd +,Cmd -), the window is resized as well. Is there a setting that makes MacVim keep its window's size, when the font is resized?
7
votes
3answers
15k 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 ...
1
vote
4answers
1k views

Macvim lags while Vim on terminal is buttery smooth

I am running OS X Lion 10.7.3 and Macvim runs significantly slower than vim on the terminal for me. All movement commands in Macvim are much slower. Moving up and down in visual mode is equally as ...
1
vote
2answers
408 views

Opening files with MacVim from command line

From my command line I'm inputting the command open .lists This is opening the text file in TextEdit. I'm pretty sure some file extensions will open with MacVim. I'm unsure how to get all text ...
0
votes
3answers
72 views

Vim - Visual Mode - Improve Word Selection

Gentlemen/Ladies, I do not understand why vim is exhibiting the following behavior when I trigger the shortcut below on visual mode (.vimrc): vmap <script> <C-LEFT> :call ...
-2
votes
1answer
63 views

Vim - Using Functions to Search (.vimrc)

I'm have a timing problem with a function that I use to search in Vim. I need the search to be executed immediately, not after the function ends. I'm using "feedkeys" function (eg. ...
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, ...
3
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 ...
0
votes
1answer
46 views

Can I change a Vim setting persistently using a shortcut?

Can I change a Vim setting persistently using a shortcut? Hypothetical Example: nnoremap <script> <F7> :call ChangeConfig()<cr> function! ChangeConfig() set virtualedit=all ...
0
votes
0answers
76 views

vim and macvim are not reading my .vim directory

I have installed vim and macvim using macports, and tried copying over my .vim directory from linux. Neither seems to read anything from that directory: my customizations for folding and indenting ...
1
vote
1answer
512 views

how to install a color scheme with yadr

someone advised me to use yadr, which is supposed to make installing dotfiles etc much easier for vim however I just couldn't figure out a way to install base16 through yadr.. before I had to ...
1
vote
1answer
61 views

How can I check if the cursor is at the end of a line?

Gentleman, Simple question about Vim! How can I check if the cursor is at the end of a line using a function in vimrc? []'s
0
votes
1answer
112 views

Automatic indentation with MacVim

How can I change the automatic indentation in MacVim? My problem is that when editing a TeX file, every time I type, for example, (, vim decides to indent the line for me. Here is a video of my ...
0
votes
1answer
54 views

Vim completion based on language

Right now if I hit ctrl + n it will complete words that are in the current document. I've also found a way to define a dictionary. I'm just unsure how to get vim to complete based on keywords in a ...
3
votes
1answer
145 views

MacVim crash with Gundo

Every time I invoke gundo MacVim crashes with the following error. Vim: Caught deadly signal SEGV Vim: Finished. It works fine in Normal vim but I am not sure what the problem is I built the app ...
7
votes
5answers
3k 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 ...
14
votes
3answers
11k 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 ...
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, ...
34
votes
3answers
16k 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.
2
votes
3answers
107 views

Is there a clever way to underline a heading?

This isn't a particularly important, but it's something I've been curious about for a while. I write a lot of documentation using rST (Sphinx). This is how you write a heading: My Awesome Heading ...
0
votes
1answer
142 views

Should I bother moving stuff from vimrc to gvimrc?

Is is worth moving gui-related options out of my vimrc and into a gvimrc if there's only a couple such options? I'm kind of inclined to keep everything in one place and house gui options inside if ...
0
votes
4answers
86 views

Vim: Jump to previous cursor position, NOT edit point

I am trying to write a tiny macro to append a ; to the end of the current line (A;), then return to the cursor position from which I jumped before executing the macro. C-o and C-i are not what I ...
16
votes
2answers
9k 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 ...
2
votes
3answers
190 views

How to use macvim to ssh into a headless server

I am using Mac OS X 10.7.5 I installed macvim for the first time in my life. I enjoyed using MacVim I was wondering how to SSH from it into a headless server within the MacVim itself. Currently, I ...
3
votes
1answer
232 views

Vim: don't move cursor when I scroll (via mouse)

When I scroll up/down and the cursor is in the visible region, it stays at that place. However, when I scroll and the cursor reaches the edge (bottom or top), it will move along with my scrolling so ...
0
votes
1answer
37 views

MacVim: make URLs clickable

I want to be able to click on URLs I see in MacVim. How can I do that? Is that possible?
22
votes
1answer
5k 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
1answer
22 views

mvim: display number of columns in window?

I'm transitioning to MacVim from terminal vim, and I've gotten used to the "80 x 24" display at the top of terminal windows (COLS x ROWS). Is there a way to enable some such display in MacVim?
0
votes
1answer
277 views

Building MacVim — missing some available features

When I compile MacVim from source, I use a bunch of flags for configure: ./configure --enable-features=huge ...(enable python,ruby,perl, and c interpreters)... --enable-gui=macvim But when I run ...
3
votes
2answers
432 views

Second user vimrc file usage on vim running on Mac os X 10.8.5 (Mountain Lion)

I am using MacVim: :version VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug 10 2013 17:49:20) MacOS X (unix) version I've executed :version in vim (to check what patches I had installed) and ...
0
votes
1answer
87 views

How can I make the active MacVim tab more obvious in fullscreen mode?

When I use MacVim normally and have multiple tabs open, it's easy to see which tab is active because it's much lighter than the others. However, in fullscreen mode, they are all the lighter color and ...
1
vote
1answer
524 views

Why is MacVim much faster than Vim in the Terminal?

I've been using Vim and MacVim as may main development tool for last two weeks and have noticed that the cursor scroll speed is much fast and fluent in MacVim than it is in Vim in the Terminal. It's a ...