Replacing commas with tabs in KWrite

Frank Bures lisfrank at chem.toronto.edu
Tue Feb 5 18:12:38 GMT 2008


Matthew Woehlke wrote:
> Frank Bures wrote:
>> 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
> 
> What app are we talking about, again?
> 
> This doesn't work in my 3.5.x katepart:
> 'No such command: "1,$s/something/something_else/g"'
> 
> ...but '%s/something/something_else/g' does.
> 

I was talking about vi.

-- 

<feeb at chem.utoronto.ca>
___________________________________________________
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.




More information about the kde mailing list