Better "Open file but keep neo-tree focused" #1968
mwinters0
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
My workflow
I have to edit groups of files spread across a huge codebase fairly often, and I realized that the only reason I ever really bounce over to GUI editors is for their persistent file browsers which make this easier. I wanted what I had there:
Keep Neotree focused when opening files
I came up with this before finding other people's solutions. I thought I'd share since some people have reported "blink" issues with the existing approaches.
With my bindings:
s=splitv=vsplitCtrl-s=splitbut keep focus in NeoTreeCtrl-v=vsplitbut keep focus in NeoTreeHunting -> editing
With the above fix I could easily open files, but there wasn't a good way to return focus to editing when done. With this config, I can press
|to toggle focus between my current editing window and the file browser.In my global mappings:
In my Neotree config:
Fin
Combined config
If / when I need the screen space, I can just focus Neotree and
q.TODO
<CR>are the_keepfocusversions, but it seems that<CR>is a special case? I can't seem to rebind it correctly. If anyone has any tips on that, I'd appreciate it!Beta Was this translation helpful? Give feedback.
All reactions