Using current directory as cwd when opening a file #3160
Unanswered
kristijanhusak
asked this question in
Q&A
Replies: 1 comment 4 replies
-
Isn't |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Recently I started working with monorepo which has a lot of sub-packages.
When I'm in the subpackage folder and I open lazygit + press
e
to edit a file, it opens up Neovim with CWD being the root directory (git root). Is there a way to edit the file with cwd being the same as the one from where I opened lazygit?For example, assuming this structure and assuming Vim (Or Neovim) is the editor:
doing this:
cd packages/frontend
lazygit
e
to editreadme_frontend.md
In Vim, checking the cwd with
:pwd
outputs/path/to/myrepo
.And I would like it to actually use the real cwd, where the
:pwd
would output/path/to/myrepo/packages/frontend
I mostly need this because I have some local configuration scoped to the specific package (local vimrc), and when I open the Neovim from lazygit, it does not pick that up. Also, the general usage with the cwd being git root gives me a lot of results in fuzzy finder, etc.
I tried using this as an edit command but it didn't work:
Beta Was this translation helpful? Give feedback.
All reactions