how do I find and remove sublime text 4 update file that was downloaded without confirmation when I clicked "check for updates" - sublimetext3

I use Sublime Text 3, and made the mistake of clicking "check for updates" which downloads an update file with no confirmation about what version will be downloaded, and no information about the update file name or location.
Rather than simply presenting a dialog such as "you have the latest version of Sublime Text 3, but Sublime Text 4 is available" it just downloads version 4. (I discovered this the hard way over a year ago when I naively assumed Sublime's updater would behave in a responsible fashion and present a dialog before downloading an entirely new version my license doesn't support. But I forgot and clicked check update again.)
Where can I find and delete the v4 update file that was downloaded? ("Recents" under Finder does not show any new files so I assume it's hidden in some Library or cache folder)

Ah, found it on another site.
The update downloaded by Sublime Text 3 is not a file, it's a folder named "Update" in:
~/Library/Application Support/Sublime Text 3

Related

How to do "File in" in Pharo 6.1?

Wanting to migrate my small project from Pharo 5 to Pharo 6.1, and I happily found the File Out option when I right-clicked on my package and its classes. I saw it generates text files for those artifacts in my image directory (I'm running on Windows). So far, so good.
However, I looked everywhere for a menu to import these files back into Pharo 6.1 (right-clicked on the package list, etc.) to no avail. How does one do a File In (the opposite of File Out)?
World menu > Tools > File Browser > (locate your changes file) + right-click > Changelist browser
The easiest way to file code in, is to just drag and drop the file onto the Pharo window. A dialog appears to ask you how you want to proceed.

How do I add an item to "Edit > Permute Lines" submenu?

According to this source the definition if Permute Lines submenu is following:
{
"caption": "Permute Lines",
"children": [...]
}
And it doesn't contain an id. Is there a way to add items to this submenu?
Also this source is 5 years old and is probably for Sublime Text 2. Is there a more recent version of default menu file?
To answer your second question first, you can always get at the most recent menu definition from your own copy of Sublime; it's stored in the file Default\Main.sublime-menu, which you can get to most easily using PackageResourceViewer to open it up.
That said, the part of the menu that you're referencing in your question is the same between Sublime Text 2 and Sublime Text 3 and neither of them has an id value directly within the Permute Lines sub-menu.
By creating a Main.sublime-menu in some other package (e.g. your User package) you could create entries that are adjacent to that sub menu, but in order to actually put new content directly inside of it you would need to create an Override.
You can do that via PackageResourceViewer; if you use it to open up the Default\Main.sublime-menu file, you can modify the file and when you save it, it will be saved as an override.
From this point forward your override becomes the new default menu; other packages that extend the menu can still do so, but they will be merged with your version and not the shipped version.
This is not without its risks in that if a future version of Sublime Text includes a modified version of the menu, your override will still take precedence and you won't be warned that it's happening, so you could potentially miss out on fixes.
This happened recently when the latest build of Sublime modified the base menu to include an install link for PackageControl, for example.
Also, this is only a viable solution if you want to edit the menu for your own purposes; if you're a package author, you can't use this method to distribute your own changes.

old file name stuck at the top of sublimetext

Very strange issue here, it's not causing problems but is aesthetically annoying. I had the kindle plugged into my windows machine as to edit the kindle's files. One of the kindle file names is now listed after the name of the python program I'm working on in sublime text. To paint a picture, above the menu drop downs in sublime text, there is the path to the document (IE python program) I'm working on, followed by the random file from the kindle.
The kindle file is no longer on my computer and never had anything to do with sublime text. I've tried restarting the computer and reinstalling sublime text, neither worked. Any ideas what might be going on??? Thanks!
The sublime text window caption shows you the name of the currently open file, followed by the name of the current project in parentheses (if you have a project open at all), followed by the name of the program.
Based on the screenshot in your image:
You currently have the file softmax.py open and it is stored in a folder on your desktop named machine learning\python programs\test\newyorktest\
The name of the Sublime project file is Casting the Circle_A Woman's Book of Ritual_B009FKTQD8_sample.sdr.sublime-project (the caption doesn't show the sublime-project part because that's redundant).
I would imagine that when you set up the project you accidentally chose that name as the name of the project file.
In order to fix your problem, select Project > Save Project As... from the menu and enter a different name for it. The location that you save the file in doesn't matter (it can be inside the folder of your project or in some other location), all that is important is that it has the extension .sublime-project.
Once you pick the new name, Sublime will immediately swap to using the new project file instead of the old one, which will keep your current set of open files, etc, and the caption will change.
You can then seek out and delete the other project file if you want.

Sublime Text Update 3083 Error - Error Code 32

When trying to update Sublime Text 3 to version 3083 on a Windows 10 computer I keep getting an error message at the end of the update saying
'Unable to rename C:\Program Files\Sublime Text 3 to C:\Program
Files\Sublime Text 3 (3083), error code: 32'
I looked it up on Microsoft's website and error 32 stands for 'The process cannot access the file because it is being used by another process'.
So I tried closing down all other programs and tried updating again but I still get the same problem. I have also tried running the program as an administrator but the update creates the same error message.
I only have package control installed and the Haxe plugin installed and so I can't find any other reason why it wouldn't work, although I haven't updated it before.
Can anyone offer any advice?
All the application is trying to do is copy the new files into the sublime program folder. You can do this yourself:
Close your Sublime Text program
Open a file browser C:\Users\...\AppData\Local\Sublime Text 3\Update (or wherever your update landed)
Open another C:\Program Files\Sublime Text 3 (Make a backup of this folder if you want to be cautious)
Copy everything from the update to the Program Files folder
Run Sublime Text (you should now see the update dialog)
Remove the update folder and backup if everything looks good
For me, I found that my antivirus (Malwarebytes) was causing the issue.
(I was alerted to this because I tried to update using the installer from the website and it warned me that Malwarebytes was holding on to files it needed to complete.)
I cancelled the installer, turned off Malwarebytes, and opened sublime to let it update itself normally and it worked nicely.
It seems this is common:
https://forum.sublimetext.com/t/build-3143-flagged-as-virus/31272?u=spenceryue
I can't believe chrome.exe (Google Chrome) was using the folder where Sublime Text was installed. Removing that lock with unlocker fixed the update error.
It's not like I have ANY plugin or open tab related to sublime text on chrome.
I really recommend unlocker though, saves you more than one time.
I was troubled by this problem for some days on Windows 10, and resolved it at last.
Navicate to sublime text path, like 'C:/program files/sublime text/'
find 'update_installer.exe' and 'sublime_text.exe'
Open the file's properties - compatibility - Run as administrator...(Something like that, maybe the spelling is wrong)
Select OK, and rerun sublime text.
In my case, the reason was a package (the Powershell Editor Services package), which establishes a handle to C:\Program Files\Sublime Text 3. Those processes continued to run even after cleanly quitting Sublime Text. Killing them and removing the package that spawned them allowed Sublime Text to install its update.
I found this by using Process Explorer (procexp). Here's how:
In procexp, run "Find Handle or DLL" (ctrl+F). Type "sublime" in the search field. When I did this, I saw "C:\Program Files\Sublime Text 3" appear several times in the search results.
Click on one of the results in the search window. The process that has a handle on the folder will be highlighted in procexp's main window.
Hover over the process name. You will see a Windows hint containing the command line that invoked the process. This is the command line which ran the process which had a lock on the Sublime Text 3 folder on my machine:
powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "& \"C:\Users\YourUser\AppData\Roaming\Sublime Text 3\Packages\PowerShell\editorservices/Start-EditorServices.ps1\" -EditorServicesVersion \"0.7.1\" -HostName \"Sublime Text Host\" -HostProfileId \"SublimeText\" -HostVersion \"3.0.3170\" -LogLevel \"Verbose\" -LogPath \"c:\users\yourus~1\appdata\local\temp\1526304355-EditorServices.log\" -BundledModulesPath \"C:\Users\YourUser\AppData\Roaming\Sublime Text 3\Packages\PowerShell\editorservices\modules\""
The issue is documented here and has been resolved here. So, the team is being responsive. Hopefully the procedure described here will help others find and resolve similar issues, with other processes that leave unnecessary handles floating around.
In my case the reason was I had Sublime Text opened with another user in the same computer. I closed Sublime Text for each user and then the installer worked.
For me it was a plugin running in background called host plugin 3-8 and i ended it right away by clicking end process tree in task manager (Windows 7)

How to add gvim icon to openwith menu

I have installed gvim in windows 7. When I right click on a file, I get list of editor to be opened with. I see a icon for notepad++, 7zip and beyond compare, but not for vim. it is tough to search "Edit with Vim" in the big list. Is it possible to add icon to "Edit with Vim". I tried setting ICON in registry to gvim.exe path, but that didn't work
I am currently having a crack at coding this up "for real" (but no success yet).
In the meantime, here's what I did on my machine as a sort of workaround:
Create a new text file and call it (for example) vim.reg
and paste this into the file:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\Edit with Vim]
"Icon"="\"C:\\Program Files (x86)\\Vim\\vim74\\gvim.exe\""
[HKEY_CLASSES_ROOT\*\shell\Edit with Vim\command]
#="\"C:\\Program Files (x86)\\Vim\\vim74\\gvim.exe\" \"%1\""
and then right-click on the file and select Merge.
Or just manually add those keys directly in RegEdit if you're comfortable with that.
You may need to restart Explorer.exe (eg. log out and back in) for it to take effect.
This will add a new "Edit with vim" entry, with the icon, to the context menu for every filetype.
If you want it only for text files, for example, then change the two occurrences of "*" in the file to "txtfile".
The other vim context menu entries (eg. open with existing vim session) will not be affected - they will still not have icons.
UPDATE:
From the bug report that Christian mentioned, it looks like someone else has now implemented this, in version 7.4.724.
Vim.org reports that the currently release is 7.4.729, so it should include that.
The only trouble is that the Windows binaries available for download from the site are from 2013.
But vim.org also suggests a way to get the latest version, precompiled for Windows:
For the latest version with all patches included see Cream below.
These versions are unofficial, but the download number is high and
complaints are few.
And
For an unofficial version that does include all the latest patches and
optionally a bit more: Cream.
The "one-click installer" mentioned includes the Cream changes.
For the "real Vim" use the "without Cream" version listed further down.
As far as I know, this is not possible yet. There is a whishlist bug that requests this feature, but no one has contributed code yet.

Resources