Add tenth place, fix doc comments
This commit is contained in:
parent
048c88cf5e
commit
43c74f415f
2 changed files with 15 additions and 5 deletions
|
|
@ -341,6 +341,16 @@ exports.commands = [{
|
|||
bindKey: bindKey("Ctrl-Shift-Down", "Alt-Shift-Down"),
|
||||
exec: function(editor) { editor.modifyNumber(-1); },
|
||||
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",
|
||||
bindKey: bindKey("Ctrl-R", "Command-Option-F"),
|
||||
|
|
|
|||
|
|
@ -1304,7 +1304,7 @@ var Editor = function(renderer, session) {
|
|||
/**
|
||||
* 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() {
|
||||
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 ) {
|
||||
var _numberRx = /[\-]?[0-9]+(?:\.[0-9]+)?/g
|
||||
|
|
@ -1339,8 +1339,8 @@ var Editor = function(renderer, session) {
|
|||
/**
|
||||
* 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.
|
||||
* This will update the whole number the digit is part of.
|
||||
* 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
|
||||
* 10 (by pressing Ctrl+Alt+Shift+Up/Down).
|
||||
**/
|
||||
this.modifyNumber = function(amount) {
|
||||
var row = this.selection.getCursor().row;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue