Interface ITextBuffer

Hierarchy

Index

Properties

Methods

Properties

public cachedDiskContents: string

public cachedText: string

public conflict: boolean

public digestWhenLastPersisted: string

public file: any

public history: IHistory

public lineEndings: Array<string>

public lines: Array<string>

public loaded: boolean

public markers: IMarkerManager

public modifiedWhenLastPersisted: boolean

public offsetIndex: any

public refcount: number

public stoppedChangingDelay: number

public stoppedChangingTimeout: any

public useSerializedText: boolean

Methods

public abortTransaction(): any

Returns

any

public addSubscription(subscription: any): ISubscription

Parameters

  • subscription: any

Returns

ISubscription

public append(text: string, normalizeLineEndings?: boolean): IRange

Parameters

  • text: string
  • normalizeLineEndings?: boolean optional

Returns

IRange

public applyPatch(patch: IBufferPatch): any

Parameters

Returns

any

public backwardsScan(regex: any, iterator: any): any

Parameters

  • regex: any
  • iterator: any

Returns

any

public backwardsScanInRange(regex: any, range: any, iterator: any): any

Parameters

  • regex: any
  • range: any
  • iterator: any

Returns

any

public beginTransaction(): any

Returns

any

public behavior(eventName: string, initialValue: any)

Parameters

  • eventName: string
  • initialValue: any

public buildPatch(oldRange: IRange, newText: string, normalizeLineEndings?: boolean): IBufferPatch

Parameters

  • oldRange: IRange
  • newText: string
  • normalizeLineEndings?: boolean optional

Returns

IBufferPatch

public cancelStoppedChangingTimeout(): any

Returns

any

public characterIndexForPosition(position: IPoint): number

Parameters

Returns

number

public clearUndoStack(): any

Returns

any

public clipPosition(position: IPoint): IPoint

Parameters

Returns

IPoint

public clipRange(range: IRange): IRange

Parameters

Returns

IRange

public commitTransaction(): any

Returns

any

public decrementSubscriptionCount(eventName: string): number

Parameters

  • eventName: string

Returns

number

public delete(range: IRange): IRange

Parameters

Returns

IRange

public deleteRow(row: number): IRange

Parameters

  • row: number

Returns

IRange

public deleteRows(startRow: number, endRow: number): IRange

Parameters

  • startRow: number
  • endRow: number

Returns

IRange

public deserializeParams(params: any): any

Parameters

  • params: any

Returns

any

public destroy(): any

Returns

any

public destroyMarker(id: any): any

Parameters

  • id: any

Returns

any

public emit(eventName: string, args?: Array<any>)

Parameters

  • eventName: string
  • args?: Array<any> optional

public emitModifiedStatusChanged(modifiedStatus: any): any

Parameters

  • modifiedStatus: any

Returns

any

public finishLoading(): ITextBuffer

Returns

ITextBuffer

public getBaseName(): string

Returns

string

public getEndPosition(): IPoint

Returns

IPoint

public getFirstPosition(): IPoint

Returns

IPoint

public getLastLine(): string

Returns

string

public getLastRow(): number

Returns

number

public getLineCount(): number

Returns

number

public getLines(): string

Returns

string

public getMarker(id: number): IMarker

Parameters

  • id: number

Returns

IMarker

public getMarkerCount(): number

Returns

number

public getMarkers(): IMarker[]

Returns

IMarker[]

public getMaxCharacterIndex(): number

Returns

number

public getPath(): string

Returns

string

public getRange(): IRange

Returns

IRange

public getSubscriptionCount(eventName: string): number

Parameters

  • eventName: string

Returns

number

public getText(): string

Returns

string

public getTextInRange(range: IRange): string

Parameters

Returns

string

public getUri(): string

Returns

string

public handleTextChange(event: any): any

Parameters

  • event: any

Returns

any

public hasMultipleEditors(): boolean

Returns

boolean

public hasSubscriptions(eventName: string): boolean

Parameters

  • eventName: string

Returns

boolean

public incrementSubscriptionCount(eventName: string): number

Parameters

  • eventName: string

Returns

number

public insert(position: IPoint, text: string, normalizeLineEndings?: boolean): IRange

Parameters

  • position: IPoint
  • text: string
  • normalizeLineEndings?: boolean optional

Returns

IRange

public isAlive(): boolean

Returns

boolean

public isDestroyed(): boolean

Returns

boolean

public isEmpty(): boolean

Returns

boolean

public isInConflict(): boolean

Returns

boolean

public isModified(): boolean

Returns

boolean

public isRetained(): boolean

Returns

boolean

public isRowBlank(row: number): boolean

Parameters

  • row: number

Returns

boolean

public lineEndingForRow(row: number): string

Parameters

  • row: number

Returns

string

public lineForRow(row: number): string

Parameters

  • row: number

Returns

string

public lineLengthForRow(row: number): number

Parameters

  • row: number

Returns

number

public load(): IPromise

Returns

IPromise

public loadSync(): ITextBuffer

Returns

ITextBuffer

public logLines(start: number, end: number)

Parameters

  • start: number
  • end: number

public markPosition(range: any, properties: any): any

Parameters

  • range: any
  • properties: any

Returns

any

public markRange(range: any, properties: any): any

Parameters

  • range: any
  • properties: any

Returns

any

public matchesInCharacterRange(regex: any, startIndex: any, endIndex: any): Array<any>

Parameters

  • regex: any
  • startIndex: any
  • endIndex: any

Returns

Array<any>

public nextNonBlankRow(startRow: number): number

Parameters

  • startRow: number

Returns

number

public off(eventNames: string, handler: Function)

Parameters

  • eventNames: string
  • handler: Function

public on(eventNames: string, handler: Function): any

Parameters

  • eventNames: string
  • handler: Function

Returns

any

public once(eventName: string, handler: Function): any

Parameters

  • eventName: string
  • handler: Function

Returns

any

public pauseEvents(eventNames: string)

Parameters

  • eventNames: string

public positionForCharacterIndex(offset: number): IPoint

Parameters

  • offset: number

Returns

IPoint

public previousNonBlankRow(startRow: number): number

Parameters

  • startRow: number

Returns

number

public rangeForRow(row: number, includeNewline?: boolean): IRange

Parameters

  • row: number
  • includeNewline?: boolean optional

Returns

IRange

public redo(): any

Returns

any

public release(): ITextBuffer

Returns

ITextBuffer

public reload(): any

Returns

any

public replace(regex: any, replacementText: any): any

Parameters

  • regex: any
  • replacementText: any

Returns

any

public resumeEvents(eventNames: string)

Parameters

  • eventNames: string

public retain(): ITextBuffer

Returns

ITextBuffer

public save()

public saveAs(filePath: string): any

Parameters

  • filePath: string

Returns

any

public scan(regex: any, iterator: any): any

Parameters

  • regex: any
  • iterator: any

Returns

any

public scanInRange(regex: any, range: any, iterator: any, reverse: any): any

Parameters

  • regex: any
  • range: any
  • iterator: any
  • reverse: any

Returns

any

public scheduleModifiedEvents(): any

Returns

any

public serializeParams(): any

Returns

any

public setPath(filePath: string): any

Parameters

  • filePath: string

Returns

any

public setText(text: string): IRange

Parameters

  • text: string

Returns

IRange

public setTextInRange(range: IRange, text: string, normalizeLineEndings?: boolean): IRange

Parameters

  • range: IRange
  • text: string
  • normalizeLineEndings?: boolean optional

Returns

IRange

public setTextViaDiff(text: any): Array<any>

Parameters

  • text: any

Returns

Array<any>

public signal(eventName: string)

Parameters

  • eventName: string

public subscribe(eventEmitterOrSubscription: any, args?: Array<any>): ISubscription

Parameters

  • eventEmitterOrSubscription: any
  • args?: Array<any> optional

Returns

ISubscription

public subscribeToCommand(eventEmitter: any, args?: Array<any>): ISubscription

Parameters

  • eventEmitter: any
  • args?: Array<any> optional

Returns

ISubscription

public subscribeToFile(): any

Returns

any

public subscribeWith(eventEmitter: any, methodName: string, args: any): ISubscription

Parameters

  • eventEmitter: any
  • methodName: string
  • args: any

Returns

ISubscription

public transact(fn: Function): any

Parameters

  • fn: Function

Returns

any

public undo(): any

Returns

any

public unsubscribe(object?: any): any

Parameters

  • object?: any optional

Returns

any

public updateCachedDiskContents(): IPromise

Returns

IPromise

public updateCachedDiskContentsSync(): string

Returns

string

public usesSoftTabs(): boolean

Returns

boolean