emacs-neotree
emacs-neotree copied to clipboard
Multiple tree (multiple buffer) support?
I'd like to have multiple instantiations of neotree, in the same way that you can have multiple dired buffers.
Is this possible with the current code? If not, how much change would you think is needed, and would you be open to a patch?
I think this would help drive compatibility with workgroups; e.g. https://github.com/pashinin/workgroups2.
I am about to try out neo-buffer--create.
Multiple instance is currently not supported. If you want to hack it, you can focus on those functions with a prefix of "neo-global-". I thinks it is not easy.
Do you think let NeoTree single instance to support multiple projects is a good idea?
neotree should support multiple projects.
Projectile + helm is a good practice. A few days ago I made a simple integration with Projectile, it can be used like this:
;; put this into your emacs dotfile
(setq projectile-switch-project-action 'neotree-projectile-action)
;; then
C-c p p <select project> RET
If you have any idea, please tell me :)
This would be an awesome feature!
@jaypei Sure you can switch between projects like this but the buffers do not change,they are not isolated.You are in project one,work on some files,switch to project two and you still have project one's buffers active.Using layouts in spacemacs is not an option either,Neotree does not work with them. https://github.com/syl20bnr/spacemacs/issues/5696
@jaypei That works super well for me. Thanks for the post!
Is this really still not a feature? I often have multiple Emacs windows attached to the same daemon and I can't have more than one instance of neotree. Pretty lame.
@fomentia Yeah, I too would like to have this feature.
Seems like the projects is not under maintenance anymore, I'm about to fork the project and begin a combo of fixes + new features (particularly this one of multiple buffers since I'm pretty used to at having multiple frames and one daemon). Dunno know if I'm gonna have full time to do this but if someone want to help every code/doc add/fix/suggestion will be welcomed.
Edit the fork is: https://github.com/aalher/treeninja
@aalher I've recently taken up maintenance! I'd be happy to help out getting this in
@Abdisalan I've been using Neotree for many years now and it's great. Only thing I wish for is the ability to have it work with multiple emacs sessions. I use emacs daemon and have a couple sessions going at once (per project). When I switch sessions I have to kill the current neotree buffer and start a new one with this function:
(defun neotree-project-dir-toggle ()
"Open NeoTree using the project root, using find-file-in-project,
or the current buffer directory."
(interactive)
(let ((project-dir
(ignore-errors
(projectile-project-root)
))
(file-name (buffer-file-name))
(neo-smart-open t))
(if (and (fboundp 'neo-global--window-exists-p)
(neo-global--window-exists-p))
(neotree-hide)
(progn
(neotree-show)
(if project-dir
(neotree-dir project-dir))
(if file-name
(neotree-find file-name))))))
Would be awesome if I could just switch projects and have neotree buffers stick for each project. Thanks for your help!