Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sublime Text Key Binding #1287

Closed
varemenos opened this issue Mar 9, 2013 · 3 comments · Fixed by #3890
Closed

Sublime Text Key Binding #1287

varemenos opened this issue Mar 9, 2013 · 3 comments · Fixed by #3890

Comments

@varemenos
Copy link

Sublime text is one of the most popular text editors/IDEs out there and supporting it's key binding would make it easier for some of us (who are keen to Sublime Text) to use Ace.

@nightwing
Copy link
Member

This shouldn't be very hard since ace and sublime keybindings have similar syntax.
Which specific shortcuts do you miss?

@varemenos
Copy link
Author

It's not that I miss some particular shortcut but the binding keys that confuse me, for example:

moving the selected lines up

  • In Sublime Text 2, you use Ctrl + Shift + Up Arrow
  • In Ace, you use Alt + Up Arrow

Well, there is 1 thing I miss from ST2, and that's the selection/block commenting, like this:

  • selecting inline commenting
    • select text you want to comment
    • hit Ctrl + /
    • and it will toggle inline comment (on/off depending if its already commented or not) for that specified selection of text.
  • selecting inline commenting
    • select the line you want to comment
    • hit Ctrl + /
    • and it will toggle block comment for those specified selected lines.

@varemenos varemenos changed the title Key Binding, Sublime Text style Sublime Text Key Binding Nov 23, 2014
@varemenos
Copy link
Author

Here is what CodeMirror does:

{
  "Alt-Left": "goSubwordLeft",
  "Alt-Right": "goSubwordRight",
  "Ctrl-Up": "scrollLineUp",
  "Ctrl-Down": "scrollLineDown",
  "Shift-Ctrl-L": "splitSelectionByLine",
  "Shift-Tab": "indentLess",
  "Esc": "singleSelectionTop",
  "Ctrl-L": "selectLine",
  "Shift-Ctrl-K": "deleteLine",
  "Ctrl-Enter": "insertLineAfter",
  "Shift-Ctrl-Enter": "insertLineBefore",
  "Ctrl-D": "selectNextOccurrence",
  "Shift-Ctrl-Space": "selectScope",
  "Shift-Ctrl-M": "selectBetweenBrackets",
  "Ctrl-M": "goToBracket",
  "Shift-Ctrl-Up": "swapLineUp",
  "Shift-Ctrl-Down": "swapLineDown",
  "Ctrl-/": "toggleComment",
  "Ctrl-J": "joinLines",
  "Shift-Ctrl-D": "duplicateLine",
  "Ctrl-T": "transposeChars",
  "F9": "sortLines",
  "Ctrl-F9": "sortLinesInsensitive",
  "F2": "nextBookmark",
  "Shift-F2": "prevBookmark",
  "Ctrl-F2": "toggleBookmark",
  "Shift-Ctrl-F2": "clearBookmarks",
  "Alt-F2": "selectBookmarks",
  "Alt-Q": "wrapLines",
  "Ctrl-K Ctrl-Backspace": "delLineLeft",
  "Ctrl-K Ctrl-K": "delLineRight",
  "Ctrl-K Ctrl-U": "upcaseAtCursor",
  "Ctrl-K Ctrl-L": "downcaseAtCursor",
  "Ctrl-K Ctrl-Space": "setSublimeMark",
  "Ctrl-K Ctrl-A": "selectToSublimeMark",
  "Ctrl-K Ctrl-W": "deleteToSublimeMark",
  "Ctrl-K Ctrl-X": "swapWithSublimeMark",
  "Ctrl-K Ctrl-Y": "sublimeYank",
  "Ctrl-K Ctrl-G": "clearBookmarks",
  "Ctrl-K Ctrl-C": "showInCenter",
  "Shift-Alt-Up": "selectLinesUpward",
  "Shift-Alt-Down": "selectLinesDownward",
  "Ctrl-F3": "findUnder",
  "Shift-Ctrl-F3": "findUnderPrevious",
  "Shift-Ctrl-[": "fold",
  "Shift-Ctrl-]": "unfold",
  "Ctrl-K Ctrl-j": "unfoldAll",
  "Ctrl-K Ctrl-0": "unfoldAll",
  "Ctrl-H": "replace",
}

source, real source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants