Edit field Regex has to contain the following: (?i).*\.json): Create a new rule by entering the following data into the dialog popping up ( Please note: The edit field NppExec command has to contain the name of the NppExec script you saved in step 5.In the toolbar at the left, click button Edit the selected rule.In the toolbar at the left, click button Add a new rule (mouse-hover over the buttons to get their tooltip texts).Navigate to (menu) Plugins -> NppEventExec -> Edit rules.Click button Cancel to close the script editing dialog.Click button Save to close the saving dialog.In the small dialog popping up enter AutoFormatJson as name for the script. That means, if the Plugins menu has another name in your Notepad UI language, you need to adapt the command accordingly. Please note: The menu entry’s path is case sensitive and has to be localized. In case you are using JsonTools plugin, line 2 of the script above has to be npp_menucommand Plugins/JsonTools/Pretty-print current JSON file. If your are using for example JSTool plugin to format your JSON files, line 2 of the script above has to be npp_menucommand Plugins/JSTool/JSFormat. Npp_menucommand Path/To your JSON formatting plugin's/menu entry
0 Comments
Leave a Reply. |