Add tenth place, fix doc comments

This commit is contained in:
Garen Torikian 2012-10-23 11:00:13 -07:00 • committed by nightwing
commit 43c74f415f
2 changed files with 15 additions and 5 deletions

View file

@ -341,6 +341,16 @@ exports.commands = [{
bindKey: bindKey("Ctrl-Shift-Down", "Alt-Shift-Down"), bindKey: bindKey("Ctrl-Shift-Down", "Alt-Shift-Down"),
exec: function(editor) { editor.modifyNumber(-1); }, exec: function(editor) { editor.modifyNumber(-1); },
multiSelectAction: "forEach" multiSelectAction: "forEach"
}, {
name: "modifyNumber+10",
bindKey: bindKey("Ctrl-Alt-Shift-Up", "Alt-Command-Shift-Up"),
exec: function(editor) { editor.modifyNumber(10); },
multiSelectAction: "forEach"
}, {
name: "modifyNumber-10",
bindKey: bindKey("Ctrl-Alt-Shift-Down", "Alt-Command-Shift-Down"),
exec: function(editor) { editor.modifyNumber(-10); },
multiSelectAction: "forEach"
}, { }, {
name: "replace", name: "replace",
bindKey: bindKey("Ctrl-R", "Command-Option-F"), bindKey: bindKey("Ctrl-R", "Command-Option-F"),

View file

@ -1304,7 +1304,7 @@ var Editor = function(renderer, session) {
/** /**
* Editor.toggleCommentLines() * Editor.toggleCommentLines()
* *
* Given the currently selected range, this function either comments all lines or uncomments all lines (depending on whether it's commented or not). * Given the currently selected range, this function either comments all the lines, or uncomments all of them.
**/ **/
this.toggleCommentLines = function() { this.toggleCommentLines = function() {
var state = this.session.getState(this.getCursorPosition().row); var state = this.session.getState(this.getCursorPosition().row);
@ -1313,9 +1313,9 @@ var Editor = function(renderer, session) {
}; };
/** /**
* Editor.getNumberAt() * Editor.getNumberAt() -> Number
* *
* Works like getTokenAt just that it returns a number * Works like [[Editor.getTokenAt]], excepts it returns a number.
**/ **/
this.getNumberAt = function( row, column ) { this.getNumberAt = function( row, column ) {
var _numberRx = /[\-]?[0-9]+(?:\.[0-9]+)?/g var _numberRx = /[\-]?[0-9]+(?:\.[0-9]+)?/g
@ -1339,8 +1339,8 @@ var Editor = function(renderer, session) {
/** /**
* Editor.modifyNumber() * Editor.modifyNumber()
* *
* If the character before the cursor is a number, you can increase/descrease it's value with 1 by pressing Alt+Shift+Up/Down. * If the character before the cursor is a number, you can increase/or decrease its value by one (by pressing Ctrl+Shift+Up/Down), or
* This will update the whole number the digit is part of. * 10 (by pressing Ctrl+Alt+Shift+Up/Down).
**/ **/
this.modifyNumber = function(amount) { this.modifyNumber = function(amount) {
var row = this.selection.getCursor().row; var row = this.selection.getCursor().row;