diff --git a/src/text-editor.coffee b/src/text-editor.coffee index 613597a6a..94e4c559d 100644 --- a/src/text-editor.coffee +++ b/src/text-editor.coffee @@ -3338,42 +3338,99 @@ class TextEditor extends Model Section: Config ### + # Experimental: Supply an object that will provide the editor with settings + # for specific syntactic scopes. See the `ScopedSettingsDelegate` in + # `text-editor-registry.js` for an example implementation. setScopedSettingsDelegate: (@scopedSettingsDelegate) -> + # Experimental: Retrieve the {Object} that provides the editor with settings + # for specific syntactic scopes. getScopedSettingsDelegate: -> @scopedSettingsDelegate + # Experimental: Enable or disable automatic language-based indentation when + # inserting a line-break in the editor. + # + # * `autoIdent` a {Boolean} indicating whether to enable or disable automatic + # indentation. setAutoIndent: (@autoIndent) -> - setAutoIndentOnPaste: (@autoIndentOnPaste) -> - + # Experimental: Is auto-indentation enabled for this editor? + # + # Returns a {Boolean}. shouldAutoIndent: -> @autoIndent + # Experimental: Enable or disable automatic language-based indentation when + # pasting text into the editor. + # + # * `autoIdent` a {Boolean} indicating whether to enable or disable automatic + # indentation. + setAutoIndentOnPaste: (@autoIndentOnPaste) -> + + # Experimental: Is auto-indentation on paste enabled for this editor? + # + # Returns a {Boolean}. shouldAutoIndentOnPaste: -> @autoIndentOnPaste + # Experimental: Enable or disable scrolling past the last line of the editor. + # + # * `scrollPastEnd` a {Boolean} indicating whether to enable or disable + # scrolling past the end. setScrollPastEnd: (scrollPastEnd) -> if scrollPastEnd isnt @scrollPastEnd @scrollPastEnd = scrollPastEnd @presenter?.didChangeScrollPastEnd() + # Experimental: Does this editor allow scrolling past the last line? + # + # Returns a {Boolean}. getScrollPastEnd: -> @scrollPastEnd + # Experimental: Set the speed that the editor scrolls on mouse wheel movement. + # + # * `scrollSensitivity` a positive {Number}. setScrollSensitivity: (@scrollSensitivity) -> + # Experimental: How fast does the editor scroll in response to mouse wheel + # movements? + # + # Returns a positive {Number}. getScrollSensitivity: -> @scrollSensitivity + # Experimental: Show or hide the line numbers in the editor's gutter. + # + # * `showLineNumbers` a {Boolean} indicating whether to show the line numbers. setShowLineNumbers: (showLineNumbers) -> if showLineNumbers isnt @showLineNumbers @showLineNumbers = showLineNumbers @presenter?.didChangeShowLineNumbers() + # Experimental: Are line numbers enabled for this editor? + # + # Returns a {Boolean} doesShowLineNumbers: -> @showLineNumbers + # Experimental: Set the time interval within which text editing operations + # are grouped together in the editor's undo history. + # + # * `undoGroupingInterval` the {Number} time interval in milliseconds setUndoGroupingInterval: (@undoGroupingInterval) -> + # Experimental: Get the time interval within which text editing operations + # are grouped together in the editor's undo history. + # + # Returns the time interval {Number} in milliseconds. getUndoGroupingInterval: -> @undoGroupingInterval + # Experimental: Set the characters that are *not* considered part of words, + # for the purposes of word-based cursor movements. + # + # * `nonWordCharacters` A {String} containing the non-word characters. setNonWordCharacters: (@nonWordCharacters) -> + # Experimental: Get the characters that are *not* considered part of words, + # for the purpose of word-based cursor movements. + # + # Returns a {String} containing the non-word characters. getNonWordCharacters: (scopes) -> (scopes and @scopedSettingsDelegate?.getNonWordCharacters?(scopes)) ? @nonWordCharacters