Notepad++ It is an excellent text editor. It allows you to do specific cleaning tasks, also to work with LUA code.
1. Clean all lines, each line from the character --
In LUA it is common to use the double hyphen -- to add annotations.
--.*$ will search the entire line from the characters --
--[[
entry line 1
entry line 2
entry line 3
]]
--[[ ]] To remove these envelopes, it is better to search and remove them manually.
Note: Therefore, it is advisable not to use the double hyphen -- in the defined code. For example, within a string. Replace it with other characters to rebuild later:
original local my_local_string = "--"
modified local my_local_string = "__"
search and replace --> --.*$
restore local my_local_string = "--"
âŚ
2. Remove empty lines (and empty content)
It is also common to use empty lines to separate functions and sections of code. To compact, it is a good idea to clean lines.
This operation will compact the code, but keep the indentation.
Do you have any interesting tricks to work with the LUA code?
Not really! Iâve used notepad++ quite a lot, and a bit of Atom and vscode. But I find myself ending up using the native scripting editor most of the time Especially now that it scales nicely to my screen resolution.
Trimming trailing space in notepad++ is still something I do though. Just a healthy amount of coding OCD.
(I would probably switch to notepad++ again if Renoise was keeping track of updated files, as well as the native editor does.)
@joule, I also use the native Renoise script editor 90% of the time, mainly for the reason you have cited (keeping track of updated files). However, I have always wondered why taktik does not add a separate zoom to the script editor, simply that it enlarges the text to the programmerâs taste. It seems to me something basic for a text editor.
But when I want to order code, mainly when I finish a tool, I go to Notepad++. I know that Notepad++ allows some very useful search/edit tricks. Unfortunately, I donât have a broad list of these tricks. Thatâs why I created this thread.
Currently using Notepad++ for working with renoise.Documents.
Scripting in the terminal but loading the resultant xmls in Notepad++. Run script then click on Notepad and it gives you a message that the doc has been updated. Click OK/yes and you can see what your script did to the xml.
Been much more comfortable than messing just with the terminal for this.
I also use the folder search âCtrl + Shift + Fâ on the whole renoise script folder to find stray prints and source files for keyboard shortcuts.
I actually now think the sublime coder joined the vscode team, or it is based on sublime. But it is so much better. PHP, JS, Node, LUA, debugging, git, all very nicely included. There even is a syntax highlighter for .m3u files, or a full mysql database manager, a included terminal All free.
Dun ged? Why itâs rip off? That preview bar simply is exactly the same as sublime, so I guess Microsoft payed the sublime dev for it? Also it simply is now better than sublime, sublime development kind of stuck.
I used vscode for electron and vuejs now, it is actually the absolutely best editor I ever used. But I am no expert. Itâs nicely streamlined in workflow.
I wish Renoise had some auto file updater thing for lua scripts, so you wouldnât need to reload the internal editor to make Renoise recognise changes on lua scripts. Also if it wasnât querying millions of files each seconds⌠Using FSEvents on macos or the equivalent on windows.
VS Code is great for JS/Node/Electron dev, yes. I use it to hack on Orca as the debugger is perfect. Has a very complete implementation. But it lacks in other areas and is pretty diabolical for Lua dev.
When i first got it i just thought, i yeah i recognise all these things from Sublime: multi-highlight text under cursor on cmd-d, click to place multi-cursor holding cmd (vs code uses alt but you can change to cmd with an explicit menu option), command line launch utility, the command palette to control a lot of things and run symbol search, go to lines etc., json files for config with âuser fileâ overrides, the overview thingy on the right of the text window. Plus more i canât remember now. I know not all of this is unique to Sublime, but itâs easy to see the âinfluenceâ at least. The one thing i HATE HATE HATE about VS Code is that it feels a bit crippled when itâs not connected to the internet, sometimes completions dont work and stuff. I found ways to install offline packages, but itâs not like that by default.