• Monitor (tail -f) prompts to reload file

    15
    2 Votes
    15 Posts
    18k Views
    PeterJonesP

    @ryangray01,

    Again, your only contribution in this topic was to reiterate phrases that had already been used in other posts. Please try to include your own unique perspective in posts. You now have two “could be AI nonsense” strikes against you. You are on very thin ice at this point.

    This was tested on Notepad++ v7.8 (32-bit) on Windows 10 (64-bit)

    Why would anybody still be using v7.8 (32-bit) on Windows 10 (64-bit) – in 2019, when the original discussion was started, that was reasonable. But 6 years later, when Notepad++ is to v8.8.1, and Windows 10 is at the cusp of end-of-support from Microsoft, I cannot believe you are actually still using that setup, or that there is any benefit today to trying to replicate that 6-year-old setup.

  • Notepad++ and NUL characters

    13
    0 Votes
    13 Posts
    2k Views
    PeterJonesP

    @ryangray01 ,

    note from moderator: please reply to the original topic, rather than creating a new topic, otherwise readers lose all context. I have fixed this post (and one other), but it’s really better if you just keep the reply in the same topic to begin with.

    update: two of your three posts so far seemed like AI nonsense; two of your three posts so far have replied into a separate topic from the post being replied to; it is really looking like you are just here to disrupt communication, rather than participate in community. If your next post is as meaningless as two of yours, or if it requires extra moderator effort to re-connect it to context, I am going to conclude that you are an AI, and thus react according to our forum’s policy on AI nonsense.

  • Large file - hangs when entering text

    6
    1 Votes
    6 Posts
    887 Views
    xomxX

    @DougK-AZ said in Large file - hangs when entering text:

    couldn’t find a way to upload the sample file.

    Each line is similar to the following: …

    Can you reproduce the problem also with this testfile_356529lines_LF.zip?

    Can you reproduce with disabled (unchecked) N++ Preferences > Auto-Completion > Enable auto-completion on each input ?

  • Feature request - Make font size in tabs adjustable

    Locked
    2
    1 Votes
    2 Posts
    264 Views
    Mark OlsonM

    There’s another topic on this subject; it would probably be best if further discussion happened there.

  • printing from file to printer with colored characters

    3
    0 Votes
    3 Posts
    356 Views
    PeterJonesP

    Additional info:

    First, once I was on my computer this morning, I was able to confirm that ino is already in the default list of extensions for C++, so you don’t need to add it to user ext. Sorry for my poor memory.

    Notepad++, by default, doesn’t know the Arduino-specific keywords/constants. But the Style Configurator has 8 “USER KEYWORDS #” styles for C++, and you can add your own keywords into User-defined keywords box for each, and define your own colors.

    Before:
    e1e7f4e3-e45c-4e1c-853d-82658355ecfd-image.png

    After:

    Change USER KEYWORDS 1 to green, with setup loop Change USER KEYWORDS 2 to orange, with pinMode digitalWrite delay begin Change USER KEYWORDS 3 to bold+orange, with Serial Change USER KEYWORDS 4 to aqua, with HIGH LOW OUTPUT

    d2149d3c-47bd-4c08-a4e6-46bfc6b44aec-image.png

    You would have to go through and figure out any other keywords (I don’t currently have a list of arduino keywords, though you could probably search the forum for “Arduino” and maybe find something).

    Ah, there, I knew it must exist: this post had a link to a zipfile with an old UDL for Arduino. From it, I was able to extract some lists of keywords, paste them into Arduino IDE 1.8.18 to see how it categorizes them, then re-allocate them:

    USER KEYWORDS 1:loop setup USER KEYWORDS 2:ANALOG_PORT BSSID Client END_SYSEX File Firmata MAX_DATA_BYTES REPORT_VERSION RSSI SSID START_SYSEX TOTAL_PORTS WiFiClient WiFiServer Wire abs accept acos analogRead analogReference analogWrite asin atan atan2 attach attachInterrupt attached autoscroll available begin beginPacket beginTransmission bit bitClear bitRead bitSet bitWrite blink blinkVersion callbackFunction ceil clear click close connect connected constrain cos createChar cursor degrees delay delayMicroseconds detach detachInterrupt digitalRead digitalWrite direction disconnect display encryptionType end endPacket endTransmission exists exp find findUntil floor flush gatewayIP getResult getSocket highByte home interrupts isListening isPressed leftToRight listen localIP log lowByte macAddress map max micros millis min mkdir move noAutoscroll noBlink noCursor noDisplay noInterrupts noTone onReceive onRequest open overflow parseFloat parseInt parsePacket peek pinMode position press print printFirmwareVersion printVersion println processInput pulseIn radians random randomSeed read readBytes readBytesUntil readMicroseconds release releaseAll remoteIP remotePort remove requestFrom rightToLeft rmdir round scrollDisplayLeft scrollDisplayRight seek send sendAnalog sendDigital sendDigitalPort sendString sendSysex setBitOrder setClockDivider setCursor setDataMode setFirmwareNameAndVersion setFirmwareVersion setSpeed setTimeout shiftIn shiftOut sin size speed sq sqrt status step stop stringCallbackFunction subnetMask sysexCallbackFunction tan tone transfer version write writeMicroseconds USER KEYWORDS 3:Serial Serial1 Serial2 Serial3 USER KEYWORDS 4:ANALOG_MESSAGE BIN CHANGE DEC DEFAULT DIGITAL_MESSAGE EXTERNAL FALLING FILE_READ FILE_WRITE HALF_PI HEX HIGH INPUT INPUT_PULLUP INTERNAL INTERNAL1V1 INTERNAL2V56 LOW LSBFIRST MSBFIRST OCT OUTPUT PI PROGMEM REPORT_ANALOG REPORT_DIGITAL RISING SET_PIN_MODE SPI_CLOCK_DIV128 SPI_CLOCK_DIV16 SPI_CLOCK_DIV2 SPI_CLOCK_DIV32 SPI_CLOCK_DIV4 SPI_CLOCK_DIV64 SPI_CLOCK_DIV8 SPI_MODE0 SPI_MODE1 SPI_MODE2 SPI_MODE3 SYSTEM_RESET TOTAL_ANALOG_PINS TOTAL_DIGITAL_PINS TWO_PI

    I don’t guarantee that’s all, or even most, of the Arduino keywords. But it’s a reasonable selection to get you started.

  • Notepad++ strange behavior if I change the style

    3
    1 Votes
    3 Posts
    539 Views
    Mauricio CagnassoM

    @xomx Thanks!!!

    This WORKS!!! 👌

    a269e947-c335-4c76-a071-455ded5c8931-image.png

  • Column Editor incrementetion is not working

    4
    1 Votes
    4 Posts
    530 Views
    Peter 1966P

    Thank you

  • New User Questions?

    2
    0 Votes
    2 Posts
    306 Views
    mkupperM

    @grievousangel-wtj Have you seen the gcode add-on for Notepad++ https://ncnetic.com/notepad-gcode-plugin/

    It’s for G-code while you mentioned G/M-code. I don’t know if that makes a difference.

    As I don’t have a CNC I don’t know if the plugin offers the coding help features you are looking for.

  • Two buffer-activated notifications instead of just one

    7
    3 Votes
    7 Posts
    929 Views
    Alan KilbornA

    I noticed a workaround; consider the following script:

    # -*- coding: utf-8 -*- from __future__ import print_function # Python2 vestige! # see https://community.notepad-plus-plus.org/topic/26799 "Two buffer-activated notifications instead of just one" from Npp import notepad, NOTIFICATION last_known_doc_index_by_view = [ notepad.getCurrentDocIndex(0), notepad.getCurrentDocIndex(1) ] def find_docindex_from_buffer_id_via_enumeration(test_buffer_id, must_be_in_this_view): for (pathname, buffer_id, index, view) in notepad.getFiles(): if view != must_be_in_this_view: continue # needed to find the right doc in case of cloned doc if buffer_id == test_buffer_id: return index return -1 # never happens def bufferactivated_callback(args): cfn = notepad.getCurrentFilename().rsplit('\\', 1)[-1] # only the filename, no directory print('BUFFERACTIVATED:', cfn, 'args=', args) current_view = notepad.getCurrentView() current_doc_index = notepad.getCurrentDocIndex(current_view) curr_doc_index_via_enumerating = find_docindex_from_buffer_id_via_enumeration(args['bufferID'], current_view) if current_doc_index != curr_doc_index_via_enumerating: print(' NOT A NEEDED ACTIVATION NOTIFICATION!!!!!!') return print(' HANDLING A REAL ACTIVATION NOTIFICATION!') if last_known_doc_index_by_view[current_view] == current_doc_index: print(' note: THIS DOC WAS ALREADY ACTIVE IN THE ITS VIEW -- so was an activation notify really necessary?') else: last_known_doc_index_by_view[current_view] = current_doc_index notepad.callback(bufferactivated_callback, [NOTIFICATION.BUFFERACTIVATED])

    This workaround works because the “index” reported with the bogus notification is also bogus, and the correct index can be found by looking through the entire tab list for the right buffer id.

    A subtle point of the script is that it can also detect when the active tab in the inactive view is activated by the user.

  • How do I add a macro to toolbar

    8
    0 Votes
    8 Posts
    922 Views
    Leszek HelakL

    @PeterJones
    Thanks, I understand

  • 0 Votes
    2 Posts
    299 Views
    PeterJonesP

    @Code-with-Pritam ,

    Notepad++ is a text editor. You type your C++ code in there, and the syntax highlighting in Notepad++ will make it easier to visually parse the code you are typing. Then you use an external compiler to compile your source code, then you run the executable. In a bog-standard approach, all Notepad++ is used for is typing.

    If you have a plugin like the NppExec plugin, you can help automate some of the steps. For example, I have written a script for NppExec plugin that I call gcc-CompileAndRun, which saves the active file, runs gcc on that file to create an executable with the same name, then runs the executable in the NppExec console window:

    NPP_SAVE cd "$(CURRENT_DIRECTORY)" gcc -o "$(NAME_PART)" "$(FILE_NAME)" $(NAME_PART)

    (This script only works on a self-contained, single-file c program. if you used g++ instead of gcc, it would work on a self-contained, single-file c++ program. You could have a similar script which runs your own copy of make – or similar, as appropriate to what C++ compiler and build system you have: the Notepad++ source code, when you are building it with mingw-based g++, uses mingw32-make; strawberryperl comes with a mingw-based gcc/g++ compiler setup, uses gmake (which might be just a rebranded mingw32-make, but I’m not sure); and I know I’ve heard that some c++ setups on Windows can use CMake – but, anyway, if you have a makefile with your project, you could easily do a similar NppExec script that would run the right flavor of make with an appropriate target, rather than directly compiling one c/c++ file and running its executable.

    (Personally, I stick with NppExec for the single-file programs, but for anything more complex, I’m more likely to just do the code editing in Notepad++ and then go to a Windows command-line-prompt to run makefiles and the like. And for C++ apps built with the VisualStudio ecosystem, I have given in and started to use that full IDE environment, because debugging is more convenient that way.)

    This forum actually has a FAQ entry on how to Compile using an external compiler from Notepad++, which reiterates some of what I told you above, and also has a bit more on the specifics of the NppExec plugin.

    This forum is not really the best resource for learning C++, because C++ is just one of the 90+ languages that Notepad++ knows how to syntax highlight, and this forum is focused on the Notepad++ aspects, not on the specific coding language you want to use or programming tasks you want to accomplish. There are tons of websites out there dedicated to helping you learn C++; and there are other forums (like stackexchange) that are better suited to getting answers to coding questions, so you’ll get better answers to coding questions someplace like that than you will here.

    So, if you have specific questions about the use of Notepad++ and its plugins that the FAQ and my brief introduction to using NppExec for compiling C++ code didn’t cover, feel free to ask, because questions specific to Notpead++ is the reason this Forum exists and most of the regulars come to answer questions.

  • Where to find shortcut keys for special characters ! & $ ( )- = , / \\ :.

    2
    0 Votes
    2 Posts
    326 Views
    PeterJonesP

    @GuFengEn0d ,

    Where can I find shortcut keys for special characters?

    Do you mean: “how do I type those characters in my file?” You use your keyboard. If your keyboard doesn’t have those, you would enter the characters the same way you would in any text eidtor or normal typing application on your computer.

    Do you mean: “how do I use those characters for keyboard shortcuts?” You use Settings > Shortcut Mapper, double click on the command whose shortcut you want to change, and pick the “special character” from the drop-down list – note that a character on its own cannot be a shortcut; you need to use a modifier (like Ctrl or Alt) along with it. Please note:
    - In v8.7.6 or newer, the keys specific to your keyboard should be listed in the Shortcut Mapper’s character pulldown
    - In v8.7.5-and-earlier, the mapper only shows the US-EN keys, and you might need to read this FAQ for how to map ~ [ ] ; ' \ / <> and Num . (numeric keypad .) to what keys they actually are on your keyboard: it gives some example mappings for a handfull of keyboards, and shows you a website where you cand

    Do you mean: “how do i search through the Shortcut Mapper to see whether those keys are used in any existing shortcuts?” Use the Filter: ____ field on each page of the Shorcut Mapper.

    See the User Manual’s Shortcut Mapper section for more.

  • Android Version

    4
    0 Votes
    4 Posts
    593 Views
    PeterJonesP

    @Anderson-Silva ,

    Nope. I haven’t used a notepad-style app on Android in years (and the one that I used to use now gets horrible reviews, so I won’t be naming/recommending it, in case it’s as bad as they say).

    Somebody might be able to get you a quick recommendation if they have one, but this isn’t really the best place for discussing the pros and cons of specific Android apps: searching the internet for “best android notepad app” and then visiting reputable app-review sites to find reasonable (non-SEO) results is probably your best bet.

  • Copy & past if copy is null

    3
    0 Votes
    3 Posts
    355 Views
    mathlete2M

    For those who want to update their back-up configuration files with this setting: in config.xml, look for GUIConfig name="ScintillaPrimaryView" and add the entry lineCopyCutWithoutSelection="no".

  • rereplace help

    3
    1 Votes
    3 Posts
    443 Views
    TreyT

    @Alan-Kilborn I had to re-add ‘.*’ to the middle section, but I got it working now and can use variables the way I want now, thanks!!

  • [FORK] Tangential Discussion about what advice is "on topic"

    34
    1 Votes
    34 Posts
    5k Views
    donhoD

    @Alan-Kilborn

    Given his level of participation here, I’d have to guess that Don doesn’t care.

    Sorry for not being able to spend more time here, and thank you (and others) to be here for helping people. I do care the proper functioning of the forum though.

    By “non-Notepad++ solutions”, I thought it was kind of spam disguised as a solution.
    Even if someone provides a brief reply such as “Notepad++ doesn’t have the feature you want, try VS Code/Sublime Text/UltraEdit/vi/emacs/…etc”, I think it’s tolerable. The most important thing is that users come here to find a solution, and he/she has got one - be it python, batch, run menu or not run menu, whatever - even if it’s not within Notepad++.

    @guy038
    Thank you for pinging me.

    As @donho created this forum, it seems to me that Don is the only person which has authority to tell us what we should speak of or not in our forum !

    The community/forum is not about any specific individual, but about people.
    If I used my privilege to silence others by imposing my will, instead of following the rules, I would be the only one left in this place.

    Regarding the rules about this tangential discussion, I find Peter’s point to be very fair:
    https://community.notepad-plus-plus.org/topic/26783/fork-tangential-discussion-about-what-advice-is-on-topic/5?_=1745252343263

    Not trying to enlighten anyone, just sharing my 2 cents as part of community.

  • Persistencia de Styles Tokens

    Locked
    3
    0 Votes
    3 Posts
    413 Views
    PeterJonesP

    Please continue the conversation in the original. This topic is locked

  • create links to FTP files

    5
    0 Votes
    5 Posts
    543 Views
    Lhuillier SébastienL

    @PeterJones yes. thanks a lot

  • Cloned file status breaks after N++ restart

    9
    2 Votes
    9 Posts
    1k Views
    xomxX

    @Mark-Olson

    Thanks, I used that info while fixing: x64 Release binary for testing

  • N++ behavior when Windows Update does an unattended restart

    11
    2 Votes
    11 Posts
    1k Views
    Alan KilbornA

    @xomx

    I’ll leave Windows updates on (for now) and see if the N++ situation recurs.