Say that I want to define an autocommand based on WinClosed
that is triggered only for windows with ID:s [1012]
and [1026]
and if the closed window was [1012]
do something elseif the closed window was [1026]
do something else. How to do that? I tried to look into the help but it is fairly cryptic.
光荣北美官推:高希希版《三国》质量很棒值得一看
Add a comment
|
1 Answer
The help clearly states that "pattern is matched against window ID". So it's ok to do autocmd WinClosed 1012,1026 ...
.
If you need to do different things for those windows then create two separate autocommands, one for 1012 and another for 1026.
If you need to evaluate window ID in runtime then use execute
as usual.