gvim

Rearrange tabs with the mouse in gvim

Is there any way in gvim to rearrange tabs by dragging and dropping them with the mouse? This is behavior I love in Firefox and Chrome. I know you can do :tabm n but that requires figuring out exactly how many tabs in you'd like to move to. Using the mouse would be more useful for this spatial task. Any methods to move tabs left/right ...

vim:confirm before closing multiple tabs

I often unintentionaly quit vim using :qa while open many files in different tabs. I wonder if there is any way to have something like a confirmation line showing before closing multiple tabs and quit. Thanks! ...

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? ...

Mercurial - How to set "hg diff" output shows in gvim?

I use mercurial and I want to see modified change in Vim or GVim. Normally there is hg diff which show the modified changes in diff format. but I want to see it in Vim as the original version and modified version side-by-side. I try extdiff in http://mercurial.selenic.com/wiki/ExtdiffExtension but it doesn't work and gvim open some blan...

How to use GVIM to edit a remote file?

I use GVIM on Ubuntu 9.10. I'm looking for the right way to configure GVIM to be able to edit remote files (HTML, PHP, CSS) by for exemple ftp. When i use :e scp://username@remotehost/./path/to/file i get: error detected while processing BufEnter Auto commands for "*":E472: Command failed. When i open a file on remote via Dolphin or Na...

How can I separate pages with Vim?

I have the requirement of separating an ASCII document into pages of max length 58 lines per page. At the bottom of each page there is a 3 line footer. I'm not aware of any pagination abilities within Vim that would accomplish this. Is there a good way to do this with Vim? Perhaps highlighting every 58th line or something of the sort. ...

How do I do a :g with a concatenating of submatches in Vim?

I have a file whose content is roughly something like insert into FooBar values (13, 19, 220, 108); // some text, // some more text insert into MixMax values (22, 5, 87, 1); // and so on insert into HooHoo values (8, 37, 222, 51); // etc ... Now, I'd like to yank the first numbers after the string values ( into a variable, preferably...

How to write a function or macro to send a parameter to a system call in gVim for Windows?

The useful command :r!date is not so useful in gVim for Windows (not cygwin's gVim) because Windows has its own date function which does not do what I want. so, something like :r!c:\cygwin\bin\date would be great. But that's a lot to type. And considering that I might want to call a few things this way, it would be nice to write a f...

What vim plugins mix results in this interface

I saw this VIM UI and thought it was awesome and now I want it. Anyone know what plugins the author is using? http://werkzeug.pocoo.org/wiki30/files/wiki30.mp4 ...

How VIM navigate in a few sub trees of a huge source tree

I just want to transfer from SourceInsight to VIM. I know the basic of VIM, also study some pop plugins (project, fuzzlefind, taglist), but I still have a few questions about my main scenario. I worked on a huge source tree. It's too huge, that I can't create tag for each sub folder, or add them all to the project, and in fact I don't c...

In Vim: how do I change a highlighted section?

cw changes a word. Likewise if I have selected sections in vim (found by /), how do I change one of the highlighted section, so that I can repeat(.) the process in all of the other highlighted sections. I know %s will do the trick. But I wanted to go this the / way (visual satisfaction). Edit: I am looking for an extender to c like w...

How to map CAPS LOCK key in VIM?

I'm using GVIM under Windows. And want to map CAPSLOCK to Ctrl+^ Any way to do this? Btw, I see tons of samples over the web how to swap CAPS and Esc using registry hack, but none of them use VIM map command, instead external tools and registry changes. ...

Right margin in Vim

Is there any way to make Vim/gVim highlight the right-margin at the current document? I have just begun to work with Vim for a while and I found it annoyed without the right-margin at column 80. ...

How to map angle brackets in Windows gVim?

I code a lot of HTML and I'd like to map CTRL+> to &gt; and CTRL+< to &lt; respectively, to make it easier when typing out lots of text featuring those symbols. After checking the Vim manual, I tried using imap <C->> &gt;, imap <C-\>> &gt; and even imap <C-S-.> &gt; but so far I've had no success. Any ideas? ...

how to draw <Bar> on each 4th space

I'd like (g)vim to draw pipe symbol '|' on each 4th space of indentation to show something like vertical indentation line. I found this plugin: http://vim.sourceforge.net/scripts/script.php?script_id=628 but it works only for 'tab'. I'm using spaces instead of the tabs. My .vimrc contains: set ts=4 set sw=4 set expandtab set softtab...

pid_t doesnt highlight by default in VIM

All datatypes like int,long,char are highlighted automatically as soon as i type them in VIM. But, there are few exceptions like pid_t,mode_t.. How do get them highlighted by default? ...

Prevent vim :make from changing the current working directory?

Synopsis: When calling vim's make command, it changes the current working directory (cwd) to the directory of the current file. It then runs the makeprg from there. I want to prevent the make command from changing the cwd, and instead call the makeprg from the directory of the parent vim instance Example: I have the following standa...

GVIM on windows: way to disable the tmp file cretion.

I use gvim on windows and I want to know a way to disable the temp file(ending in ~) file creation. Also is there a problem if we do it ? ...

Save commonly used regex patterns in Vim?

Is there an easy way to save a commonly used Regex pattern so that I can reuse it between different files? I look through many log files and always need create a mildly complex regex (it's not rocket science but it is a pain to retype) to find errors so it would be good to have a way to recall that without having to save it in a text fil...

How can I make the cursor go back and forth around the block keywords?

Hi there, I am at present writing a syntax file in VIM for the script language I use, which isn't a generic language like c. One of the block syntaxes is the do..loop structure as below: DO blah blah blah LOOP times, label I wonder that if there is a way for me to make the cursor go back and forth around DO and LOOP like in c ...