nek023/Lin-Xcode5

Customized Macro?

coneybeare opened this issue · 10 comments

I use a special macro which has the same argument order as NSLocalizedString(key, comment)... how can I tell Lin to use my custom macro (_ls(key, comment)) instead?

@coneybeare Yeah, it's a very useful feature request.

+1 for that feature

Would be great to have a way to configure custom macros that be recognized along with standard NSLocalizedString* macros.

I will try to make this feature this weekend.

I created this feature in my fork. But not sure if it fits your needs. It basically asks you to input your own regx to detect the command. Maybe it's not so convenient to some of you. So please let me know how you think it should work. @amarcadet @coneybeare

Couldn't you just do it as a defaults write command?

Explain more please? What do you mean by defaults write?

You can use the defaults command line tool in terminal to set any NSUserDefaults item. Why not just set the macro string that way, then you read it in the plugin?

On Tue, Mar 25, 2014 at 8:58 AM, Wenbin Zhang notifications@github.com
wrote:

Explain more please? What do you mean by defaults write?

Reply to this email directly or view it on GitHub:
#21 (comment)

I prefer to have it as part of the plugin so you don't actually have to leave Xcode and use command line tool. I created UI to allow you to input macro string regx and store that in NSUserDefaults. That's the basic idea. But now I think not everybody is very familiar with regx and it might not be very convenient? Or maybe I think too much.

@coneybeare You can try it out from my fork? And also maybe you might come up with some better ideas.

I won't be able to for a few weeks. I really think anybody who works with Xcode will be comfortable on the command line, so my idea is to just let somebody edit it that way. It seems the easiest to maintain