Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (6) </ 1 2 3 [4] 5 6 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Vim tips< Next Oldest | Next Newest >
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Dec. 14 2007,23:55 QUOTE

Ah, yeah.

I think the thing I most often have trouble with as a result of using Vim is when using other editors. Many times a string of text gets started with "i", or ends with :wq =o)


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
WDef Offline





Group: Members
Posts: 798
Joined: Sep. 2005
Posted: Dec. 18 2007,15:26 QUOTE

Clearly I need to work on my vim chops as I'm missing out on all this.  All I ever use it for is a quick config file edit.
Back to top
Profile PM 
jpeters Offline





Group: Members
Posts: 804
Joined: April 2006
Posted: Dec. 19 2007,18:12 QUOTE

I was looking through lucky's cheatlink for a way to search & replace using wild characters (* or ?)  Example:

search "F1 F2 F3 F4....    
replace "F(1) F(2) F(3) F(4)

It's probably there somewhere, but couldn't find anything.
Back to top
Profile PM 
^thehatsrule^ Offline





Group: Members
Posts: 3275
Joined: July 2006
Posted: Dec. 19 2007,19:27 QUOTE

Could try something with regexp, such as 's/F\([0-9]\)/F(\1)/g'
Of course, if you needed it more than 1 digit, you could use an additional +
Back to top
Profile PM 
lucky13 Offline





Group: Members
Posts: 1478
Joined: Feb. 2007
Posted: Dec. 19 2007,19:41 QUOTE

Quote
I was looking through lucky's cheatlink for a way to search & replace using wild characters (* or ?)

Grrr, off the top of my head I can figure out the search. The replace string needs work (e.g., it's changing F1 to F(d)). Off to google...

:%s@F\d@F(\d)@g

This can't be too difficult.

Edit: Especially if you do what hats suggested. The digit range (\d) will work for [0-9].


--------------
"It felt kind of like having a pitbull terrier on my rear end."
-- meo (copyright(c)2008, all rights reserved)
Back to top
Profile PM WEB 
27 replies since Dec. 10 2007,08:11 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (6) </ 1 2 3 [4] 5 6 >/
reply to topic new topic new poll
Quick Reply: Vim tips

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code