A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/vim/vim/issues/9721 below:

Add autocmd for `DirChangedPre` to enable doing some work before the `cwd` changes · Issue #9721 · vim/vim · GitHub

Is your feature request about something that is currently impossible or hard to do? Please describe the problem.

As the plugin author of https://github.com/rmagatti/auto-session/ I'd like to be able to do some session related work before the cwd changes.

In the context of this issue for example rmagatti/auto-session#102 when :cd is called, I'd like to be able to save the current session and clear the current session tracking from the plugin before the cwd changes. Then on DirChanged I'd want to evaluate if the now current cwd has a mapped session or not. Today I can only do the DirChanged portion of this.

Describe the solution you'd like

Ideally I'd have a DirChangedPre to work with. It would be an autocmd called right before the actual cwd change.

Describe alternatives you've considered**

Right now there's no real alternative. At least not one that enables me to save the session before anything happens to the cwd. The only real workaround is stopping the plugin from tracking the current session when a DirChanged happens, but that isn't really enough.

Additional context

N/A


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4