• Login
Community
  • Login

How to configue Notepad++ with any programming languages?

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
8 Posts 5 Posters 6.7k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T
    Thierry Trouillet
    last edited by Sep 9, 2020, 6:38 PM

    Well, I’m trying to use Notepad++ and after to have discovering it I really ask me how to use it with C# and the last Roselyn compiler for example! thank you very much

    P E 2 Replies Last reply Sep 9, 2020, 7:04 PM Reply Quote 0
    • P
      PeterJones @Thierry Trouillet
      last edited by PeterJones Sep 9, 2020, 7:06 PM Sep 9, 2020, 7:04 PM

      @Thierry-Trouillet ,

      How is this question different than your first question from a few days ago? If you had really wanted to remind people that you hadn’t gotten an answer, you should have replied there, rather than creating a whole new topic.

      But since we are here, I will answer here.

      Your question, both there and here, is so ambiguous as to be difficult to answer.

      Notepad++ is automatically set up to edit C# or any other code. It even has the ability to syntax highlight a file, if either its extension is correct (so if it ends in .cs, it will syntax-highlight on C# syntax). So from that perspective, it is already configured to work with C#, no matter the compiler you happen to use.

      Are you asking how to set it up so that Notepad++ launches your c# compiler of choice? There are many ways.

      • If all you need is a single command based on the filename, like c:\path\to\compiler.exe FILENAMEHERE.cs, then you can just use the builtin Run menu’s Run command, where you could type "c:\path with spaces\to\compiler.exe" "$(FULL_CURRENT_PATH)" (using the quotes around each term, because there can be spaces in those paths)

        • the official docs have a section on User Defined Commands , which includes a description of the “environment variables” like $(FULL_CURRENT_PATH) that the Run command recognizes.
        • you can click the save button in the run dialog to save that command for later, and even assign a keyboard shortcut for later use. It will show up in the Run menu from now on.
      • If you have a more complicated build need, you can either create a windows batch file (.bat or .cmd or .ps1 file – whatever you are most comfortable with) and pass the file to your batch file instead of just to the compiler. Or, you could use a plugin like the NppExec plugin, which has its own batch scripting language. For example, I have a NppExec script which compiles the current .c file, and then runs the resulting .exe:

        npp_save
        cd "$(CURRENT_DIRECTORY)"
        g++ "$(FILE_NAME)" -o "$(NAME_PART)"
        npp_run cmd.exe /k "$(NAME_PART)"
        
        • The NppExec script can be added to the Macro menu using Plugins > NppExec > Advanced Settings, and once in the Macro menu, you can use the Macro > Modify Shortcut command to add a keyboard shortcut for that script.

      If you describe what you actually want a little bit better, we might be able to help you better. Or if I have guessed right, you might want to confirm that, and ask any questions you have as a result of the info I’ve given you.

      T 1 Reply Last reply Sep 11, 2020, 9:34 AM Reply Quote 2
      • E
        Ekopalypse @Thierry Trouillet
        last edited by Sep 9, 2020, 7:22 PM

        @Thierry-Trouillet

        in addition to what @PeterJones already said, there is a plugin
        called CS-Script which makes Npp a C#/VB.Net IDE.
        Maybe worth trying.

        1 Reply Last reply Reply Quote 2
        • M
          Makwana Prahlad Banned
          last edited by Sep 10, 2020, 4:55 AM

          Hello,@Thierry-Trouillet
          Follow this step,To How to configue Notepad++ with any programming languages?

          Step 1:- Launch Notepad++
          Step 2:- Click Settings > Preferences.
          Step 3:- Click on the New Document/Default Directory tab.
          Step 4:- Change the Default Language to HTML.
          Step 5:- Click the Close button.

          I hope this information will be useful for you.
          Thank you.

          A 1 Reply Last reply Sep 10, 2020, 12:02 PM Reply Quote -3
          • A
            Alan Kilborn @Makwana Prahlad
            last edited by Sep 10, 2020, 12:02 PM

            @Makwana-Prahlad said in How to configue Notepad++ with any programming languages?:

            I hope this information will be useful for you.

            Nope. Just like every single one of your postings, it is totally irrelevant to the question posed. Why is this? Hmmm.

            T 1 Reply Last reply Sep 11, 2020, 9:26 AM Reply Quote 2
            • T
              Thierry Trouillet @Alan Kilborn
              last edited by Sep 11, 2020, 9:26 AM

              @Alan-Kilborn I know, I know!

              1 Reply Last reply Reply Quote 0
              • T
                Thierry Trouillet @PeterJones
                last edited by Sep 11, 2020, 9:34 AM

                @PeterJones Hi P. Jones, a few hours or more will be necessary in order to manage with notepad++ but yours explanations give me important details. Excuse me for these questions. Thierry

                1 Reply Last reply Reply Quote 1
                • T
                  Thierry Trouillet
                  last edited by Sep 11, 2020, 9:45 AM

                  @Makwana-Prahlad Ok Thank you very much

                  1 Reply Last reply Reply Quote 0
                  5 out of 8
                  • First post
                    5/8
                    Last post
                  The Community of users of the Notepad++ text editor.
                  Powered by NodeBB | Contributors