jaypei / emacs-neotree Goto Github PK
View Code? Open in Web Editor NEWA emacs tree plugin like NerdTree for Vim.
License: GNU General Public License v3.0
A emacs tree plugin like NerdTree for Vim.
License: GNU General Public License v3.0
I think some small functions would make Neotree more convenient for using:
find-file
at the node. That is, find-file
with the var default-directory
set to current node, which let user be able to open the directory node with dired-mode
directly, or open a new file under the directory node. (I have to say C-c C-n
is too inconvenient and against instinct. How about bind +
to mkdir
with the current node's path set as default-directory
?)#*#
, *~
)I would like to suggest a "Peep-mode" or some such thing similar to Sublime Text where you can get an instant preview of the file just by scrolling. See peep-dired
for one such implementation. (N.B. for peep-dired the temporary buffers continue to hang around rather than being ephemeral like in Sublime Text.)
First of all - thank you for making this plugin for us! NerdTree was one of the things I missed when I switched from vim to emacs; I was really happy to see that you provided a similar useful plugin.
It's got everything I loved about NerdTree, except... no bookmarks. In Nerdtree, you could call :Bookmark on any node to have it added to a bookmark list, that you could call with Shift-B. This allows you to quickly jump to commonly used folders. It would be lovely to see something similar in Neotree!
I get this when trying to toggle neo-tree
Debugger entered--Lisp error: (wrong-type-argument window-live-p nil)
#<subr select-window>(nil nil)
funcall(#<subr select-window> nil nil)
(with-no-warnings (funcall ad--addoit-function window norecord))
(setq ad-return-value (with-no-warnings (funcall ad--addoit-function window norecord)))
(let (ad-return-value) (setq ad-return-value (with-no-warnings (funcall ad--addoit-function window norecord))) (powerline-set-selected-window) ad-return-value)
ad-Advice-select-window(#<subr select-window> nil)
apply(ad-Advice-select-window #<subr select-window> nil)
select-window(nil)
(let ((window nil) (buffer (neo-global--get-buffer))) (select-window (neo-global--get-first-window)) (split-window-horizontally) (setq window (selected-window)) (neo-window--init window buffer) (setq neo-global--window window) (select-window (window-right (get-buffer-window))) window)
neo-global--create-window()
(setq neo-global--window (neo-global--create-window))
(progn (setq neo-global--window (neo-global--create-window)))
(if (and (null neo-global--window) auto-create-p) (progn (setq neo-global--window (neo-global--create-window))))
neo-global--get-window(t)
(progn (neo-global--get-window t) (let ((wconfig (current-window-configuration))) (unwind-protect (progn (let ((rlt nil)) (switch-to-buffer (neo-global--get-buffer)) (setq buffer-read-only nil) (setq rlt (progn (let ... ... ...) (neo-buffer--save-cursor-pos path nil) (neo-buffer--refresh nil))) (setq buffer-read-only t) rlt)) (set-window-configuration wconfig))))
(if (and (file-exists-p path) (file-directory-p path)) (progn (neo-global--get-window t) (let ((wconfig (current-window-configuration))) (unwind-protect (progn (let ((rlt nil)) (switch-to-buffer (neo-global--get-buffer)) (setq buffer-read-only nil) (setq rlt (progn ... ... ...)) (setq buffer-read-only t) rlt)) (set-window-configuration wconfig)))))
neotree-dir("/Users/cezar/Sites/project/")
(if (not valid-start-node-p) (neotree-dir (neo-path--get-working-dir)) (neo-global--get-window t))
(let ((valid-start-node-p nil)) (let ((wconfig (current-window-configuration))) (unwind-protect (progn (let ((rlt nil)) (switch-to-buffer (neo-global--get-buffer)) (setq buffer-read-only nil) (setq rlt (progn (setq valid-start-node-p ...))) (setq buffer-read-only t) rlt)) (set-window-configuration wconfig))) (if (not valid-start-node-p) (neotree-dir (neo-path--get-working-dir)) (neo-global--get-window t)))
neotree-show()
(if (neo-global--window-exists-p) (neotree-hide) (neotree-show))
neotree-toggle()
call-interactively(neotree-toggle nil nil)
command-execute(neotree-toggle)
File names are white even when using light theme!!
So, it's hidden.
https://github.com/bmag/emacs-purpose
When I press F8 the layout goes crazy, left most window splits and neotree shows up in a random window.
I like the font in the screenshot:
Could you tell me which font you use? I looked into your Emacs configuration, but the lines:
(setq cn-name (if *is-a-mac* "STHeiti" "STHeiti"))
(setq en-name (if *is-a-mac* "Inconsolata" "Ubuntu Mono"))
Don't correspond with the font used in the screenshot.
Thanks in advance for your reply.
I really like to this to go to the next level Visually:
How about trying to make it like the sidebar of textmate; where the list of the file have their own
font-size and the font is small because it helps make the file names less trimmed.
What you guys think ?
I have to set neo-persist-show
to nil
to disable (defadvice delete-other-windows ..
.
I have ido and popwin enabled.
With that configuration, when I hit TAB in the minibuffer, ido-complete
is called, which in turn calls ido-completion-help
if there are multiple completion items to be shown.
That triggers popwin, which calls delete-other-windows
and there, if the defadvice set in this package is active (if neo-persist-show
is t
), then I get the elisp error "Attempt to delete minibuffer or sole ordinary window"
.
Can you please fix the defadvice so that it doesn't try to delete the minibuffer window?
neo-dont-be-alone seems to have several issues.
For example, the neotree-toggle command won't work when the var is set to t. This seems to also affect other commands such as neotree-hide.
ChangeLog:
m
in NerdTree;Hi,
I have been using dirtree
for quite some time, but after seeing neotree
I had to change. neotree
is WAAAAAAAY better.
I have made a function to open the tree widget right at the project root given by the find-file-in-project
package. What about adding this feature to neotree
?
It would be nice to be able to filter-out files by filename.
Something like defined here: https://github.com/jaypei/emacs-neotree/blob/dev/neotree.el#L45 but not a constant. (I don't know that much of emacs/elisp -- that might be overridable somehow in .emacs, right?)
Both neotree-show
and neotree-toggle
open Neotree, but leave the point focused on the current window, rather than moving the point to the Neotree buffer.
Expected behavior would be to focus the point in the newly-opened Neotree buffer. See: Calc
, Calendar,
Info,
Speedbar` and others for examples.
Sometime, I don't like to see the full Path in NeoTree!!
Just the Project Direcory name is enough. And if I wanna see the full path I just do:
:!pwd
Most of the time we can't see the full path anyway, unless we make the NeoTree split very wide.
Briefly: it's nice to give me enough info within as less space as possible, right?
Hi! I just installed this plugin today, but when issuing the neotree-toggle command, I get an error, as shown in the title.
Is this a problem on my end or a bug in the project?
This is a feature request rather than a bug. It would be nice if we could customize neotree to hide certain file extensions, such as .class for java or .pyc for python, etc. It gets cluttered when there are unwanted files.
Update: Just realized neotree hides pyc files automatically. Should of checked that first :p
Can we do this in Neotree? I think It's the default behavior in NerdTree.vim, have a option to toggle this feature should be great.
Hi Zhen Pei,
Thanks for building this project! Neotree looks like it has a lot of potential!
I'd like to request that a feature similar to :NerdTreeFind be built into Neotree--find the current file in the sidebar.
In the Vim world, it's one of the differentiators that helps it to stand out. http://www.reddit.com/r/vim/comments/22ztqp/why_does_nerdtree_exist_whats_wrong_with_netrw/cgs2hxv
Thanks!
Jonathan Lai
It'd be nice to see neotree installation via package.el
,
For example, the MELPA recipe would simply be:
(emacs-neotree
:fetcher github
:repo "jaypei/emacs-neotree")
Note that MELPA will propagate the master
branch, so depending on your release strategy, you could either use alternative branches for your bleeding edge releases, or specify the :branch
parameter in the recipe, ie.
(emacs-neotree
:fetcher github
:repo "jaypei/emacs-neotree"
:branch "stable")
(assuming a stable release is on origin/stable
)
You can fork MELPA and add your package recipe, via a pull request.
If you have more windows A, B, C in the same frame and you open neotree from within a certain window A and then select a file and open it, the file will not necessarily be opened in the original window A but might be opened in window B or C. It would be nice if the file was opened in the last focused window just like NERDTree for vim does.
When on a file line, it would be nicer to be able to press Enter any where on the line not only on the filename.
It would be great if there where a blacklist of extensions (configured per customize) which will not be visible in the tree. Files I am thinking of:
In the latest version on Melpa (neotree-20150322.518
), clicking on directories in neotree does not expand/contract them, but produces the error Buffer is read-only: #<buffer *NeoTree*>
.
(Expanding directories via on the keyboard still works as usual.)
You should disable line numbers by default
Hi,
if i open neotree from some buffer for the first time, it shows the directory that fits to the buffer. Fine.
If i now switch to another buffer for a file in some other dir and get neotree up again, it shows the old directory instead of updating.
Killing the neotree buffer instead of "toggling" it helps, then it ends in the right place.
But it would be nice if it (probably customizable) could just always refresh the dir on toggle.
Thanks,
Joerg
Toggle for hidden files:
.* files
like C-i
would be nice!
For some reason the neotree window always appears on the right, any idea why that might be happening.
Idiomatic use of 'q' usually buries the buffer (see Calendar
, Info
and Calc
for examples). In Neotree, it is bound to quit-window
, which has the side-effect of not actually calling delete-window
, which is expected.
Toggle would be nice!
shortcut like:
C-n or C-u
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.
Probably it's already been implemented and i don't know of it, but i'd like to see the behaviour like github has, i.e when i have structure a/b/c/d/file
, and there are no other folders/files in a
,b
,c
, neotree would automatically open these folders. I've tried to modify neotree-enter
function, but couldn't get it working.
I'm hooking neotree like this:
(add-hook 'go-mode-hook 'neotree)
(add-hook 'php-mode-hook 'neotree)
But when neotree appears for first time emacs forgets to switch to the opened file buffer, I have to switch to it manually or select it again from neotree.
I'm doing something wrong?
I tend to use neotree for most of my file navigation purposes now. It would be good if I were able to move files (and folders) from within neotree.
Typically, I reserve the left side of buffers for text editing, and place less important things on the right hand side. Is there a way to tell neotree to open on the right instead of the left? Could not find any customization options to accomplish this.
If i have opened only the scratch buffer and the NeoTree window on the left and open a file from it, the "right" window with the scratch buffer is not reused. Instead the window is split horizontally and the file is opened at the bottom. Is there a way to use the last active window to open the new file? In my case replace the scratch window with the file i opened from the NeoTree window?
Is there a method to visualize Java packages like this:
|-- org.something.controller
| |-- source.java
| |-- anotherSource.java
not like:
|-- org
| |-- something
| | |-- controller
| | | |-- source.java
| | | |-- anotherSource.java
?
If the user resizes the neotree window, the root node will not updated acording to the length.
When you close the only one window other than the neotree window, neotree cannot open new file.
NerdTree has a handy feature to rename/move folders and files. I used this feature extremely often, so I think this is a missing key feature. neotree already can create and delete files and folders, so renaming/moving (technically the same feature) should be implemented.
It would be great if neotree
could (optionally) tie in to vc
. See this Emacs.SE question.
If neotree window is too narrow to see a long filename, mouse hovering tip should come into help.
When I delete a file using Neotree
I would like it to kill this file's buffer, just like Dired
does.
Hi,
and it would be nice to have ".." bound to a keybinding in neotree, that is, pressing (say) ^ goes up a dir. Without the user having to scroll to and "selecting" the .. entry.
Thanks,
Joerg
This is a weird bug and may happen because of something else on my config (don't see why it would, but then again I don't see how neotree does this).
After opening say helm-mini, trying to open helm help (with "C-c ?") gives the following error : Attempt to delete minibuffer or sole ordinary windows
I have these two lines on my config (and when I comment them the bug goes away) :
(add-to-list 'load-path (concat user-emacs-directory "/vendor/neotree"))
(require 'neotree)
Neotree and popwin don't seem to get along. If neotree is open and successively a temporary buffer is opened with popwin, a new window with the neotree buffer is displayed side by side next to the first one. Ideally only one neotree window should be displayed no matter how many buffers are opened with popwin.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.