This events gets triggered between TabEnter and WinEnter, and only for
newly created tab pages. It seemed necessary because currently there is no
easy way to handle things like

~~~

function! NewStartifyTab(afile)
    if exists('g:entering_tab')
        call startify#insane_in_the_membrane()
        unlet g:entering_tab
    endif
endfunction

au! TabNew * let g:entering_tab = 1
au! BufEnter * call NewStartifyTab(expand('<afile>'))

~~~

To set the `g:entering:tab` flag on TabEnter would force us to add some
cumbersome logic to the NewStartifyTab function (which might not cover all
cases).

Regards,

Felipe Morales

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -296,6 +296,7 @@
 |WinLeave|             before leaving a window
 |TabEnter|             after entering another tab page
 |TabLeave|             before leaving a tab page
+|TabNew|                  before entering a new tab page
 |CmdwinEnter|          after entering the command-line window
 |CmdwinLeave|          before leaving the command-line window
 
@@ -853,6 +854,10 @@
 TabLeave                       Just before leaving a tab page. |tab-page|
                                A WinLeave event will have been triggered
                                first.
+
+TabNew                          Before entering a new tab page. |tab-page|
+                                Before triggering the TabEnter event.
+
                                                        *TermChanged*
 TermChanged                    After the value of 'term' has changed.  Useful
                                for re-loading the syntax file to update the
diff --git a/runtime/doc/tabpage.txt b/runtime/doc/tabpage.txt
--- a/runtime/doc/tabpage.txt
+++ b/runtime/doc/tabpage.txt
@@ -284,6 +284,9 @@
        WinEnter
        BufEnter
 
+When entering a new tab page (|:tabnew|), TabNew is triggered before TabEnter
+and after WinEnter.
+
 ==============================================================================
 4. Setting 'tabline'                                   *setting-tabline*
 
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -62,7 +62,7 @@
 
 " AutoCmd Events {{{2
 syn case ignore
-syn keyword vimAutoEvent contained     BufAdd BufCreate BufDelete BufEnter 
BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd 
BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite 
BufWriteCmd BufWritePost BufWritePre Cmd-event CmdwinEnter CmdwinLeave 
ColorScheme CompleteDone CursorHold CursorHoldI CursorMoved CursorMovedI 
EncodingChanged FileAppendCmd FileAppendPost FileAppendPre FileChangedRO 
FileChangedShell FileChangedShellPost FileEncoding FileReadCmd FileReadPost 
FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost 
FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost 
FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter 
InsertLeave MenuPopup QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply 
SessionLoadPost ShellCmdPost ShellFilterPost SourceCmd SourcePre 
SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabEnter TabLeave 
TermChanged TermResponse TextChanged TextChangedI User UserGettingBored 
VimEnter VimLeave VimLeavePre VimResized WinEnter WinLeave 
+syn keyword vimAutoEvent contained     BufAdd BufCreate BufDelete BufEnter 
BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd 
BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite 
BufWriteCmd BufWritePost BufWritePre Cmd-event CmdwinEnter CmdwinLeave 
ColorScheme CompleteDone CursorHold CursorHoldI CursorMoved CursorMovedI 
EncodingChanged FileAppendCmd FileAppendPost FileAppendPre FileChangedRO 
FileChangedShell FileChangedShellPost FileEncoding FileReadCmd FileReadPost 
FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost 
FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost 
FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter 
InsertLeave MenuPopup QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply 
SessionLoadPost ShellCmdPost ShellFilterPost SourceCmd SourcePre 
SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabEnter TabLeave 
TabNew TermChanged TermResponse TextChanged TextChangedI User UserGettingBored 
VimEnter VimLeave VimLeavePre VimResized WinEnter WinLeave 
 
 " Highlight commonly used Groupnames {{{2
 syn keyword vimGroup contained Comment Constant String Character Number 
Boolean Float Identifier Function Statement Conditional Repeat Label Operator 
Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass 
Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug 
Underlined Ignore Error Todo 
diff --git a/src/fileio.c b/src/fileio.c
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -7702,6 +7702,7 @@
     {"Syntax",         EVENT_SYNTAX},
     {"TabEnter",       EVENT_TABENTER},
     {"TabLeave",       EVENT_TABLEAVE},
+    {"TabNew",          EVENT_TABNEW},
     {"TermChanged",    EVENT_TERMCHANGED},
     {"TermResponse",   EVENT_TERMRESPONSE},
     {"TextChanged",    EVENT_TEXTCHANGED},
diff --git a/src/window.c b/src/window.c
--- a/src/window.c
+++ b/src/window.c
@@ -3655,6 +3655,7 @@
        redraw_all_later(CLEAR);
 #ifdef FEAT_AUTOCMD
        apply_autocmds(EVENT_WINENTER, NULL, NULL, FALSE, curbuf);
+        apply_autocmds(EVENT_TABNEW, NULL, NULL, FALSE, curbuf);
        apply_autocmds(EVENT_TABENTER, NULL, NULL, FALSE, curbuf);
 #endif
        return OK;

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui