• subscripts

    29
    1 Votes
    29 Posts
    8k Views
    Mark OlsonM

    @Coises said in subscripts:

    The problems you are having are likely to plague those who read your files, too. As I mentioned earlier, it seems likely to me that there is a better way to approach your task. Using Unicode superscript and subscript numbers is usually not a good way to present material in which the superscripts and subscripts are important.

    @Эндрю-Ципихович
    Coises is correct. I would use LaTeX or MathJax to make a document with superscripts and subscripts.

    For example, if I wanted to make

    144689bd-4a9b-4e74-afe1-209c219f6fdf-image.png

    I would write this and use MathJax to render it.

    \log_{10}(x^2) = \sin(y)

    That’s only a tiny fraction of what is possible with LaTeX and MathJax. You can make some very impressive-looking documents from a simple plain-text document once you’re familiar with it.

    But I’m not going to talk any more about LaTeX or MathJax here, because that would be off-topic for this forum.

  • 1 Votes
    4 Posts
    346 Views
    CoisesC

    @mkupper said in Notepad++ Regex to find files having more than 2 words but should exclude certain word:

    It turns out that the not scanner, (?!word3a|word3b) only works on lines, not files, even if you try ``(?-s)(?!word3a|word3b).

    You’re misunderstanding what is going wrong. The expression you gave says, “Match null here if the following characters aren’t either word3a or word3b.” That matches at every position in a file except immediately before word3a or word3b. (Each line is listed once in the search results, but look at the number of hits.) What is needed is (?s)\A(?!.*(word3a|word3b)), which says, “Match null at the beginning of the document if the following characters don’t match any number of arbitrary characters followed by either word3a or word3b.”

    When I tested the whole expression I got some erratic results when I had it match null, which is why I set it to match the string from the beginning up to the word word1.

  • Macro works normally, but fails when shortcut is Ctrl+Shift+C

    8
    1 Votes
    8 Posts
    1k Views
    Mike NewmanM

    @mkupper Just following up here, as I finally got this working correctly. It was indeed another app (Webex in my case) capturing the shortcut first. I typically don’t like to download third-party apps (fourth-party?), but I gave Hotkey Detective a try, and it led me to the culprit.

  • 0 Votes
    10 Posts
    14k Views
    Rayran BritoR

    @Munter-Göök said in How can I find strings between "(" and ")" with any number of characters in between?:

    Thanks Alan! Now it works perfectly.
    The reason I couldn’t find out whyit’s working or not is that is my learning curve. I simply don’t have the time nor the experience needed to understand the syntax. So then I was crying out for help. Anyways this solved my problem and I am greateful.

    It would be nice if succesful solutions like this were to be found in some archive or why not implemented in N++.

    Thanks again!

    I appreciate @Alan-Kilborn for answering and @Munter-Göök for inquiring.
    I’m grateful that you guys were able to solve my problem! This demonstrates the forum’s significance to those who are facing similar issues. 🤜🤛

  • Multiline edititng

    2
    0 Votes
    2 Posts
    201 Views
    RARgamesR

    The solution is to create empty noColumnToMultiSelect.xml file in the config dir of Notpad++

    Very weird way of changing config instead of adding a checkbox in settings

  • GIFT syntax

    4
    0 Votes
    4 Posts
    312 Views
    J

    @fatalvector
    I was just looking for the same thing. There is a very nice user defined language style. I can’t post links here (created an account just for this post).
    You can find the UDL file if you Google for

    "GIFT-Format_byMatthewKuznia.xml"

    The documentation describes how to install it, google for:

    import a udl npp
  • Will Np++ support cursorcolumn like Vim?

    2
    0 Votes
    2 Posts
    200 Views
    PeterJonesP

    @John-Slegers ,

    I recommend two things to help with this:

    View > Show Symbols > Show Space and Tab – this will use special glyphs for the space and tab symbols, to make indentation obvious
    01612359-6a01-4f48-b9bb-55ec1970c056-image.png

    Install the ColumnTools plugin and enable Plugins > ColumnTools > Column Highlight
    cc3569eb-fca8-4f6a-980b-508c7be2581a-image.png
    This puts the “edge column marker” at the current column (the cyan vertical line in the screenshot below)

    The results of these two together:
    c7114b0d-1920-43eb-ace2-bb728212c968-image.png

    You can assign keyboard shortcut to either, to be able to easily toggle them on and off.

    -----
    update: three things, actually. View > Show Symbol > Show Indent Guide
    3bbb3b8d-09c9-4820-8d0e-4d7a4068d697-image.png

    This puts a separate vertical line at every tabstop level; Settings > Preferences > Language > yaml > Tab Size: ____ determines how far apart the Indent Guide lines are.
    2f7ec0ff-4f47-4a16-9ae3-694f9e1ef697-image.png

    And Settings > Style Configurator > Language: Global Styles > Style: Indent guideline style and … > Style: Edge colour will allow you to change the colors for the Indent Guide and the Edge Column Marker, if you don’t like the default gray and cyan for those two.

  • How do I increase numbers by one

    4
    0 Votes
    4 Posts
    336 Views
    dr ramaanandD

    @PeterJones I was finally able to increase the numbers by one, using the methods you elucidated at, “How to install and run a script in Python Script”. Thanks a lot!

  • Notepad++ being ,,Invisible''

    6
    0 Votes
    6 Posts
    908 Views
    Daniel FerreiraD

    @mkupper i made an account just to be able to login and upvote your answer. thank you so much mkupper

  • How to install and run a script in Python Script?

    24
    0 Votes
    24 Posts
    6k Views
    dr ramaanandD

    @PeterJones OK, thanks a lot! “<sup>.*?\[” finds what I want it to find, that is “<sup>\[” with the Regular expression mode turned on. I then put “<sup>[” in the Replace with field and hit “Replace all”

  • Adjusting column spacing and line tracking

    3
    1 Votes
    3 Posts
    496 Views
    Torge WeißT

    Hello Peter,
    thank you so much. It worked out exactly as I wanted.

  • Project files: mark them

    6
  • How to highlight lines with color one by one?

    22
    0 Votes
    22 Posts
    3k Views
    Alan KilbornA

    @Coises said in How to highlight lines with color one by one?:

    …loop through character by character checking SCI_POINTYFROMPOSITION to determine where the wrapping happens

    The original script fires its logic every time the UI is updated (maybe that could be changed to every time the data is modified instead).
    When I wrote the original script, I had “performance” concerns for the script, with moderately-sized files and larger.
    I have even more concerns about that if the script is changed for the newly requested feature for it (which would incorporate the “looping” @Coises mentioned).

  • Regex: Find String in HTML Not at Line Start or Following </p>

    15
    0 Votes
    15 Posts
    852 Views
    Sylvester BullittS

    @dr-ramaanand Understand. Thanks for your input and time!

  • Calltip on mouse-over from UDL xml file (Python)

    21
    0 Votes
    21 Posts
    2k Views
    Khundian TwitchK

    I have finished the script, if anyone is interested I posted it in the Plugin development forum.
    Thanks again to everyone who helped me out!

  • Find-in-FIles: Can’t Replace Multiple Instances of Word

    48
    0 Votes
    48 Posts
    4k Views
    Sylvester BullittS

    @Sylvester-Bullitt Got done generating broken link report.

    THE GOOD NEWS: My regex didn’t break any links

    THE BAD NEWS: I just go lucky. Some further testing revealed that my regex would have broken links, if I had had the bad luck to use a search term that also in a hyperlink URL.

    So, I added lookaheads to ignore matches of underscores and .htm, and it seems to work. In case anyone’s interested, here’s the new-and-improved regex, with some comments added for clarity:

    (?-si:<section class="lyrics">|(?!\A)\G)(?s-i:(?!</section>).)*?(?#Not at start of line or para)(?<!^)(?<!<p>)(?<!<p class="chorus">)\K(?-si:\bWORD_TO_FIND\bq(?#Not in hyperlink)(?!(\.htm))(?!_))
  • Line where cursor is located disappears in line highlighting

    3
    0 Votes
    3 Posts
    324 Views
    PeterJonesP

    @Stefan-Kirsch ,

    You might want to follow similar steps to what I suggested in this post – that other post was about the “multi-selected text colour” setting, but your stylers.xml and themes\DarkModeDefault.xml might be missing some of the recent style definitions, and the default it chooses with those undefined styles might not be compatible with your color choices.

    So you basically need to compare the whole <GlobalStyle>...</GlobalStyle> section from your copies of those two settings files to the same section in stylers.model.xml, and copy over any lines that are missing from the stylers.model.xml version into your config files. Once you restart, you can use Style Configurator with either the default-theme or DarkModeDefault theme selected, and change the new colors to better match the colors you’re using for other things.

  • How to revert to single pane after compare

    3
    0 Votes
    3 Posts
    700 Views
    Vishnu vardhanV

    @PeterJones Thanks mate!

  • All occurrences of token: Not all the same texts are marked (highlighted)

    3
    0 Votes
    3 Posts
    350 Views
    N

    @PeterJones Thank you. Your tip solved exactly my problem. THANK YOU SO MUCH!

  • Trying to create Language for ChordPro Format but I am miserably failing

    4
    1 Votes
    4 Posts
    332 Views
    Heinz FaerberH

    @Mark-Olson said in Trying to create Language for ChordPro Format but I am miserably failing:

    EnhanceAnyLexer

    While reading about UDL I cam across EnhanceAnyLexer so I knew I have to install that plugin :-) Then I copied the Chordpro lexer code into C:\Users\UserName\AppData\Roaming\Notepad++\plugins\config\EnhanceAnyLexer\EnhanceAnyLexerConfig.ini

    Guess what? You’v made my day.

    Everything is working the way I wantet it to be.

    Thank you very much Mark