如何清除目录窗口并在Emacs ECB中添加一个cscope窗口? [英] How to remove directory window and add a cscope window in Emacs ECB?

查看:141
本文介绍了如何清除目录窗口并在Emacs ECB中添加一个cscope窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

昨天我在我的Emacs上安装了ECB,我发现方法窗口和历史窗口很有用。但目录树窗口和源窗口不太有用,如果我可以隐藏它们,我将为方法窗口和历史节省更多的空间。另一个问题是我使用cscope在项目中搜索定义和调用者,通过将主窗口分割为两个窗口来显示cscope的结果。我想知道是否可以在ECB窗口中修改cscope结果窗口,就像方法窗口和历史窗口一样?



非常感谢。



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



感谢sanityinc和ecb文件,最后我创建一个布局与cscope固定在其中。我会在这里发布代码,以防它会帮助别人。

 (require'ecb)

(ecb-layout-define 0.5)
(其他窗口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-namemy-cscope-layout)

;;禁用桶,以便历史缓冲区可以显示更多条目
(setq ecb-history-make-buckets'从不)


解决方案

有一堆布局预设,列在这里,其中一个可能为你工作。此外,您可以按照以下说明创建自定义布局: here < a>,甚至可以使用ecb-create-new-layout命令交互地完成。



后一页还描述了如何添加一个新的固定窗口输入您想要的cscope。


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)

解决方案

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.

这篇关于如何清除目录窗口并在Emacs ECB中添加一个cscope窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆