Re: editor that has multi file search/replace?

From: Dances With Crows (danSPANceswitTRAPhcrows_at_gmail.com)
Date: 11/17/05


Date: Wed, 16 Nov 2005 19:20:44 -0600

On 16 Nov 2005 08:53:41 -0800, news@celticbear.com staggered into the
Black Sun and said:
> Dances With Crows wrote:
>> On Wed, 16 Nov 2005 17:15:45 +0100, Michael Heiming staggered into
>> the Black Sun and said:
>> > In comp.os.linux.misc news@celticbear.com <news@celticbear.com>:
>> >> Any recommendations on any free programs for Linux, script/code
>> >> editors with syntax hilighting, that allows you to open multiple
>> >> files and then can do a find and search/replace on all open files?
>> > $ for f in *.txt [snip]
>> Er, what news@ wanted was something that worked *within* a text
>> editor. vim does that too, natch:
> I was worried at first, because sometimes I need to find/replace on
> about 50 different files, I wasn't about to type "vim file1 file2
> file3 etc.". "vim *.php" seemed to work OK.

Of course, because the shell expands *.php to "file1.php file2.php ...
fileN.php" .

> I just really like to be able to quickly scroll around, use a mouse to
> copy/paste, switch between files quickly. Oh I know you can do all
> that with Vim (except the mouse part,)

Say what?

:set mouse=a

...et voilĂ . Of course, you have to be using vim from an xterm or
xterm-like thingy (konsole, eterm, etc.) but that's no problem. It
doesn't quite react the way I expected it to work, but it wouldn't take
long for me to get used to it.

> [Another editor] has auto function complete,

^P ? Might help, maybe.

> marking and bookmarking lines,

m[a-zA-Z] sets mark.
'[a-zA-Z] jumps to mark.
:marks lists marks
:help mark gives help on vim's line marking stuff.

> quick display of the beginning of end brackets,

% ?

> built-in SQL connections

Er. That's a bit outside a text editor's range. Fortunately, you can
have as many xterms (or konsole tabs) as you want, and you can have a
mysql/Postgres/Orrible/whatever session open in one of those terms/tabs.

>> > I'd use perl/sed/awk if you have more then a few dozen files to edit.
>> AOL on that.
> I really should learn Perl sometime....

Llama Book, work through the exercises, no problem.

-- 
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin /    mail: TRAP + SPAN don't belong
http://www.brainbench.com     /    "He is a rhythmic movement of the
-----------------------------/      penguins, is Tux." --MegaHAL


Relevant Pages

  • Re: how can I stop vim from showing old xterm view after saving and exit
    ... Mark wrote: ... I want vim to leave the last screen view of the file on the xterm when I exit it, but what it really does is refresh the xterm to what the xterm showed back when I entered vim. ... similar flag for vim. ...
    (comp.editors)
  • Terminal: right-click behavior
    ... standard xterm behavior for copy-paste. ... of the right-click to mark the end-of-selection point. ... menu pops-up! ... HOW CAN I CONFIGURE GNOME Terminal TO USE THE RIGHT-CLICK TO MARK ...
    (GNOME)
  • Re: VFP 6: Good Non-GUI Editor to Use
    ... >>of text, mark end of block, perform block operation. ... Read about the map facility of Vim, ... integration into the VFP IDE. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: forth in forth
    ... an html document offers you better navigability than info but I ... still find it severely lacking compared to what less or vim ... mark for that particular point. ... If I want to return to page1 I have to click on the back ...
    (comp.lang.forth)
  • Re: [OT] Re: In vi/vim delete lines
    ... In emacs, you can grag the mouse over a range, and then delete. ... set the current mark, move to a new location, and press the delete ... Also with vim, provided your terminal has mouse support. ... to delete a paragraph, delete to the end of the paragraph, ...
    (comp.unix.shell)