• php function/term hint not working after update

    2
    0 Votes
    2 Posts
    287 Views
    EkopalypseE

    @Sloan-Thrasher-0

    Do you see the the autoCompletion folder? Is there a php.xml with content?
    Can you post your debug-info from the last menu item, the ? menu?

  • Python auto-indent

    6
    0 Votes
    6 Posts
    4k Views
    EkopalypseE

    @Alan-Kilborn

    Note, I do have autoindent disabled in order to make this work.
    Because I know you are doing python, I haven’t refactored anything,
    but I guess it’s mostly getting rid of self to make this work in a non-class way.
    Concerning the todo, no, I haven’t looked at it since then.

    def __init__(self): self.excluded_styles= [1, 3, 4, 6, 7, 12, 16, 17, 18, 19] def on_modified(self, args): # TODO: text == \r even if \r\n is assumed, but length is 2, is this a bug?? Or am I doing something wrong? if args['modificationType'] & 0x100000 == 0x100000 and args['text'] in ['\r','\n']: text = '\r\n' if args['length'] == 2 else args['text'] self._indent(args['position'], text) def _indent(self, position, text): if self.is_python and self.auto_indent: indent = editor.getLineIndentation(editor.lineFromPosition(position)) if (editor.getCharAt(position-1) == 58 and # 58 == : editor.getStyleAt(position-1) not in self.excluded_styles): tabwidth = editor.getTabWidth() text += ' '*(indent//tabwidth+1)*tabwidth else: text += ' '*indent editor.changeInsertion(text)
  • 1 Votes
    18 Posts
    3k Views
    EkopalypseE

    @jcg3675
    Thank you very much and yes, there is time when a microwave becomes the best invention since sliced bread :-)

    Let me know how it goes!

    I sure will do.

  • Hex editor plugin crashes Notepad++ on startup when opening nfo files

    7
    0 Votes
    7 Posts
    2k Views
    PeterJonesP

    @Fourbits,

    I said,

    at home, I think I have a virtual windows machine

    Sorry, I didn’t get a chance until this weekend.

    I spun up the VM, and did a fresh install of v7.8.4-32bit. I can confirm your symptoms.

    I ran the five experiments I suggested:

    Experiment cmd.exe: hmm, the default “Edit With Notepad++” connects to DLL, not EXE. Still, "c:\Program Files (x86)\Notepad++\notepad++.exe" file.nfo crashes Experiment autodetect: turn encoding autodetect off: crashes Experiment 1: remove extension from langs.xml: Fresh RClick is okay Experiment 2: associate with Search Results rather than DosStyle: Fresh RClick is okay Experiment 3: associate with dummy UDL “PlainNFO”: Fresh RClick is okay

    So, any of the three experiments which tried to convince Notepad++ that a .nfo file wasn’t MSDOS-Style/ASCII-ART was successful in preventing the crash.

    If you do not need the default lexer trying to apply the default color of black on white to all text (ie, doing nothing helpful), I’d suggest implementing one of those three options to get around the buggy interaction between HEX-Editor Plugin and Notepad++'s NFO lexer.

  • find and replace

    2
    0 Votes
    2 Posts
    265 Views
    Alan KilbornA

    I would be tempted to try a Regular Expression Search Mode replacement operation, looking for (?-si)^([CON])(\(P.+?\)) and replacing with \1\(Fragment=1\).

    Let us know how that goes for you.

  • Run as administrator and document encodings

    2
    0 Votes
    2 Posts
    271 Views
    Alan KilbornA

    @octopoesie

    When you think you should be in administrator mode, does the title bar of Notepad++ have the word Administrator in it?

    Encodings are tough things to deal with…so, no comment. :-)

  • Custom Code-Fold settings for standard language (iLogic/VB.net)

    1
    0 Votes
    1 Posts
    417 Views
    No one has replied
  • Window rapidly opens and closes

    3
    0 Votes
    3 Posts
    319 Views
    moziet purinM

    Yeah… Probably so. :(

  • 0 Votes
    1 Posts
    290 Views
    No one has replied
  • Find Duplicate HTML Tags with Regex

    8
    0 Votes
    8 Posts
    1k Views
    guy038G

    Hi, @sylvester-bullitt, @alan-kilborn, @peterjones and All,

    Some observations about in-line modifiers :

    Let’s consider the text :

    1 abc 2 abC 3 aBc 4 aBC 5 Abc 6 AbC 7 ABc 8 ABC

    The regex (?-i)a((?i)b)c matches lines 1 and 3 and the group 1 contains the letter b or B

    Using a non-capturing group, the full syntax of the regex becomes (?-i)a(?:(?i)b)c and matches the same lines 1 and 3 but, this time, no group is defined

    As a convenient shorthand, in case of a non-capturing group, the option may appear between the question mark and the colon, giving the alternate syntax (?-i)a(?i:b)c, which produces the same results as the former regex

    Note that, because options are not reset until the end of a subpattern, if that subpattern contains alternatives, an option setting in one branch does affect all the subsequent branches !

    So, assuming the text :

    1 ab 2 aB 3 Ab 4 AB 5 cd 6 cD 7 Cd 8 CD The regex ((?-i)ab|CD), with group1 and the regex (?-i:ab|CD), with a non-capturing group, match, both, lines 1 and 8, only

    REMARK :

    Note that the previous rule is always valid if, when choosing between the different alternatives, the regex engine is not aware of a later option. For instance, let’s consider the regex (?-i)(a(?i)b|cd)

    In this regex, due to the initial (?-i) modifier, the search should be done in a sensitive way, except for the part (?i)b, which should match letter b or B. However, this regex matches the lines 1 and 2 and lines from 5 to 8, in the above text !

    For instance, when the regex engine is located, right before the first letter of line 8, and choose the second alternative, in order to process c, rather than a, it does not know about the caseless option, applied to letter b. Still, it does match the uppercase letter C because the (?i) modifier is carried on into the cd alternative, as well !

    Best Regards,

    guy038

  • Find&Replace in all documents |

    3
    0 Votes
    3 Posts
    641 Views
    Mateusz.M

    Did some testing, now everything works perfectly.
    Thanks for help

  • Older Version N++

    12
    0 Votes
    12 Posts
    724 Views
    dtoxic64D

    @Alan-Kilborn said in Older Version N++:

    Computers used to belong to the people. No longer

    You got that right, now on my pc i;ts only me so i just don’t understand why n++ was made like this not allowing you to write in Program Files [probably a good reason i am sure] but at least devs could have made an option for people who want full control over a program or something like that

  • Help for highlight hex numbers

    3
    0 Votes
    3 Posts
    316 Views
    dreamforceincD

    @Ekopalypse said in Help for highlight hex numbers:

    @dreamforceinc

    extras2 might contain A B C D E F
    and suffix 1 should contain the h

    I have “0x” in prefix2 for highlight numbers like that: 0x123, 0xFF. After your hint this nums no more highlited.

    upd: thats ok, all works ))
    THX!

  • Remove lines from file

    3
    0 Votes
    3 Posts
    350 Views
    Terry RT

    @Brian-Bennett said in Remove lines from file:

    where the text changes slightly for each line

    There is a bookmark function that will allow you to identify lines with the text that does NOT change.

    Under Search (top menu) look for Mark. Into this area type the first portion of your line “<ModSecurity…” up to the point where the text changes. Now as this inserted text does NOT change your search mode can be “Normal”. Then tick the button named “Bookmark Line” and then click on “Mark All”.

    This will identify the lines with that text. At this point you may want to check some randomly. If you are happy with the selection use the Search/Bookmark/Remove Bookmarked Lines option to remove those.

    Terry

  • UDL documentation (()) operator

    17
    1 Votes
    17 Posts
    2k Views
    dshuman52D

    @dshuman52

    The following code performs substitutions on a space inside single or double quotes of \b or \v respectively. That is how you activate the existing code “end if” means end\vif or ‘end case’ means end\bcase.

    only apparently in the following buffers.

    // OPERATORS2, FOLDERS_IN_CODE2, FOLDERS_IN_COMMENT, KEYWORDS1-8

    void ScintillaEditView::setUserLexer(const TCHAR *userLangName) { int setKeywordsCounter = 0; execute(SCI_SETLEXER, SCLEX_USER); UserLangContainer * userLangContainer = userLangName? NppParameters::getInstance().getULCFromName(userLangName):_userDefineDlg._pCurrentUserLang; if (!userLangContainer) return; UINT codepage = CP_ACP; UniMode unicodeMode = _currentBuffer->getUnicodeMode(); int encoding = _currentBuffer->getEncoding(); if (encoding == -1) { if (unicodeMode == uniUTF8 || unicodeMode == uniCookie) codepage = CP_UTF8; } else { codepage = CP_OEMCP; // system OEM code page might not match user selection for character set, // but this is the best match WideCharToMultiByte offers } execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("fold"), reinterpret_cast<LPARAM>("1")); execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("userDefine.isCaseIgnored"), reinterpret_cast<LPARAM>(userLangContainer->_isCaseIgnored ? "1":"0")); execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("userDefine.allowFoldOfComments"), reinterpret_cast<LPARAM>(userLangContainer->_allowFoldOfComments ? "1":"0")); execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("userDefine.foldCompact"), reinterpret_cast<LPARAM>(userLangContainer->_foldCompact ? "1":"0")); char name[] = "userDefine.prefixKeywords0"; for (int i=0 ; i<SCE_USER_TOTAL_KEYWORD_GROUPS ; ++i) { itoa(i+1, (name+25), 10); execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>(name), reinterpret_cast<LPARAM>(userLangContainer->_isPrefix[i] ? "1" : "0")); } for (int i = 0 ; i < SCE_USER_KWLIST_TOTAL ; ++i) { WcharMbcsConvertor& wmc = WcharMbcsConvertor::getInstance(); const char * keyWords_char = wmc.wchar2char(userLangContainer->_keywordLists[i], codepage); if (globalMappper().setLexerMapper.find(i) != globalMappper().setLexerMapper.end()) { execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>(globalMappper().setLexerMapper[i].c_str()), reinterpret_cast<LPARAM>(keyWords_char)); } else // OPERATORS2, FOLDERS_IN_CODE2, FOLDERS_IN_COMMENT, KEYWORDS1-8 { char temp[max_char]; bool inDoubleQuote = false; bool inSingleQuote = false; bool nonWSFound = false; int index = 0; for (size_t j=0, len = strlen(keyWords_char); j<len && index < (max_char-1); ++j) { if (!inSingleQuote && keyWords_char[j] == '"') { inDoubleQuote = !inDoubleQuote; continue; } if (!inDoubleQuote && keyWords_char[j] == '\'') { inSingleQuote = !inSingleQuote; continue; } if (keyWords_char[j] == '\\' && (keyWords_char[j+1] == '"' || keyWords_char[j+1] == '\'' || keyWords_char[j+1] == '\\')) { ++j; temp[index++] = keyWords_char[j]; continue; } if (inDoubleQuote || inSingleQuote) { if (keyWords_char[j] > ' ') // copy non-whitespace unconditionally { temp[index++] = keyWords_char[j]; if (nonWSFound == false) nonWSFound = true; } else if (nonWSFound == true && keyWords_char[j-1] != '"' && keyWords_char[j+1] != '"' && keyWords_char[j+1] > ' ') { temp[index++] = inDoubleQuote ? '\v' : '\b'; } else continue; } else { temp[index++] = keyWords_char[j]; } } temp[index++] = 0; execute(SCI_SETKEYWORDS, setKeywordsCounter++, reinterpret_cast<LPARAM>(temp)); } } char intBuffer[32]; sprintf(intBuffer, "%d", userLangContainer->_forcePureLC); execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("userDefine.forcePureLC"), reinterpret_cast<LPARAM>(intBuffer)); sprintf(intBuffer, "%d", userLangContainer->_decimalSeparator); execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("userDefine.decimalSeparator"), reinterpret_cast<LPARAM>(intBuffer)); // at the end (position SCE_USER_KWLIST_TOTAL) send id values sprintf(intBuffer, "%" PRIuPTR, reinterpret_cast<uintptr_t>(userLangContainer->getName())); // use numeric value of TCHAR pointer execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("userDefine.udlName"), reinterpret_cast<LPARAM>(intBuffer)); sprintf(intBuffer, "%" PRIuPTR, reinterpret_cast<uintptr_t>(_currentBufferID)); // use numeric value of BufferID pointer execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>("userDefine.currentBufferID"), reinterpret_cast<LPARAM>(intBuffer)); for (int i = 0 ; i < SCE_USER_STYLE_TOTAL_STYLES ; ++i) { Style & style = userLangContainer->_styleArray.getStyler(i); if (style._styleID == STYLE_NOT_USED) continue; char nestingBuffer[32]; sprintf(nestingBuffer, "userDefine.nesting.%02d", i ); sprintf(intBuffer, "%d", style._nesting); execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>(nestingBuffer), reinterpret_cast<LPARAM>(intBuffer)); setStyle(style); } }
  • Weird Red Boxes

    6
    0 Votes
    6 Posts
    942 Views
    Alan KilbornA

    @Sam-Benson said in Weird Red Boxes:

    I will have to wait and see what happens.

    Sure, leave us hanging for something you could test and report back on immediately…

  • libcurl https proxy error with version 7.8.3 32 bits

    1
    0 Votes
    1 Posts
    264 Views
    No one has replied
  • Can't Save As SQL file

    3
    2 Votes
    3 Posts
    10k Views
    Sally HarrisS

    Beautiful! Thanks, just typed in the .sql extension and it worked like a charm. Appreciate your help!

  • All my themes a only have one colors of text.

    2
    0 Votes
    2 Posts
    286 Views
    Alan KilbornA

    @nick610

    That’s pretty “light” for information to be able to give a great answer. Are you actually specifying a type for the files you are looking at? This would be shown on the leftmost section of the status bar–what does it say there?

  • I am constantly losing data!

    7
    0 Votes
    7 Posts
    676 Views
    guy038G

    Hello @veridigital and All,

    I think, indeed, that @veridigital asks a rather embarrassing question…

    If we suppose that the problem of the NUL characters, following a power cut, comes from a setting, concerning the writing on the HDD, how to explain that it acts, specifically, on the files opened in Notepad++ ?

    In theory, corruptions should occur, in a random way, on any file opened by any software !?

    Seemingly, the NUL bytes story is not ended ;-)) It’s really irritating !

    Best Regards,

    guy038

    P.S. :

    Reading the @peterjones answer more carefully, I understand that Notepad++ is based on MS API. But it should certainly not be the only software ! Also, why should problems privilege Notepad++ files ?