macvim

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 above, is it possible to delete every whitespace character (without using regex?) so that ...

Command - R like functionality in MacVim

I'm on a Mac and when I am in TextMate editing a ruby file I can simply hit Command-R to execute the file and see the results in a new window. Is there something similar to this using MacVim? It's really important that I be able to open up a NEW window. Reason is because in the current window I might have more than one full page of info...

Is it possible to not display a "tilde" for blank lines in vim

This confuses MacVim's scrollbar. And I quite don't like them ...

textmate >> vim for python - teething troubles: especially indenting

I'm (attempting) to move from textmate to vim [macvim to be exact] as my primary editor. I have already installed snipmate - wondering if there are other plugins you would suggest I install? In particular I seem to be having a lot of trouble with indenting (<< seems to really do some very strange/unpredictable things), and I can't seem ...

How do I create skeleton files, or templates, for MacVim

I have seen instructions about creating a "skeleton" file in vim. This involves creating the file, naming it "tmpl" plus the extension of the file type you are targeting (ex: tmpl.html), saving it to the "skeleton" directory, and then editing the vimrc file. But, in MacVim, I don't see a "skeleton" directory anywhere. Googling, etc., ha...

How can I run Ruby specs and/or tests in MacVim without locking up MacVim?

About 6 months ago I switched from TextMate to MacVim for all of my development work, which primarily consists of coding in Ruby, Ruby on Rails and JavaScript. With TextMate, whenever I needed to run a spec or a test, I could just command+R on the test or spec file and another window would open and the results would be displayed with t...

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 % <Enter> This scenatio will work works fine with global python, but I want to run virtualenv python instead. How do I enable virtualenv within vim...

Dealing with code indentation in Vim?

Hello, I work on an engineering team of 4 people, mostly writing javascript while occasionally dabbling in ruby and python. So, as a team, we share code all the time, and as most programmers do, each member of the team has his favorite level of indentation & related settings. I am one of 2 members of the team who use and love Vim as my ...

How to switch off automatic copy to clipboard in gVim

When a text is selected in (my) gVim then is copied automaticaly into the clipboard (X11 behavior). While this has been ok under X11 it starts to anoy me in Windows and Mac OS. I am sure this can be switched off somewhere. But I just can't find the propper help page. Probably using the wrong search term for Google and :help. Question: W...

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 break the line in two, then 'esc' to return to normal mode. I am not trying to set a maxim...

Skipping a window in VIM with Ctrl-W_W

When I have several windows open in VIM, I'd like to always skip one of them (the one containing my project using Aric Blumer's Project plugin), whenever I press Ctrl-W_W. In other words I'd like to cycle through my document windows as if the Project window wasn't one of them. When I actually do want to go into the project window, I'll ...

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 it's on the left. How can I disable NERDtree's scrollbar? Thank you in advance. I appreciate the help. ...

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 <Esc>, or <c-c>, or <c-[>, VIM exits command mode and I can't run my :normal command. I put imap <c-e> <Esc> in my .vimrc but when I type <c-e> in command mode, nothing gets inserted. I can't figure out how to enter a "con...

project.vim and commands using the shift key

I'm trying to get up and running using project.vim but for some reason, none of the keybinding requiring a capital letter seem to be working. For example \C, which should create new project fold recursively, just acts like normal C, but \c operates as expected. Same thing with \R and \r. I'm using MacVim with Vim 7.3 (on a Mac, obvious...

MacVim and Mercurial check-in

I'm trying to use MacVim as a default editor (on my Mac, obviously). I'd like to have MacVim to edit commit messages when I hg ci. Unfortunately when I do so (either by setting EDITOR=mvim or alias vi='mvim') MacVim pops up with an empty message (i.e. none of the boilerplate in the bottom half), and when I save that commit message I get ...

How can I see the file or directory named passed to Vim from the command line?

I'd like to set up my .vimrc so that NERDTree is open whenever vim (or MacVim) is called from the command line with a directory argument, but closed when vim is called with a file argument. I looked through the list of vim's built-in variables but couldn't find anything that looked promising. ...