romgrk / termrk

Terminal for atom, using pty.js & term.js
MIT License
33 stars 7 forks source link

Add more keybindings to the keymap. #12

Closed ghost closed 9 years ago

ghost commented 9 years ago

Hello

I found some more keys that can be added to the keymap:

  'ctrl-x': 'native!'

  'shift-backspace': 'native!'

  'ctrl-shift-c': 'core:copy'
  'ctrl-shift-v': 'core:paste'

Ctrl-X is used by application such as nano that use this as a shortcut (here it exits the application, if Git decides to open nano for a merge commit message, I can't exit nano without manually binding this). The other shortcuts mimic behaviour of other terminals such as gnome-terminal.

Thanks in advance

romgrk commented 9 years ago

Yep, for this one I was wondering wether I should include them in default keymap or juste let people add them in their personnal keymap. My goal was to still be able to use some keybindings even with focus on the terminal. But I could surely include some sort of escape keybinding, or add some option to let user choose wich keymaps should be catched. In any case, for the moment you can use

'.termrk':
    'key': 'native!'

Also, I have added a % f binding, which inserts current file path in terminal, let me know what you think of it.

PS: I agree with 'shift-backspace' as native by default. Not so sure about 'ctrl-x' but I'll add it anyway for now.