How to execute autocmd command after "cd <path>" event?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to execute autocmd command after "cd <path>" event?

Igor Forca
Hi,
I have written some vim commands that I would like to execute every time after
:cd <some path>
command is executed.

I searched the help:
:help autocmd-events
but can't find "change directory" event.

Any idea how to trigger vim script after "cd <path>" command?

Regards

I am using gVim latest nightly currently 8.1.1119 on Windows 7.

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to execute autocmd command after "cd <path>" event?

Christian Brabandt

On Fr, 05 Apr 2019, Igor Forca wrote:

> Hi,
> I have written some vim commands that I would like to execute every time after
> :cd <some path>
> command is executed.
>
> I searched the help:
> :help autocmd-events
> but can't find "change directory" event.
>
> Any idea how to trigger vim script after "cd <path>" command?

I think this is not possible. There was a patch
(https://groups.google.com/d/msg/vim_dev/_69EpxY7rJ4/XoncR9-ON3IJ)
proposed, but it had some problems.


Best,
Christian
--
Man muß die Menschen so belehren, als ob man sie nicht belehrte, und
unbekannte Dinge vortragen, als seien sie nur vergessen.
                -- Alexander Pope

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to execute autocmd command after "cd <path>" event?

Yegappan Lakshmanan
In reply to this post by Igor Forca
Hi,

On Fri, Apr 5, 2019 at 5:56 AM Igor Forca <[hidden email]> wrote:

>
> Hi,
> I have written some vim commands that I would like to execute every time after
> :cd <some path>
> command is executed.
>
> I searched the help:
> :help autocmd-events
> but can't find "change directory" event.
>

You can use the DirChanged autocmd event.

- Yegappan

> Any idea how to trigger vim script after "cd <path>" command?
>
> Regards
>
> I am using gVim latest nightly currently 8.1.1119 on Windows 7.
>

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.