Search all text files in a directory for text

2006-08-18 Thread Jerin Joy

Hi,

I have a lot of source code distributed over a directory hierarchy
structure. I always need to find class declarations, instances where
variables are set etc. Usually I just go to command line and run
something like
find . -name *.vr -print | xargs grep 'class foo'

Isn't there an easier way to do this in vim? I can't use cscope since
the source is not in C.

Jerin


--
http://jerinj.blogspot.com/
--


Re: regexp select and place elsewhere

2006-06-29 Thread Jerin Joy

I need to use regexp. there are a lot of lines like these. I can't
manually do it.

Jerin

On 6/29/06, Saurabh Jain [EMAIL PROTECTED] wrote:




On 6/29/06, Jerin Joy [EMAIL PROTECTED] wrote:
 Hi,

 I have data that looks like this

 input [4:0] a.b.c.d;
 which I need to replace with
 input a.b.c.d [4:0] d;

 ie. I want to copy a.b.c.d and place it after input and replace it
 with d after [4:0].


Hi,
  you can try.
 // In non-insert mode press v to start visual mode
// Then use arrow keys to select the required text.
//After selecting, press d to delete the selected text.
// And paste it using p wherever you want.

Happy vimming
-Saurabh




--
Busy Wasting Time



--
http://jerinj.blogspot.com/
--


Re: regexp select and place elsewhere

2006-06-29 Thread Jerin Joy

Thanks guys, I was looking for the ()

Jerin

On 6/29/06, Vishnu [EMAIL PROTECTED] wrote:

Hi Jerin,

Use the following reg exp,

:%s/\(\[\d\+:\d\+] \)\(.*\.\)\(\i\+\);/\2\3 \1\3;/


:h \(


~VIshnu

 -Original Message-
 From: Jerin Joy [mailto:[EMAIL PROTECTED]
 Sent: Thursday, June 29, 2006 2:29 PM
 To: vim@vim.org
 Subject: regexp select and place elsewhere

 Hi,

 I have data that looks like this

 input [4:0] a.b.c.d;
 which I need to replace with
 input a.b.c.d [4:0] d;

 ie. I want to copy a.b.c.d and place it after input and replace it
 with d after [4:0].

 I'm fairly comfortable with regexp but I'm not sure how to select and
 copy the text to another place on the line.
 Could someone help me out here.

 thanks,
 Jerin

 --
 http://jerinj.blogspot.com/
 --





--
http://jerinj.blogspot.com/
--


Re: Replace all on a line

2006-06-26 Thread Jerin Joy

maybe the 'gdefault' option is on. What does

  :verbose set gdefault?
output?

it doesn't output anything. Cursor just comes back to the file.

Jerin



Regards,
Jürgen

--
Jürgen Krämer  Softwareentwicklung
HABEL GmbH  Co. KGmailto:[EMAIL PROTECTED]
Hinteres Öschle 2  Tel: +49 / 74 61 / 93 53 - 15
78604 Rietheim-WeilheimFax: +49 / 74 61 / 93 53 - 99




--
http://jerinj.blogspot.com/
--


Copying from vim to a term

2006-06-20 Thread Jerin Joy

Hi,

I have a vim window open with a file in a terminal. I wanted to copy
some text to another terminal.
FIrst problem is my select. I hit the Ctrl+V to go into visual mode on
a line, then hitting the Shift key and moving up and down does not
select the lines below or above it.
So I select with my mouse. I usually just use my middle mouse button
to paste elsewhere but it doesn't work for things I select/copy in
vim. I tried the explicit Copy/Paste but it doesn't work.
Do I need to add a setting to my .vimrc file?

thanks
Jerin

--
http://jerinj.blogspot.com/
--


differences in regexp replace

2006-06-19 Thread Jerin Joy

Hi,

I have the same version of vim installed on two different machines.
The file I want to edit contains
inputsignala;
input   signalb;

I wanted to have just signala, signalb on a line so that the file looks like:

signala
signalb

I used the regexp replace:
:%s/input[\ ]\+/ /g

It works on one of the systems but the other one gives me a Pattern
not found error. Does anyone know whats causing this difference?

Jerin


--
http://jerinj.blogspot.com/
--


Re: differences in regexp replace

2006-06-19 Thread Jerin Joy

hi,

It was actually a \t and not a space.
thanks!

Jerin

On 6/19/06, Andrei A. Voropaev [EMAIL PROTECTED] wrote:

On Mon, Jun 19, 2006 at 12:20:10PM +0530, Jerin Joy wrote:
 Hi,

 I have the same version of vim installed on two different machines.
 The file I want to edit contains
 inputsignala;
 input   signalb;

 I wanted to have just signala, signalb on a line so that the file looks
 like:

 signala
 signalb

 I used the regexp replace:
 :%s/input[\ ]\+/ /g

 It works on one of the systems but the other one gives me a Pattern
 not found error. Does anyone know whats causing this difference?

Maybe the 'magic' option is set to something different. Try :he pattern
and :he 'magic'

--
Minds, like parachutes, function best when open




--
http://jerinj.blogspot.com/
--


Syntax Highlighting problem

2006-05-10 Thread Jerin Joy

Hi,

I use gvim as my default editor. My source files are in a non standard
language whose syntax is similar to Verilog. When I open files from
command line in independent gvim windows the syntax highlighting uses
the verilog syntax which is what I want. The only thing is when I use
the split command to split an existing gvim window between 2 files,
the new file opened does not have the syntax highlighting or colour.
Does anyone know why its not using the verilog syntax for the second
file? Is there a way to add this file type so that gvim recognizes it?
It works fine for Verilog/C++ source files.
I wanted to use the split command instead of multiple gvim windows to
reduce clutter on my desktop.

Jerin


Shell support in Vim?

2006-05-10 Thread Jerin Joy

Hi,

I was just wondering if adding shell support to vim is a feature thats
being considered. It would be great to be able to run commands from
vim instead of having to shift to terminal to do so.
I've seen vim shell but its a separate plugin:
http://www.wana.at/vimshell/

Jerin
--
http://jerinj.blogspot.com/