I want to use Sublime Text as my default editor for Octave, but cant get it to work.
The location of my Sublime Text app is in the /Applications/ folder as usually.
For example putting EDITOR (“/Applications/SublimeText.app”) results in the following error:
parse error near line 1 of file /Users/czapla/.octaverc
syntax error
>>> EDITOR (“/Applications/SublimeText.app”)
^
error: source: error sourcing file '/Users/czapla/.octaverc'`
FYI: Yes SublimeText, this is name of the application, no spaces in between, I changed it to avoid having to escape spaces - I wasnt sure how that would be handled by Octave.
Any ideas?
Thanks!
You don't mention what different things you tried to place in your .octaverc file. The following should work EDITOR ("path_to_your_sublime_aplication"). It doesn't need to be the full path, whatever works to call it from the command line should suffice. For example, EDITOR ("gedit") works fine on my system.
Also, it is important to set this before calling any function that makes use of it. The variable is persistent during an Octave session after being accessed the first time (and defaults to emacs).
I am using Sublime Text 3 on OS X
Octave programs are running perfectly. So you can try the below mentioned steps
Open Sublime
Goto Tools --> Build System --> New Build System...
Paste this code
{
"cmd": ["/usr/local/octave/3.8.0/bin/octave-3.8.0", "$file"],
"selector": "source.m"
}
Save it as Octave.sublime-build
Now use Octave as your build system
Use ⌘ + B to run your code.
Enjoy!
Related
I'm running Geany 1.34.1 under Windows 10. Whenever I click a text file on Windows Explorer Geany opens the file in a new instance.
How can I configure Geany so that it opens all files in a single instance only?
According to a section of the Geany documentation, the behavior you want should occur unless Geany is started with the appropriate command line option. From the table of command line options, that would be either -i or --new-instance.
Check your file type association for text files and delete either of those command line options if they're there.
If no options are found, you might check your Geany configuration file to see if there's something related to starting a new instance. If so, you can try deleting the related stuff and see what happens. Be sure to make a backup copy of the configuration file before editing it so you can recover in case something goes terribly wrong.
If no options are found anywhere, then it may be a bug in the Windows version of Geany.
I set (appended) the path to new install of sqlite3. it didn't work in my vscode terminal afterward, only working in cmd. So, I set it again in vscode as well, assuming that vscode is running a different terminal, requiring its own path variable,,, but when I came back later that day after shutdown and new startup, the path for sqlite3 needed to be added again. it appears as though I will need to add it every time I want to use sqlite3 in my vscode terminal
I'm pretty newb, so I haven't tried much other than setting it again, then trying to look up the keywords on google and the vscode documentation, but so far I haven't found a setting or command to save the path variable permanently.
Press ctrl + comma
Search for terminal integrated shell + your OS
Type in the path of sqlite shell (You can use whereis sqlite3)
You can also add line "terminal.integrated.shell.${yourOS}" : "path/to/shell" to your global settings.json file.
I just added an incorrect PATH line to my .bash_profile and now every command results in "command not found", include vim. How can I re-edit the file to make the correction?
Thanks!
Try specifying an absolute path to an editor:
% /usr/bin/vim ~/.bash_profile
On the Mac you can also use the open command to have the OS open a GUI-based editor of its choosing (or have you select one.) I believe TextEdit is the default for .bash_profile:
% open ~/.bash_profile
In the case command line tools won't work, files on most systems (eg. linux, osx, cygwin, etc) can be edited by non-command tools such as notepad. This tool, in contrast to Wordpad, is a plain text editor, while Wordpad is a word processor. In case some errors appear after using it, in the terminal simply runs:
dos2unix your-problematic-file
that should solve the problem.
I'm trying to create a .cfg file for bcc32 compiler and I'm following the instructions. I have installed correctly and placed an environment path as instructed but when I type "edit bcc32.cfg" into the command prompt it says that edit isn't a valid command? What am I supposed to do?
You could also create a .bat file, edit.bat, to replace the 16-bit edit program (removed because x64 windows flavors won't run it) which would launch your favorite editor.
#echo off
notepad %1
#echo on
This is what I wound up doing as a simple patch so I could carry on the way I always had for the most part. Just type:
edit myfile.ext
in the command prompt to use it.
Note: notepad is not my favorite editor - this is just an example that will work with stock windows.
Note 2: #echo off and #echo on are shown for clarity. You may also shorten this by omitting the echo statements and simply placing the # before the command to be silenced.
#notepad %1
I just use notepad (since they took out the edit command) from the command window like so:
C:\Borland\BCC55\bin> notepad bcc32.cfg
The file will open in notepad for editing. When you've finished editing the file, save it and you're done.
I have found this works for seeing in-window text of a complete file, on a 64bit machine. Once your path is set in cmd prompt, type the word type... followed by "filename" do you see how I used the quotes around the filename only!
type "filename"
You type it just like this (changing filename for your files name) and you will be able to see the entire file text in the cmd window. Not sure how to edit from here on but maybe someone can figure it out from here and tell me.
Assuming you're using Windows 7 (where edit.exe and edlin.exe have been removed):
Use powershell.exe instead of cmd - thereby edit will be available via command line.
Take a look at: http://en.wikipedia.org/wiki/Windows_PowerShell
simple answer....
if your using an old version of windows (xp e.t.c...) you would be able to use edit
but since your using new version of windows, Microsoft has updated and removed the commands that they think are not relevant e.g.. (msg, edit) depending if its a bit32 bit64 or bit82...
I have started a new thread rather then reviving this one:
Creating your own syntax highlighting in GEdit?
Hope that was the right thing to do. I have created a syntax file for fish shell and placed it in /usr/share/gtksourceview-2.0/language-specs (in Ubuntu). When I open a .fish file with gedit there is no highlighting and the view-->high light mode menu does not show this fish as an option. Is there something that needs to be updated to allow the file to be recognized?
Thanks for reading-Patrick
Make sure you are in fact using Gedit 2 and not Gedit 3 (which uses gtksourceview-3.0). For the newer, 3.0 lang files, you can put them into ~/.local/share/gtksourceview-3.0/language-spec/
If you've installed it to the correct location, you should see the name you specified in the _name attribute in the View > Highlight Mode menu under the sub menu you specified with the _section attribute in your .lang file. For example, if I had test.lang with:
<language id="test" _name="Test Language File" version="2.0" _section="Markup">
Then I would see "Test Language File" under View > Highlight Mode > Markup in the Gedit menu.
As an alternative to /usr/share/gtksourceview-2.0/language-specs/, you could try putting it in ~/.gnome2/gtksourceview-2.0/language-specs/.
Assuming you've restarted gedit after installing your syntax file, then it may just be a syntax error. Try installing the Go syntax file (http://go-lang.cat-v.org/text-editors/gedit/), and if that shows up but your custom one still doesn't, then it's a problem with your file. If none of them show up, then you may need to re-install gedit or gtksourceview.
Also, make sure the permissions on your new file match those of the existing ones. I doubt gedit would need more than read permissions to be able to use the file, but it wouldn't hurt to check.