Tagged Questions
2
votes
2answers
88 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 ...
2
votes
1answer
99 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
59 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 ...
2
votes
1answer
148 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
237 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
830 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 ...
3
votes
2answers
527 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 ...