Interface IEditor

Index

Properties

Methods

Properties

public behaviors: any

public buffer: ITextBuffer

public callDisplayBufferCreatedHook: boolean

public cursors: ICursor[]

public declaredPropertyValues: any

public deserializing: boolean

public displayBuffer: IDisplayBuffer

public eventHandlersByEventName: any

public eventHandlersByNamespace: any

public id: number

public languageMode: ILanguageMode

public lastOpened: number

public registerEditor: boolean

public selections: ISelection[]

public softTabs: boolean

public subscriptionCounts: any

public subscriptions: ISubscription[]

public subscriptionsByObject: any

public suppressSelectionMerging: boolean

Methods

public abortTransaction(): Array<any>

Returns

Array<any>

public addCursor(marker: any): ICursor

Parameters

  • marker: any

Returns

ICursor

public addCursorAtBufferPosition(bufferPosition: any): ICursor

Parameters

  • bufferPosition: any

Returns

ICursor

public addCursorAtScreenPosition(screenPosition: any): ICursor

Parameters

  • screenPosition: any

Returns

ICursor

public addSelection(marker: any, options: any): ISelection

Parameters

  • marker: any
  • options: any

Returns

ISelection

public addSelectionAbove(): ISelection[]

Returns

ISelection[]

public addSelectionBelow(): ISelection[]

Returns

ISelection[]

public addSelectionForBufferRange(bufferRange: any, options: any): ISelection

Parameters

  • bufferRange: any
  • options: any

Returns

ISelection

public autoIndentSelectedRows(): Array<TextBuffer.IRange[]>

Returns

Array<TextBuffer.IRange[]>

public backspace(): Array<any>

Returns

Array<any>

public backspaceToBeginningOfLine(): Array<any>

Returns

Array<any>

public backspaceToBeginningOfWord(): Array<any>

Returns

Array<any>

public backwardsScanInBufferRange(): any

Returns

any

public beginTransaction(): ITransaction

Returns

ITransaction

public bufferPositionForScreenPosition(screenPosition: any, options?: any): IPoint

Parameters

  • screenPosition: any
  • options?: any optional

Returns

IPoint

public bufferRangeForBufferRow(row: any, options: any): IRange

Parameters

  • row: any
  • options: any

Returns

IRange

public bufferRangeForScopeAtCursor(selector: string): any

Parameters

  • selector: string

Returns

any

public bufferRangeForScreenRange(screenRange: any): IRange

Parameters

  • screenRange: any

Returns

IRange

public bufferRowForScreenRow(row: any): number

Parameters

  • row: any

Returns

number

public bufferRowsForScreenRows(startRow: any, endRow: any): Array<any>

Parameters

  • startRow: any
  • endRow: any

Returns

Array<any>

public buildIndentString(number: any): string

Parameters

  • number: any

Returns

string

public clearSelections(): boolean

Returns

boolean

public clipBufferPosition(bufferPosition: any)

Parameters

  • bufferPosition: any

public clipBufferRange(range: any)

Parameters

  • range: any

public clipScreenPosition(screenPosition: any, options: any): IRange

Parameters

  • screenPosition: any
  • options: any

Returns

IRange

public commitTransaction(): any

Returns

any

public consolidateSelections(): boolean

Returns

boolean

public copy(): IEditor

Returns

IEditor

public copySelectedText(): Array<boolean>

Returns

Array<boolean>

public createFold(startRow: any, endRow: any): IFold

Parameters

  • startRow: any
  • endRow: any

Returns

IFold

public cutSelectedText(): Array<boolean>

Returns

Array<boolean>

public cutToEndOfLine(): Array<boolean>

Returns

Array<boolean>

public delete(): Array<any>

Returns

Array<any>

public deleteLine(): IRange[]

Returns

IRange[]

public deleteToEndOfWord(): Array<any>

Returns

Array<any>

public deserializeParams(params: any): any

Parameters

  • params: any

Returns

any

public destroyFoldWithId(id: any): any

Parameters

  • id: any

Returns

any

public destroyFoldsIntersectingBufferRange(bufferRange: any): any

Parameters

  • bufferRange: any

Returns

any

public destroyMarker(args?: Array<any>): boolean

Parameters

  • args?: Array<any> optional

Returns

boolean

public destroyed()

public duplicateLine(): Array<any[]>

Returns

Array<any[]>

public duplicateLines(): Array<any[]>

Returns

Array<any[]>

public expandSelectionsBackward(fn: (selection: AtomCore.ISelection) => any): ISelection[]

Parameters

  • fn: (selection: AtomCore.ISelection) => any

Returns

ISelection[]

public expandSelectionsForward(): any

Returns

any

public finalizeSelections(): Array<boolean>

Returns

Array<boolean>

public findMarkers(args?: Array<any>): IDisplayBufferMarker[]

Parameters

  • args?: Array<any> optional

Returns

IDisplayBufferMarker[]

public foldAll(): Array<any>

Returns

Array<any>

public foldAllAtIndentLevel(level: any): any

Parameters

  • level: any

Returns

any

public foldBufferRow(bufferRow: any): any

Parameters

  • bufferRow: any

Returns

any

public foldCurrentRow(): any

Returns

any

public foldSelectedLines(): Array<any>

Returns

Array<any>

public getBuffer(): ITextBuffer

Returns

ITextBuffer

public getCurrentParagraphBufferRange(): IRange

Returns

IRange

public getCursor(): ICursor

Returns

ICursor

public getCursorBufferPosition(): IPoint

Returns

IPoint

public getCursorScopes(): Array<string>

Returns

Array<string>

public getCursorScreenPosition(): IPoint

Returns

IPoint

public getCursorScreenRow(): number

Returns

number

public getCursors(): ICursor[]

Returns

ICursor[]

public getEofBufferPosition(): IPoint

Returns

IPoint

public getGrammar(): IGrammar

Returns

IGrammar

public getLastBufferRow(): number

Returns

number

public getLastScreenRow(): number

Returns

number

public getLastSelection(): ISelection

Returns

ISelection

public getLastSelectionInBuffer(): ISelection

Returns

ISelection

public getLineCount(): number

Returns

number

public getLongTitle(): string

Returns

string

public getMarker(id: number): IDisplayBufferMarker

Parameters

  • id: number

Returns

IDisplayBufferMarker

public getMarkerCount(): number

Returns

number

public getMarkers(): IDisplayBufferMarker[]

Returns

IDisplayBufferMarker[]

public getMaxScreenLineLength(): number

Returns

number

public getPath(): string

Returns

string

public getScreenLineCount(): number

Returns

number

public getScrollLeft(): number

Returns

number

public getScrollTop(): number

Returns

number

public getSelectedBufferRange(): IRange

Returns

IRange

public getSelectedBufferRanges(): IRange[]

Returns

IRange[]

public getSelectedScreenRange(): IRange

Returns

IRange

public getSelectedText(): string

Returns

string

public getSelection(index?: number): ISelection

Parameters

  • index?: number optional

Returns

ISelection

public getSelectionMarkerAttributes(): { type: string; editorId: number; invalidate: string; }

Returns

{ type: string; editorId: number; invalidate: string; }

public getSelections(): ISelection[]

Returns

ISelection[]

public getSelectionsOrderedByBufferPosition(): ISelection[]

Returns

ISelection[]

public getSoftTabs(): boolean

Returns

boolean

public getSoftWrap(): boolean

Returns

boolean

public getSoftWrapColumn(): number

Returns

number

public getTabLength(): number

Returns

number

public getTabText(): string

Returns

string

public getText(): string

Returns

string

public getTextInBufferRange(range: IRange): string

Parameters

Returns

string

public getTextInRange(range: any): any

Parameters

  • range: any

Returns

any

public getTitle(): string

Returns

string

public getUri(): string

Returns

string

public getViewClass(): any

Returns

any

public getWordUnderCursor(options?: any): string

Parameters

  • options?: any optional

Returns

string

public handleGrammarChange()

public handleMarkerCreated(marker: any): any

Parameters

  • marker: any

Returns

any

public hasMultipleCursors(): boolean

Returns

boolean

public indent(options?: any): any

Parameters

  • options?: any optional

Returns

any

public indentLevelForLine(line: any): number

Parameters

  • line: any

Returns

number

public indentSelectedRows(): Array<TextBuffer.IRange[]>

Returns

Array<TextBuffer.IRange[]>

public indentationForBufferRow(bufferRow: any)

Parameters

  • bufferRow: any

public insertNewline(): IRange[]

Returns

IRange[]

public insertNewlineAbove(): any

Returns

any

public insertNewlineBelow(): IRange[]

Returns

IRange[]

public insertText(text: string, options?: any): IRange[]

Parameters

  • text: string
  • options?: any optional

Returns

IRange[]

public inspect(): string

Returns

string

public isBufferRowBlank(bufferRow: any): boolean

Parameters

  • bufferRow: any

Returns

boolean

public isBufferRowCommented(bufferRow: any)

Parameters

  • bufferRow: any

public isFoldableAtBufferRow(bufferRow: any): boolean

Parameters

  • bufferRow: any

Returns

boolean

public isFoldedAtBufferRow(bufferRow: any): boolean

Parameters

  • bufferRow: any

Returns

boolean

public isFoldedAtCursorRow(): boolean

Returns

boolean

public isFoldedAtScreenRow(screenRow: any): boolean

Parameters

  • screenRow: any

Returns

boolean

public isModified(): boolean

Returns

boolean

public joinLines(): Array<any>

Returns

Array<any>

public largestFoldContainingBufferRow(bufferRow: any): boolean

Parameters

  • bufferRow: any

Returns

boolean

public largestFoldStartingAtScreenRow(screenRow: any): any

Parameters

  • screenRow: any

Returns

any

public lineForBufferRow(row: number): string

Parameters

  • row: number

Returns

string

public lineForScreenRow(row: any): ITokenizedLine

Parameters

  • row: any

Returns

ITokenizedLine

public lineLengthForBufferRow(row: number): number

Parameters

  • row: number

Returns

number

public linesForScreenRows(start?: any, end?: any): ITokenizedLine[]

Parameters

  • start?: any optional
  • end?: any optional

Returns

ITokenizedLine[]

public logScreenLines(start: number, end: number): Array<any>

Parameters

  • start: number
  • end: number

Returns

Array<any>

public lowerCase(): Array<boolean>

Returns

Array<boolean>

public markBufferPosition(args?: Array<any>): IDisplayBufferMarker

Parameters

  • args?: Array<any> optional

Returns

IDisplayBufferMarker

public markBufferRange(args?: Array<any>): IDisplayBufferMarker

Parameters

  • args?: Array<any> optional

Returns

IDisplayBufferMarker

public markScreenPosition(args?: Array<any>): IDisplayBufferMarker

Parameters

  • args?: Array<any> optional

Returns

IDisplayBufferMarker

public markScreenRange(args?: Array<any>): IDisplayBufferMarker

Parameters

  • args?: Array<any> optional

Returns

IDisplayBufferMarker

public mergeCursors(): Array<number>

Returns

Array<number>

public mergeIntersectingSelections(): any

Returns

any

public moveCursorDown(lineCount?: number)

Parameters

  • lineCount?: number optional

public moveCursorLeft()

public moveCursorRight()

public moveCursorToBeginningOfLine()

public moveCursorToBeginningOfNextWord()

public moveCursorToBeginningOfScreenLine()

public moveCursorToBeginningOfWord()

public moveCursorToBottom()

public moveCursorToEndOfLine()

public moveCursorToEndOfScreenLine()

public moveCursorToEndOfWord()

public moveCursorToFirstCharacterOfLine()

public moveCursorToNextWordBoundary()

public moveCursorToPreviousWordBoundary()

public moveCursorToTop()

public moveCursorUp(lineCount?: number)

Parameters

  • lineCount?: number optional

public moveCursors(fn: (cursor: AtomCore.ICursor) => any): any

Parameters

  • fn: (cursor: AtomCore.ICursor) => any

Returns

any

public moveLineDown(): ISelection[]

Returns

ISelection[]

public moveLineUp(): ISelection[]

Returns

ISelection[]

public mutateSelectedText(fn: (selection: AtomCore.ISelection) => any): any

Parameters

  • fn: (selection: AtomCore.ISelection) => any

Returns

any

public nextNonBlankBufferRow(bufferRow: any)

Parameters

  • bufferRow: any

public normalizeTabsInBufferRange(bufferRange: any): any

Parameters

  • bufferRange: any

Returns

any

public outdentSelectedRows(): Array<TextBuffer.IRange[]>

Returns

Array<TextBuffer.IRange[]>

public outermostFoldsInBufferRowRange(startRow: any, endRow: any): Array<any>

Parameters

  • startRow: any
  • endRow: any

Returns

Array<any>

public pasteText(options?: any): IRange[]

Parameters

  • options?: any optional

Returns

IRange[]

public preserveCursorPositionOnBufferReload(): ISubscription

Returns

ISubscription

public redo(): Array<any>

Returns

Array<any>

public reloadGrammar(): any

Returns

any

public removeCursor(cursor: any): ICursor[]

Parameters

  • cursor: any

Returns

ICursor[]

public removeSelection(selection: ISelection): any

Parameters

Returns

any

public replaceSelectedText(options: any, fn: (selection: string) => any): any

Parameters

  • options: any
  • fn: (selection: string) => any

Returns

any

public save()

public saveAs(filePath: any)

Parameters

  • filePath: any

public scan(): any

Returns

any

public scanInBufferRange(): any

Returns

any

public scopesForBufferPosition(bufferPosition: any): Array<string>

Parameters

  • bufferPosition: any

Returns

Array<string>

public screenPositionForBufferPosition(bufferPosition: any, options?: any): IPoint

Parameters

  • bufferPosition: any
  • options?: any optional

Returns

IPoint

public screenRangeForBufferRange(bufferRange: any): IRange

Parameters

  • bufferRange: any

Returns

IRange

public selectAll(): ISelection[]

Returns

ISelection[]

public selectDown(rowCount?: number): ISelection[]

Parameters

  • rowCount?: number optional

Returns

ISelection[]

public selectLeft(): ISelection[]

Returns

ISelection[]

public selectLine(): ISelection[]

Returns

ISelection[]

public selectMarker(marker: any): any

Parameters

  • marker: any

Returns

any

public selectRight(): ISelection[]

Returns

ISelection[]

public selectToBeginningOfLine(): ISelection[]

Returns

ISelection[]

public selectToBeginningOfNextWord(): ISelection[]

Returns

ISelection[]

public selectToBeginningOfWord(): ISelection[]

Returns

ISelection[]

public selectToBottom(): ISelection[]

Returns

ISelection[]

public selectToEndOfLine(): ISelection[]

Returns

ISelection[]

public selectToEndOfWord(): ISelection[]

Returns

ISelection[]

public selectToFirstCharacterOfLine(): ISelection[]

Returns

ISelection[]

public selectToNextWordBoundary(): ISelection[]

Returns

ISelection[]

public selectToPreviousWordBoundary(): ISelection[]

Returns

ISelection[]

public selectToScreenPosition(position: IPoint): any

Parameters

Returns

any

public selectToTop(): ISelection[]

Returns

ISelection[]

public selectUp(rowCount?: number): ISelection[]

Parameters

  • rowCount?: number optional

Returns

ISelection[]

public selectWord(): ISelection[]

Returns

ISelection[]

public selectionIntersectsBufferRange(bufferRange: any): any

Parameters

  • bufferRange: any

Returns

any

public serializeParams(): { id: number; softTabs: boolean; scrollTop: number; scrollLeft: number; displayBuffer: any; }

Returns

{ id: number; softTabs: boolean; scrollTop: number; scrollLeft: number; displayBuffer: any; }

public setCursorBufferPosition(position: any, options?: any): any

Parameters

  • position: any
  • options?: any optional

Returns

any

public setCursorScreenPosition(position: IPoint, options?: any): any

Parameters

  • position: IPoint
  • options?: any optional

Returns

any

public setEditorWidthInChars(editorWidthInChars: any)

Parameters

  • editorWidthInChars: any

public setGrammar(grammer: IGrammar)

Parameters

public setIndentationForBufferRow(bufferRow: any, newLevel: any, _arg: any)

Parameters

  • bufferRow: any
  • newLevel: any
  • _arg: any

public setScrollLeft(scrollLeft: any)

Parameters

  • scrollLeft: any

public setScrollTop(scrollTop: any)

Parameters

  • scrollTop: any

public setSelectedBufferRange(bufferRange: any, options: any): any

Parameters

  • bufferRange: any
  • options: any

Returns

any

public setSelectedBufferRanges(bufferRanges: any, options: any): any

Parameters

  • bufferRanges: any
  • options: any

Returns

any

public setSoftTabs(softTabs: boolean)

Parameters

  • softTabs: boolean

public setSoftWrap(softWrap: any)

Parameters

  • softWrap: any

public setTabLength(tabLength: any)

Parameters

  • tabLength: any

public setText(text: any)

Parameters

  • text: any

public setTextInBufferRange(range: IRange, text: string): any

Parameters

Returns

any

public setVisible(visible: boolean)

Parameters

  • visible: boolean

public shouldAutoIndent(): boolean

Returns

boolean

public shouldPromptToSave(): boolean

Returns

boolean

public splitSelectionsIntoLines(): Array<any>

Returns

Array<any>

public subscribeToBuffer()

public subscribeToDisplayBuffer()

public toggleFoldAtBufferRow(bufferRow: any): any

Parameters

  • bufferRow: any

Returns

any

public toggleLineCommentsInSelection(): IRange[]

Returns

IRange[]

public tokenForBufferPosition(bufferPosition: any): IToken

Parameters

  • bufferPosition: any

Returns

IToken

public transact(fn: Function): any

Parameters

  • fn: Function

Returns

any

public transpose(): IRange[]

Returns

IRange[]

public undo(): Array<any>

Returns

Array<any>

public unfoldAll(): Array<any>

Returns

Array<any>

public unfoldBufferRow(bufferRow: any): any

Parameters

  • bufferRow: any

Returns

any

public unfoldCurrentRow(): Array<any>

Returns

Array<any>

public upperCase(): Array<boolean>

Returns

Array<boolean>