Skip to content
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

Shorten long file name #224

Open
PaulPichaureau opened this issue Feb 9, 2017 · 2 comments
Open

Shorten long file name #224

PaulPichaureau opened this issue Feb 9, 2017 · 2 comments

Comments

@PaulPichaureau
Copy link

Hi,

I've just tested neotree. It's a very promising package, good work!

But I've find an annoying behavior: when files have long names, the display is quite clumsy and hard to read.

neotree long file name

In my opinion, long name should be shortened. For example:

verylongnameofafile.pdf

should be displayed

verylo(....).pdf

What do you think?

@dajnz
Copy link

dajnz commented Apr 23, 2017

I have the same issue.

Neotree looks great, thank you guys!
I would like to continue use it, so maybe you can advice some way to
shorten long file names, or truncate them.

I have tried to truncate lines using neotree-mode-hook, but this wasn't work for me unfortunately.

my code:

(add-hook 'neotree-mode-hook (lambda () (progn
    (setq truncate-lines t)
    (setq word-wrap nil))))

@lukertty
Copy link

Try this

(add-hook 'neo-after-create-hook
   #'(lambda (_)
       (with-current-buffer (get-buffer neo-buffer-name)
         (setq truncate-lines t)
         (setq word-wrap nil)
         (make-local-variable 'auto-hscroll-mode)
         (setq auto-hscroll-mode nil))))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants