How to map Visual Studio shortcut keys in Github Atom

2.2k views Asked by At

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'
1

There are 1 answers

2
Ishan On BEST ANSWER

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.