NOTEPAD++ CUSTOM SYNTAX HIGHLIGHTING: User Defined Language Tutorial

Поделиться
HTML-код
  • Опубликовано: 27 ноя 2024

Комментарии • 79

  • @AmitChristian
    @AmitChristian  3 года назад +3

    ⚡ Hello Friends ⚡ hope you found this useful! Do Subscribe ♥ to my channel (ruclips.net/channel/UCbU0jmMgFAfmL1J1BHsEmAA) for more videos. 🚩 Let me know what other types of videos you want to see in the future!!

  • @MindTryX
    @MindTryX Год назад +1

    Thank you very much for this tutorial! I was super confused as to how to use this, and looking it up on google made it no easier, I could finally make my own Syntax Highlighting for a custom version of Assembly I created thanks to you! I hope this also helped a lot of other people like it helped me

  • @bazcuda
    @bazcuda Год назад +1

    Great intro, thanks. Very useful.
    N.B. If you're using a dark theme in Notepad++, in the Styler where you choose the color, set the background color to "Transparent", otherwise every keyword etc. will appear on a white background. NPP is actually doing this in the video, but because the default background is already white, you don't see that it's doing it. Actually, maybe you should always do this so that your UDL highlighting can be used by everyong, regardless of what theme they're using.

  • @kurmanbek
    @kurmanbek 4 месяца назад

    Great video, thanks! How do I add a list of words into the keywords? I have thousands of bad words and I wanted them to be highlighted when reading the text. However, when I add the list in to the keywords area, it won't work. It works when I manually type each word into the field.

    • @AmitChristian
      @AmitChristian  4 месяца назад

      When you say bad words, do you mean typos?

  • @JillRhoads
    @JillRhoads 3 года назад +3

    Is there a way in UDL to highlight a keyword based on a RegEx? I've been creating my own text highlighting and I have some patterns that come up again and again that I want to highlight. Sort of like CART CORT CERT should be highlighted..but CEART also could be highlighted since the regex would apply there as well.

    • @AmitChristian
      @AmitChristian  3 года назад +3

      JRhoads, as far as I know, you cannot use Regex in UDL. (superuser.com/questions/881614/notepad-user-defined-language-regex). If you come across something that works, please post it here. Appreciate your comment.

  • @KlezHistory
    @KlezHistory 3 года назад +4

    What is the font you are using in notepad? Also the tutorial is so helpful i couldn't understand other tutorials, thank you

    • @AmitChristian
      @AmitChristian  3 года назад +1

      Gytch, If you meant the block fonts at the beginning of the video, they are actually *ASCII Fonts* (Also known as *FIGlets* ). It is not actually Windows Fonts. But I like to put those in my code comments /titles, it helps as you navigate through a large code base.
      You can also create your own ASCII text from this online webpage. (patorjk.com/software/taag/#p=display&f=Big&t=Type%20Something)
      The Figlet fonts I like is Doom, Big, Small, Slant etc). There are literally hundreds of them.
      There is a way to automatically put those in Notepad++. I may make a video of it sometime in future. (Feel free to subscribe to my channel, if you like to see more content like this.)
      Thanks.

    • @KlezHistory
      @KlezHistory 3 года назад +1

      @@AmitChristian No I mean the typing font and not the first one, they look smooth

    • @AmitChristian
      @AmitChristian  3 года назад +2

      @Gytch Oh, it is a *CONSOLAS* . It is Microsoft's new Monospaced font available with Windows. It is free and it is awesome. (docs.microsoft.com/en-us/typography/font-list/consolas)

  • @EdHatesNoobTubers
    @EdHatesNoobTubers Год назад

    Great video, crazy question I use MobaXterm as SSH client for work, I love how it has color schematic and its easier to view logs. Just wondering if there is a way to export that color scheme file or style and import it to Notepadd? Are there default ones that we can already use? or can you recommend one?

    • @AmitChristian
      @AmitChristian  Год назад

      What kind of log is this? I’m sure there is a syntax highlighting XML online for those. If you can send me a link to similar log online. I can look up for using define language syntax highlighting a Notepad++.

  • @zanaton1989
    @zanaton1989 4 месяца назад +1

    que buen video yo edito mucho yuris revenge un juego y como su archivo rulesmd esta en .ini aveces cuando trato de balancearlo cometo errores pero asi los ubico mas rapido

    • @ggjjabc
      @ggjjabc Месяц назад

      A classic game. From there I migrated to Supreme Commander. And finally, to Warno.

  • @joymackey8218
    @joymackey8218 2 года назад +2

    Quick question i have a big list with names how can i convert alot of name like jason to jason:jason in notepad++ thanks alot

    • @AmitChristian
      @AmitChristian  2 года назад +2

      Joy, you can easily do that with regular expression’s back reference. I may make a short Video about it to demonstrate it. Meanwhile you can check regular expressions playlist on my channel or on google.

  • @praveend5952
    @praveend5952 3 месяца назад

    This is very much useful. Can you please tell us how to edit one udl

    • @AmitChristian
      @AmitChristian  3 месяца назад

      Notepad++ creates a UDL.xml file and you can edit this xml file. If you try to edit the udl xml file in Notepad++, it may not work properly since Notepad++ is also using this file. So better way is to use Microsoft notepad and view and edit udl xml file.

  • @xaviersilveira5575
    @xaviersilveira5575 8 месяцев назад

    Great video Amit - keep up the good work!

  • @mangounit9678
    @mangounit9678 3 года назад

    this makes it look more like an actual programming language, but how can we add functionality? or would we need to create the actual language elsewhere that can run the code we type into notepad++?

    • @AmitChristian
      @AmitChristian  3 года назад +1

      Not sure if I understood your comment completely. But this video shows how you can add a syntax highlighting for the programming languages that Notepad++ does not support by default. Thank you for the comment though.

    • @myname-sj7hs
      @myname-sj7hs 3 года назад

      @@AmitChristian I think what he's trying to say is, if I have x language how do I run a program for x language in notepad++

    • @AmitChristian
      @AmitChristian  3 года назад

      @@myname-sj7hs Sorry, I may not have fully understood his question. I think each language is different. So, it depends, how to handle compiling it in Notepad++.

  • @Spuds1411
    @Spuds1411 2 года назад

    hey so im making a custom UDL for a modding language for a game, and it quite simply uses a system of "Keyword = Action". is there any way of making every word before the = sign a certain colour?

    • @AmitChristian
      @AmitChristian  2 года назад

      Well, if you have specific keywords on the left hand side of the = sign, then you can add those in the 'Keyword Lists' of UDL. Can you share few lines of your example code, and I can try to help you out.

  • @PaulieM
    @PaulieM Год назад

    Great Tutorial, thank you!

  • @Unfinished_Sculpture
    @Unfinished_Sculpture 2 года назад

    Can you make a video on doing it on the language of Small Basic
    please

    • @AmitChristian
      @AmitChristian  2 года назад

      Sure, I can give it a try. Is Small Basic a language that is for young kids to learn to code? Do you have a sample code?

    • @Unfinished_Sculpture
      @Unfinished_Sculpture 2 года назад

      @@AmitChristian sure I have a sample code. I can share my github link if you need it

    • @AmitChristian
      @AmitChristian  2 года назад

      @@Unfinished_Sculpture sure. can you please share the github link? The small basic is pretty fun little language. I may teach my young one this to create some fun program. Thanks.

  • @rajatsonu01
    @rajatsonu01 2 года назад

    Bro.....
    hats off.
    Thanks thanks thanks a lot.
    God bless you

    • @AmitChristian
      @AmitChristian  2 года назад

      Rajat, Glad that you liked it. Please like the video if you can. Thank you.

  • @Arvindv939
    @Arvindv939 2 года назад

    hello amit ,I have one issue in the notepad++ ,when I code in the notepad++ and save ,after closing and then opened its colors is reverting means no color change has occured.
    Can u help me with this

    • @AmitChristian
      @AmitChristian  2 года назад

      Arvind, do you have a user defined language? Does it have a specific file extension? You can assign a UDL to a specific file types. Let me know and I will try to help you out. Thanks

  • @chiragjain7908
    @chiragjain7908 2 года назад

    Can we share the custom UDL syntax created on my notepad++ with team members, if yes, how can we do it?

    • @AmitChristian
      @AmitChristian  2 года назад

      Chirag, best place to share the UDL would be either GitHub page or notepad++ forum.

  • @ReospecMedia
    @ReospecMedia 2 года назад +1

    dude, how to save everytime i open load other file i want that languages load itself?

    • @AmitChristian
      @AmitChristian  2 года назад

      Do you want your UDL to be opened by default? Can you please elaborate?

    • @ReospecMedia
      @ReospecMedia 2 года назад

      @@AmitChristian sorry my english is very bad. yes i want custom UDL opened by default everytime i open other script, or other file. I dont want manual evertime you open the file need to select language and select UDL.

    • @AmitChristian
      @AmitChristian  2 года назад

      Avris, no problem. What is the extension of your custom file? You can assign the extensions to be associated with a particular user defined language. There is Ext. box in the setting. ( community.notepad-plus-plus.org/assets/uploads/files/1588106931262-791bcd5a-444d-4e83-83d2-6b3536fff19c-image.png )

    • @ReospecMedia
      @ReospecMedia 2 года назад

      @@AmitChristian i dont have "Ext" box after ignore case box.
      Edit: okey i see now. idk my extension is, i just download this notepad++ yesterday.

    • @AmitChristian
      @AmitChristian  2 года назад

      What programming language do you want to open by default? (In other words, which one do you use v frequently).

  • @EdHatesNoobTubers
    @EdHatesNoobTubers Год назад

    How would I highlight IP addresses? Would it be like xx.xx.xx.xx or . . . . ? I want it to highlight any iP address Im trying to customize for log review

    • @AmitChristian
      @AmitChristian  Год назад +1

      Ed, check this out, this may help.
      stackoverflow.com/questions/25203446/notepad-ip-address-highlighting-language
      The OP in that post was also looking to examine logs and the IP addresses. Hope it helps.

    • @EdHatesNoobTubers
      @EdHatesNoobTubers Год назад

      @@AmitChristian so close yet so far, your video is awesome it helped me create my own. The issue I have is I still can't get the IPs to be highlighted or similar I just can't. I spent the past 2 hrs trying. So close all I'm missing is my IP address and I'm done :(

  • @santiagoluquez1299
    @santiagoluquez1299 3 года назад +1

    How can I change the general background here?

    • @AmitChristian
      @AmitChristian  3 года назад +1

      Santiago, if I understand your question correctly: If you would like to change the background in User Defined Language settings, there is a DEFAULT STYLER which has BACKGROUND COLOR and FOREGROUND COLOR settings. (Check out the video at this time, ruclips.net/video/qyUZwJOeoIA/видео.html )
      IF YOU ARE INTERESTED IN CHANGING GENERAL BACKGROUND, you can use style configurator, you can use themes as well. Check these videos out.
      Notepad++ Dark Mode ( ruclips.net/video/Hg7V_0GaFLw/видео.html )
      Notepad++ Top Dark Themes ( ruclips.net/video/gvk0swkir5A/видео.html )
      Hope it helps.

    • @AmitChristian
      @AmitChristian  3 года назад

      Santiago, just checking back, were you able to find a good solution for the question about background color?

    • @waterfelon33
      @waterfelon33 2 года назад

      @@AmitChristian Hello, I am having issue with changing color styles while using UDL, entire text gets inverted to white. It only happens when selecting UDL.
      I select my UDL > Style Config > Default Style theme > Choose Color Style and everything gets inverted until I go back to normal language settings.

    • @AmitChristian
      @AmitChristian  2 года назад

      @@waterfelon33 The only thing I suspect is that you may have Dark mode on/off and when changing the color style, it may be going to White text color in white background or something. Can you press Ctrl + A to see that all text is still there and is highlighted.
      Other then that, I am not completely sure, what is going on. You can share your UDL info or post a screenshot on Imgur and then share a link here. Thanks.

  • @Dwza23
    @Dwza23 3 года назад

    Is there a way to sort the custom highlight into letters above?

    • @AmitChristian
      @AmitChristian  3 года назад

      Dwza, can you please post a sample code here, with little more description of what kind of highlighting are you expecting?

    • @Dwza23
      @Dwza23 3 года назад +1

      @@AmitChristian it's not about the higjlight, its more about where my custom highlight is getting displayed in the dropdown. I made a highlight for a csv file and want it to appear under C and not on the bottom of the list :D

    • @AmitChristian
      @AmitChristian  3 года назад

      Ok I got it. You would like th UDL to appear in the menu under C (as for CSV). Now that is kind of hard. Because as far as I understand, the Language menu comes from langs.model.xml. And would be difficult to mess with. So, I would say, it is not possible, but you can ask on Notepad++ forum and may be there is a way. ( community.notepad-plus-plus.org/category/2/general-discussion )

    • @AmitChristian
      @AmitChristian  3 года назад

      Dwza, were you able to find a way to put those custom CSV User defined language into the menu under C, just wondering? Thanks.

    • @Dwza23
      @Dwza23 3 года назад

      @@AmitChristian sadly not... guess i was looking so long for it that i accepted the position by the time :D

  • @vuthanhhung3710
    @vuthanhhung3710 3 года назад +1

    Thankyou :))

    • @AmitChristian
      @AmitChristian  3 года назад

      Hưng Vũ Thanh, you are very welcome. Please like the video if you can.

  • @lycanthrope8979
    @lycanthrope8979 9 месяцев назад

    Chris, you need to revisit this tutorial, as it's in error about a few things, such as your folding code needs an "open" word/symbol and a "close" word/symbol. That's why all those other words highlighted with end, instead of the "end" single word closing the structure to fold, as well as an explanation of what the two types of code folding are about. One must have whitespace surrounding the word and the other allows for words to be run together like "function(example)" and they will still be highlighted properly.

    • @AmitChristian
      @AmitChristian  9 месяцев назад +1

      Thanks Lycan for your feedback. I will take a look at it. Appreciate the detailed explanation. I did this video a while ago. Thanks.

    • @lycanthrope8979
      @lycanthrope8979 9 месяцев назад

      @@AmitChristianI realize that, and looked for a way to give you a heads up on the DL, but couldn't find another way to contact you, but for this forum of yours. I have learned a lot from some of your other videos that I wasn't aware of what Notepad++ can do, so I'm only looking to keep your content "helpful".

    • @AmitChristian
      @AmitChristian  9 месяцев назад +1

      @lycanthrope8979 absolutely. Thanks for your input.

  • @TwilightSatium
    @TwilightSatium 8 месяцев назад

    1:20 wath to do if "user defined Language" dosnt exist?

    • @AmitChristian
      @AmitChristian  8 месяцев назад

      There might be issue with the Notepad++ installation. It should have a menu for UDL.

  • @shadowgamingboy7388
    @shadowgamingboy7388 3 года назад +1

    How excute pypy in notepad+++

    • @AmitChristian
      @AmitChristian  3 года назад

      Hi Srikanth, I am not sure. But I will check it out. Thanks.

  • @MurrelRhodes
    @MurrelRhodes 3 года назад

    Enjoyed this video - very helpful. Are you on Twitter?

    • @AmitChristian
      @AmitChristian  3 года назад

      Yes I am! But haven't been very active. (twitter.com/amitchristian20). May be I should. Thank you for your encouraging comments.

  • @EdHatesNoobTubers
    @EdHatesNoobTubers Год назад

    There are more things i want highlightes but i will learn i hope 😅

    • @AmitChristian
      @AmitChristian  Год назад

      Best way is to try and see if it sticks. :)