I am writing a custom macro/userscript (in JS) for Komodo Edit.
The final thing I need to do is to CLOSE the file in the editor after I save it, but I cannot locate a list of doCommands.
I can use this to save the file, but I do not know how to close it.
ko.commands.doCommand('cmd_saveAll');
The Komodo docs point here:
http://docs.komodoide.com/SDK/commandid
But as you can see the page is blank.
Not sure where to find a list of doCommands, but I use the following:
SAVE file:
ko.commands.doCommand('cmd_saveAll');
CLOSE file:
ko.commands.doCommand('cmd_bufferClose');
Related
How do I fix this on Mac?
Unable to save /test.py Error: Read-only file system
Since Mojave, you are no longer allowed to write to /. I suspect this is the cause of your problem: nothing to do with Sublime Text.
Pick another directory to save your files to, preferably in your home folder.
Once you make your document, go to File and click Save (or just press cmd+n).
Write the title of your document.
Right under the name there should be a little box that says Macintosh. You can click on it and change it to whatever file you prefer.
you must have left the save location as "macintosh". Basically this error means, that this "macintosh" folder is read-only. There is no issue like "sublime not having permission to write to the disk".
Just save to a usual folder and you would be gtg.
Make sure you save it to your project's folder and not just to the desktop or whatever is the default.
If I create a brand new sublimetext buffer, then set the syntax of the buffer to something (in this example json).
When I go to save the file, it will have untitled.json in the file save dialog automatically. If I then change that to foo.bar and hit save. The file saved to my filesystem will be foo.bar.json.
Why? My intentions as a user are clear in this case, I'm overriding the file extension for my own reasons.
Is there a way to globally set sublimetext to stop appending what it assumes is the proper extensions to files? Any number of google searches has turned up nothing.
I want to open and read a file which has not been saved. I would like to do this in Windows OS with VC++ or by means of a batch file only.
If I open up the file by normal method of fopen or fopen_s, the file is opened in the last saved manner which is not what I want. I want all the data which is present in the file but not yet saved.
I have read something on this in this link. Similar question. But I am unable to follow the scripts. Can someone please convert it into a batch and give it to me?
I believe you mean read the contents from a window or control.
Files are made only after data is saved.
To read contents of a window like the edit control in Notepad, you first have to get a handle to the control. You can do this using FindWindow to first get the handle of the main window and then use it in FindWindowEx to get the handle of the edit control.
Once you have the handle of the control, you can send it WM_GETTEXT message using SendMessage to read the text it contains.
Please note that this may not work for all applications. For example, MS-Word uses a rich edit control which had its own methods to fetch text.
I have a single xcdatamodeld file and would merely like to open this particular file with xcode. However, when I double click the file, it doesn't really show me anything or allow editing. The only way to do this is to run MyApp.xcodeproj and only then can I modify this file. Isn't there any way to edit the coredata file using only the xcdatamodel file? Thanks!
The xcdatamodeld file is not actually a file - it's a directory containing other model files.
Right click the file, choose Show Package Contents and you will get access to the files inside the directory. You can then double-click those files. When I do so I get just the Xcode model editor without the full Xcode project window.
I have been using TextPad for years and I am happy with it except for one issue. I use it to monitor log files that are updated in near real time. Every time the log file is updated TextPad prompts me to reload it. Essentially I want to force the yes button at all times and never see the prompt. I submitted a change request at their site, but I was wondering if there were any alternatives to TextPad that would allow me to see the file loading in real time with out a prompt to reload it.
You can configure Textpad to reload the file without prompting.
Go to Configure->Preferences...->File, then select the Auto-Reload option under When files are modified by another process.
One point to note, if the cursor is at the end of the file, TextPad will keep it at the end as updates are made so the file will scroll nicely. If the cursor is elsewhere in the file, it won't scroll.