• How to stop Notepad++ from formatting HTML files

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    Claudia FrankC

    @Bernie-Elsner

    If I understand correctly, I assume that some installed plugin is responsible for this behavior.
    Could this be in your case? Did you install additional plugins?

    In general, if you want to switch off the language dependent actions temporarily, choose
    Normal text from language menu, do the needed action and reselect HTML from the
    language menu.

    Cheers
    Claudia

  • Notepad++ v1.0 source

    3
    0 Votes
    3 Posts
    2k Views
    Shakespeare WillianS

    @chcg
    Thank you.

  • whatever are the variables to use in user-defined shortcut ?

    Locked
    3
    0 Votes
    3 Posts
    1k Views
    Budi KusasiB

    Great favor ! Thanks so much God bless you… ameen

  • What is the procedure to get this software to be used officially?

    3
    0 Votes
    3 Posts
    1k Views
    Marco CzenM

    @Amogha-A-Rao - Just install the software / accept the license terms and you can use officially ! Nothing else required. There is no special licesing package or key etc.

  • how to know opening tag without scrolling

    3
    0 Votes
    3 Posts
    1k Views
    Marco CzenM

    @bonaca - Goto that html tag and hit Ctrl+T. That will take you to the closing tag. HTML Tag Plugin needs to be installed.

  • Need to uninstall 7.3.3 (32bit) but...

    Locked
    5
    0 Votes
    5 Posts
    3k Views
    Chip CooperC

    Yep, that did it. However, I had installed the original as a .bin and I probably have a bit of garbage in my registry. So, I did a little manual labor collecting garbage in the Dragon’s den. Wouldn’t surprise me if I left a couple pieces laying around; but, the Dragon probably won’t notice. ;-)
    So, after doing that, I’m now wrestling with whether I should leave a (x86) version on the machine while (x64) is still under development, perhaps not; although, it’s much further along than I expected with the x64 Plugin Manager, so woo hoo! The .lua plugin for (x64) is available too, so I couldn’t be happier… but I digress…
    Thanks a lot for your help… I appreciate it. Now, if I could only figure out how to remove those typo’s from my autocompletion dictionary, apparently lang.xml has chanced name, been upgraded or something as well… sure would be nice to have a clean editor for what ever it’s called, where-ever it’s stored… Now, if I could just find it, see how messy it looks, and perhaps how to make a plugin… I could do something about that. When it gets too irritating, maybe I’ll take a break from .lua and dig into the plugins for Notepad++ using Scintilla and learn about that! :-)
    Thanks again for your help!

  • 0 Votes
    2 Posts
    1k Views
    Scott SumnerS

    @Life’s-Hacks.

    Something like this could work:

    Find-what zone: (?-s)^.*?delete me.*\R.*\R
    Replace-with zone: make sure this is EMPTY
    Wrap-around checkbox: ticked
    Search-mode: Regular expression
    Action: Press Replace All button

  • C function exploration

    4
    1 Votes
    4 Posts
    2k Views
    Scott SumnerS

    @Telis-Tnilit

    So…not sure if the TagsView plug-in met your need, but I modified something I already had scripted (in Pythonscript) to do what you want , albeit in a basic way: The script needs to see the enclosing C function braces ( { and } ) in column 1, and when it does it takes the single line above the { as the function signature.

    So for a C function like this:

    void test2(void) { x = 1; if (1) { x = 2; } }

    when the caret is inside the function body, the status bar will show this:

    Imgur

    I call the script CFunctionShowInStatusBar.py :

    def CFSISB__callback_sci_UPDATEUI(args): def sb_print(x): if len(x) == 0: x = ' ' # writing '' to status bar does nothing, so change it! notepad.setStatusBar(STATUSBARSECTION.DOCTYPE, x) if notepad.getCurrentFilename().lower().endswith('.c'): f = editor.findText(FINDOPTION.REGEXP, editor.getCurrentPos(), 0, '^[{}]') if f != None: (found_start_pos, found_end_pos) = f if '{' == editor.getTextRange(found_start_pos, found_end_pos): line_nbr = editor.lineFromPosition(found_start_pos) if line_nbr == 0: sb_print('not in function?') else: sb_print('in function: ' + editor.getLine(line_nbr - 1).rstrip()) else: sb_print('not in function') else: sb_print('not in function!') else: sb_print('') editor.callback(CFSISB__callback_sci_UPDATEUI, [SCINTILLANOTIFICATION.UPDATEUI])```
  • Replace all places of text that contain ips in brackets with nothing

    Locked
    10
    1 Votes
    10 Posts
    4k Views
    guy038G

    Hi, @patrick-tamm, @claudia-frank and @scott-sumner,

    Claudia, regarding your last regex, it would better to use a lazy quantifier, just in case of lines, as below :

    This is [an example] of text with [some pairs] of square brackets, in the [same line] !

    So a correct regex S/R should be :

    SEARCH : \[.*?\]

    REPLACE : []

    OPTIONS : Regular expression and Wrap around and, maybe, . matches newline if brackets pair are split on two different lines !

    ACTION : Click on the Replace All button

    Cheers,

    guy038

  • Show count of occurrences of a selected string

    Locked
    2
    0 Votes
    2 Posts
    5k Views
    Scott SumnerS

    @bob-bob

    You could do a plugin to get this behavior, or you could script it. Here’s an example (may not be fully rounded out) in Pythonscript, I call it SelectedTextCountIntoStatusBar.py; you would run it once per Notepad++ session:

    def callback_sci_UPDATEUI(args): if args['updated'] & UPDATE.SELECTION: matches = [] if editor.getTextLength() < 100000: # don't search "big" files if editor.getSelections() == 1 and not editor.getSelectionEmpty(): try: editor.research(r'\Q' + editor.getSelText() + r'\E', lambda m: matches.append(1)) except: matches = [] l = len(matches) notepad.setStatusBar(STATUSBARSECTION.DOCTYPE, ' ' if l == 0 else '{} occurrence(s) of selected text'.format(l)) editor.callback(callback_sci_UPDATEUI, [SCINTILLANOTIFICATION.UPDATEUI])
  • 2 Votes
    32 Posts
    15k Views
    Marco CzenM

    @Scott-Sumner - Noted. Thanks.

  • How to replace a whole line starting with a given expression

    Locked
    5
    0 Votes
    5 Posts
    31k Views
    guy038G

    Hello @rachad-antonius, @claudia-frank, @Scott-sumner, and All,

    Claudia, don’t forget that the \s regular syntax matches any single character of the range [\t\n\x0B\f\r\x20\x85\xA0\x{2028}\x{2029}]

    So let’s imagine this initial text, below :

    Which begins with 3 empty lines

    With 2 other empty lines, after line bbbbbbb

    And the second to last line contains, ONLY the expression GIVEN_WORD

    GIVEN_WORD aaaaaaaaaaaa bbbbbbb GIVEN_WORD ccccccccc GIVEN_WORDeeeeeeeeeeeeeeeee GIVEN_WORD fffffff gggggggggggggggggg hhhhhhhhh GIVEN_WORD iiiiiiiiiiiiiiiiiiiiiiiiiiiii GIVEN_WORD jjjjjjjjjjjjjjjjjjjjjj

    With your regex, ^\s*GIVEN_WORD.*, this text turns into :

    bbbbbbb gggggggggggggggggg hhhhhhhhh jjjjjjjjjjjjjjjjjjjjjj

    Whereas the Scott’s regex, (?-s)^GIVEN_WORD.*\R gives :

    bbbbbbb gggggggggggggggggg hhhhhhhhh jjjjjjjjjjjjjjjjjjjjjj

    This later syntax seems more correct as it matches a single line, at a time ;-)) doesn’t it ? Claudia, you may click several times on the couple Find Next | Replace, with the View > Show Symbol > Show All Characters option set !

    BTW, @rachad-antonius, the \R syntax, at the end of the regex, matches the line-break characters of the current line, whatever the kind of file ( Unix, Windows, or Mac ) !

    Additional Notes :

    In case, @rachad-antonius, that you would like, in addition, to delete entire lines, having some blank characters ( spaces and/or tabulations ), before the GIVEN_WORD, you could use the regex ^\h*GIVEN_WORD(?-s).*\R

    Secondly , depending if you prefer the GIVEN_WORD to be matched with that exact case, or not, you could choose :

    The regex ^\h*(?-i)GIVEN_WORD(?-s).*\R for an exact case match

    The regex ^\h*(?i)GIVEN_WORD(?-s).*\R for a match, independent of the case of GIVEN_WORD

    Finally, if GIVEN_WORD represents an complete expression, containing special regex characters, I advice you to use the following one : ^\h*(?-i)\QGIVEN_WORD\E(?-s).*\R. Indeed, between the 2 syntaxes \Q and \E, you may insert any character or symbol, without no restriction !!

    Refer to :

    http://www.boost.org/doc/libs/1_55_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html#boost_regex.syntax.perl_syntax.quoting_escape

    For instance, if you want to delete the entire lines, beginning with the string +++ | Test | +++, whatever the case of the word test, and possibly preceded, in the same line, by some blank characters, use the regex, below :

    ^\h*(?i)\Q+++ | Test | +++\E(?-s).*\R

    Remark :

    If you don’t use the quoted form \Q.......\E, the regex must be rewritten as below, which each special regex character escaped with an \ character !

    ^\h*(?i)\+\+\+ \| Test \| \+\+\+(?-s).*\R

    Best Regards,

    guy038

    P. S. :

    Claudia, many Thanks for your Xmas Greetings ! Sorry for not replying, in time :-< I just forgot to consult my e-mail box ;-))

  • 0 Votes
    7 Posts
    10k Views
    Marco CzenM

    Thats ;

    C:\Users\username\AppData\Roaming\Notepad++

  • Issue when trying to overwrite a closing brace on notepad++

    Locked
    6
    0 Votes
    6 Posts
    2k Views
    Scott SumnerS

    @CodeSteady said:

    do you have a solution?

    Instead of pressing } just press right-arrow (or End) to move beyond the auto-inserted closing brace? :-)

  • Big encoding problem with UTF-8 / UTF-8-BOM / ANSI / ISO-8859-1

    4
    0 Votes
    4 Posts
    5k Views
    Sybell LirwacoS

    Unfortunately the problem with 7.5.1 is not solved.
    npp.7.5.1.bin.minimalist.x64 opens files stored in UTF-8 containing characters from the Mathematical Alphanumeric Symbols Unicode block as ANSI.

    What I have just seen is that the term “ANSI” means different. Once the term ANSI means Windows-1252 (Menubar -> Encoding) and once means only ISO-8859-1 (Preferences -> New Document -> Encoding). Or there are problems because files stored in Windows-1252 are opened as ANSI, even if “Apply to opened ANSI file” is set.

  • Find and Replace with RegEx help

    Locked
    9
    0 Votes
    9 Posts
    4k Views
    Ksomeone MsomeoneK

    @Claudia-Frank said:

    @guy038

    I was close, wasn’t I? :-D

    thx for the detailed information and improvements - always a pleasure :-)

    Cheers
    Claudia

    Yours was the one I used before guy038 made his post and it worked perfectly, so I would say you were more than close. :)

  • Red console

    2
    0 Votes
    2 Posts
    1k Views
    Claudia FrankC

    @Ivo-Balbaert

    I don’t know Red console - could it be that it closes while providing incorrect data to it,
    like a file which isn’t found?
    Can you run Red console without providing a file as parameter from notepad++ run menu?
    Another option might be to use cmd /k in front of red…exe - maybe you see the error it throws
    or why it is closing.

    Cheers
    Claudia

  • Line Number

    9
    0 Votes
    9 Posts
    4k Views
    gstaviG

    The end of line is screwed, probably something like <CR><LF><LF>, Notepad++ sees every line as a line + blank line.
    So Line number in Notepad++ is multiplied by 2.

  • 请让这款优秀的编辑器支持MAC OS X

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    Meta ChuhM

    your “general voice of the public” about an incompatible subject will probably not be understood, if you use an incompatible language to try to transport your incompatible wishes.

  • Quick database rip

    Locked
    3
    0 Votes
    3 Posts
    1k Views
    guy038G

    Hello @xavier-xenoph,

    It’s not very clear what you want to achieve, but, to my mind, you would like to change all records of your database file :

    IPHERE | DATE: | HWID: | password: | audioid: | hashid : |

    as :

    | hashid : |

    Am I right about it ?

    If so :

    Open your database file, in N++

    Open the Replace dialog ( Ctrl + H )

    SEARCH (?-s)^.+(?=\|.+\|$)

    REPLACE Leave EMPTY

    OPTIONS Wrap around and Regular expression ticked

    ACTION Click on the Replace All button

    Notes :

    As usual, the (?-s) modifier means that the dot ( . ) matches a standard character, ONLY and NOT any *line-break character

    Then the part ^.+ represents the longest range of characters of any line, but…

    ONLY IF the condition, in the look-ahead, ( (?=\|.+\|$) ) is true. That is to say if it’s followed by two | symbols, with some characters between, ( \|.+\| ), which end each line ( $ )

    Note that the | symbol have to be escaped as \|, to be interpreted as literal, as it’s a special regex character, too !

    Due to the empty replacement zone, the selected range, of each line, is simply deleted

    Best Regards,

    guy038