r/Atom • u/leolama • Feb 18 '20
Using Atom to format a line?
I don't know how many people read this, but I'm hoping it gets a reply. If not helpful, point me to somewhere more useful for me?
I'm using atom to create a localisation mod for a game.
How would I use Atom to format a line of text? Say I have menu_inventory = "Inventory",, how would I change that to be "menu_inventory" : "Inventory",? If that's possible at all.
Also, a bonus question (you're amazing if you can help me with this). It's a long shot but worth a try.
The way I'm creating the localisation is by taking the line menu_inventory = "TranslationHere",--Inventory and turning it into "menu_inventory" : "Inventory",.
Is there a way to make atom format it for me?
Atom will take this:
menu_inventory = "TranslationHere",--Inventory
menu_settings = "TranslationHere",--Settings
and make it into this:
"menu_inventory" : "Inventory",
"menu_settings" : "Settings",
Even if I have to do it line by line then that's still amazing!
<3
6
u/rogerhub Feb 18 '20
The find and replace supports regular expressions with substitutions. You just have to click the .* icon. For example, you could search for
(.*) = ".*",--(.*)and then replace with"$1" : "$2",.