Is it possible to launch an external image editor from Textmate? - macos

Is it possible to launch an external image editor from the TextMate project drawer? I suppose the same concept would apply to launching any external editor from TextMate. Right now, if I right-click on the image file, I only have an option to open in Preview or Finder.
Thanks!

Yes. There is an (official) TM Bundle that does what you want--it's called "ImageBrowser." I installed recently and i have used it only once. It seems to work fine for the purpose you mentioned in your Question; in particular, it finds images in your current project and displays them in an image browser that runs inside TextMate.
You can get it from the Macromates SVN Repository.

TextMate respects the Finder's (well, LauchService's) "Open with" choice for each file. Whichever program would open when you double-click the file in Finder will appear in TextMate's contextual menu. Simply change this through the Finder's Get Info window for the file in question to the editor of your choice, and TextMate will respect it. It's dynamically populated, so you don't need to restart TextMate.
As far as I know, there's no method to specify a secondary program beyond the default.

I think no is the answer, but like Matt said, explore the usage of the Services menu.

Related

Where is the windows terminal settings location?

I edited the settings file and there must have been a typo and now the app crashes on startup.
Online the documentation says the settings lives in $env:LocalAppData\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json
I can't figure out what that path means since it doesn't exist on the computer.
I re-installed the app to fix the problem then made sure to see what the actual path is.
It's located in : C:\Users\{USERNAME}\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState
In the current version (1.7.1033.0), the application can open the JSON settings file for you via a button. Open the Settings tab, and the bottom left corner will have a button named "Open JSON file". Clicking that button will open a prompt asking with what application to open the file. That text editor can then tell you where the file is located.
If you open the terminal settings, it will open a text editor with the settings.json file. If your default editor is VS Code it will show you the path below the tabs on the top of the screen.
I'm unsure what other editors show you the path, but if it is crucial you can change your default text editor to Code.
There is still the option to open the JSON file through settings. In version 1.15.2875.0 you can still find the "Open JSON file" at the bottom left corner
Screenshot with highlights
This hint was given by a comment by user1340531:
Mine is at C:\Users\{username}\AppData\Local\Microsoft\Windows Terminal\settings.json
(or more generically: %userprofile%\AppData\Local\Microsoft\Windows Terminal\settings.json)
If it's not there, you should consider OP's answer or vyps comment which lets you find out one of these generic paths (they are equivalent):
%userprofile%\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState
%LocalAppData%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState
$env:LocalAppData\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState
If you don't know what these paths mean, I'd recommend playing around with "Windows Run" (Win+R) and the explorer address bar.

How do I Goto Anything (across all "projects" or windows) in Sublime Text?

aka: How can I find a tab in another window in Sublime?
In Sublime, the feature called Goto Anything (⌘+P, ⌘+T, Win: ⌃+P, etc.) searches through a list of open files/tabs, or any files (and more) but only in your current project/focused window :( I understand why it works that way but it's not super useful for having a bunch of random files open.
I'm currently using Sublime on my home computer (Mac) where I have 3 or 4 windows open (not technically projects, but Sublime seems to associate the two conceptually) each with 1-5 tabs. It's often difficult to find a tab I was using for a quick note (eg. groceries) because right-clicking the app icon in the dock only shows the active tab per window. If "groceries" was in a window and wasn't the last viewed tab when I went to another Sublime window, it's effectively lost, and I've got to start going through each one of my Sublime windows to find it.
I've also tried the Find in Files... feature (⇧+⌘+F) with <open files> in the Where field thinking I'd just search for something in the file (eg. eggs) but "open files" really means "open files in this project/window"...same scope limitation.
I've even looked for a plugins that might help but "Goto absolutely everything" is a concept that's hard to search for. I've been wanting to try writing my own so I'd be grateful for a Python solution as well!
I realize this is a somewhat old thread, and you may have already come up with a solution. While there is no way that I know of to do a search or goto anything across all windows, I developed a Sublime Text plugin that allows you to jump between windows using command+shift+o on Mac OS X.
You can install it from package control:https://packagecontrol.io/packages/GotoWindow

How do i open a file via terminal with a specific editor?

How do i set a default application to open a file with my preferred text editor? I am currently trying open file.rb. It opens text wrangler, but I want to open with another. How do i do this?
Go to finder, right click on your file.rb file and select Get Info.
In the Info Window you'll see a section that says Open with, expand that section. There you can change the default application to open that particular file. There's also a button labeled Change All... This button allows you to use the specified application for all similar filetypes (*.rb).
You want to use the name of the editor you want to open with, i.e. gedit file.rb, or vim file.rb. You can probably also change your default editor associated with that file type, depending on your OS, etc.

MacOS, how to delete unused service item in Keyboard Shortcuts

I'm a newbie to Mac OS and learning with Automator, I found it useful but not quite controllable. I made a shortcut in services but I don't know how to delete it.
The item highlighted is what I want to delete. I think I should do it with Automator but I don't find out how.
Any help will be appreciated.
crtl + mouse click on the service to get a context menu for the service.
Select Show in Finder.
This will take you to the service file by opening a new finder window and selecting it.
You then just need to remove the file from the Services folder.
When close and re-open the System Prefs. The Service will not be there anymore.
Here Are Some Good Things to Know Too
#markhunte seems to have a good answer, but here's another way:
If you are within Automator.app,
Open the Service that you want to delete. You may have to choose "Open..." from the menu and type the key-combination command-shift-period to view invisible files such as ~/Library (which is now invisible by default in Mountain Lion.)
Your services (the ones that are local to your account) are in the folder: ~/Library/Services
After opening your Service in Automator, hold down the command-key and click the title of the window. (This works in most Mac applications -- not just in Automator to reveal documents in the Finder.)
Once you've found the document in the Finder, you can simply move it to the Trash like any other document.
Also, other kinds of Automator workflows can be found in a similar manner in the following directory:
~/Library/Workflows/Applications
I think that with this sort of Thing that Apple has just made it hard.
With the folder ~/Library now being hidden by default.
With having to know the "secret-handshake" command-shift-period to be able to open hidden files.
and
To have a way to reveal documents in the Finder, but have it also a "secret-handshake" of holding down the command-key while clicking on a document window's title to be able to reveal documents in the Finder.
I think that to get Apple to change these things, the way that they listen is if many developers file a bug report:
Apple's Bug Reporter:
https://developer.apple.com/bug-reporting/
Look in ~/Library/Services or /Library/Services
In the Finder, ~/Library is now an invisible folder by default in Mountain Lion. Of course, people can google for "Mac show hidden files" and find a command to enter into the command-line to make all files and folders visible. As a programmer, I like being able to see everything.
Unix Command:
defaults write com.apple.Finder AppleShowAllFiles TRUE
Reference:
http://osxdaily.com/2009/02/25/show-hidden-files-in-os-x/

Multiple editor windows in Xcode

When coding in Xcode, I double-click a file in the "Groups and files" list, and it opens a new editor window. I have several of these open at once.
Until today.
Today, when I double-click a file in the list, it opens the file in the last editor window I was using, meaning I can only have one editor window up at any one time.
I guess I've switched some option somewhere by mistake. How do I get it back to the way I like it?
I'm using Xcode 3.2.5
In the top right of the editing window is an icon that says "grouped", perhaps you clicked on it by accident.
Click on it so it says "ungrouped", and you'll be back to opening multiple windows.
perhaps preferences>General>Open Counterpart in same Editor

Resources