Emacs key bindings in DrRacket? - emacs

How are we supposed to configure DrRacket so that it does not use Emacs key bindings? Like I type C-s and it just saves the code instead of bringing up the search line. Or I use C-x C-f and it won't open another file. The DrRacket documentation claims to not use Emacs bindings but it obviously does.

You want to disable the check box, Enable keybindings in menus.
Unfortunately this checkbox is a bit buried:
Open the Racket Preferences dialog.
Click the Editing tab.
There's a row of sub-tabs for that. Click the General sub-tab.
A few items down you should see the Enable keybindings in menus check box. Un-check it.

Related

Emmet keyboard shortcuts not working in vscode

I'm not talking about the abreviations (which works fine); but rather keyboard shortcuts.
Like this one for instance, Ctrl+k is supposed to remove a tag(opening and closing) and re-arrange the inner HTML's indentation.
This is just one example, but most shortcust found in emmet's page, doesnt work on vscode, why is that ? how can I fix it ?
If you look at the Keyboard Shortcuts page and search for emmet you will see many emmet commands unbound to a keybinding. Including
editor.emmet.action.removeTag
[I think there are just too many emmet commands for vscode to have devoted keybindings to them when most people wouldn't use them.]
If you hover over any command and click on the + sign to its left vscode will open an input box where you can enter your desired shortcut keybinding.
I wouldn't recommend Ctrl+K as that is used as a part of a lot of default keybindings in vscode.

Can I see, and individually disable, keyboard shortcuts for extensions, such as the Sublime Text Keymap extension?

When I started using VS Code, I installed the "Sublime Text Keymap and Settings Importer" extension, to make it act more like Sublime, because that is what I was familiar with.
Now, I would like to use the default shortcuts. I want to switch gradually, maybe by disabling a few Sublime shortcuts at a time, or by at least knowing which shortcuts are coming from the Sublime extension, so I can train myself to stop using them.
Is there any easy way to see which shortcuts are coming from the Sublime extension, and ideally disable some, but not all, of them?
If I look at the "Keyboard Shortcuts" list, it shows the default shortcuts and the Sublime shortcuts mixed together, with no hint as to which is which, as far as I can tell. Example:
It shows both Command+P and Command+T as shortcuts for workbench.action.quickOpen, both with a source of "Default". But I know that Command+T is coming from the extension, because if I disable the extension, I don't see it (but I still see Command+P). Disabling the extension and restarting VS Code is kind of inconvenient, so I would like an easy way to see which shortcuts are coming from the extension.
You can see a comprehensive list of all keybindings the extension includes in the "Contributions" tab of the extension itself:
I'm not aware of any options to display this in the keyboard shortcuts UI directly. However, you could put the two tabs side-by-side for easy comparison:
Here is an updated and better method to filter the Keyboard Shortcuts editor to show which keybindings are contributed by a specific extension. See Specify which extension provides a specific keyboard shortcut. And here is an example where I search for one of my extensions, Toggle Line Comments to see if it contributes any keybindings.
And then it would be easy to disable or re-bind any of those keybindings.
Also you can click on the Extension gear icon in the Extensions list. That will bring up a menu with an Extension Keyboard Shortcuts option. Which will open the Keyboard Shortcuts editor with a search already completed for any keybindings contributed by that extension.
Keep an eye on this PR https://github.com/microsoft/vscode/pull/95713 (Show keybinding source in GUI). Looks like it may be included in vscode v1.45. It would allow you to filter the "Keyboard Shortcuts" by user-defined or extension. From the above link:
Filters examples:
#user - shows user defined keybindings
#default - shows default keybindings
#extensions - shows all extension contributed keybindings
#extensions:"${EXTENSION_NAME}" - shows keybindings contributed by
${EXTENSION_NAME}
#extensions:${EXTENSION_NAME} - same as above only without quotes
(spaces are invalid for this one)
Searching with filter and text also works:
#extensions:bookmarks list - shows keybindings from bookmarks
extension that contain the word "list"
And then with such a filtered list it would be easy to disable whichever commands you wished.

How do I find out which command name is bound to a particular key sequence in VSCode and vice-versa?

Are there commands equivalent to Emacs' C-h k and C-h w?
If not, is there at least a big file containing all keybindings I can search through?
Edit: the "vice-versa" is trivial if you know the command name. Just type it in the command prompt and it shows the associated keybinding. I'm more interested in the former.
v1.28.0 added a better way to search for bound key chords, see search keyboard shortcuts: release notes.
Record and search keyboard
shortcuts
In the Keyboard Shortcuts editor (Ctrl+K Ctrl+S), you can now search
for keybindings just by typing keystrokes instead of typing out the
key name (example 'shift'). Turn on the Recording Keys mode and type
the keystrokes you want to search for.
You can also enter into the Recording Keys mode using Alt+K. Press the
Esc key to exit from Recording Keys mode
.
Open the keyboard shortcuts editor (cmd+k cmd+s), and you can search for keybindings to see what they're bound to. e.g. search cmd+s and "Save" will be returned.
You can also click the keybindings.json link on that page to see all the keybindings in json form.
A) Help -> Keyboard Shortcuts Reference
It will open a PDF with a table containing "hotkey - command" pairs, categorized. (On Windows, it will open this PDF.)
B) File -> Preferences -> Keyboard Shortcuts
This will open the keyboard shortucts editor where you can search for the command or even the keys.

Emacs 24 shows drop-down menu

I use emacs in terminal mode. I know how to get the menu through F10 key. Emacs used to show the menu in terminal mode as text in a separate buffer. Either since a recent update, or I installed some package, I notice emacs starts to create a graphic drop-down list for menu items (see the screenshot). However, I only see it on one of my computer (Mac OS), my other computers still show the menu in "text mode". Can anyone tell me how to enable the graphic dropdown list menu feature? Is this a new feature of latest Emacs 24.3 or it can be enabled via some package?
This is described in the NEWS file for Emacs 24.4:
* Emacs now supports menus on text-mode terminals.
If the terminal supports a mouse, clicking on the menu bar, or on
sensitive portions of the mode line or header line, will drop down the
menu defined at that position. Likewise, clicking C-mouse-2 or
C-mouse-2 or C-mouse-3 on the text area will pop up the menus defined
for those locations.
If the text terminal does not support a mouse, you can activate the
first menu-bar menu by typing F10, which invokes `menu-bar-open'.
If you want the previous behavior, whereby F10 invoked `tmm-menubar',
customize the option `tty-menu-open-use-tmm' to a non-nil value.
(Typing M-` always invokes `tmm-menubar', even if `tty-menu-open-use-tmm'
is nil.)
Looks like a nice feature.

How can I select emacs autocomplete options with keyboard (not arrow keys)

I am wanting to choose from emacs autocomplete options without using the arrow keys. In vim this would be accomplished with Ctrl-n and Ctrl-p but doing the same in emacs moves me to the next line. Is there a keyboard shortcut I can use to do this? I know I could probably make a keybinding for this myself but I wanted to know if there was something idiomatic already there.
In auto-complete you can select next candidates using M-n and previous candidates using M-p. Here is a link to the manual