[picker]: New action to cd_up when in grep or files picker #959
Closed
rbhanot4739
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Here is the usecase that some of you might have encountered. You are working on something and jump to library code with lsp go to definition, and then you want to search something in the directory of that library code file. Now this isn't natively possible, I suppose because that file or directory is not in your
cwd
or project root. Even if your project include thatbuild/site-packages
,node-modules
type of directory its not efficient because there will huge number of files/directories in those folders and most of the times you are interested in searching a particular directory.So in order to solve this, I added a mapping that lets me grep in adjacent directory of currently opened file and then define a custom action mapped to a key that sets the
cwd
of the picker to one level up. Combining these two things gives me a nice workflow which mimics a feature from i used to like from IntellIJ. Here is how I did itAnd here is how I map it
Finally, this mapping will bring it all together.
Is there a way to update the
cwd
of the picker without having to close/reopen it again? Also Please share your feedback/ideas if you find this useful and/or how I can improve it.Beta Was this translation helpful? Give feedback.
All reactions