Can we run commands in terminal directly from scite editor? - c++

I just started using Scite Text editor.
Is it possible to change our directory location and run the commands in terminal directly from scite ?
Is there any other text editor for c/c++ which can support this ?

Related

CLion bind shortcut to run command in terminal

I currently have a setup which can compile and run the currently focused file tab through a shortcut. I achieve this through the External Tool feature in which I assigned a custom bash file with a couple of commands to that keypress.
But this causes the output in the Run tab to clear each time I run my code. I want to preserve the output. This can be done if the bash file that I run through the External Tools can instead run as a command in the terminal when I press the shortcut.
Can this be done?
Run tab will remain if you uncheck the "Open console for output" in the External tool configuration window. It won't open the tool's output then, though.

Set Questa Sim Double-Click Editor

I am trying to get Questa Sim-64 10.7a to open .sv files in Notepad++ when I double-click in the project window. I set the editor command to use Notepad++, so when I use the edit command in the Questa Sim console window it uses Notepad++. That also sets Notepad++ as the editor that is used when I select File-->Open in External Editor in the Quest Sim editor, but that means I have to open the file in the default editor, then open it in my preferred external editor.
How do I set my Questa Sim project to open the file in Notepad++ when I double-click on the file in the project window?
I'm not sure what I did, but suddenly it is working as expected. That is, double-clicking a file in the project opens it in Notepad++.
I tried restarting Questa Sim, and it still didn't work as expected. All of a sudden, without even restarting, it just works.
edit: This morning it is not working again, although I haven't changed anything. That is, it is opening in the default editor. Unless I'm missing something, I think this feature is just flaky.
edit edit: OK, I discovered a work around. Whenever I add an existing file, the editor defaults back to the Questa Editor. If I open any .sv file from Windows Explorer (I have .sv files associated with Notepad++ in Windows), Questa starts using Notepad++ as expected. So, it's some goofy Questa Sim bug for sure.
1.install gvim or notepad++
2.after installation go to This PC
3.select any file .v or .sv file
4.select and open with open with gvim or notepad++
5.make default for .v or .sv with gvim or notepad++
6.whenever you open the file it will open with the default tool only
7.in Questa Editor also it open with the default tool

How to make sublime text highlight CUDA C++ syntax

I'm using Sublime Text 3 to write CUDA C++ programs. But when I create the .cu file and open it using Sublime Text, the Sublime Text does not highlight the syntax.
I installed the packages here
https://github.com/harrism/sublimetext-cuda-cpp
I cd to the Sublime Text directory, git the repository and restart the Sublime Text. However, nothing got changed. What's wrong? Do I need to further configure something after I git the repository to the sublime text directory?
Thank you all for helping me !!!
I think I have solved this problem.
Firstly, install the Package Control introduced by most blogs. Then, as recommended by OdatNurd, I abort the installation via git. Instead, I open the sublime text, then press Ctrl+Shift+p. Then type in "Package Control", then choose "Package Control: Add Repository". We are required to input a url. Input "https://github.com/harrism/sublimetext-cuda-cpp". Press Enter. Then press Ctrl+Shift+p again, type in "Package Control", this time choose "Package Control: Install Package". In the search box, type in "cuda", and choose the name of the CUDA C++ package.
Finally, restart sublime.
Thanks all the answerers!

How do I save a TextEdit (mac) file with a custom extension (.sas)?

So, I'm in the process of writing some code for SAS and I realized I have to save the file as filename.sas. My professor mentioned that I would have to use note pad or another text editor on my computer.
How can I use TextEdit on the Mac to save a .sas file? Opening TextEdit, adding some text, and saving causes the file to have a .rtf or .odt extension added to it.
Should probably add that my mac version is 10.5.8
Your Mac comes with TextEdit, which is a perfectly good basic text editor. Be sure to choose Format > Make Plain Text so that you get a text file. Be sure to uncheck Hide Extension when you save, and provide the .sas extension manually. Or you can change the extension later using File > Get Info in the Finder.
You also have pico, vim, vi, emacs, and probably a host of others in the Terminal.
Above mentioned solutions are best suitable for older mac os versions.
But for the latest mac os version(Mojave or later) try with nano or other command-line text editors.

Sublime Text build and run

Notepad++ has a "Run" feature where you can simply run "$(full_current_path)" and it will run the file you're working on with its default program.
Is there any way Sublime Text can do this as well?
In ST2, you can set its build system in: Tools > Build System > New Build System
And here you can find the manual https://www.sublimetext.com/docs/3/build_systems.html