Re: Replacing commas with tabs in KWrite

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthew Woehlke wrote:
> Eyolf Østrem wrote:
>> On 04.02.2008 (14:47), Matthew Woehlke wrote:
>>> Actually, as soon as I posted that, I remembered the 's' command, which 
>>> /does/ understand \t... view->switch to command line, and then type 
>>> 's/,/\t/g' works, but only on the current line. I want to say there is a 
>>> way to make it work on all lines (and I found a list mail on google that 
>>> implies it is so), but I don't recall how offhand, and haven't managed 
>>> to track down anyone that knows.
>> Just prepend a range of the command (do :help range). % is the whole file,
>> 1,25s/.... would apply the substitution to the first 25 lines,
>> :/foo/,/bar/s/... between the first matches of "foo" and "bar", etc.
>> Quite powerful, that little vimmer...
> 
> Ah, so *that's* the prefix. I was trying the sed prefix, '1,$'... Can 
> you tell I'm not much of a vim guru? ;-)
> 

You can do
:1,$s/something/something_else/g

It's the same thing as '%'

Cheers
Frank

-- 

<feeb@xxxxxxxxxxxxxxxx>
___________________________________________________
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.


[Index of Archives]     [Trinity (TDE) Desktop Users]     [Fedora KDE]     [Fedora Desktop]     [Linux Kernel]     [Gimp]     [GIMP for Windows]     [Gnome]     [Yosemite Hiking]
  Powered by Linux