How to configue Notepad++ with any programming languages?



  • 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



  • @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.



  • @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.


  • Banned

    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.



  • @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.



  • @Alan-Kilborn I know, I know!



  • @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



  • @Makwana-Prahlad Ok Thank you very much


Log in to reply