Skip to content

Latest commit

 

History

History
224 lines (176 loc) · 3.31 KB

KEYMAP.md

File metadata and controls

224 lines (176 loc) · 3.31 KB

EnhancedReadline Keymap

Cursor Movement

  • Forward by words ctrl+f
{
  "keys": ["alt+f"],
  "command": "move",
  "args": { "by": "wordends", "forward": true }
}
  • Backward by words ctrl+b
{
  "keys": ["alt+b"],
  "command": "move",
  "args": { "by": "words", "forward": false }
}
  • Beginning of line (soft) ctrl+a
{
  "keys": ["ctrl+a"],
  "command": "move_to",
  "args": { "to": "bol" }
}
  • Beginning of file alt+p
{
  "keys": ["alt+p"],
  "command": "move_to",
  "args": { "to": "bof" }
}
  • End of file alt+n
{
  "keys": ["alt+n"],
  "command": "move_to",
  "args": { "to": "eof" }
}
  • Forward by words shift+alt+f
{
  "keys": ["shift+alt+f"],
  "command": "move",
  "args": { "by": "wordends", "forward": true, "extend": true }
}

Selection

  • Select backward by words shift+alt+b
{
  "keys": ["shift+alt+b"],
  "command": "move",
  "args": { "by": "words", "forward": false, "extend": true }
}
  • Select to previous line shift+ctrl+p
{
  "keys": ["shift+ctrl+p"],
  "command": "move",
  "args": { "by": "lines", "forward": false, "extend": true }
}
  • Select to end of File shift+alt+n
{
  "keys": ["shift+alt+n"],
  "command": "move_to",
  "args": { "to": "eof", "extend": true }
}
  • Select to begining of File shift+alt+p
{
  "keys": ["shift+alt+p"],
  "command": "move_to",
  "args": { "to": "bof", "extend": true }
}

Line editing

  • Delete word Forward alt+d
{
  "keys": ["alt+d"],
  "command": "delete_word",
  "args": { "forward": true, "sub_words": true }
}
  • Toggle comment ctrl+/
{
  "keys": ["ctrl+forward_slash"],
  "command": "toggle_comment",
  "args": { "block": false }
}
  • Join lines ctrl+j
{
  "keys": ["ctrl+j"],
  "command": "join_lines"
}

Multiple Cursors

  • New Cursor Up ctrl+alt+p
{
  "keys": ["ctrl+alt+n"],
  "command": "select_lines",
  "args": { "by": "characters", "forward": true }
}
  • New Cursor Down ctrl+alt+n
{
  "keys": ["ctrl+alt+p"],
  "command": "select_lines",
  "args": { "by": "characters", "forward": false }
}

Line movement

  • Swap line Up ctrl+cmd+p
{
  "keys": ["ctrl+super+p"],
  "command": "swap_line_up"
}
  • Swap line Down ctrl+cmd+n
{
  "keys": ["ctrl+super+n"],
  "command": "swap_line_down"
}

Extra Readline Enhacements

  • Indent with ctrl instead of super ctrl+]
{
  "keys": ["ctrl+]"],
  "command": "indent"
}
  • Unindent with ctrl instead of super ctrl+[
{
  "keys": ["ctrl+["],
  "command": "unindent"
}
  • Toggle comments with ctrl instead of super ctrl+/
{
  "keys": ["ctrl+forward_slash"],
  "command": "toggle_comment",
  "args": { "block": false }
}
  • Toggle fold comments with ctrl instead of super shift+ctrl+c
{
  "keys": ["ctrl+shift+forward_slash"],
  "command": "toggle_fold_comments"
}