• "Find Next Word from Caret" or "Select and Find Next"

    12
    0 Votes
    12 Posts
    691 Views
    donhoD

    @mkupper said in "Find Next Word from Caret" or "Select and Find Next":

    Sometimes a creepy person sits near you, edges closer and closer, and whispers, do you want to touch my caret?
    That seems to explain Notepad++'s search functions. It does not matter if the creep is to your left or right.

    You just made my night :D

    https://twitter.com/Notepad_plus/status/1832921210239225984

  • New feature or missing option or workaround

    3
    1 Votes
    3 Posts
    254 Views
    again great maggaraA

    @PeterJones

    You are right.

    In my use case it would be recent changed files related or not to each other. They are not changed outside Notepad++. They are something that I am focused to do, currently working or maybe some hours later. Something that I am engaged.

    “so if the Green Checkmark is normal and Yellow Pencil is changed-without-saved”

    I could imagine something like a flash shape.

  • 0 Votes
    5 Posts
    275 Views
    Colin HinsonC

    Thank you Coises, that’s what I needed.
    Colin.

  • Unexpected text display change for >=

    3
    1 Votes
    3 Posts
    201 Views
    Alan KilbornA

    @Martin-L-Buchanan

    You probably have a font selected that has support for ligatures.
    And you may have Direct Write turned on in the Preferences (not sure about this, though; I’m AFK).

    Note: Your data hasn’t changed, just what it looks like has changed. This is confirmed by when you copy and paste that data to another source, and you get 2 characters instead of 1.

    In computing you more often want >= to appear as such

    Disagree.
    Try typing ! and then = right next to it … and now you are living in a better world.

  • Hash error on Customize Toolbar plugin

    11
    1 Votes
    11 Posts
    838 Views
    Alan KilbornA

    @Cooly0 said in Hash error on Customize Toolbar plugin:

    For x32, I never understood why/if anyone used x32 anymore

    I suppose one reasonable reason would be if they had a plugin that they needed that was older and it only had a 32-bit build.

  • File/tab specific word wrap (vs. global enable) -- THREAD REBOOT

    6
    2 Votes
    6 Posts
    693 Views
    Alan KilbornA

    This thread is older; newer threads about scripts refer one to this site’s FAQ entry, which contains info on running a script from startup.

    But, really, I could have been more explicit about what you needed to do to get it to activate upon startup, when I posted the persistent version of the script – sorry about not doing that.

    I don’t see the instructions about adding the lines to startup in the original instructions above

    For the record, the instructions were in the source code for the script itself, down near the end of the file.

  • Find and change EOL's

    3
    0 Votes
    3 Posts
    207 Views
    __

    @PeterJones Very Thanks.

  • How do I turn folding OFF?

    5
    0 Votes
    5 Posts
    411 Views
    mkupperM

    @SteveRMann You likely will also want to disable the keyboard shortcuts related to folding so that you can’t accidentally fumble-finger-fold something. They still work when the folding thing is no longer visible in the left margin. You will see a horizontal line that marks the folded area.

    In the shortcut mapper you filter for the word fold and will see a bunch of shortcuts in the Main menu tab in the section for the View menu.

  • Feature request: Resizable UDL window

    2
    1 Votes
    2 Posts
    157 Views
    PeterJonesP

    @Sam-Marrocco ,

    That’s a great idea – whether it’s a tooltip or resizable. Unfortunately, we fellow Notepad++ users in the Community don’t get to make decisions about such things. I suggest following our Feature Request FAQ to make the feature request in a place where the developer will see it and could make a decision about it. (As the FAQ says, make sure you search the existing issues – both still-open and already-closed – to make sure no one else has requested that – and upvote it if it already exists)

  • How to keep paragraph reduced

    3
    1 Votes
    3 Posts
    188 Views
    Raphaël AldhariR

    @Alan-Kilborn

    Thank you, I didn’t know the session part, it will be useful !

    Have a good day

  • Suggestion: make inc files not default associated with any language

    2
    0 Votes
    2 Posts
    201 Views
    PeterJonesP

    @Sykledust said in Suggestion: make inc files not default associated with any language:

    in order to allow automatic syntax highlighting one have to edit “%AppData%\Notepad++\langs.xml”, and (in my experience) this has to be re-done for every NP++ update.

    In the Settings > Style Configurator, you can literally just go into the language you do want it to be, go to the User ext.: box and add it – no editing of langs.xml needed. Here’s a screenshot of adding it to the C language: e27f3429-368c-456b-a82f-59255f616620-image.png

    Once you’ve hit Save & Close from the Style Configurator, then the next time you open an *.inc file in Notepad++, it will be under the new language, not Pascal, because user-extensions take priority over the default list from langs.xml. This change, like other user-defined changes, does stay chosen if you do a normal update of Notepad++, because Notepad++ updates (under normal circumstances) do not overwrite the user-edited config files.

    this has to be re-done for every NP++ update.

    Even if you did it in langs.xml, this is incorrect: a normal upgrade does not delete or overwrite %AppData%\Notepad++\langs.xml or other such files – so unless you deleted that file (or the whole %AppData%\Notepad++\ folder), or something else weird was going on, it would keep that choice.

    (Obviously, installing on a new computer will require making the config change again, but this is true for every option in Notepad++.)

  • How to read every line in a file edit box

    2
    0 Votes
    2 Posts
    227 Views
    CoisesC

    @heraldww said in How to read every line in a file edit box:

    How to read every line in a file edit box

    Notepad++ can open many files at once.
    Now I want to traverse every line of each opened file.
    What function do I need to call?
    I don’t want to read files directly from the hard drive.
    I need to read them from the memory interface through an API
    What function should be called?

    I assume you’re talking about writing a plugin or a script. I can give you a clue regarding plugins; the script logic should be similar, but I don’t know the details.

    To get the contents of an active tab, use SCI_GETTEXT or SCI_GETLINE, along with other functions you’ll find described nearby in the same document to get the length of the text or the number of lines.

    Notepad++ keeps one or two views open, with a Scintilla control in each view and the document of the active tab in that view loaded into the Scintilla control; the documents in the other tabs are not loaded into Scintilla controls, and to the best of my knowledge there is no way to read their contents without loading them into a Scintilla control.

    You can switch active tabs, though, and thereby traverse all open files. I don’t have an example handy, but the information you need is in this Notepad++ documentation.

    NPPM_GETNBOPENFILES will tell you how many files are open in each view, and NPPM_ACTIVATEDOC will activate a specific document, so that should get you most of the way there.

  • How to use LuaScript examples

    3
    0 Votes
    3 Posts
    383 Views
    mpheathM

    @Brad-Morgan luaautoindent.lua example is OnChar() so is not quite suitable for the task to reformat a whole document.

    You can download CodeFormat.exe from
    https://github.com/CppCXY/EmmyLuaCodeStyle/releases .
    Seems only 64 bit so unsure if 32 bit is available.

    win32-x64.zip is what I downloaded and tested with. CodeFormat.exe can reformat a whole document. Extract CodeFormat.exe from the zip to the plugins config directory which if installed Notepad++ is %AppData%\Notepad++\plugins\Config .

    You can add this code to LuaScript’s Edit Startup Script:

    npp.AddShortcut('Reformat Lua Code', '', function() local configDir = npp:GetPluginsConfigDir() local codeFormatPath = configDir .. '\\CodeFormat.exe' local filePath = npp:GetFullCurrentPath() local command = '""' .. codeFormatPath .. '" ' .. 'format -f "' .. filePath .. '" -d"' local file = io.popen(command) if file then local text = file:read('*a') file:close() if text and text ~= '' then editor:SetText(text) end end end)

    Need to restart Notepad++ to see the entry named Reformat Lua Code in the menu Plugins -> LuaScript .
    filePath will contain the path to the lua file. New1, New2… temporary files are not expected to work.

    A test file:

    t = {'a', 'b', 'c'}

    Click the Reformat Lua Code entry reformats the document to:

    t = { 'a', 'b', 'c' }

    The change is set in the document buffer.

  • Need help figuring this out.

    3
    0 Votes
    3 Posts
    179 Views
    CoisesC

    @Mike-0 said in Need help figuring this out.:

    Also can you tell me how to do a wildcard search in Notepad ++
    /*. I seem to remember it was something like this, but I rarely use wildcards these days.

    You can use regular expressions. Start by reading the relevant section of the online manual and then come back if you have questions.

  • Help for a JSON formatting.

    2
    0 Votes
    2 Posts
    619 Views
    Mark OlsonM

    Ordinarily I would recommend JsonTools for this sort of task, but your JSON is a real mess, with arrays that contain a confused jumble of different types, so JsonTools is less useful than it might otherwise be. Likely whatever suggestion I give will only work in this specific situation.

    That said, if you open the JsonTools tree view and execute the RemesPath query @[5][0][2][Version, FileReferences], then click the Save query result button, that would print the JSON you want in a new buffer.

    There’s lots of RemesPath documentation in the GitHub repo linked above. PythonScript is also a reasonable option for this sort of problem.

  • copy and paste problem

    6
    0 Votes
    6 Posts
    614 Views
    ohlogicO

    @ohlogic It seems that a different wine version did not suffice, though installing Diodon, a clipboard manager, seems to be ok for now, if anything changes, I’ll update this post. Good day.

  • Inserting the FF character (new Page)

    2
    0 Votes
    2 Posts
    167 Views
    Alan KilbornA

    @Branislav-Trnkocy

    See THIS recent discussion on the same topic.

  • Hiding Line number column has totally disappeared now!

    4
    -1 Votes
    4 Posts
    312 Views
    PeterJonesP

    @mkupper said in Hiding Line number column has totally disappeared now!:

    it can be a challenge to discover where a setting is

    Which is why my recommendation is always to check the User Manual > Preferences if you don’t find it right away, and search for the setting you are looking for using your browser’s find-in-page feature: searching for line number on that page finds it pretty quickly.

    And until partway into the next major version, I keep notes like (this preference used to be in **MISC** section, before v8.x.y) – but sometime after a Major release, I clear out those old notes. (For example, the most recent change for Line Number was in v7.9.2, when it and all the other marginalia moved into Margins/Border/Edge; I didn’t get rid of the note until long after v8.0 was documented … actually, it was after v8.5 before I removed the v7.x notes – two years of trying to make it easier to find a setting that moved)

  • I want to find informal and replace to formal words.

    3
    0 Votes
    3 Posts
    220 Views
    Mohamed MohamedM

    @Alan-Kilborn said in I want to find informal and replace to formal words.:

    If you had a two-element list of everything,

    What do you mean by two element list of everything.

  • Folder as Workspace Docking

    14
    0 Votes
    14 Posts
    1k Views
    Jim FortuneJ

    @rdipardo This is still happening in 2024, and the solution still works. One note; The entry starting with ‘<GUIConfig name=“DockingManager” …’ and ending with ‘</GUIConfig>’ should all be deleted, not just the lines between them. Thanks for the help. I was tearing out what little hair I have left!