EmEditor (text editor) Forum Index
   EmEditor Core Enhancement Suggestions
     Search and insert feature request
Register To Post

Threaded | Newest First Previous Topic | Next Topic | Bottom
Poster Thread
Zocor
Posted on: 10/17/2012 1:10 am
Just popping in
Joined: 12/28/2010
From: Netherlands
Posts: 2
Search and insert feature request
I am looking for an option like 'search and replace' but then 'search and insert, whit as sub-choices, insert before / insert after a character or word.

I'll try to explain why:
As a professional translator i often have .js files to translate. Some of them are not regularly formatted and i have to format them by hand which is a lot of work. All strings are some times in one enormous long line (files are some 200KB or bigger) where i have to look for comma's, :{, and other tags to insert a LF/CR and then insert one two or tree TABS. See below (the words in single quotes are the to be translated strings):

tinyMCE.addI18n({'en':{'dlg':{modified:'Modified',file:'File',folder:'Folder',files:'files',folders:'folders',comments:'Comments',size:'Size',preview:'Preview',duration:'Duration',dimensions:'Dimensions',contents:'Contents',unwritable:'Unwritable' etc. etc.


It should be manually formatted as:

tinyMCE.addI18n({'en':{
'dlg'
	:{
		modified:'Modified',
		file:'File',
		folder:'Folder',
		files:'files',
		folders:'folders',
		comments:'Comments',
		size:'Size',
		preview:'Preview',
		duration:'Duration',
		dimensions:'Dimensions',
		contents:'Contents',
		unwritable:'Unwritable'
 etc. etc. 


It would be great to have this work automated in emEditor in the near future. This is what i mean whit a new option like 'search and insert'.

Kind regards, Z. ;)
Stefan
Posted on: 10/17/2012 10:12 am
Home away from home
Joined: 7/14/2008
From: Germany, EU
Posts: 261
Re: Search and insert feature request
Sorry, i don't understood.
I see nothing which is "insert before / insert after".


Rather i see an "break at comma" reformating.


I would do it like this:
- format the first lines yourself till the "modified:"

- next do an search&replace:
Find: ,
Replace with: ,\n
[X]Use Escape Sequence

- next do the indenting



@Yutaka, this search&replace doesn't respect this setting:
"Configuration - General tab - Tab/Indent > [X]Enable Auto Indent"
I had expected it would be auto -indent with s&r \n too.
Zocor
Posted on: 10/17/2012 12:26 pm
Just popping in
Joined: 12/28/2010
From: Netherlands
Posts: 2
Re: Search and insert feature request
Thanks for your hint Stefan.

I find it still to much work though, I need a more precise way without all the hassle. It is not only just replacing a character sequence but I am looking for a smooth and mistake-less way because the jscript code has to stay in tact and that isn't always the case this way. It is however a way to give it a try, better anyway then doing all the string separations by hand.

Z.
Threaded | Newest First Previous Topic | Next Topic | Top


Register To Post
 
English čeština Deutsch español français italiano 日本語 한국어 Русский 简体中文 繁體中文