Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to map Visual Studio shortcut keys in Github Atom

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'
like image 350
Shan Khan Avatar asked May 30 '26 00:05

Shan Khan


1 Answers

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.

like image 81
Ishan Avatar answered May 31 '26 17:05

Ishan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!