• how to delete from lines custom formula

    2
    0 Votes
    2 Posts
    213 Views
    Alan KilbornA

    @Dream-Box

    I would try searching for (?-s)delete".+ and replacing with nothing. Search mode = Regular expression.

  • Breaking lines after full stops, not dots

    5
    0 Votes
    5 Posts
    2k Views
    Viktoria OntapadoV

    @PeterJones

    I see. Again, thank you for your explanation and assistance and have a nice weekend!

  • Dialogs very slow to open

    13
    0 Votes
    13 Posts
    1k Views
    EkopalypseE

    @Michael-Brock

    Because you already using pythonscript plugin it might be helpful
    to let a script like this

    from Npp import notepad from os import path import xml.etree.ElementTree as et from pprint import pformat # <GUIConfig name="Backup" action="0" useCustumDir="no" dir="" isSnapshotMode="yes" snapshotBackupTiming="7000" /> expected_settings = {'name': "Backup", 'action': "0", 'useCustumDir': "no", 'dir': "", 'isSnapshotMode': "yes", 'snapshotBackupTiming': "7000", } plugin_config_dir = notepad.getPluginConfigDir() npp_config_dir = path.join(plugin_config_dir, r'..\..') config_xml = path.abspath(path.join(npp_config_dir, r'config.xml')) if path.exists(config_xml): xml_doc = et.parse(config_xml) node = xml_doc.find('GUIConfigs/GUIConfig[@name="Backup"]') current_settings = { x:y for x,y in node.items()} if expected_settings != current_settings: template = ('name == {name}\r\n' 'action == {action}\r\n' 'useCustumDir == {useCustumDir}\r\n' 'dir == {dir}\r\n' 'isSnapshotMode == {isSnapshotMode}\r\n' 'snapshotBackupTiming == {snapshotBackupTiming}\r\n') current = template.format(**current_settings) expected = template.format(**expected_settings) notepad.messageBox(('Backup settings have been changed\r\n\r\n' 'expected:\r\n\r\n{0}\r\n\r\n' 'received:\r\n\r\n{1}').format(expected, current), 'BACKUP SETTINGS CHECK') else: notepad.messageBox(('Unable to find:\r\n\r\n{0}\r\n\r\n' 'Backup settings might be lost!').format(config_xml), 'BACKUP SETTINGS CHECK')

    run on every npp startup. Put it in user startup.py and make sure
    your configuration is set to ATSTARTUP then your expected
    settings will be checked against current xml setting each time npp starts. Of course you need to adapt the expected settings to your need.

  • Old Pythonscript stopped working

    5
    0 Votes
    5 Posts
    386 Views
    Bérci RóbertB

    @Ekopalypse
    Thanks. That did the trick.

  • Drag and Drop not working in portable 7.6.3

    15
    0 Votes
    15 Posts
    4k Views
    chetanDNC

    @Pere-Drinovac said in Drag and Drop not working in portable 7.6.3:

    Both, Total Commander and N++, are portable and running with user privileges. Deactivating UAC doesn’t change anything.

    I have figured out, that I used TC as 32Bit version and N++ as 64Bit version. Using N++ as 32Bit version solves the problem.

    Solved for me too. I was using ClearCase (Windows 32 bit application). Drag and Drop from ClearCase 32 to notepad++ 32 bit works fine. On the other hand drag and drop from any win 32 application to notepad++ 64 bit is not working.

  • Can't Read File/Folder Names in Workspace Window

    3
    0 Votes
    3 Posts
    406 Views
    PeterJonesP

    @Sylvester-Bullitt said in Can't Read File/Folder Names in Workspace Window:

    Looks like some work is needed on the links on the NP++ download page.

    Could you be more specific? The downloads available at the official site are the only official downloads of Notepad++. Specifically, https://notepad-plus-plus.org/downloads/v7.8.2/ has the v7.8.2 released in December. There have been no newer releases. Do you believe there is a typo in one of the download links on the v7.8.2 page? Or do you think that the v7.8.2 available there is not the “real/final” v7.8.2?

    The newest 64-bit Notepad++ I can see in the cnet downloads is the older v7.8.0, from October. I have not compared the hashes to determine whether it’s a valid official version or some custom / out-of-Don’s-control repackaging (my work blocks cnet downloads).

  • Collapse XMl tags for all the XMLS in a file

    2
    -2 Votes
    2 Posts
    7k Views
    PeterJonesP

    @vijay-S ,

    This is not your personal XML support forum.

    You have been given plenty (dozens!) of regex examples to manipulate XML, and @guy038 has selflessly iterated through your ever-changing requirements to try to satisfy you.

    I have previously explained to you that you need to read documentation (which I linked to), and show what you’ve tried, and basically you need to show some effort.

    Notepad++ has builtin XML language syntax highlighting and code folding, and View > Collapse Level / Uncollapse Level will help you hide and unhide various levels of your XML hierarchy.

    There are plugins for Notepad++ – noteably, XML Tools – which will help you with validation, syntax checking, etc.

    @Peter-Brand has recommended that you use XSLT to do your XML transformations.

    There are programming languages out there with libraries that will help you extract just the information you want from your XML files.

    Please show some effort

  • Spaces appear in Notepad++ but not in Excel

    2
    0 Votes
    2 Posts
    497 Views
    PeterJonesP

    @Rick-Gallo said in Spaces appear in Notepad++ but not in Excel:

    thought the experts on an N++ forum might have the answer.

    You really didn’t give us much to go on. You say “Excel” and “printed text” and “N++”, but don’t say what you mean. By “printed text”, do you mean the results of the formula? Or printing from Excel to paper? For Notepad++ to show them, are you copying the cell values from excel and pasting them as text in Notepad++? or is your spreadsheet a CSV-with-formulas, and you are looking at the source CSV in Notepad++?

    Besides, what does your problem have to do with Notepad++? All I can see is that Notepad++ happens to be the text editor that you used for whatever “look at text” operation you are doing that you haven’t described. My guess is that any other text editor would have shown the same thing.

    Really, assuming you provide more details to them than you did to us, an Excel forum would probably be a better place. But maybe someone else here is a better guesser than I am.

  • Prevent code folding style to override keyword style

    7
    0 Votes
    7 Posts
    606 Views
    PeterJonesP

    I have explained the situation to the best of my ability, and shown you where to go to ask for this feature.

    Continuing to try to “convince” me is pointless. I have no authority to force someone else to make the changes; I do not have the set of knowledge to make and submit the changes myself (nor the time, even if I had the knowledge). If you have the knowledge and time, then submit the pull request yourself, and see if it gets accepted; if you don’t, then submit the feature request and wait to see if anyone else has the time and ability and approval to implement it. There’s nothing more I can do for you.

    Good luck.

  • Please help me

    4
    0 Votes
    4 Posts
    345 Views
    EkopalypseE

    @rafiq-khan

    Please post the debug-info from ? menu, the last menu item.
    How did you install nppftp?

  • Remove Duplicate Lines

    8
    0 Votes
    8 Posts
    900 Views
    Alan KilbornA

    @Prahlad-Makwana4145

    I would not advise people to use the TextFX plugin as it is old and support is questionable.

  • any alternative for npftp

    2
    0 Votes
    2 Posts
    211 Views
    EkopalypseE

    Please avoid opening multiple posts for the same topic.

  • Remember last session npp portable

    2
    0 Votes
    2 Posts
    272 Views
    EkopalypseE

    In order to be able to have the same session on different machine
    you need to find a way to read the same session.xml file from all
    machines. One obvious solution might be to have the config files stored
    on a network drive which is accessible from all machines or having a usb
    drive with the npp setup and using it on different machines.
    Of course, all machines do need to have access to your files in the same way.

  • adding word between any 3 lines

    7
    0 Votes
    7 Posts
    1k Views
    guy038G

    Hello, @Hasan123, @Alan-kilborn, @peterjones and All,

    Here is my very similar version :

    SEARCH (?-s)(?:^.+(?:(\R)|\Z)){1,3}

    [word]\1$0

    Group \1 contains the current EOL char(s) of the file

    Best Regards,

    guy038

  • Regex usage in notepad

    4
    0 Votes
    4 Posts
    670 Views
    guy038G

    Hi, @rovitie, @peterjones, @alan-kilborn and All,

    Just a variant, slightly shorter ;-))

    SEARCH ^.+?:([^:]+@.+?:).+:([[:xdigit:]]{32}):.*

    REPLACE $1$2

    Best Regards

    guy038

  • Basic Font editing

    2
    0 Votes
    2 Posts
    239 Views
    PeterJonesP
    The Preferences > Style Configurator is used for defining text formatting for the various syntax highlighter languages. documented at https://npp-user-manual.org/docs/preferences/#style-configurator the Language > User Defined Language > Define your language… allows you to set text formatting for the User Defined Lanauges (UDL), which are for syntax highlighting not covered by the builtin languages. documented at https://npp-user-manual.org/docs/user-defined-language-system/ if you are editing a markup file (like HTML), or a markdown file, or other “formatted text”, then Notepad++ doesn’t come out-of-the-box with a “change font size for the selected text” or “make this line a header”. However, for languages like HTML or Markdown, there are plugins that help automate the authoring of such files, and will add in the appropriate <b>...</b> or **...** wrappers at the touch of a button or shortcut keystroke. However, you’d have to give us more details so we know what markup/markdown language(s) you are editing. if you want some sort of “permanent” formatting that can go to a different machine and be looked at in a different text editor for non-HTML, non-markdown, truly plaintext file, you really need a word processor and some more powerful filetype than .txt (and it’s beyond the scope of this forum).
  • Regex: Replace tag with another tag from text

    6
    0 Votes
    6 Posts
    1k Views
    hasan123H

    thank you very much

    You are welcome

  • 0 Votes
    3 Posts
    328 Views
    MaxM

    Marvellous. Thank you!

  • Copy with line numbers

    6
    3 Votes
    6 Posts
    3k Views
    Michael VincentM

    @Michael-Vincent said in Copy with line numbers:

    OK - weird workaround

    Much better:

    ::copylinenums NPP_CONSOLE keep SET LOCAL CR ~ STRFROMHEX 0xd SET LOCAL LF ~ STRFROMHEX 0xa SCI_SENDMSG SCI_GETSELECTIONSTART SCI_SENDMSG SCI_LINEFROMPOSITION $(MSG_RESULT) SET LOCAL START = $(MSG_RESULT) SCI_SENDMSG SCI_GETSELECTIONEND SCI_SENDMSG SCI_LINEFROMPOSITION $(MSG_RESULT) SET LOCAL END = $(MSG_RESULT) SCI_SENDMSG SCI_GETCURRENTPOS SCI_SENDMSG SCI_GETCOLUMN $(MSG_RESULT) SET LOCAL COLUMNEND = $(MSG_RESULT) :LOOP IF $(START)==$(END) THEN IF $(COLUMNEND)==0 GOTO END ENDIF ENDIF SCI_SENDMSG SCI_GETLINE $(START) @"" SET LOCAL LINE ~ $(START) + 1 // ECHO $(LINE): $(MSG_LPARAM) SET LOCAL OUTTEXT = $(OUTTEXT)$(LINE): $(MSG_LPARAM)$(CR)$(LF) IF $(START)==$(END) GOTO END SET LOCAL START ~ $(START) + 1 GOTO LOOP :END CLIP_SETTEXT $(OUTTEXT)

    Cheers.

  • How to paste a selection in the same way as typing in overwrite mode?

    5
    0 Votes
    5 Posts
    966 Views
    Alan KilbornA

    @Alan-Kilborn said in How to paste a selection in the same way as typing in overwrite mode?:

    print(‘got here a’)

    Oops; delete that line! Just for debugging! :-)