0

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.

1 Answer 1

1

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.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.