Set Questa Sim Double-Click Editor - questasim

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

Related

File not formatting after saving in Sublime even when SublimeAstyleformatter's autoformat_on_save is true

So I tried setting up Sublime text editor for programming in cpp on mac , and to use formatter I added the sublimeAstyleformatter plugin and then followed these steps:
Sublime Text > Preferences > Browse packages > SublimeAstyleformatter > SublimeAStyleFormatter.sublime-settings
and inside the file I changed the autoformat_on_save to true and saved the file, but still whenver I save the cpp code, the file is not formatted.
I searched but didn't find any way out, Any help would be appreciated
I understand many windows users are facing the same issue on their systems too. It's probably because you may have installed fresh OS on your system.
so let's get to the solving part.
I am assuming if you are reading this answer you're already done with this step:
Preferences > Browse Packages > SublimeAStyleFormatter > SublimeAStyleFormatter.sublime-settings > "autoformat_on_save": true, (change false to true in line 8)
(If not then do the above step after installing AsytleFormatter package in sublime, and give it a go-to check whether it started working or not)
Now, after this, if your formatter still doesn't work there is a major chance your system doesn't have Microsoft Visual C++ 2010 x64 Redistributable - 10.040219
here is the official link : Microsoft Visual C++ 2010 x64 Redistributable-10.040219
install this software, relaunch sublime editor and you are good to go.
PS: For confirmation do the following (I have added snap for reference Screenshot):
Right-click in the file on your sublime editor
Hover over AStyleFormatter
Now you will be able to see the "format" option (which previously was greyed out)
( Hope it helps to solve the issue!)
I was facing issue with my m1 mac. Now it is resolved. What I did was open sublime text using Rosetta. Some of the sublime packages started working for me as I changed sublime text to open using Rosetta, when I click.
Follow these steps.
Quit Sublime text.
Go to Applications.
Right click on Sublime Text -> Get Info -> Select "Open using Rosetta" checkbox.
Open sublime Text again and check.
This resolved the issue for me. However, in case you do not want to go through Rosetta for sublime, then you can have Clang format Sublime Package installed; that works natively, without going through Rosetta.
Going off the documentation, the key combos on macOS/OSX are CtrlAltF for format current file and ⌘K, ⌘F for format current selection (you had it backwards). The Command Palette commands are called SublimeAStyleFormatter: Format Current File and SublimeAStyleFormatter Format Current Selection.
After looking through the issues on the plugin's Github repo, it looks like the Microsoft Visual C++ 2010 SP1 Redistributable Package (x64) is required for the plugin to work. However, seeing as you're on macOS, I'm not sure what else would be required.

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!

Can we run commands in terminal directly from scite editor?

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 ?

Shortcut file on Windows Desktop doesn't show in Windows Explorer

I am writing some program to get the list of shortcut files on Desktop.
and I find some strange things about this.
Most programs will create shortcut files on Windows Desktop like "Mozilla Firefox.lnk" or "Google Chrome.lnk" after installed. I can see these shortcuts on Desktop and use them to launch programs.
But I find that if you use Windows Explorer to open the desktop folder, you can't see these lnk files on the list. Some lnk files are visible while some are not (e.g. Mozilla Firefox, Google Chrome, Opera). That's the strangest part. I can't tell what's the different between them.
Then I try to open the cmd program and use "dir" command to list the files on Desktop and also can not see these files.
Then I try to write some code to test with C#
File.Exists(#"C:\Documents and Settings\user\Desktop\Google Chrome.lnk")
The result is "False", that means the lnk file is not exist on the Desktop.
Then I move the "Google Chrome.lnk" from desktop to a folder and move it back.
Now I can see it on Windows Explorer and cmd "dir" command
and the result of the code
File.Exists(#"C:\Documents and Settings\user\Desktop\Google Chrome.lnk")
is "True".
I have no idea what has been changed after the lnk file move out from desktop and move back, but now it appears like a normal file.
Does anyone notice this and know why it likes this?
Thanks.
The answer is:
Some lnk files are in the "All Users\Desktop" folder
not in the current user's Desktop
Thanks to #DanielA.White
I know this is a really old thread, but I thought I'd share anyway. I had a .Ink file on my desktop that would not delete. After trying to delete it a number of times in different ways I decided to just right click the desktop and click refresh. It disappeared! Sounds too easy to be true doesn't it?
There they were. C: > Users > Public > Desktop

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.