Abdelrahman Eldawi
Abdelrahman Eldawi

Reputation: 13

Changing all variables to specific naming convention (lowercase)

Is there any automated way to change all variables (alongside there references) in file to specific convention (lower case) without changing the whole line to lowercase?

I'm using VScode IDE but it doesn't seem to help, it only helps in changing them one by one!

In my case

local Device_MacAddress_f =     ... >> local device_macAddress_f
local Device_Signalstate_f=     ... >> local device_signalstate_f
local Device_Controller_f =     ...
local Device_Timesinceboot=     ...
local Device_Ipaddress_f =      ...
local Device_Subnetmask_f =     ...
local Device_Gateway_f =        ...
local Device_Netbiosname_f=     ...
local Device_Dhcpstate_f =      ...
local Device_Fwversion_f =      ...
local Device_Kernalversion=     ...
local Device_Controllertype_f = ...

Upvotes: 1

Views: 310

Answers (1)

shingo
shingo

Reputation: 27011

Enable regex search .*

Search: local Device_([A-Z])

Replace: local device_\l$1

Upvotes: 2

Related Questions