Hi Bram,
On Thu, May 9, 2019 at 4:36 AM Bram Moolenaar <[email protected]> wrote:
>
> Yegappan wrote:
>
> > > > When you change the directory using the :cd or :tcd or :lcd commands,
> > > > the previous directory is remembered. You can change to this
> > > > directory, by passing "-" as the directory name to these commands.
> > > >
> > > > Currently only a single previous directory is remembered across
> > > > :cd, :lcd and :tcd. If you have a tabpage local directory and change
> > > > the global directory using ":cd", then the previous directory for
> > > > the :tcd is also changed.
> > > >
> > > > I think we should keep a separate previous directory for every window
> > > > with a local directory, every tabpage with a local directory and the
> > > > global directory. Any comments/suggestions?
> > >
> > > It might complicate things too much. When I use ":lcd somedir" and then
> > > "cd -", what directory gets used for "-"?
> > >
> >
> > With the proposed change, in the above case you will get a "No previous
> > directory" error message after "cd -". But if you use ":lcd -", then
> > the directory
> > will be changed to "somedir".
> >
> > If you use a separate tabpage for each project directory, then currently
> > when
> > you change directory in one of the tab pages, the previous directory of all
> > the tab pages will be changed. With the proposed change the previous
> > directory of only the current tab page will be changed.
>
> I don't like that the meaning of "-" depends on where or how you use it.
> I would rather think of using another special name for "previous
> window-local directory", "previous tab-local directory" and "previous
> global directory". Perhaps -l, -t and -g?
>
The updated help description for the :cd, :tcd and :lcd commands
with the support for the -l, -t and -g arguments is below. Let me know
if you have any comments.
Regards,
Yegappan
*:cd-* *E186*
:cd[!] - Change to the previous current directory (before the
previous ":cd {path}" or the ":tcd {path}" or the
":lcd {path}" command).
*:cd-g* *:cd-t* *:cd-l*
:cd[!] -g
:cd[!] -t
:cd[!] -l Change to the previous global (|:cd|) or tabpage-local
(|:tcd|) or window-local (|:lcd|) current directory
respectively.
*:tcd-*
:tcd[!] - Change to the previous current directory (before the
previous ":cd {path}" or the ":tcd {path}" or the
":lcd {path}" command).
*:tcd-g* *:tcd-t* *:tcd-l*
:tcd[!] -g
:tcd[!] -t
:tcd[!] -l Change to the previous global (|:cd|) or tabpage-local
(|:tcd|) or window-local (|:lcd|) current directory
respectively.
*:lcd-*
:lcd[!] - Change to the previous current directory (before the
previous ":cd {path}" or the ":tcd {path}" or the
":lcd {path}" command).
*:lcd-g* *:lcd-t* *:lcd-l*
:lcd[!] -g
:lcd[!] -t
:lcd[!] -l Change to the previous global (|:cd|) or tabpage-local
(|:tcd|) or window-local (|:lcd|) current directory
respectively.
--
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/CAAW7x7nL4Y%3DHthmOkYJuGvEAYoj1CBdjmYTBTzkMuB%2BuWYcKpQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.