Use only a single Geany instance under Windows - geany

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.

Related

Why is the folder created on the command line not visible by other programs?

I created a folder on my Desktop within the command line on Windows, by using the command mkdir. I also added some files in there by using the command type nul >> fileName.
The folder is there, but two blue arrays appear on its top.
I want to open it on my IDE now.
I'm using PHP Storm, and I'm trying to open a file inside the folder, but when I do
file > open file or project > Desktop
the folder is not visible.
For it was on read-only mode, I have also tried to change such a setting, but nothing changed, I don't know whether or not this is relevant as regards to the issue explained above.
Why a folder created within the command line is not visible by some other program, and how can I solve and avoid the issue in the future?

use external editor in Octave on OSX

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!

"edit" not a valid command in cmd.exe?

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

Creating Gedit syntax files

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.

how do you make a shortcut that can select a file and run a DOS command with it as a parameter?

I need this to be able to ask the user for a file, then after the user chooses one, it will run a CMD command like "program.exe [selected file]"
If you're asking for a way to have a batch script create an open file dialog, I don't believe that's possible. You're better off creating a small program that will do this for you.
There might be a way, but I don't know it. I'm going to cover some alternatives.
GUIs work mostly by attaching commands to files, not the other way around. You can do that using file extensions. You can do that using Send To.
File extensions permit the association of an command (e.g. perl) with a file extension (e.g. .pl) Using "assoc" and "ftype", one associates the name to an extension, and a command to that name.
I'm not at my Windows machine at the moment, so I can't give you the exact usage. Type "help assoc" and "help ftype" at the prompt for usage. Use "%1" (quote included) in the command to indicate where the name of the clicked file should appear in the command.
Whenever you double-click on a file with that extension, it will be launched in with your command.
Alternatively, you can use "Send To". Somewhere in your profile is a directory named "Send To". (Just do a search to find it.) Put a shortcut to the application in there. To use the shortcut, right-click on the file you want to open, choose Send To, choose the application.
Eric
Check out the cmd command (the modern version of the DOS command line on Windows), which can invoke itself recursively. The command-line options are available by typing cmd /? at a command prompt.

Resources