4

I usually have my emacs frame something like this:

|             |             |
| <window 1>  | <window 2>  |
|             |             |

When I open neotree, it then looks like this (N representing the neotree window):

|   |             |         |
| N |     W1      |   W2    |
|   |             |         |

Then, when I close neotree, the windows look like this:

|                 |         |
|         W1      |   W2    |
|                 |         |

This is aesthetically displeasing and brings window 2's width below 80 characters, so code lines wrap.

Is there a way I can make neotree-toggle reset the window sizes to their values in the first diagram?

  • 1
    Does this happen with -Q and only neotree loaded? I am not able to reproduce this. – Jordon Biondo Jan 22 '16 at 15:09
0

Very strange. I don't have this problem. Here my conf:

(autoload 'neotree "neotree" "" t) 
(setq neo-window-width 50) 
(setq neo-persist-show nil)

I use emacs 25 with the latest neotree.el

0

Here's the workaround that I use:

  • set a hotkey for neotree-toggle: (global-set-key (kbd "M-n") 'neotree-toggle)
  • open 2 or 3 windows side by side: C-x 3
  • make them the same size: C-x +
  • open neotree: M-n

Additionally, I started using winner-mode, mainly for maximizing windows: C-x 1, then revert to previous window configuration C-c <left>.

Emacs version: GNU Emacs 24.5.1 (x86_64-apple-darwin15.0.0) of 2015-09-13 on elcapitanvm.local, config file: emacs.el

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.