I created a snippet in Geany. Can I bind a key for this snippet?
For example, binding Ctrl + B to the snippet bf=\\textbf{%cursor%}.
I knew key binding from menu Edit → Preferences → Keybindings. But it just allows binding a key to the listed functions.
Using the [Keybindings] part in file snippets.conf.
Attention: these keybindings can be overridden by Geany's configurable keybindings, i.e. keybindings from menu Edit → Preferences → Keybindings.
In the case you want using this way to create a keyboard shortcut for a snippet, but it is already in the Geany's configurable keybindings, you need to change this keyboard shortcut in the Geany's configurable keybindings.
Related
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
I want to use visual studio's default Alt+Down Arrow key binding instead of Resharper's Alt+Down Arrow binding. I am using Resharper key scheme.
I have tried assigning the key binding from Environment > Keyboard and assigned Alt+Down Arrow to Edit.MoveSelectedLinesDown but it is not working.
First remove the key binding related to resharper, then in the same window, add that key binding of visual studio.
edit: remove the assigned key for ReSharper.ReSharper_GotoNextMethod in keyboard tab of options from all Items in the list of shortcuts (text editor, global, ...).
Then assign alt+down to Edit.MoveSelectedLineDown. i just tested this and it is working.
In TOOLS --> Options | Environment| Keyboard
Select the scope if the shortcut (can be global) in the use new shortcut in: combo box
go in the Press shortcut keys text box, perform your key presses (Alt+Down Arrow) and select the command you want to assign it to in the list above.
Click the Assign button
Click OK
I want to change the key binding of "Go to File" of textmate from it's default one Cmd + T to option + cmd + n. How to do that?
Head into System Preferences → Keyboard → Shortcuts → App Shortcuts.
Add a new Application (Textmate) and the Menu Title should be 'Go to File..."
I tried just using 'Go to File' but found out the actual title requires the additional '...'
Go to System Preferences → Keyboard → Shortcuts.
Click App Shortcuts and then the plus button to create a new entry.
Select TextMate as application, set menu title to Go to File… (including the ellipsis) and then pick your desired key equivalent.
There were Ctrl+E+C (comment) and Ctrl+E+U (uncomment) in older versions, or Ctrl+K+C and Ctrl+K+U.
But in VS 2012, I can't see key shortcuts:
How to enable those shortcuts?
Keyboard accelerators are configurable. You can find out which keyboard accelerators are bound to a command in Tools -> Options on the Environment -> Keyboard page.
These commands are named Edit.CommentSelection and Edit.UncommentSelection.
(With my settings, these are bound to Ctrl+K, Ctrl+C and Ctrl+K, Ctrl+U. I would guess that these are the defaults, at least in the C++ defaults, but I don't know for sure. The best way to find out is to check your settings.)
You can also add the toolbar in Visual Studio to have the buttons available.
View > Toolbars > Text Editor
Use the keys CtrlK,C to comment out the line and CtrlK,U to uncomment the line.
From your screenshot it appears you have ReSharper installed.
Depending on the key binding options you chose when you installed it, some of your standard shortcuts may now be redirected to ReSharper commands. It's worth checking, for example Ctrl+E, C is used by R# for the code cleanup dialog.
This is how I did it,
Menu Tools → Options on the Environment → Keyboard window
One can alter the default shortcuts following the below steps
Select Edit.CommentSelection in the listbox
Click on "Remove" button
Select "Text Editor" option in the dropdown under "Use new shortcut in:"
Press your own shortcut in the textbox under "Press shortcut keys:"
Example: Pressing Ctrl+E and then C will give you Ctrl+E, C
Click on "Assign" button
Repeat the same for Edit.UnCommentSelection (Ctrl+E, U)
I went to menu: Tools → Options.
Environment → Keyboard.
Show command containing and searched: comment
I changed Edit.CommentSelection and assigned Ctrl+/ for commenting.
And I left Ctrl+K then U for the Edit.UncommentSelection.
These could be tweaked to the user's preference as to what key they would prefer for commenting/uncommenting.
"commentLine" is the name of function you are looking for. This function coment and uncoment with the same keybinding
Shift + alt + a
the command palette is great for finding shortcut keys.
Is there a keyboard shortcut that allows you to easily change Build Configuration (say, from Debug to Release) in Visual Studio (2008)?
In the Standard Toolbar there is a drop-down where one can easily change between Build Configurations, but I only know how to access it with my mouse.
Is there an easy way this can be done via the keyboard?
Just for the record, it's actually not that hard to use the standard keyboard mappings for the Configuration Manager dialog:
Alt+B, O, (Arrow keys or first letter, e.g. D(ebug) or R(elease)), Enter
The dialog box pops up fairly quickly, so this works for me.
You can set up a key combo through the Tools -> Options -> Environment -> Keyboard dialog. The Build.SolutionConfigurations command will put your focus on the build configuration drop down so you can easily change the configuration with the arrow keys. Additionally the Build.SolutionPlatforms selects the Platform drop down. The only drawback is that focus will be taken away from whatever was previously selected.
It doesn't seem there are, but you can set a key command (Tools -> Options -> Environment -> Keyboard) for Build.ConfigurationManager, which will open a dialogue box that you can use the cursor keys to navigate quickly.
You could also set up a macro (similar to this) and bind that to a hot key.