How to map Visual Studio shortcut keys in Github Atom - visual-studio

How to map the shortcut keys in GitHub Atom just like Visual Studio.
If anyone have keymap file kindly share.
I tried to implement (Ctrl+K ,Ctrl+C) in github atom for comment. It didnt work.
Also Ctrl-K,Ctrl-U to turn off comment
'atom-text-editor':
'ctrl-k+ctrl-c': 'editor:toggle-line-comments'

Open the Settings panel by pressing ctrl-, on windows cmd-, on mac and select the Keybindings tab. It will show you all the keybindings currently in use.
You can also open the keybinding resolver using ctrl-. and press ctrl-k and see what keybinding it displays.
To assign custom keybindings, go to File -> Open Your Keymap. It will open keymap.cson file.
Add the following to the keymap.cson file.
'atom-workspace atom-text-editor:not([mini])':
'ctrl-k ctrl-c': 'editor:toggle-line-comments'
Now you can use 'ctrl-k ctrl-c' to comment/uncomment your code.

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

Keyboard Shortcuts Not Working in Visual Studio 2013's Find in Files dialog?

I usually access Visual Studio's Find in Files feature with Ctrl-Shift-F, type in what I'm after and press enter.
Everything is working, I can type what I want to find, Ctrl-A will select all text, arrow keys will navigate within the Find What text control only the enter key press does nothing. The dialog still has focus, just nothing happens.
The accelerator keys that are marked on the various buttons also do not do what I expect. Alt-P will open the Project menu, Alt-F the File menu, Alt-A nothing. When the Find in Files dialog is focussed I expect the Find Previous, Find Next or Find All actions to be performed.
The tab key also does not change focus from one control to another while in that dialog.
The escape key will kill the focus in that dialog and return focus back to the file that I have open in the text editor as expected.
I have tried using the Reset button under Tools -> Options -> Environment -> Keyboard to no avail.
I am using Visual Studio Ultimate 2013 Update 4 on Windows 7 x64.
If you're using Resharper, after applying R# keyboard scheme, it will add it's keyboard shortcuts. For example, it adds Alf+F shortcut in Text Editor scope.
Setting your keyboard shortcut in Global scope is not enough if same keyboard shortcut is set by R# for Text Editor.
To override R# shortcut in Global scope, make sure you delete R# shortcut setting in VS keyboard settings modal dialog.
Rarely, strange keyboard shortcut behavior could be also caused by non-US keyboard setting. If you are using non-English keyboard set in Windows Control Panel settings, try this solution:
Set keyboard layout to US
Reset keyboard shortcuts in VS under Tools -> Options -> Environment -> Keyboard
Assign your shortcuts (e.g. Alt-F)
Set keyboard to your local layout

key bindings visual studio 2013 to switch tabs

I was wondering if there are any hotkeys by default key bindings I can add to Visual Studio 2013 to switch tabs. I know you can ctrl+tab and shift+ctrl+tab to go forward and backwards in VS13's list of open tabs, but I prefer i Xcode or sublime text where you can just cmd+shift+] or cmd+shift+[ to go to the right tab or left tab respectively. Does anyone know if there is a way for this? I can't seem to find one. Thanks.
I guess you can do it. I don't know why I couldn't find this before:
http://www.jetbrains.com/resharper/webhelp/Configuring_Keyboard_Shortcuts.html
Keyboard shortcuts in VS can be configured in Tools -> Options -> Environment -> Keyboard. You can find commands either by searching for their name ("Show commands containing:") or by pressing a known shortcut and seeing which commands it's mapped to ("Press shortcut keys:").
It looks like you need to set Window.NextDocumentNav and Window.PreviousDocumentNav.

Is it possible to implement a "Vim" toggle in Visual Studio?

Ie, specify [ctrl][alt]+v or something...and that would instance vim inside that text editor window... because that would be really cool.
And/Or: is there a way to do it yourself, if you wanted to? Ie, can you attach custom functions to the keyboard keys and whatnot? I noticed that a lot of the Add-Ins seem to be able to kindof accomplish that level of customizability...
There are a few projects that incorporate vim keybindings directly into the Visual Studio editor.
Here's one: VsVim
I'm using VsVim
You download the plugin from the link above, double click on it and it will be installed in all VisualStudios you have installed in your computer.
About toggling VIM in VisualStudio:
I don't think you can enable/disable it per tab or file openned: either is enabled or disabled in all files.
What you could do is this: add a new shortcut to enable or disable it when you need it.
Tools -> Options... -> Environment -> Keyboard
On the "Show commands containing" input type "VsVim.ToggleEnabled". For me this command wasn't bind it with anything. I added the shortcut
Ctrl Q, Ctrl V

visual studio shell F# keyboard shortcuts

I've started using F# with the visual studio shell and I like the capability to be able to send lines to fsi by highlighting them, but the alt+Enter shortcut is really awkward and I would be much happier with this being on shift+Enter. (mainly since shift+ up/down arrow is select lines already)
Does anyone know how to change this? Thanks.
You can alter the keyboard mappings within Visual Studio. If you go to Tools -> Options -> Environment -> Keyboard, you'll see a window like the image below.
In order to check existing bindings, place the cursor in the "Press shortcut keys:" box and hit "Shft+Enter". You'll then see any potential conflicts in the drop-down box as shown.
In the example below, I'm searching through Global, which means shortcuts for anything in the application. You can switch it to be just the console or whatever you like.
Once you're happy with the shortcut you want to use, you need to select the command from the window containing all of the Action.* lines and then press Assign.
So I don't mean to be trite, but have you tried mapping the key?
So for F# Interactive I see Alt+Enter mapped to:
ClassViewContextMenus.ClassViewMultiselectProjectreferencesItems.Properties
Have your tried mapping Shift+Enter (or whatever) to that command?
Tools->Options->Environment->Keyboard
You should be able to get it all working from there.

Resources