Feature Request: Add Arduino Sketch INO files to file menu



  • I am not sure if this is the correct place to request new features but I did not find a specific place.

    I would like to request that dot INO files for Arduino sketches be added to the file types menu. INO’s are a subset of C but I saw no option in the file types.

    Thank you.



  • welcome to the notepad++ community, @Jim-Pruitt

    yes, you are at the correct place to work out if something already exists, or if there are chances of features getting added at the notepad++ core.

    arduino .ino language support already exists as an add on for notepad++, so it is very unlikely, that it will be integrated at the notepad++ core.

    to install arduino .ino if you are on notepad++ 7.6.6:

    after that all .ino files will be automatically detected and highlighted as arduino files.

    note: you can also add autocompletion to this user defined language.

    • copy Notepad++.Arduino.0.2.0\APIs\Arduino.xml form above’s zip into autoCompletion inside your notepad++ program folder, %ProgramFiles(x86)%\Notepad++\autoCompletion\ folder (32 bit, installed version) or %ProgramFiles%\Notepad++\autoCompletion\ (64 bit, installed version) and restart notepad++.

    best regards.



  • @Meta-Chuh said:

    extract it, and copy Arduino_Language_0.2.0.xml to %AppData%\Notepad++\userDefineLangs\

    after that all .ino files will be automatically detected and highlighted as arduino files.

    I’m kind of an Arduino dabbler, so I tried this, and as a portable N++ user I copied to …\npp.7.6.6.bin\userDefineLangs\

    After a restart of N++ I loaded a valid .ino file and the file type on Notepad++'s status bar still said “C++ source file” (which I presume is Scintilla deciding that enough of my file looks like C++?). I guess my expectation was that the status bar would say “INO file” (based upon your description of what would happen; maybe I interpreted it poorly).

    Anyway, did I do something wrong, or maybe this method doesn’t work for portable N++?

    SInce I didn’t get the first part to work, I didn’t try the 2nd part (autocomplete).

    Thx, MC!



  • …actually it is very reasonable that an .INO file is detected as C++ (if that’s what’s happening)…the Arduino stuff really is C++, it’s just the designers thought they’d be cute and complicate things by giving the “main” file of the project the .INO extension (all other files, if any, have the typical .h, .cpp extensions).



  • @Alan-Kilborn said:

    which I presume is Scintilla deciding that enough of my file looks like C++

    AFAIK, Scintilla doesn’t guess things like that. Looking in Settings > Style Configurator > C++, .ino is in the list of default extensions, because Arduino .ino files are C++; they’ve just got some other libraries included, and the main() function is buried in one of those libraries, rather than being something you include in your source code. But it’s the definition of .ino being a default extension in the C++ list that causes Scintilla to recognize it as such.

    I tried to replicate your results – I exited notepad++, downloaded, extracted into my portable userDefineLangs folder, reloaded Notepad++, saw Arduino in my UDL list, and opened an .ino file (randomly downloaded off the interwebs), and it properly recognized as a UDL-Arduino file.



  • @PeterJones

    Ah, okay. Thx, Peter. I’m not anywhere close to knowing much about UDLs. Or, apparently that N++ knows by default that INO is in the extension list for C++…

    So if I load the .INO file, like I said it will say C++ on the status bar. If I go to the Language menu I see “Arduino” right below “Define your language…”, but it is not ticked. If I select it it becomes ticked and now my status bar says “User Defined language file - Arduino”.

    I guess I would have thought that I would not have had to select the UDL and it would have automatically known. But as it is still in the extension list for C++…hmmmmm…



  • @Alan-Kilborn said:

    I guess I would have thought that I would not have had to select the UDL and it would have automatically known

    And it did auto-identify on mine. The status bar properly says “User Defined Language file - Arduino”. The extension in the UDL overrides a “default ext” from another language.

    “What’s your debug info?” ;-) Seriously, though, I don’t know why yours is behaving differently.



  • @Jim-Pruitt said:

    INO’s are a subset of C but I saw no option in the file types.

    Personally, though I’ve been experimenting with the Arduino UDL just for purposes of helping, I would be more likely to actually just use the C++ syntax highlighter that it wants to use.

    If I cared about highlighting Arduino-specific keywords, I would probably add user-defined keywords (Settings > Style Configurator > Language: C++ > Style: INSTRUCTION WORD or TYPE WORD, add to the User-defined keywords box).

    Alternatively, I would look for the EnhanceAnyBuiltinLexer.py that @Ekopalypse shares here, and add the Arduino-specific keywords/highlighting there. (This will allow more options, for doing more styles than just adding user-defined keywords attached to one or two styles in C++.)



  • @PeterJones said:

    And it did auto-identify on mine.

    @Alan-Kilborn,

    I cleared it out and started fresh. It still auto-detects for me:



  • @PeterJones said:

    If I cared about highlighting Arduino-specific keywords, I would probably add user-defined keywords (Settings > Style Configurator > Language: C++ > Style: INSTRUCTION WORD or TYPE WORD, add to the User-defined keywords box).

    I agree. I did some more experimentation with the Arduino UDL, and I don’t really see the point of its creation. It is simply C++ with some additional “keywords” that can easily be handled, if desired, as Peter says.

    Autocompletion, however, may make it useful…off to experiment with that now…



  • Okay, after some trials, the autocompletion for Arduinio IS useful, for Function parameters hint on input.

    [ BTW, I can’t stand Notepad++'s main auto-completion, namely Enable auto-completion on each input. I have a Pythonscript that does “completion” for me in a much better manner IMO. ]

    So…I’m wondering (mainly out of curiosity, but I would use it) if there is a reasonable way to not use the “first part” but yet use the “second part” of @Meta-Chuh 's original solution for this?

    First part = copy Arduino_Language_0.2.0.xml to %AppData%\Notepad++\userDefineLangs\

    Second part = copy Notepad++.Arduino.0.2.0\APIs\Arduino.xml form above’s zip into autoCompletion inside your notepad++ program folder



  • @Alan-Kilborn

    only if you merge the parts you need from Arduino.xml to cpp.xml.
    so you would use the c++ lexer with an extended cpp.xml autocompletion file for arduino.


Log in to reply