2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

el-getでインストールしたneotreeでneo-window-fixed-sizeを使えるようにする

Posted at

neotreeのwindow-sizeがC-x }などで変えられない件

paizaの記事を読んで、emacsのneotreeが便利なことを知りました。そこで早速el-getを使いインストールします。

el-getはインストールされている前提で、僕が使っていたneotreeの設定部分は以下のとおりです。

;; neotree - ディレクトリ構造を表示できるやつ
(el-get-bundle neotree)
;; F8でnetreee-windowが開くようにする
(global-set-key [f8] 'neotree-toggle)
;; neotreeでファイルを新規作成した場合のそのファイルを開く
(setq neo-create-file-auto-open t)
;; delete-other-window で neotree ウィンドウを消さない
(setq neo-persist-show t)

さて、早速F8でneotreeを開くわけですが、ディレクトリ階層が深くなるとウィンドウが狭くなってくるわけで、windowを広げたり狭めたりしたいという需要が湧いてきます。そこで C-x } なんかを押すと

Selected window has fixed size

と言われてしまいます。neotreeのwindowのサイズが固定されていて変更できません。

neo-window-fixed-size オプション

そこで調べてみると、こんなものが出てきました。

ディレクトリ構造が深くなると幅が欲しくなるので、resizeできるようにして欲しいというissueです。コレに対して、以下の変更がありました。

これにより、 (setq eo-window-fixed-size nil) すればwindow-sizeを変更できるように思います。

が、設定しても変更できませんでした。何故か。

neo-window-fixed-size オプションは emacs-neotree の master に入っていない

このオプションはemacs-neotreeのdevelopブランチには入っているのですが、masterには入っていませんでした。

さらに、el-getのneotreeが何処を指しているかというとmasterでした

el-getを変更してdevelopを向くようにして無理やり動かす

仕方ないので、emacs-neotree の develop を見るようにして無理やり動かします。

$ emacs el-get/recipes/neotree.rcp

$ git diff
diff --git a/recipes/neotree.rcp b/recipes/neotree.rcp
index f61aca8..64746f8 100644
--- a/recipes/neotree.rcp
+++ b/recipes/neotree.rcp
@@ -2,5 +2,5 @@
        :website "https://github.com/jaypei/emacs-neotree"
        :description "An Emacs tree plugin like NerdTree for Vim."
        :type github
-       :branch "master"
+       :branch "develop"
        :pkgname "jaypei/emacs-neotree")

installしなおす

$ rm -rf elisp/neotree

emacsを起動してel-getが走る。

neo-window-fixed-size オプションを無効化する

;; C-x }, C-x { でwindowサイズを変更できるよにする
(setq neo-window-fixed-size nil)

ウィンドウサイズを変更できるようになる。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?