Documentation
¶
Overview ¶
Package autocmd provides the Neovim autocmd.
Index ¶
Constants ¶
View Source
const ( // BufAdd Just after creating a new buffer which is added to the buffer list, or adding a buffer to the buffer list, a buffer in the buffer list was renamed. // // Before BufEnter. BufAdd = "BufAdd" // BufDelete before deleting a buffer from the buffer list. BufDelete = "BufDelete" // BufEnter after entering a buffer. // // Useful for setting options for a file type. // Also executed when starting to edit a buffer. // // after BufAdd. // after BufReadPost. BufEnter = "BufEnter" // BufFilePost after changing the name of the current buffer with the ":file" or ":saveas" command. BufFilePost = "BufFilePost" // BufFilePre before changing the name of the current buffer with the ":file" or ":saveas" command. BufFilePre = "BufFilePre" // BufHidden before a buffer becomes hidden: when there are no longer windows that show the buffer, but the buffer is not unloaded or deleted. BufHidden = "BufHidden" // BufLeave before leaving to another buffer. // // Also when leaving or closing the current window and the new current window is not for the same buffer. BufLeave = "BufLeave" // BufModifiedSet After the "modified" value of a buffer has been changed. // // This autocmd Neovim specific. BufModifiedSet = "BufModifiedSet" // BufNew Just after creating a new buffer. // Also used just after a buffer has been renamed. // // When the buffer is added to the buffer list BufAdd will be triggered too. BufNew = "BufNew" // BufNewFile When starting to edit a file that doesn't exist. // Can be used to read in a skeleton file. BufNewFile = "BufNewFile" // BufReadPost starting to edit a new buffer, after reading the file. BufReadPost = "BufReadPost" // BufRead starting to edit a new buffer, after reading the file. // // Alias of BufReadPost. BufRead = BufReadPost // BufReadCmd Before starting to edit a new buffer. // Should read the file into the buffer. Cmd-event. BufReadCmd = "BufReadCmd" // BufReadPre when starting to edit a new buffer, after reading the file into the buffer, before processing modelines. // // See BufWinEnter to do something after processing modelines. // // Also triggered: // when writing an unnamed buffer such that the buffer gets a name // after successfully recovering a file // for the "filetypedetect" group when executing ":filetype detect" // // Not triggered: // for ":r file" // if the file doesn't exist BufReadPre = "BufReadPre" // BufUnload before unloading a buffer, when the text in the buffer is going to be freed. // // After BufWritePost. // Before BufDelete. BufUnload = "BufUnload" // BufWinEnter After a buffer is displayed in a window. // // This may be when the buffer is loaded (after processing modelines) or when a hidden buffer is displayed (and is no longer hidden). BufWinEnter = "BufWinEnter" // BufWinLeave before a buffer is removed from a window. // // Not when it's still visible in another window. // Also triggered when exiting. // // Before BufUnload, BufHidden. BufWinLeave = "BufWinLeave" // BufWipeout before completely deleting a buffer. // // The BufUnload and BufDelete events may be called first (if the buffer was loaded and was in the buffer list). // // Also used just before a buffer is renamed (also when it's not in the buffer list). BufWipeout = "BufWipeout" // BufWritePre before writing the whole buffer to a file. BufWritePre = "BufWritePre" // BufWrite before writing the whole buffer to a file. // // Alias of BufWritePre. BufWrite = BufWritePre // BufWriteCmd Before writing the whole buffer to a file. BufWriteCmd = "BufWriteCmd" // BufWritePost after writing the whole buffer to a file (should undo the commands for BufWritePre). BufWritePost = "BufWritePost" // ChanInfo state of channel changed, for instance the client of a RPC channel described itself. // Sets these |v:event| keys: info. // See |nvim_get_chan_info()| for the format of the info Dictionary. ChanInfo = "ChanInfo" // ChanOpen just after a channel was opened. // sets these |v:event| keys: info. // // See |nvim_get_chan_info()| for the format of the info Dictionary. ChanOpen = "ChanOpen" // CmdUndefined when a user command is used but it isn't defined. // Useful for defining a command only when it's used. // // The pattern is matched against the command name. // Both <amatch> and <afile> expand to the command name. CmdUndefined = "CmdUndefined" // CmdlineChanged after a change was made to the text inside command line. // Be careful not to mess up the command line, it may cause Vim to lock up. <afile> expands to the cmdline-char. CmdlineChanged = "CmdlineChanged" )
List of autocmd events.
View Source
const ( // FileReadPre before reading a file with a ":read" command. FileReadPre = "FileReadPre" // FileReadPost after reading a file with a ":read" command. FileReadPost = "FileReadPost" // FileReadCmd before reading a file with a ":read" command. See also `:help Cmd-event`. FileReadCmd = "FileReadCmd" // FilterReadPre before reading a file from a filter command. FilterReadPre = "FilterReadPre" // FilterReadPost after reading a file from a filter command. FilterReadPost = "FilterReadPost" // StdinReadPre before reading from stdin into the buffer. StdinReadPre = "StdinReadPre" // StdinReadPost After reading from the stdin into the buffer. StdinReadPost = "StdinReadPost" )
List of Reading autocmd name.
View Source
const ( // FileWritePre starting to write part of a buffer to a file. FileWritePre = "FileWritePre" // FileWritePost after writing part of a buffer to a file. FileWritePost = "FileWritePost" // FileWriteCmd before writing part of a buffer to a file. See also `:help Cmd-event`. FileWriteCmd = "FileWriteCmd" // FileAppendPre starting to append to a file. FileAppendPre = "FileAppendPre" // FileAppendPost after appending to a file. FileAppendPost = "FileAppendPost" // FileAppendCmd before appending to a file. See also `:help Cmd-event`. FileAppendCmd = "FileAppendCmd" // FilterWritePre starting to write a file for a filter command or diff. FilterWritePre = "FilterWritePre" // FilterWritePost after writing a file for a filter command or diff. FilterWritePost = "FilterWritePost" )
List of Writing autocmd name.
View Source
const ( // BufCreate just after adding a buffer to the buffer list. // // Alias of BufAdd. BufCreate = BufAdd // SwapExists detected an existing swap file. SwapExists = "SwapExists" )
List of Buffers autocmd name.
View Source
const ( // FileType when the 'filetype' option has been set. FileType = "FileType" // Syntax when the 'syntax' option has been set. Syntax = "Syntax" // OptionSet after setting any option Startup and exit. OptionSet = "OptionSet" // VimEnter after doing all the startup stuff. VimEnter = "VimEnter" // GUIEnter after starting the GUI successfully. GUIEnter = "GUIEnter" // GUIFailed after starting the GUI failed. GUIFailed = "GUIFailed" // TermResponse after the terminal response to t_RV is received. TermResponse = "TermResponse" // QuitPre when using `:quit`, before deciding whether to exit. QuitPre = "QuitPre" // ExitPre when using a command that may make Vim exit. ExitPre = "ExitPre" // VimLeavePre before exiting Nvim, before writing the shada file. VimLeavePre = "VimLeavePre" // VimLeave before exiting Nvim, after writing the shada file. VimLeave = "VimLeave" // VimResume after Nvim is resumed. VimResume = "VimResume" // VimSuspend before Nvim is suspended. VimSuspend = "VimSuspend" )
List of Options autocmd name.
View Source
const ( // DiffUpdated after diffs have been updated. DiffUpdated = "DiffUpdated" // FileChangedShell Vim notices that a file changed since editing started. FileChangedShell = "FileChangedShell" // FileChangedShellPost after handling a file changed since editing started. FileChangedShellPost = "FileChangedShellPost" // FileChangedRO before making the first change to a read-only file. FileChangedRO = "FileChangedRO" // ShellCmdPost after executing a shell command. ShellCmdPost = "ShellCmdPost" // ShellFilterPostafter filtering with a shell command. ShellFilterPostafter = "ShellFilterPostafter" // FuncUndefined a user function is used but it isn't defined. FuncUndefined = "FuncUndefined" // SpellFileMissing a spell file is used but it can't be found. SpellFileMissing = "SpellFileMissing" // SourcePre before sourcing a Vim script. SourcePre = "SourcePre" // SourceCmd before sourcing a Vim script |Cmd-event|. SourceCmd = "SourceCmd" // VimResized after the Vim window size changed. VimResized = "VimResized" // FocusGained Nvim got focus. FocusGained = "FocusGained" // FocusLost Nvim lost focus. FocusLost = "FocusLost" // CursorHold the user doesn't press a key for a while. CursorHold = "CursorHold" // CursorHoldI the user doesn't press a key for a while in Insert mode. CursorHoldI = "CursorHoldI" // CursorMoved the cursor was moved in Normal mode. CursorMoved = "CursorMoved" // CursorMovedI the cursor was moved in Insert mode WinNew after creating a new window. CursorMovedI = "CursorMovedI" // WinEnter after entering another window. WinEnter = "WinEnter" // WinScrolled after scrolling the viewport of the current window. // // This autocmd Neovim specific. WinScrolled = "WinScrolled" // WinLeavet before leaving a window. WinLeavet = "WinLeavet" // WinClosed after closing a window. <afile> expands to the window-ID. after WinLeave. // // This autocmd Neovim specific. WinClosed = "WinClosed" // TabNew when creating a new tab page. // // This autocmd Neovim specific. TabNew = "TabNew" // TabNewEntered after entering a new tab page. // // This autocmd Neovim specific. TabNewEntered = "TabNewEntered" // TabEntert after entering another tab page. TabEntert = "TabEntert" // TabLeavet before leaving a tab page. TabLeavet = "TabLeavet" // TabClosed after closing a tab page. // // This autocmd Neovim specific. TabClosed = "TabClosed" // CmdlineEnter after entering cmdline mode. CmdlineEnter = "CmdlineEnter" // CmdlineLeave before leaving cmdline mode. CmdlineLeave = "CmdlineLeave" // CmdwinEnter after entering the command-line window. CmdwinEnter = "CmdwinEnter" // CmdwinLeave before leaving the command-line window. CmdwinLeave = "CmdwinLeave" // InsertEnter starting Insert mode. InsertEnter = "InsertEnter" // InsertChange when typing <Insert> while in Insert or Replace mode. InsertChange = "InsertChange" // InsertLeave when leaving Insert mode. InsertLeave = "InsertLeave" // InsertCharPre when a character was typed in Insert mode, before inserting it. InsertCharPre = "InsertCharPre" // TextYankPost when some text is yanked or deleted. TextYankPost = "TextYankPost" // TextChanged after a change was made to the text in Normal mode. TextChanged = "TextChanged" // TextChangedI after a change was made to the text in Insert mode when popup menu is not visible. TextChangedI = "TextChangedI" // TextChangedP after a change was made to the text in Insert mode when popup menu visible. TextChangedP = "TextChangedP" // ColorSchemePre before loading a color scheme. ColorSchemePre = "ColorSchemePre" // ColorScheme after loading a color scheme. ColorScheme = "ColorScheme" // RemoteReply a reply from a server Vim was received. RemoteReply = "RemoteReply" // QuickFixCmdPre before a quickfix command is run. QuickFixCmdPre = "QuickFixCmdPre" // QuickFixCmdPost after a quickfix command is run. QuickFixCmdPost = "QuickFixCmdPost" // SessionLoadPost after loading a session file. SessionLoadPost = "SessionLoadPost" // MenuPopup just before showing the popup menu. MenuPopup = "MenuPopup" // CompleteChanged after popup menu changed, not fired on popup menu hide. CompleteChanged = "CompleteChanged" // CompleteDone after Insert mode completion is done. CompleteDone = "CompleteDone" // DirChanged after the `current-directory` was changed. // // This autocmd Neovim specific. DirChanged = "DirChanged" // Signal after Nvim receives a signal. // // This autocmd Neovim specific. Signal = "Signal" // User to be used in combination with ":doautocmd". User = "User" )
List of Various autocmd name.
View Source
const ( // TermOpen when a terminal job starts. // // This autocmd Neovim specific. TermOpen = "TermOpen" // TermEnter after entering Terminal mode. after TermOpen. // // This autocmd Neovim specific. TermEnter = "TermEnter" // TermLeave after leaving Terminal mode. TermLeave = "TermLeave" // TermClose when a terminal job ends. // // This autocmd Neovim specific. TermClose = "TermClose" )
List of terminal autocmd name.
View Source
const ( // UIEnter after a UI connects via nvim_ui_attach(), after VimEnter. Can be used for GUI-specific configuration. // // This autocmd Neovim specific. UIEnter = "UIEnter" // UILeave after a UI disconnects from Nvim. // // This autocmd Neovim specific. UILeave = "UILeave" )
List of UD autocmd name.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.