[TxMt] Re: Select word and replace with different word

Ross Ahmed rossahmed at googlemail.com
Wed Mar 12 14:37:46 UTC 2014


Hi all

I don¹t think I captured what I was actually after in my question ­ my
mistake. Heres another try:

I often have a list of birds like this

Bar-tailed Godwit
Mallard
Redshank
Ringed Plover
Turnstone

I need to convert them into their abbreviated codes, so the list needs to
become:

BA
MA
RK
RP
TT  

My current strategy is to just manually replace each bird name with their
code. I was hoping to make 5 selections (multiple cursors, one cursor for
each bird name), and convert them to their codes in one keystroke. Does this
sound possible?

Thanks
Ross




From:  Stéphane THIL <stephane.thil at univ-perp.fr>
Reply-To:  TextMate users <textmate at lists.macromates.com>
Date:  Wednesday, 12 March 2014 08:26
To:  TextMate users <textmate at lists.macromates.com>
Subject:  [TxMt] Re: Select word and replace with different word

Hi,
The easiest way (afaik) is probably to create a snippet that replaces Œrspb¹
with 'Royal Society for Protection of Birds¹ using a tab trigger.
S.

On 11 Mar 2014, at 20:13, Gildas Hamel <gweltaz at ucsc.edu> wrote:

> If this is in LaTeX, you can also edit the configuration file (LaTeX bundle >
> Edit Configuration File) and add a line:
>  rspb = 'Royal Society for Protection of Birds';
> or even
>  rs = 'Royal Society for Protection of Birds';
> and in your text, use Control-Shift-period after typing rs.
> --gildas
> 
> 
> On Tue, Mar 11, 2014 at 9:10 AM, Ross Ahmed <rossahmed at googlemail.com> wrote:
>> Lets say I have this abbreviation:
>> 
>> RSPB
>> 
>> Can I make a command which, when I select ³RSPB² and hit a keyboard shortcut,
>> will replace ³RSPB² with ³Royal Society for Protection of Birds²?
>> 
>> Thanks 
>> Ross
>> 
>> 
>> _______________________________________________
>> textmate mailing list
>> textmate at lists.macromates.com
>> http://lists.macromates.com/listinfo/textmate
> 
> 
> 
> -- 
> Gildas Hamel
> 331 Plateau Avenue
> Santa Cruz, CA 95060
> 
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate

_______________________________________________ textmate mailing list
textmate at lists.macromates.com http://lists.macromates.com/listinfo/textmate

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20140312/6f08d319/attachment.html>


More information about the textmate mailing list