macvim

Changing background color in vim at a certain column

I'd like to be able to highlight the wrap margin/text width in vim by changing the background color (or maybe just a line?). A lot of IDEs have this. I mocked up what I'm talking about: Anyone know if this can be done in macvim or gvim? ...

Vim: Key map bindings to open Firefox in background

" Open firefox - maps to Option|Command|f map <M-D-f> :!/Applications/Firefox.app/Contents/MacOS/firefox-bin -no-remote -P dev The above works but blocks in Vim. I want to do: map <M-D-f> :!/Applications/Firefox.app/Contents/MacOS/firefox-bin -no-remote -P dev & but Firefox does not open. Any suggestions on creating a key binding f...

Vim cursor shape question

I currently use MacVim for a lot of my editor needs but occasionally I need to edit files remotely over ssh. In MacVim the shape of the cursor varies depending on your current mode, i.e. command mode -> block cursor, insert mode -> vertical bar cursor, which I find very helpful. Is there a way to replicate this behavior in a .vimrc fil...

Changing the Leader in MacVim?

I'm trying to change <Leader> in MacVim to be something less carpal-tunnel inducing. I have added this line let mapleader="," to my .gvimrc, but "\" is still the only key that works. Am I missing something? ...

How can I get vim's closetag plugin to work for all html tags?

I am using the closetag.vim plugin, but it doesn't seem to work for all tags. In the plugin code there is the ignored tags var that contains some one that I noticed were not closing ex dd dl, but there are many others that aren't in the list that are not working (p, ul, li). Nothing seemed to happen after updating the list of ignored ta...

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. <C-v> and <C-V>. Or am I missing something? ...

vimdiff and MacVim

I'd like to run vimdiff on MacVim. Is there an easy way I'd be able to do it? ...

MacVim set as default text editor: How to set files to open in a new tab as opposed to a new window?

I've set MacVim as my default text editor, and when I double click files it opens up a new window. Is there a way to set it to open up in a new tab instead? ...

Autowrite VIM buffers after <alt-tab>

How can I configure vim to autowrite buffers after switching with alt-tab to another application? ...

Autoupdate VIM Plugins?

Is it possible to update vim plugins automatically? ...

recompiled ruby - now "mach-o, but wrong architecture" macvim error

I am recieving the following error when trying to use MacVim: ~$mvim index.php dyld: Library not loaded: /usr/lib/libruby.1.dylib Referenced from: /Applications/MacVim.app/Contents/MacOS/Vim Reason: no suitable image found. Did find: /usr/lib/libruby.1.dylib: mach-o, but wrong architecture /usr/lib/libruby.1.dylib: mach-o,...

What is the <leader> in a .vimrc file?

I see <leader> in many .vimrc files, and I am wondering what the meaning of it is? What is it used for? Just a general overview of the purpose and usage. Thanks! ...

How to run mvim (MacVim) from Terminal?

Apologies but I am new to the whole UNIX/Mac command line. I have MacVim installed and I am trying to set it up as the editor for Git (version control). But I can't run 'mvim' from the command line as it isn't recognised. I don't see an option in MacVim to do this for me. I am guessing I need to edit a PATH variable on the Mac? ...

Key repeats and ranges in Vim mappings

I want to define a mapping in my .gvimrc such that if the last key pressed is held, the triggered action is repeated. Specifically, I want to do something like map <SPACE>t :set transparency-=1 map <SPACE>T :set transparency+=1 for MacVim, but I want the transparency to continue to be decreased/increased when t/T are held (don't want ...

vim command after cd

I want to execute a command automatically after cd'ing to a new directory from within vim. For example, I open gvim and run: :cd ~/src/player I would like vim at this point to automatically source a file that is in that directory. Is this possible? ...

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 before and your brain isn’t ready yet to advise your fingers on how to type the real thing. ...

Reasons for using command line Vim versus GUI Vim

Background I'm building an application where it detects what documents you're using from the file system. To do this it must access the AXDocument attribute of the active window. MacVim provides this. Running Vim in the Terminal wouldn't provide this. I've just put out a survey to ask what editor coders who are interested in my app use...

vim and NERD Tree: Can NERD Tree persist across tabs in MacVim?

When using NERD Tree on MacVim, I can open a file in a new tab by using 't' (or 'T' to open it in the background) in the NERD Tree window, but when I switch to that tab, the NERD Tree window is no longer visible since it remains in the original tab. Is there a way to automatically open NERD Tree in new tabs when opening files from NERD ...

tips and tricks for using vim with ruby/ruby on rails

I'm one of those developers who isn't using TextMate with any of his Ruby/Ruby on Rails work. My particular loyalty in this arena lies with vim. What are your favorite tips/tricks for using vim with Ruby and/or Ruby on Rails to make you as efficient as possible when working? ...

I need to test something by changing vimrc

However already opened mvim windows do not load changed done to vimrc until I close all mvim windows and start fresh. Is there a way I can tell existing mvim windows to load new vimrc file without closing and opening all windows every time. ...