• Convert to UPPERCASE

    3
    0 Votes
    3 Posts
    300 Views
    DarthDataD

    @ekopalypse That’s perfect. Thanks!!

  • Replace unknown character

    4
    0 Votes
    4 Posts
    522 Views
    PeterJonesP

    @robert-carnegie said in Replace unknown character:

    Shooting from the hip, isn’t that tab marks?

    No, it isn’t. If View > Show Symbol > Show Whitespace and TAB or > Show All Characters is enabled (the latter is what it must be, because of the orange dots for the spaces that @Focuscar-A showed, along with the black CR and LF boxes at the end of line), then tabs use stretchy arrows in their display, as shown below.

    8d83b8bb-6005-4a55-a101-576281519891-image.png

    The dots in my screenshot are spaces, the arrows in my screenshot are tabs, and the long blank between the dots that @Focuscar-A showed is either another character or some weird spacing issue, not a tab.

  • Error message when clicking edit with notepad++

    3
    0 Votes
    3 Posts
    314 Views
    CadetSparklezC

    @peterjones said in Error message when clicking edit with notepad++:

    @cadetsparklez ,

    The error message asked if the command was correct. Is it?

    Is that where your Notepad++ installation is? Does that file really exist at the exact path shown?

    If you run Notepad++ normally, rather than through context menu, does it run correctly? Can you share Notepad++'s ?-menu’s Debug Info (you can copy/paste the text from that dialog, because sometimes the text is more than fits in the visible dialog, so a screenshot will cut things off).

    Yeah the path looks correct, the error message has quotes in the command so that should be ok with there being a space in the path, although in the debug info there is not.

    Notepad++ v8.1.9.3 (32-bit)
    Build time : Dec 6 2021 - 19:16:45
    Path : C:\Program Files (x86)\Notepad++\notepad++.exe
    Command Line :
    Admin mode : ON
    Local Conf mode : OFF
    Cloud Config : OFF
    OS Name : Windows 10 Home (64-bit)
    OS Version : 2009
    OS Build : 19044.1415
    Current ANSI codepage : 1252
    Plugins : mimeTools.dll NppConverter.dll NppExport.dll

  • 0 Votes
    2 Posts
    353 Views
    PeterJonesP

    @liggliluff

    Notepad++'s line numbering system just counts the lines in order. You cannot trick it as you described.

    The Compare Plugin will line things up side-by-side, and it will appear to add more lines while viewed in Compare mode… but as soon as you turn off the compare mode, the original file goes back to the original line number (and when it’s saved to disk, even if you are in Compare mode, it will save the real file, not the one with extra lines).

    Alternately, you could start with the original file, and use the column mode selection and Edit > Column Editor dialog to insert line numbers in the text, which will match up with the original line numbers in the document. Then, if you had to insert lines to get things to line up correctly, you will easily see the empty lines as compared to the lines that start with the number. When done, you can delete the blank lines (Edit > Line Operations > Remove Empty Lines), then use column-selection or a regex to remove the numbers at the beginning of each of the lines.

  • Auto-Completion Is this Legal?

    35
    0 Votes
    35 Posts
    5k Views
    Lycan ThropeL

    @lycan-thrope
    To be clear, I have no idea how to use github, a pull request, etc. So I’m really novice in this area. As a note, the Autocompletion and functionList files (with the same name) seem to be the problem with just zipping up the files and since I have no way of knowing where users have their installations, my assumptions about 64 bit/32 bit/Standard install and stand alone install have all been pushed to the side as I tried to explain where to install the files, and am not sure what I would have to do to get a .zip version to do it automagically. I know, there’s a lot I don’t know…tell me something I don’t know. :-)

    Lee

  • How to put symbols after every letter

    6
    0 Votes
    6 Posts
    1k Views
    Neil SchipperN

    @peterjones

    My humble solutions require you to bang on “replace all” until the status becomes “0 occurrences were replaced…”

    Find1: (?<=&)(.*)([^\.])(?!\.)(.*)(?=.#) ==> adds .'s from right, does not add rightmost; tests OK Find2: (?<=&)(.*)([^\.])(?!\.)(.*)(?=#) ==> adds .'s from right, does add rightmost; tests OK ReplWith: $1$2.$3

    However, there is also an advantage. With the high powered ones, if you issue a subsequent “replace all”, the data gets mucked up. My regexes do nothing after the job is all done.

  • FTP Direct Online Script Editing of Web Files with Notepad++

    2
    0 Votes
    2 Posts
    519 Views
    PeterJonesP

    @wilfred-osula

    Could somebody please help or tell me where I’m going wrong?

    To get FTP access to remote files inside Notepad++, you need to install the NppFTP plugin using Plugins > Plugins Admin.

  • how to use macro to make my code

    3
    1 Votes
    3 Posts
    379 Views
    Alan KilbornA

    And it is HERE.

  • XML Tools Pretty Print changes empty tag

    3
    0 Votes
    3 Posts
    2k Views
    jdhertogJ

    solution:
    install/upgrade to the latest version of XML Tools (in my case 3.1.1.9) and set “Auto-close tags” to false in the Options form.

  • How to use "pip" with Pythonscript plugin?

    5
    1 Votes
    5 Posts
    1k Views
    Michael VincentM

    @michael-vincent said in How to use "pip" with Pythonscript plugin?:

    the simple Python IDE thing Eko gave us a while back

    should have linked that.

    Cheers

  • PythonScript early return

    17
    0 Votes
    17 Posts
    755 Views
    Alan KilbornA

    @paul-wormer said in PythonScript early return:

    I see “os.sep”, shouldn’t one “import os”?

    I requested a forum moderator to add the missing import os to the script listing above, and that was done…thanks Mr. Moderator!

  • Did I break NPP?

    17
    0 Votes
    17 Posts
    781 Views
    Lycan ThropeL

    @alan-kilborn ,

    Thanks. I appeciated, and actually understood the information you were linking me to. I guess my humorous response wasn’t taken the way it was intended, so… sorry . :-)

    But I definitely agree with your observation, that indeed, it is not at all obvious, which is kind of why my answer was a “flippant” so I apologize if you didn’t understand that I was agreeing with you. :-)

    Lee

  • Issue with making this (^.*\\.dxy$)|

    4
    0 Votes
    4 Posts
    246 Views
    Juan FranciscoJ

    This is what I have my couple ones from many more. Thank you. Now i know something. Still learning regular expression. And knowing what each means.

    92dfc47b-10df-4feb-908b-8a781b625997-image.png

  • I would like to do my own PowerShell Indenting

    7
    0 Votes
    7 Posts
    3k Views
    Michael VincentM

    @michael-vincent said in I would like to do my own PowerShell Indenting:

    Feel free to experiment with this and see if you can get it to work AFTER Notepad++ does it’s auto-indenting-of {.

    @mmannion
    @Steve-Almes
    @Alan-Kilborn
    @PeterJones

    I think I got it working by calling 2 callbacks (CHARADDED and UPDATEUI) instead of just CHARADDED. The following works for my when I type:

    if (test) [ENTER]

    I get:

    if (test) |

    Where | is cursor. Then I type the { and get this:

    if (test) {|}

    Where | is cursor. The { auto-inserts the closing } and both are auto-indented 4-spaces as requested. Pressing Enter now yeilds:

    if (test) { | }

    Obviously you can adjust the _set_indent() function to perform how you want.

    from Npp import editor, notepad, LANGTYPE, NOTIFICATION, SCINTILLANOTIFICATION class GnuIndent(object): def __init__(self): self.DEBUG = False self.ENABLED = False self.my_language = [LANGTYPE.POWERSHELL] self.is_my_language = False self._do_indent = False self.nppCallbacks = { self._on_buffer_activated: [NOTIFICATION.BUFFERACTIVATED, NOTIFICATION.LANGCHANGED] } self.edCallbacks = { self._on_charadded: [SCINTILLANOTIFICATION.CHARADDED], self._on_updateui: [SCINTILLANOTIFICATION.UPDATEUI] } def start(self): """Start the service""" for cb in self.nppCallbacks: notepad.callback(cb, self.nppCallbacks[cb]) for cb in self.edCallbacks: editor.callbackSync(cb, self.edCallbacks[cb]) self.ENABLED = True def status(self): """Status the service""" for e in sorted(self.__dict__): print("{0:<25} : {1}".format(e, self.__dict__[e])) def stop(self): """Stop the service""" for cb in self.nppCallbacks: notepad.clearCallbacks(cb) for cb in self.edCallbacks: editor.clearCallbacks(cb) self.ENABLED = False def _on_buffer_activated(self, args): lang = notepad.getCurrentLang() if lang in self.my_language: self.is_my_language = True else: self.is_my_language = False def _on_charadded(self, args): if not self.is_my_language: return if chr(args['ch']) == '{': self._do_indent = True def _on_updateui(self, args): if not self.is_my_language: return if args['updated'] & 0x01 and self._do_indent: self._do_indent = False self._set_indent() def _set_indent(self): tabwidth = editor.getTabWidth() pos = editor.getCurrentPos() currline = editor.lineFromPosition(pos) indent = editor.getLineIndentation(currline - 1) if self.DEBUG: print(pos, currline, indent, tabwidth) editor.setLineIndentation(currline, indent + tabwidth) if __name__ == '__main__': gnuIndent = GnuIndent() gnuIndent.start()
  • 0 Votes
    3 Posts
    551 Views
    A

    @peterjones Thanks a lot! did the job better

  • Many times, colors disappear

    5
    0 Votes
    5 Posts
    523 Views
    PeterJonesP

    @kenhorse2 ,

    Almost everyone here is just a fellow user of Notepad++ (hence the name “Notepad++ Community”, not “Notepad++ Paid Support”). Thus, if we haven’t seen your problem, or don’t have ideas on how to debug it, there’s not much we can do. And you haven’t given us much to go on: presumably, anyone here who does use PHP regularly hasn’t seen a 10% failure rate of the PHP lexer. Which means likely, the problem is on your end, or very rare for the vast majority of users.

    if you gave us more information (maybe an example PHP file that shows the problem for you), there might be more for us to work with.

    You could try turning off plugins: rename c:\notepad++\plugins\ folder to c:\notepad++\xplugins temporarily, or run notepad++ with the -noPlugin command line option to see if the problem goes away. If either of these work, then one of your plugins is causing the problem.

    You could try seeing if the same thing happens with the default theme instead of the ruby blue theme – maybe there’s some setting in the theme that sometimes confuses Notepad++.

  • PythonScript

    30
    0 Votes
    30 Posts
    2k Views
    Heinz Berecz 0H

    @alan-kilborn said in PythonScript:

    The recommended standard for Python is to insert 4 spaces every time the Tab key is pressed.
    If you must deviate from that standard, UGH, you go into the Settings > Preferences… > Language > Tab Settings > python and change it to what you want:

    Thank you very much.

  • Search and replace "" with " in random hyperlinks in a csv file

    8
    0 Votes
    8 Posts
    852 Views
    Waqas SaeedW

    @alan-kilborn Thank you for your help. My problem has solved. I am grateful.

  • 0 Votes
    2 Posts
    222 Views
    gstaviG

    It sounds as if you want Notepad++ to help you circumvent your company policies.
    If Notepad++ could save directly into some cloud (which ?), wouldn’t it become a forbidden cloud storage provider?

    Notepad++ is designed to work with a file system. It uses file system API. It doesn’t even know if the file system is local or over network.
    The majority of users that want cloud synching just use the cloud synching software so your feature request is serves a fraction of the user base.
    It is far more likely that you could convince your company of your need then Notepad++ will add such a feature.

  • UDL based on default HTML

    3
    0 Votes
    3 Posts
    320 Views
    SEE-ICTS

    @ekopalypse Thanks for the quick reply. I’m not sure that the additional functionality would justify the work required to implement it. I’ll take a look and see. At least I’ll learn something about lexers!