Ace has a command we can use directly instead of shimming Sublime's "expand to word"

This commit is contained in:
Thomas Wilburn 2013-10-08 09:37:19 -07:00
parent b330709260
commit 03524a9ef0
4 changed files with 3 additions and 8 deletions

View file

@ -17,7 +17,7 @@
"^-p": { "command": "palette:open" },
"^-P": { "command": "palette:open", "argument": "command" },
//"^-r": { "command": "palette:open", "argument": "reference" },
"^-g": { "command": "palette:open", "argument": "goto" },
"^-g": { "command": "palette:open", "argument": "line" },
"^-m": { "ace": "jumptomatching" },
"^-M": { "command": "sublime:expand-to-matching" },
"^-q": { "command": "ace:togglemacro" },

View file

@ -17,7 +17,7 @@
{ "label": "Undo", "command": "ace:command", "argument": "undo" },
{ "label": "Redo", "command": "ace:command", "argument": "redo" },
"divider",
{ "label": "Select Word", "command": "sublime:expand-to-word" },
{ "label": "Select Word", "command": "ace:command", "argument": "selectMoreAfter" },
{ "label": "Select Line", "command": "sublime:expand-to-line" },
{ "label": "Select Paragraph", "command": "sublime:expand-to-paragraph" },
{ "label": "Select to Matching", "command": "sublime:expand-to-matching" },

View file

@ -2,11 +2,6 @@ define(["command", "editor", "statusbar"], function(command, editor, status) {
//this is a place to put bindings that don't have direct equivalents in Ace, but are required for Sublime compatibility
command.on("sublime:expand-to-word", function() {
editor.execCommand("gotowordleft");
editor.execCommand("selectwordright");
});
command.on("sublime:expand-to-line", function() {
editor.execCommand("gotolinestart");
editor.execCommand("selecttolineend");

View file

@ -1,7 +1,7 @@
{
"name": "Caret",
"description": "Professional text editing for Chrome and Chrome OS",
"version": "1.0.12",
"version": "1.1.0",
"manifest_version": 2,
"icons": {
"128": "icon-128-2.png"