How to remove directory window and add a cscope window in Emacs ECB?

99封情书 提交于 2019-12-11 01:46:08

问题


Yesterday I installed ECB on my Emacs, and I find method window and history window quite useful. But directory tree window and source window less useful, if I can hide them I will save more space for method window and history.

Another problem is that I use cscope to search through the project for definitions and callers, the result of cscope is shown by splitting the main window into two. I'd like to know is it possible to make cscope result window fixed in ECB window, just like method window and history window?

Many thanks.

===============

Thanks to sanityinc and ecb documents, finally I create a layout with cscope fixed in it. I'll post code here in case it will help others.

(require 'ecb)

(ecb-layout-define "my-cscope-layout" left nil
                   (ecb-set-methods-buffer)
                   (ecb-split-ver 0.5 t)
                   (other-window 1)
                   (ecb-set-history-buffer)
                   (ecb-split-ver 0.25 t)
                   (other-window 1)
                   (ecb-set-cscope-buffer))

(defecb-window-dedicator ecb-set-cscope-buffer " *ECB cscope-buf*"
                         (switch-to-buffer "*cscope*"))

(setq ecb-layout-name "my-cscope-layout")

;; Disable buckets so that history buffer can display more entries
(setq ecb-history-make-buckets 'never)

回答1:


There are a bunch of layout presets, listed here, one of which might work for you. Also, you can create a custom layout following the directions here, which can even be done interactively using the ecb-create-new-layout command.

The latter page also describes how to add a new fixed window, of the type you want for cscope.



来源:https://stackoverflow.com/questions/2190062/how-to-remove-directory-window-and-add-a-cscope-window-in-emacs-ecb

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!