Change language being spell-checked in Textmate - macos

In OS X applications such as Mail and Firefox you can right click in a text field and change the language being spell-checked. I can't figure out how to do the same in Textmate. Can it be done easily, and if, how?

Press ⌘: (it's a shortcut to Edit, Spelling, Show Spelling and Grammar) and change the language in the dropdown.
To update the error highlights on the active file, press ⌥⌘; twice to turn Check Spelling as You Type off and on again.

Edit / Spelling /check spelling as you type (click on it to uncheck).

Since there is no option in the TextMate preferences, there is no easy option. The only way to accomplish this is to change your preferred system language, i.e. going to "System Preferences" > "Language & Text" > "Language" and dragging the language you want to spell-check to the top. You have to log out and log in again to make this change work.
Hopefully there will be an easier solution in TextMate2.

Very old thread but in TextMate 2:
Edit -> Spelling -> various options to spell check are shown at the top of that menu. Below, choose System (Automatic by Language) ideally and it'll follow System Preferences, else choose from one of the other languages listed.
If using the "automatic" setting, you should not need to log in/out or restart Textmate 2 (at least, in OS X Sierra) to detect a change made in System Preferences, though you might need to toggle on and off the "system automatic" TextMate language selection if it doesn't seem to "see" the change straight away.
The ⌘: shortcut mentioned by #dipnlik works in TextMate 2, showing a popup menu hovering under the first "underlined in red" word and is useful for its "learn spelling" and "ignore spelling" options.

Related

Visual Studio Code shortcut to display autocomplete list before typing on macOS

I am trying to display all possible words after putting the cursor in certain place in the code.
The autocomplete list appears when I start writing/typing:
However, I would like to see all suggested words even before typing.
I tried command + space, however it was a system shortcut for Search in macOS:
Any thoughts?
In case you are a CJK user using Mac, Ctrl+Space will not work, since it is used to switch IMEs.
There is another keyboard shortcut for triggering suggestions:
Option+Esc (Mac)
Alt+Esc (Windows)
Also see this post.
VS code version: 1.41.1
I solved this problem using fn+control+space.
Hope it helps you.
"change input source" keyboard shortcut should be disabled
To disable it->
Go to system preferences -> keyboard -> input sources
add a new input source (choose ABC)
Go to shortcuts tab (inside of keyboard settings)
Click on input sources on the left
disable the "select previous input source" shortcut
restart your vs code and now ctrl+space will show quick suggestions.
You can use the following alternative keyboard shortcuts:
⌘+I (mentioned in the official VS Code documentation for "Trigger suggestion")
⌥+esc
fn+control+space
The shortcut for the "Trigger Suggest" command is ⌃Space (ctrl+space) — as mentioned in the comments.
Most default shortcuts can be found in the documentation, which will automatically show the correct keybindings for the system you're on. In other words, if you visit the page on a Mac, you'll see Mac keybindings.
Additionally, you can:
go to Code > Preferences > Keyboard Shortcuts (on a Mac) and search for keybindings based on the command you want to execute
open up "show all commands" (⇧⌘P on a Mac) and search for the command there, allowing you to either view the keybinding for that command, or simply navigate to it directly from the search
Of course you'd have to have some idea of what the command's name might be. And in this case, a search for "suggest" would suffice.
If you use too many keyboard layouts, maybe the MacOS shortcut might be active. You can disabled ^(Ctrl)+Space shortcuts for MacOS.
System Preferences>Keyboard>Shorcuts>Input Sources> Disable Select the previous input source.
You can use next shortcut for change input sources.Ctrl+Alt+Space
when I was set up 2 keyboards with different layouts, and it turn out it overrides the ^+Space behavior, so this is how fix it:
Go to system preferences -> Keyboard -> Keyboard shortcuts
Click on input sources
and disable the "select previous input source" shortcut

RStudio for Mac: "Move Focus to Source" shortcut doesn't work (?)

The "Move Focus to Source" Shortcut (Ctrl1) doesn't seem to be working--either it does nothing or, when RStudio is in full-screen mode, it (annoyingly) acts as if I had just pressed Ctrl+Left Arrow) (However, manually clicking on "Move Focus to Source" does work as expected).
This post suggests that it might be a bug. However, in contrast to the post, the other shortcuts involving control+numeral (Such as "Show History") appear to be working correctly.
So is this a bug or am I doing something wrong?
Also, since--as mentioned in the post--the RStudio guys "don't recommend overriding [the keyboard shortcuts] via the Mac System Preferences", I'd prefer to avoid that approach (though I'm not exactly sure why it should be avoided--hopefully someone can shed some light on this, too).
Set-up:
OS X Version 10.9.3
RStudio Version 0.98.501
By default, Apple sets the Ctrl1 shortcut to "Switch to Desktop 1". As a result, if you want to enable the Ctrl1 behavior in RStudio you will first have to disable this shortcut in the System Preferences.
Specifically, the path is:
System Preferences --> Keyboard --> Mission Control --> Switch to Desktop 1
Then, after disabling this, RStudio's shortcut will work just fine.
[Note: you could either reassign the RStudio shortcut or the "Switch to Desktop 1" shortcut but the approach I described is definitely the most reliable since you won't have to worry about any other shortcut conflicts.]
I encounter the same problem when I use the Romaji keyboard instead of the e.g. US or US Extended keyboards.
When one of the Japanese input methods is active, ^1 is used to "Convert to related character" and ^2 is used to find a similar kanji character.
In other words, when you use multiple input methods, use the correct input method for working with RStudio.

How to set an external editor in Xcode 4.2

All the posts I have found suggest going to the "file types" sub-section under XCode preferences and adding an external editor for a specific file type. However this options does not seem to be there on XCode 4.2.
It looks like it just goes through LaunchServices, so... whatever you'd get by opening it using Finder by default.
I had a look around and I couldn't figure it out. I notice that right-clicking on a source file, there is a greyed out option for "open in external editor." I couldn't figure out how to get that working at a glance.
A reasonable workaround would be to right-click on the source file you want to edit, click "Reveal in Finder," and then edit the file in the editor of your choice. The changes will be automatically updated in Xcode. I think you'll lose any undo/redo history you may have had for that file in Xcode though.
you have to make the editor you want is the default editor for the file type(cpp/h/lua ..).
step: first time you 'show in finder', then open the file with 'open as', then choose the editor you want, make sure you choose the 'always open it'. then every is ok now.
I agree that you need to change the default setting for the file type in Finder. The best way to do that is to right-click any similar file in Finder. Select Get Info from the pop-up menu. Then look down the list for the "Open with" drop-down option. Select your chosen editor and then below the words "Use this option to open all documents like this one" click on "Change All..."
Then it will change the default for all your applications.

Where did the "Search in Project" context menu item go in Xcode 4?

When you selected text in the code window and right-clicked on it, you would get a context menu with an option to "Search in Project" for the selected text. (Xcode 3.x)
Anyone knows how I can achieve the same in Xcode 4? Or a keyboard shortcut?
Now I select the text and wrestle my fingers in the following combination CMD-C, CMD-CTRL-F, CMD-V, RETURN. Feels a bit like playing the Playstation...
Cheers,
Niels R.
There doesn't seem to be a single keyboard shortcut, but one you might find useful is "Use Selection for Find" (Command+E). That is, you can select some text, and press Command+E, Command+Shift+F, Return.
It's no longer in a menu option but is accessible by an icon. Look directly beneath the "Schemes" at the sequence of 7 small icons. The 3rd one over is a "search" icon. Click that icon and type in your project search text and press return.
Just think it might be handy to see it at a glance:

2 basic Textmate shortcuts 'don't save' and 'replace all'

Ok, maybe they're system shortcuts. I've googled (just a bit) and couldn't find an answer. Maybe there isn't any :) Still..
I love keyboard and I use quite a few in TextMate but just realise I still use the mouse for 2 of the most common actions:
How do I press search and replace after the S/R dialog box is up? - if you press enter it just takes you to the next occurrence of the search string
when I close a file that I don't want to save, how can I choose don't save without touching the mouse?
To select Don't Save from the keyboard, you can use the keyboard shortcut ⌘+D. (This works in most OS X apps, not just TextMate.)
The search and replace (actually it's called "Replace & Find") shortcut is alt-cmd-f and works both inside the Find dialog and without it. With using other shortcuts like cmd-f, shift-cmd-f, cmd-G you can perform most of the search/replace actions without even opening the dialog. For example, if you want to perform the substitution, you press alt-cmd-f, then another is highlighted and if you want to skip it, it's cmd-G, which finds yet another, and so on.
As for the second question, I think it's a general Mac OS X issue -- the message boxes buttons don't have keyboard shortcuts in other apps, too. When I first switched from Windows, this annoyed me but I got used to it by now.
I recently built a web site to store lists of shortcut keys and there is a great list of TextMate Shortcut Keys for Mac on there.
If you know any more you can add them yourself too!
Here's the link http://shortcutkeys.org/software-shortcuts/mac/textmate
If you want to choose the answer for any dialog with the keyboard, go to "System Preferences" > "Keyboard" > "Keyboard Shortcuts". On the bottom of that page there are two radio buttons. Activate "All controls". Now you can switch options of a dialog box with the tab key in every proper OS X application. Note that this is a secondary option, thus you can hit the enter key for the default behaviour or space to trigger your secondary option. Most often it's set to the opposite of the default behaviour, i.e. "Don't save" in a file save dialog and "no" or "cancel" in many many other applications.
I think thats a great feature. Due to the secondary option I always hit either enter or space, depending which option I wanted.

Resources