# Some thoughts for people who like \`function\` nodes and coding

**URL:** https://discourse.nodered.org/t/some-thoughts-for-people-who-like-function-nodes-and-coding/99687
**Category:** General
**Created:** [15 November 2025 04:06 UTC](https://discourse.nodered.org/t/some-thoughts-for-people-who-like-function-nodes-and-coding/99687 "2025-11-15T04:06:14Z")
**Posts on this page:** 18
**Page:** 2

<div class="post-metadata">

### Author: ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)
#### Post date: [20 November 2025 08:37 UTC](https://discourse.nodered.org/t/some-thoughts-for-people-who-like-function-nodes-and-coding/99687/21 "2025-11-20T08:37:02Z")

</div>

> [@TotallyInformation](#):
>
> Some research suggests that the ESLINT vscode extension will not work directly in Monaco.

So perhaps `nrlint` is the best alternative to achieve this.

---

<div class="post-metadata">

### Author: ![ThingsTinkerer](https://avatars.discourse-cdn.com/v4/letter/t/91b2a8/32.png) [@ThingsTinkerer](https://discourse.nodered.org/u/ThingsTinkerer)
#### Post date: [20 November 2025 09:37 UTC](https://discourse.nodered.org/t/some-thoughts-for-people-who-like-function-nodes-and-coding/99687/22 "2025-11-20T09:37:04Z")

</div>

I have nrlint and it shows nicely in bottom bar (notification) and right bar (details). But it doesn't show inside the editor. Node-RED simply doesn't have first-class configuring of javascript code. By that I mean custom rules that show in editor and also custom formatting (with triggers).

---

<div class="post-metadata">

### Author: ![berijan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/berijan/32/35313_2.png) [@berijan](https://discourse.nodered.org/u/berijan)
#### Post date: [8 January 2026 14:36 UTC](https://discourse.nodered.org/t/some-thoughts-for-people-who-like-function-nodes-and-coding/99687/23 "2026-01-08T14:36:21Z")

</div>

Have You thought about using Node-Red Projects?  
[https://nodered.org/docs/user-guide/projects/](https://nodered.org/docs/user-guide/projects/)

> ### Introducing projects
> 
> Projects are a new way to manage your flow files. Rather than treat your flows as a simple pair of files, they represent everything you need to create a redistributable Node-RED application.
> 
> They are backed by a Git repository, meaning all of the files are fully version controlled and allow developers to use familiar workflows to collaborate with others.

---

<div class="post-metadata">

### Author: ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)
#### Post date: [8 January 2026 16:33 UTC](https://discourse.nodered.org/t/some-thoughts-for-people-who-like-function-nodes-and-coding/99687/24 "2026-01-08T16:33:44Z")

</div>

I came to know just a few days back that you can press `ctrl+/` to quickly comment out the current line or selected block in a function node, no matter where your cursor is in that line. such a useful feature. may be everybody who use knows already, but it was a sweet discovery for me.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [8 January 2026 17:00 UTC](https://discourse.nodered.org/t/some-thoughts-for-people-who-like-function-nodes-and-coding/99687/25 "2026-01-08T17:00:55Z")

</div>

No, I didn't know that, thanks.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [8 January 2026 17:40 UTC](https://discourse.nodered.org/t/some-thoughts-for-people-who-like-function-nodes-and-coding/99687/26 "2026-01-08T17:40:04Z")

</div>

oh, well, if you want some Monaco tips, here you go...

| **Shortcut** | **Explanation** |
| --- | --- |
| F1 | **Command Palette:** Open the main search for all editor commands. |
| F2 | **Rename Symbol:** Rename all occurrences of a variable or function safely. |
| CTRL + D | **Add Selection to Next Find Match:** Selects the next occurrence of the current word - allowing you to edit/type in multiple locations. |
| CTRL + F | **Find:** Opens the find input (inside the editor). |
| CTRL + H | **Find & Replace:** Opens the find & replace input (inside the editor). |
| CTRL + Space | **Trigger Suggestion:** Manually trigger the IntelliSense/Autocomplete menu. |
| ALT + ↑ / ↓ | **Move Line:** Move the current line or selection up or down. |
| ALT + SHIFT + ↑ / ↓ | **Copy Line:** Copy the current line or above or below. |
| CTRL + ALT + ↑ / ↓ | **Add Cursor:** Add a cursor above or below. |
| CTRL + SHIFT + \ | **Goto Bracket:** Move the cursor to the matching curly/square/regular bracket. |
| ALT + Click | **Multi-cursor:** Add a secondary cursor wherever you click. |

`F2`, `CTRL-D` , `CTRL-F` , `CTRL-SPACE` are fully committed to the auld muscle memory and are huge speed ups - worth learning IMO.

There are lots more, but you can see most of them if you simply scroll the Command Palette (`F1`)

PS, these are also the defaults in VSCode (unsurprisingly)

---

<div class="post-metadata">

### Author: ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)
#### Post date: [8 January 2026 18:10 UTC](https://discourse.nodered.org/t/some-thoughts-for-people-who-like-function-nodes-and-coding/99687/27 "2026-01-08T18:10:13Z")

</div>

> [@Steve-Mcl](#):
>
> ALT + Click **Multi-cursor:** Add a secondary cursor wherever you click.

Looks cool but what is a good use case for this one 😉

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [8 January 2026 18:15 UTC](https://discourse.nodered.org/t/some-thoughts-for-people-who-like-function-nodes-and-coding/99687/28 "2026-01-08T18:15:05Z")

</div>

> [@Sean-McG](#):
>
> Looks cool but what is a good use case for this one 😉

Its for the mouse lovers (the slow way of doing CTRL-D then using cursor keys 😉

TBF, I rarely use that unless my hand is on the mouse already

![chrome_hq7FMxjMab](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/9/4937d392d5673574f27ba0afa576c0163eb4eaaf.gif)

---

<div class="post-metadata">

### Author: ![gregorius](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gregorius/32/73816_2.png) [@gregorius](https://discourse.nodered.org/u/gregorius)
#### Post date: [8 January 2026 19:21 UTC](https://discourse.nodered.org/t/some-thoughts-for-people-who-like-function-nodes-and-coding/99687/29 "2026-01-08T19:21:21Z")

</div>

> [@Steve-Mcl](#):
>
> my hand is on the mouse already

touchpad/trackpad feature then - it's interesting that some features really work better with a three-button physical mouse while others are designed for laptops with trackpads.

not to mention mobile touch screens.

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [8 January 2026 19:26 UTC](https://discourse.nodered.org/t/some-thoughts-for-people-who-like-function-nodes-and-coding/99687/30 "2026-01-08T19:26:51Z")

</div>

Thanks folks, I probably should know of `projects`.

But when I go into the `settings.js file and search:

```auto
 * - editorTheme
 ****************************************************************************** /

    /** The following property can be used to disable the editor. The admin API
     * is not affected by this option. To disable both the editor and the admin
     * API, use either the httpRoot or httpAdminRoot properties
     */
    //disableEditor: false,

    /** Customising the editor
     * See https://nodered.org/docs/user-guide/runtime/configuration#editor-themes
     * for all available options.
     */
    editorTheme: {
        theme: "midnight-red",
        codeEditor: {
            lib: "monaco", //can be "monaco" or "ace"
            options: {
                // /* theme - must match the file name of a theme in 
                // * packages/node_modules/@node-red/editor-client/src/vendor/monaco/dist/theme
                // * e.g. "tomorrow-night", "upstream-sunburst", "github", "my-theme"
                // */
                theme: "vs-dark",
            }
        }
    }

```

Maybe because I've had NR for many years now.

Someone.....

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [8 January 2026 19:35 UTC](https://discourse.nodered.org/t/some-thoughts-for-people-who-like-function-nodes-and-coding/99687/31 "2026-01-08T19:35:02Z")

</div>

just add it...

```auto
    editorTheme: {
       projects: {
           enabled: true
       },
     ...other stuff...

```

> **[Projects : Node-RED](https://nodered.org/docs/user-guide/projects/)**

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [8 January 2026 19:37 UTC](https://discourse.nodered.org/t/some-thoughts-for-people-who-like-function-nodes-and-coding/99687/32 "2026-01-08T19:37:30Z")

</div>

Thanks.

I just did that and about to test it.

_Rhetorical?_ question:  
I am running NR 4.x.

Why wasn't that part added in any of the updates?

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [8 January 2026 20:28 UTC](https://discourse.nodered.org/t/some-thoughts-for-people-who-like-function-nodes-and-coding/99687/33 "2026-01-08T20:28:31Z")

</div>

The update doesn't replace the settings file as you may have edited it.

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [8 January 2026 22:23 UTC](https://discourse.nodered.org/t/some-thoughts-for-people-who-like-function-nodes-and-coding/99687/34 "2026-01-08T22:23:08Z")

</div>

Agreed.

But if _new options_ are added, I would think it would be nice if those are added to the `settings.js` file. rather than just being _ignored_ and not included.

At least that way idiots like me see there is another thing with which to play/adjust and not be blind sided by the whole thing.

Just saying.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [8 January 2026 22:43 UTC](https://discourse.nodered.org/t/some-thoughts-for-people-who-like-function-nodes-and-coding/99687/35 "2026-01-08T22:43:26Z")

</div>

If I remember correctly the upgrade script tells you where to find the new one to compare it with the existing one.

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [8 January 2026 23:36 UTC](https://discourse.nodered.org/t/some-thoughts-for-people-who-like-function-nodes-and-coding/99687/36 "2026-01-08T23:36:16Z")

</div>

You are most likely correct.

It was only said in passing as I missed it - and it is kinda off topic.

It is just I got shown that failing (on my part) as I missed that addition to the ~~config~~ `settings.js` file.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [9 January 2026 01:52 UTC](https://discourse.nodered.org/t/some-thoughts-for-people-who-like-function-nodes-and-coding/99687/37 "2026-01-09T01:52:14Z")

</div>

> [@smanjunath211](#):
>
> I came to know just a few days back that you can press `ctrl+/` to quickly comment out the current line or selected block in a function node, no matter where your cursor is in that line. such a useful feature. may be everybody who use knows already, but it was a sweet discovery for me.

Yes, that is standard on VSCode as well. One of my most used coding shortcuts.

F1 - yes, so much easier than ... well, I can't even remember the shortcut that most of the docs say.

F2 - is actually a common Windows shortcut for renaming things - see, Microsoft do have their occasional use! 🙂

ctrl-f/h - yup, use those all the time as well.

**Copy Line:** - if you don't have any text selected, ctrl-c then ctrl-v copies a line as well, I use that all the time too.

> [@Trying\_to\_learn](#):
>
> Maybe because I've had NR for many years now.

One of the slightly more annoying parts of Node-RED upgrades is that you don't get an obvious summary of changes to settings.js. I tend to make a copy of the vanilla settings.js when I install a new version and then use VSCode to do a visual comparison. The settings.js I use personally is rather better structured than the vanilla version so I can't do a direct comparison.

> [@Trying\_to\_learn](#):
>
> But if _new options_ are added, I would think it would be nice if those are added to the `settings.js` file. rather than just being _ignored_ and not included.

Not really possible since it is a node.js module and so may have all sorts of custom entries. For example, the default directly exports an object. But that prevents you from using one setting to update another which I find occasionally useful. So I assign the object to a constant that I then export at the end. More flexible. I also have other code I want to run on startup such as knowing the memory in use. I also look for a pid file which I take the number from and save to global, this is useful for restarting from a flow. And a few other things of use.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [9 April 2026 01:52 UTC](https://discourse.nodered.org/t/some-thoughts-for-people-who-like-function-nodes-and-coding/99687/38 "2026-04-09T01:52:34Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

[Previous page](https://discourse.nodered.org/t/some-thoughts-for-people-who-like-function-nodes-and-coding/99687.md?page=1)
