GithubHelp home page GithubHelp logo

Comments (3)

alex-courtis avatar alex-courtis commented on August 25, 2024

sync_root_with_cwd is used to change the tree's root on :cd or similar:

*nvim-tree.sync_root_with_cwd*
Changes the tree root directory on `DirChanged` and refreshes the tree.
  Type: `boolean`, Default: `false`

In your case, a :cd bar would do the job.

:pwd in the tree window and the file's window will show .../bar

However, I'm not quite sure that's what you're after...

from nvim-tree.lua.

alex-courtis avatar alex-courtis commented on August 25, 2024

actions.change_dir.global will set the global cwd when changing directories in the tree:

*nvim-tree.actions.change_dir*
vim |current-directory| behaviour.

    *nvim-tree.actions.change_dir.enable*
    Change the working directory when changing directories in the tree.
      Type: `boolean`, Default: `true`

    *nvim-tree.actions.change_dir.global*
    Use `:cd` instead of `:lcd` when changing directories.
    Consider that this might cause issues with the
    |nvim-tree.sync_root_with_cwd| option.
      Type: `boolean`, Default: `false`

    *nvim-tree.actions.change_dir.restrict_above_cwd*
    Restrict changing to a directory above the global cwd.
      Type: `boolean`, Default: `false`

from nvim-tree.lua.

alex-courtis avatar alex-courtis commented on August 25, 2024

Better documentation of all these changing directory behaviours is needed: #2405

from nvim-tree.lua.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.