Binding function keys in keymap


#1

Is thee a way to bind function keys (e.g. F5, F3, F1) to commands in Atom? Would love to be able to replicate the default ‘Sort lines’ mapping to F5 that I used in Sublime Text 3.


#2

First, make sure you have the Sort Lines package installed, then you can add this to your keymap.cson file:

'.workspace':
  'f5': 'sort-lines:sort'

#3

Thanks. That worked brilliantly.