How can you make long words (here: file names) break e.g. at hyphens?

I'm looking for a way to make my neotree directory listing not break after the icon. I'm fine with both not breaking but truncating file names, and breaking at hyphens or anywhere else in between. Would be nice if the first character of each file name would align on the same column.

I tried variable-width mode to make more horizontal space, but it's still too crammed :)

screenshot of non-breaking lines

Currently active minor modes in that buffer:

Enabled minor modes: Auto-Composition Auto-Compression
Auto-Dim-Other-Buffers Auto-Encryption Beginend-Global Blink-Cursor
Buffer-Face Column-Number Delete-Selection Emojify File-Name-Shadow
Global-Edit-Server-Edit Global-Eldoc Global-Emojify Global-Font-Lock
Global-Visual-Line Ivy Line-Number Menu-Bar Mouse-Wheel
Override-Global Projectile Recentf Shell-Dirtrack Show-Paren
Text-Scale Tooltip Transient-Mark Visual-Line

(I tried disabling visual-line-mode, didn't help.)

  • 1
    The problem you describe and the screen-shot depicted are not the default behavior and appearance when installing neotree from MELPA. Specifically, the default behavior is to truncate long-lines and the icons are rather basic looking. Please provide a step-by-step recipe to reproduce the problem. If the fancy icons are not necessary to reproduce the problem, then you may wish to eliminate installing those when creating a minimal working example. You may also wish to verify whether you are using regular hyphens in the filename, or some special character that just looks like a hyphen. – lawlist Sep 7 '20 at 3:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.