Six icon indicating copy to clipboard operation
Six copied to clipboard

Map ctrl+j to enter/<cr>/insert newline in insert mode

Open Mattiaslndstrm opened this issue 8 years ago • 3 comments
trafficstars

I've been trying to just copy the information from the enter keybinding from the default keybindings. I've also tried to just remap it as I have done with jj and esc. Nothing works.

Any idea how to solve this?

Thank you for an amazing plugin!

Mattiaslndstrm avatar Sep 07 '17 00:09 Mattiaslndstrm

Ctrl+j is probably missing in the .sublime-keymap file for Six. Otherwise, what you've tried should work.

I'll check if I can add this combination in the next build.

guillermooo avatar Sep 13 '17 05:09 guillermooo

Thank you! I solved it with a system wide keymap with Karabiner though.

Mattiaslndstrm avatar Sep 14 '17 22:09 Mattiaslndstrm

@Mattiaslndstrm For now, you could try the following

  { "keys": ["ctrl+k"], "command": "run_macro_file", "args": { "file": "res://Packages/Default/Add Line Before.sublime-macro"}, "context": [{ "key": "six_is_in_insert_mode" }] },
  { "keys": ["ctrl+j"], "command": "run_macro_file", "args": { "file": "res://Packages/Default/Add Line.sublime-macro"}, "context": [{ "key": "six_is_in_insert_mode" }] },

The advantage of this small tweak is you don't have to use system-wide keybinding as you do with Karabiner.

bangedorrunt avatar Oct 08 '17 11:10 bangedorrunt