import { Extension } from '../types'; declare let ignoreTab: boolean; /** * Sets whether editors should ignore tab or use it for indentation. * Users can always toggle this using Ctrl+M / Ctrl+Shift+M (Mac). */ declare const setIgnoreTab: (newState: boolean) => boolean; /** * Extension that will add automatic indentation and closing of brackets, quotes, and * tags along with the following commands. * * ## Commands * * Here, `Mod` refers to `Cmd` on Mac and `Ctrl` otherwise. * * - `Alt` + `ArrowUp`: Move line up * - `Alt` + `ArrowDown`: Move line down * - `Ctrl` + `ArrowUp`: Scroll one line up (Windows/Linux only) * - `Ctrl` + `ArrowDown`: Scroll one line down (Windows/Linux only) * - `Shift` + `Alt` + `ArrowUp`: Copy line up * - `Shift` + `Alt` + `ArrowDown`: Copy line down * - `Mod` + `Enter`: Insert blank line * - `Mod` + `]`: Indent line * - `Mod` + `[`: Outdent line * - `Tab`: Indent line (Tab capture enabled) * - `Shift` + `Tab`: Outdent line (Tab capture enabled) * - `Shift` + `Mod` + `K`: Delete line * - `Mod` + `/`: Toggle comment * - `Shift` + `Alt` + `A`: Toggle block comment * - `Ctrl` + `M`: Toggle tab capturing (Windows/Linux) * - `Ctrl` + `Shift` + `M`: Toggle tab capturing (Mac) * * @param selfClosePairs Pairs of self-closing brackets and quotes. * Must be an array of strings with 2 characters each. * Defaults to `['""', "''", '``', '()', '[]', '{}']`. * @param selfCloseRegex Regex controlling whether or not a bracket/quote should * automatically close based on the character before and after the cursor. * Defaults to ``/([^$\w'"`]["'`]|.[[({])[.,:;\])}>\s]|.[[({]`/s``. */ declare const defaultCommands: (selfClosePairs?: string[], selfCloseRegex?: RegExp) => Extension; export interface EditHistory { /** Clears the history stack. */ clear(): void; /** * Sets the active entry relative to the current entry. * * @param offset The position you want to move to relative to the current entry. * * `EditHistory.go(-1)` would be equivalent to an undo while `EditHistory.go(1)` would * be equivalent to a redo. * * If there's no entry at the specified position, the call does nothing. */ go(offset: number): void; /** * Returns whether or not there exists a history entry at the specified offset relative * to the current entry. * * This method can be used to determine whether a call to {@link EditHistory.go} with the * same offset will succeed or do nothing. */ has(offset: number): boolean; } /** * History extension that overrides the undo/redo behavior of the browser. * * Without this extension, the browser's native undo/redo is used, which can be sufficient * in some cases. * * Once added to an editor, this extension can be accessed from `editor.extensions.history`. * * @param historyLimit The maximum size of the history stack. Defaults to 999. */ declare const editHistory: (historyLimit?: number) => Extension; export { editHistory, defaultCommands, setIgnoreTab, ignoreTab };