-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Neotree improvements or replacement #29
Comments
This evening I added some stuff to my contrib module that allows hiding all the cruft in dired and also expanding sub-directories inline, but I'm not very happy with it. It's better than standard dired but not good enough to be a sidebar. I'm somewhat unsatisfied with all the emacs file trees, as well as with my console file browser (https://github.com/trishume/MacRanger), and I don't like my GUI file browser either. So I might end up using emacs as a platform for writing my own file browser that is good enough to function as a sidebar, as well as a primary file manager when put in its own frame. Or I might just end up modifying something like direx or speedbar to suit my wishes. |
OMG I'm a heavy user of What kind of features do you expect in a good sidebar ? |
Holy shit you use ranger as well? Wow you use all the coolest/my favourite things: emacs+vim, ranger, ledger, fish, i3, osx, Github ... Anyways I did some investigating last night and I'm pretty sure the problems I'm having with ranger are probably due to some kind of performance bug in the rendering code of iTerm2. I think I'm gonna try to fix that rather than write a new one, and then I'll write a plugin for ranger that keeps one of its tabs synced up with emacs. Currently my OSX fork is really hard to set up, you need some extra files to get it to work nice (a patched font and a prefs file for the custom iTerm2 fork), I'm going to try packaging those in an app build, but if you don't want to wait I can just email them to you. |
I'm looking for your project and will try it when the setup is less complicated. |
Progress on ranger integration:
With this I can add a mode to my window manager that puts ranger in a skinny window next to emacs and it will sync up with what I'm doing. Functioning as a sidebar with the awesomely good file manager powers of Ranger. Currently everything is in my MacRanger forks but I plan on factoring out the bug fixes into pull requests and the control server and responsiveness into plugins that work with any ranger install. This doesn't fix the problem that basic emacs doesn't have a good sidebar. But if people don't like neotree they can just install my ranger-control plugin and then enable my ranger-control contrib module (PR coming soon). |
@trishume This looks very promising. If iTerm is not required then maybe it is possible to have the ranger process in a term ? By the way, did you mean |
Oh I see, a ranger tab inside the current projectile project directory. Very clever :-) |
Yah currently the synchronization is single direction. When you execute the shortcut I tried to get the projectile project found hooks to work so that it would automatically change to a project when you opened but I couldn't, although I didn't try for very long. There is nothing iTerm specific about the control and responsive stuff at least, so if the emacs terminal emulator is good enough to run ranger that could work. Popwin with a responsive single column synced ranger window could be cool. I'm just going to have a window manager shortcut to put a skinny MacRanger window next to my emacs though, so that I get the fancy MacRanger features like icons. But an emacs window would require much less configuration for others who wanted to use my stuff. |
You all ever try to go the route of Tpope's vim package |
I actually use dired at bit like vinigar.
|
@Wolfy87 |
Sorry, I meant I tried to use markdown in an email response, it didn't work :) |
The recent questions [1] from @tuhdo on Emacs exchange about dired and his comments on /r/emacs show that it is a pretty solid solution. Maybe we should give it a try. |
Since this is emailed to me, I have a alternative suggestion for file navigation in replacement of a file browser: How about we browse file by searching files. This can be achieved with Projectile and/or Helm:
You can create a virtual directory that groups files in different physical directories together to form a logical unit. DEMO.
Personally, I think Dired is really nice already. With |
Thank you very much @tuhdo for taking time to reply and link your demos. This is a lot of info so I need some time to study them and testing them in my workflow. |
I certainly agree with @tuhdo that search based interfaces can be exceptionally powerful, and he has some cool ideas that could certainly be added to spacemacs' file finding functionality. However, I also like having a normal browser around. I use search when I'm working with a codebase I know and a file tree when I'm working with a new codebase. I looked into getting Ranger to run within emacs, but eshell isn't good enough to run curses so ranger crashes. So I'm going to solve my personal problem with MacRanger+window management+ranger-control but that's probably a no-go for most spacemacs users so it would probably be good to include some better dired fanciness by default. |
I would love to get Ranger working within emacs, but I curses support on Windows is abysmal. @Wolfy87 In terms of emulating
That way, I only press |
@Ralesi Would be cool to add |
How about Speedbar also gives Semantic content of each file (such as include/import and variable/function definitions), and you can click on those semantic nodes. With all these features, I think it's much better than NeoTree. EDIT: If the current buffer is in a subdirectory of the directory EDIT2: By default, speedbar won't show all files, but only source code files. To show all files: (setq speedbar-show-unknown-files t) EDIT3: You can always toggle the speedbar if you like, with |
@tuhdo Interesting that you mentioned it since I had a hard time to make it work with.... |
I use it fine with Helm out of the box. I'm curious, why do you want Helm always appear at the bottom? Isn't that's a waste of screen estate? Even so, what's the specific problem when you make Helm that way? |
I think I misunderstood what you said earlier. I thought that you said Helm buffer is always visible, and that it conflicts with ;; open helm buffer inside current window, not occupy whole other window
(setq helm-split-window-in-side-p t) |
The speedbar is duplicated whenever |
@tuhdo |
Reverse this: (setq helm-split-window-in-side-p nil
helm-always-two-windows t) To: (setq helm-split-window-in-side-p t
helm-always-two-windows nil) |
I cannot succeed in reproducing the duplication, but with both configurations the |
@tuhdo Other alternative which may be better is to have |
@syl20bnr I also use What's your |
I've just tried (setq helm-split-window-in-side-p t
helm-always-two-windows nil) There's no problem at all. I don't see the symptom you described, and Btw, nice distribution. There's some suggestions:
(setq golden-ratio-exclude-modes '("ediff-mode"
"gud-mode"
"gdb-locals-mode"
"gdb-registers-mode"
"gdb-breakpoints-mode"
"gdb-threads-mode"
"gdb-frames-mode"
"gdb-inferior-io-mode"
"gud-mode"
"gdb-inferior-io-mode"
"gdb-disassembly-mode"
"gdb-memory-mode"
"magit-log-mode"
"magit-reflog-mode"
"magit-status-mode"
"IELM"
"eshell-mode"
"dired-mode"
"pdf-outline-buffer-mode"
"speedbar-mode")) EDIT: You could replace (require 'highlight-symbol)
(highlight-symbol-nav-mode)
(add-hook 'prog-mode-hook (lambda () (highlight-symbol-mode)))
(add-hook 'org-mode-hook (lambda () (highlight-symbol-mode)))
(setq highlight-symbol-idle-delay 1
highlight-symbol-on-navigation-p t)
(global-set-key (kbd "M-n") 'highlight-symbol-next)
(global-set-key (kbd "M-p") 'highlight-symbol-prev) You can also customize |
@tuhdo One thing I like about |
This
Thank you @tuhdo for the list of exclude modes for @danielwuz +1 |
@danielwuz But @syl20bnr hmm why do you always need two windows? I think helm buffer for only active window look less confusing and less intrusive? I tried my suggested configuration and it has no problem with |
@tuhdo to highlight any symbol persistently we can just use incremental search with |
@syl20bnr I see. If that is the case, it's better |
Seems that a sidebar is not an important component of spacemacs. I close this discussion. |
Discussion started with issue #28.
we have 2 possibilities:
I lack knowledge for sidebar things since I don't use them (I use ido and helm projectile) so any proposal is welcome.
The text was updated successfully, but these errors were encountered: