• You cannot receive donation?

    Locked
    1
    0 Votes
    1 Posts
    460 Views
    No one has replied
  • Convertxt macro

    Locked
    2
    0 Votes
    2 Posts
    683 Views
    Terry RT

    Can you provide some more detail? Macros are generally created by users for their own purposes, so is it possible whom ever is asking you to do this might have more information?

    Do you know what sort of function this macro does to your file. If it changes the source data a lot then it might actually be a ‘plugin’. These are programs that users can make using other programming languages, which are then incorporated into NPP to enhance it’s usefulness.

    Terry

  • case sensive

    Locked
    2
    0 Votes
    2 Posts
    690 Views
    PeterJonesP

    I assume you want “case sensitive matching” during a Find or Find And Replace? If so, then the toggle is in the same place it’s always been: in the Find dialog, there’s a ☑ Match Case which needs to be toggled on to match case, or off to ignore case.

  • command to compile and execute code in COBOL

    Locked
    3
    0 Votes
    3 Posts
    2k Views
    PeterJonesP

    … For example, here’s an NppExec script that I use to save, compile, and run a standalone C++ program:

    npp_save cd "$(CURRENT_DIRECTORY)" g++ "$(FILE_NAME)" -o "$(NAME_PART)" npp_run cmd.exe /k "$(NAME_PART)"

    For compiling cobol, you would use your cobol compiler rather than “g++”, and would have to format the command line appropriately; if your compiler is not in your path, you will have to do something like “c:\full\path\to\compileCobol.exe”.

    If you don’t want to also run the program when compiled, then you could just remove the “npp_run …” command from the NppExec script.

  • Delete LF

    Locked
    2
    0 Votes
    2 Posts
    1k Views
    Scott SumnerS

    @Jose-Emilio-Osorio

    You could use a negative lookbehind assertion, e.g. (?<!\r)\n

    How did you get mismatched line-endings in your file, anyway?

  • Not remembering opened NppConsole

    Locked
    2
    0 Votes
    2 Posts
    755 Views
    Claudia FrankC

    @Esteban-Julián

    you probably better asking at the NppConsole forum
    unless you find someone here using it and knows the answer

    Cheers
    Claudia

  • Replace a special character

    Locked
    6
    0 Votes
    6 Posts
    2k Views
    Jose Emilio OsorioJ

    Thanks. It works without the + and ?.

  • Remember hidden lines after unhiding

    Locked
    4
    1 Votes
    4 Posts
    1k Views
    Claudia FrankC

    @Kris-S.

    I don’t know of a plugin doing this maybe someone else does.
    Npp itself offers this functionality only if you use folding instead of hiding but
    this means your document lexer needs to support this.

    I’m currently thinking about a python script solution but this raises the question,
    about the logic when to hide, which documents should be affected …

    Cheers
    Claudia

  • Creating and running macros

    19
    0 Votes
    19 Posts
    18k Views
    PeterJonesP

    @Tony-Moody,

    You must not …

    That’s not strictly true. “You must be careful if you …” would be the better way of phrasing that.

    C:\Documents and Settings\<username>\Application Data\Notepad++\shortcuts.xml

    And I can now identify that you’re on an older Windows, such as Win2k or WinXP. For more on the %AppData%, see our FAQ on the topic – which includes an explanation for how the simplest way to access folders in the user-app-data hierarchy is by %AppData%\FolderName, so you don’t have to know which file hierarchy your system uses.

    What I do is record a macro and run it to check. If it needs altering I either record it again or I have a go at editing it. One can add macros together by editing.

    Yep, those are good, solid advice.

    Editing Configuration Files

    As it says in NpWiki++: Configuration Files, “Because Notepad++ updates some of its configuration files on normal program termination, manual editing of a Notepad++ configuration file requires both specific procedures and good knowledge of the files’ layout. It is strongly advised to read about how to edit configuration files and the knowledge base for file layouts.”

    The editing configuration files page claims you have to mark the files as read-only, but that’s not technically accurate, either.

    Notepad++ will overwrite the shortcuts.xml file when it exits… but only if you’ve recorded a new Macro, or if you’ve used the Settings > Shortcut Mapper or Macro > Modify Shortcut / Delete Macro…. (There may be one or two other circumstances that I haven’t thought of, but if there are, they seem to be more rare.)

    A sequence that has always worked for me, every time, for editing the shortcuts.xml from within Notepad++:

    Close all active instances of Notepad++. This will make sure Notepad++ saves any changes it needs to save into shortcuts.xml. Open one instance of Notepad++. Do nothing else regarding Notepad++, other than what’s described in these steps, while following these instructions. Do not open another instance. Do not change GUI settings, especially the Shortcut Mapper… or Modify Shortcut / Delete Macro…. Open %AppData%\Notepad++\shortcuts.xml using that one instance of Notepad++ if you’re in a portable installation, open the local shortcuts.xml instead Make your edits to shortcuts.xml using that one Notepad++, without opening any other instances. Save shortcuts.xml Close that one instance of Notepad++. When you open Notepad++ again, the changes you made should take effect if you handcrafted a new macro, or edited an existing one, it should be available in the Macro menu. You can also re-load shortcuts.xml to make sure the changes are still in place; they should be (they are for me). If shortcuts.xml is open, either Close shortcuts.xml again, so that you don’t expect it to be editable this time,
    or if you do want to safely edit shortcuts.xml more, and haven’t done anything else with Notepad++, you’re effectively back at step #3 right now, and can continue the sequence from there
  • 0 Votes
    1 Posts
    525 Views
    No one has replied
  • can't donate

    Locked
    1
    1 Votes
    1 Posts
    561 Views
    No one has replied
  • NP++ 'ignores' parenthesis in remote session while editing Python

    Locked
    6
    0 Votes
    6 Posts
    2k Views
    Chip WachobC

    Thanks to all.

    Just got Npp with NppFTP plugin working. The ‘help’ for NppFTP is a little light, but once you set up your ‘server’ in NppFTP and click on the chain link, you are good to go…

    Used vsftpd and xinetd per here

    https://linuxconfig.org/how-to-setup-and-use-ftp-server-in-ubuntu-linux

    On the Ubuntu side.

  • Automatic update of "modified:..." in .md file header

    Locked
    2
    2 Votes
    2 Posts
    868 Views
    PeterJonesP

    What you want is something that will set a callback on the FILEBEFORESAVE notification.

    You could use PythonScript – download the latest using the Plugin Manager, or directly from the github repo releases. The Plugins > Python Script > Context-Help will bring up a help window; navigate to Notepad++ Object and scroll down to notepad.callback(function, notifications) for the syntax.

    You can search this forum for “callback” to find other complete examples of how to set up a callback. (You would want to put the callback initialization in your startup.py in order to get it to be always enabled.) I believe there are also examples in the forum of applying a callback only to a particular type of file – for you, you’d presumably want it only if the file was a .md markdown file.

    I assume LuaScript would also have the notification/callback feature, too (though I could be wrong).

  • Changing NPP's GUI

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    PeterJonesP

    Embedding the image you linked:

    I believe that the blue background you are referring to on the menu bar and the icon bar are a function of your operating system. I use Windows 10 64bit OS, and mine does not have the blue tinge to the title bar, menu bar, and icon bar. If I remember correctly, Windows 7 used the faded blue backgrounds.

    The icons, themselves, however, I do see the same icon shapes… just not with the bluish background tinge:
    Imgur
    I opened both the Settings > Style Configurator to show I had temporarily selected Zenburn, and the Settings > Preferences > General to show I’ve got ☑ Standard icons selected. If I change to ☑ Small icons or ☑ Big icons, they are definitely a different image/icon: specifically,
    and

    Note that the icons don’t change when I change the theme; they just change as I go between small, big, or standard.

  • Help with regex

    Locked
    3
    0 Votes
    3 Posts
    1k Views
    C Ananda RaoC

    @PeterJones Thank you so much! It worked!

    I went through the FAQ. But the whole regex thing looked so frightening that I decided to depend upon the kindness of strangers. Not being a programmer, I felt that it would take me at least a couple of months just to get an idea about it.

  • How to add/use ISCII encoding or devanagari code page in notepad++?

    Locked
    1
    0 Votes
    1 Posts
    619 Views
    No one has replied
  • Npp crashes when NppFTP connects to the server

    Locked
    3
    0 Votes
    3 Posts
    1k Views
    Pete NorrisP

    Scratch the question.

    Both my desktop and my laptop have Notepad++. NppFTP was crashing the Notepad++ on both computers.

    I am at a remove location now with my laptop. Notepad++ and NppFTP are working fine here.

    It must be my IP connection. I am using my Android as a hotspot.

    I apologize for taking everyone’s time.

  • 2 Votes
    6 Posts
    4k Views
    guy038G

    Hello, @ttm-1895, @claudia-frank and All,

    I think that the regex can be shortened, as below :

    (?s)(?<=\[).+?(?=\])

    Notes :

    The (?s) modifier means that the dot regex character ( . ) represents any single char ( either a standard one or an EOL one )

    The (?i) modifier is not necessary, as no letters or letter range(s) are involved in the discussed regexes

    The main part of the regex is the .+? syntax, which catches the smallest NON-empty range of any character, which, either :

    is preceded by a literal [ symbol, due to the (?<=\[) positive look-behind structure

    is followed with a literal ] symbol, due to the (?=\]) positive look-ahead structure

    Both [ and ] symbols must be escaped, with the \ symbol, to be interpreted as literals

    Cheers,

    guy038

  • How to repalce newlines to other characters with Extended Search

    Locked
    3
    1 Votes
    3 Posts
    1k Views
    Claudia FrankC

    @Shima-Hisaharu

    what you have posted and what you did describe doesn’t match.

    If you want to have it added you need to replace with \n\ta

    But from what you’ve posted as result you want to insert it in front of \n
    which means you need to replace with \ta\n.

    Find is, for both, like you already did \n

    Cheers
    Claudia

  • Need help changing a number section in these text files for a game

    Locked
    6
    1 Votes
    6 Posts
    1k Views
    Terry RT

    Great answer @guy038 ! And of course for any newbies on this forum the definition of a regex is most likely the search string used only when under the ‘extended’ or ‘regular expression’ modes of search , find and replace, using the ‘metacharacter’ options made available. Because that’s where your ‘literal’ example turns into a ‘regex’.

    When using the ‘normal’ mode or looking at a very simple string search as in this instance I probably should refrain from using the ‘regex’ word.

    Thanks for the clarification.

    Terry