Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vim: sets local dirs (via :lcd) #1085

Closed
3 of 15 tasks
blueyed opened this issue Oct 14, 2017 · 2 comments
Closed
3 of 15 tasks

vim: sets local dirs (via :lcd) #1085

blueyed opened this issue Oct 14, 2017 · 2 comments
Milestone

Comments

@blueyed
Copy link
Contributor

blueyed commented Oct 14, 2017

  • Category
    • fzf binary
    • fzf-tmux script
    • Key bindings
    • Completion
    • Vim
    • Neovim
    • Etc.
  • OS
    • Linux
    • Mac OS X
    • Windows
    • Windows Subsystem for Linux
    • Etc.
  • Shell
    • bash
    • zsh
    • fish

The Vim plugin uses :lcd to push/pod dirs, but should rather use the most appropriate cd command (let cd = haslocaldir() ? 'lcd' : (exists(':tcd') == 2 && haslocaldir(-1, 0)) ? 'tcd' : 'cd').
Therefore the window where fzf has been used with gets a local dir (haslocaldir()).

Any thoughts on this, otherwise I might provide a PR which remembers the prev dir together with the command being used (and use that also for popping).

@junegunn
Copy link
Owner

fzf has been used with gets a local dir (haslocaldir())

I see, but I'm not sure what the issue is. What problem do you have when it's set? Also, haslocaldir in Vim 7.4 does not take arguments, so I don't want to use it that way.

@blueyed
Copy link
Contributor Author

blueyed commented Oct 15, 2017

I am using only haslocaldir() with Vim in the PR.

The problem is that :lcd is meant to be special, and that I normally have a global or tab-local working dir. If a local window dir is set, this will not adjust.
When saving views (e.g. via vim-stay) you have to put additional workarounds in place to not store this (zhimsel/vim-stay#10).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants