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
eto 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/frontendlazygiteto editreadme_frontend.mdIn Vim, checking the cwd with
:pwdoutputs/path/to/myrepo.And I would like it to actually use the real cwd, where the
:pwdwould output/path/to/myrepo/packages/frontendI 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