3
votes
2answers
221 views

vim: Execute BundleInstall without showing the vim interface

I have a installation script that I use to initalize my vim plugins when I'm on a new machine #!/bin/bash # Clone vundle into the directory if it's not already if [[ ! -e bundle/vundle/.git ]] then ...
5
votes
2answers
165 views

How to consistently start Vim's command line to make a mapping work in any mode?

I try to normalize access to Vim's command line mode from any other mode in order to simplify my actual mappings. For example to make the <f6> key work from anywhere I define the following ...
6
votes
1answer
250 views

How to change Vim's command type mode programmatically?

Is there a simple way to switch from one command type mode to another without loosing the current command line? In my ~/.vimrc file I remap the <space> and <c-space> character, coming ...
1
vote
1answer
173 views

How to reference a script-local dictionary in a Vim mapping?

Somehow I'm not able to execute the following mapping: function! s:MySurroundingFunctionIWantToKeep() let s:Foobar={'foo': 'bar'} map \42 :echo <sid>Foobar.foo<cr> endfunction call ...
4
votes
1answer
225 views

vim auto complete custom list

I had these two questions about this function " how do I load a file into a list here? " set some variable func! CustomComplete() " and then read the variable here so that b:list = a \n split ...
2
votes
1answer
380 views

vim script: how to change “put =” to an append?

I'm trying to hack the c-vim plugin because I don't like the way it inserts comments. I want this: /* comment */ but it gives me this: /* comment */ I'm sure it has its reasons, but I don't ...
1
vote
3answers
2k views

Is it possible to execute a VIM script in a non-interactive mode?

The Gnats bug tracker has a command (edit-pr) that opens a ticket in $EDITOR. My $EDITOR is VIM, and when this command opens the ticket in $EDITOR, I'd like to automatically perform some scripted ...
5
votes
2answers
743 views

How to do a text replacement in a big folder hierarchy?

I want to search and replace some text in a large set of files excluding some instances. For each line, I want a prompt asking me if I need to replace that line or not. Something similar to vim's ...