:vimgrep looks like a really useful thing.
Here's how to use it:
:vim[grep][!] /{pattern}/[g][j] {file} ...
:help says that you can essentially glob {file} to name, say, *.c for the current directory. I may have started vim with a list of files that is complicated enough that I don't want to manually type it in for {file}, and beside...
So I was hoping that some old school Vim'ers could help me out. These are all separate questions and normally I would put them up each on their own but I'm not sure if that qualifies as question whoring here.
Plus I think if you know enough to be asking any of these questions they will all be coming up in the near future:
I have a li...
I have an entry in my .vimrc which makes it page down the viewport when I hit the spacebar. It looks like this:
map <Space> <PageDown>
I want to create another key mapping which pages the viewport up when holding shift and hitting the spacebar. I have tried the following entries:
map <Shift><Space> <PageUp>
map <S-Space> <PageUp>
N...
After reading The Pragmatic Programmer, I became quite accustomed to VIM. When in Visual Studio I have ViEmu (http://www.viemu.com/) to provide me with VIM functionality.
Is anyone aware of a similar program/key binding/workaround to integrate VI/VIM key bindings in CodeGear Delphi 2007?
...
So I've got a big text file which looks like the following:
<option value value='1' >A
<option value value='2' >B
<option value value='3' >C
<option value value='4' >D
It's several hundred lines long and I really don't want to do it manually. The expression that I'm trying to use is:
<option value='.{1,}' >
Which is working as inte...
I'm an avid vim user and have started to write some SQL code recently. I like to write my SQL statements in CAPS and sometimes forget to switch CAPS LOCK off and I then quickly wreak havoc on my code before I realise what's happening.
I have so far not found any way to tell whether the CAPS LOCK key is on other than looking at my keyboa...
I'm trying to use the < C-a> (CTRL+A) shorcut under vim to increment a variable under the cursor. This works fine under vim running on Linux. However when I try to do this in gvim under windows it "selects all" (i.e. highlights or visually selects all text in the current window). How can I change this behaviour or alternatively how can I...
Does anyone know of a way that I can paste over a visually selected area without having the selection placed in the default register?
I know I can solve the problem by always pasting from an expicit register. But it's a pain in the neck to type "xp instead of just p
Thanks
...
Any tricks for using project explorer in VIM?
How can I search from all files in project? I tried \g \G but they dont work .
How to toggle on off Project explorer window?
I am using Project explorer and taglist and when I open both then there are two windows on left side ,this makes very much cluttered .Is it possible when to open tag...
One of the reasons I usually don't use an IDE for development is that I'm so used to vi keybindings that I usually end up messing up my text and putting in lots of ":w"s, and I can't use vi's powerful regex replace mechanism. Are there any IDEs that allow you to configure vi keybindings or use vi as the editor within the IDE?
Related:
...
When I use `gqap' command to reflow a paragraph in vim, vim seems to try to be smart and adds indentation automatically, e.g.
When a line ends with a ',':
We protect your rights with two steps: (1) copyright the software, and (2),
offer you this license which gives you legal permission to copy, distribute
and/or modify the sof...
When using gdb and Vim, often I want to stop on a particular line. Normally in Vim I copy-paste the line number showing on the rule area to the gdb session. It'd save me a lot of hassle if I could use something like "+<magic-incantation> to copy the line number of the current cursor position into the xclipboard buffer. Is this possible?
...
The vim * star / asterisk search (:help star) is a great feature which lets you find the next occurrence of the word the cursor is over. Unfortunately it treats dollar-prefixes as part of the string, so if I press * while over the "SearchTerm" in the class name it finds "SearchTerm" in the comment, and "$this->SearchTerm", but not "$Sear...
This question follows on from this vim search question
I have a setting in my .vimrc which excludes $ as a valid part of a word:
set iskeyword-=$
This works fine for most files but isn't working in PHP. I assume it is being overwritten by a php plugin, but since plugins are loaded after .vimrc I can't work out how to overwrite this s...
Vim is acting slow when I scroll. The cursor skips some lines when I'm pressing j/k continually.
I'm using xterm and urxvt. In both vim acts like this.
This happens locally, with small or big files. I do use Control + F/B they work just fine.
EDIT: ttyfast in small files did the trick but in bigger is the same. When running without cu...
How do i tell vim editor about my include files path, so that it can auto complete the function names when i press control+N.
For example, I have c program like below
#include<stdio.h>
int main()
{
sca //here i press control+N, it doesnot complete to scanf
}
...
I have an auto command triggered off BufEnter in my .vimrc to cd into the current buffer directory (very useful)
au BufEnter * execute ":lcd " . expand("%:p:h")
The problem is this fails on FTP files (as you might expect). The real problem is the error message telling me it has failed. Is there any way to suppress the error messag...
Is there a way to view the list of recent documents you've opened in Vim? I realize I could view the cursor jump list, :ju, and then go to a cursor position in the list but this is not ideal because there will be multiple listings of the same document in the list. Is there another command which would do what I'm looking for?
...
Omnicompletion is working, but it automatically inserts the first result.
What I'd like to do is open the omnicomplete menu, then be able to type to narrow down the results, then hit enter or tab or space or something to insert the selected menu item.
Is this possible?
...
When editing PHP code (I'm not sure if it's specific to that language) and I create a new line in the middle of comma-separated lists that span multiple lines, the indent rules always unindent the line I'm leaving. Here's a video of it. This happens in arrays, function argument lists, etc.
Is there anything I can do to stop this from ha...