Emacs组织模式:关闭行号 [英] Emacs Org-Mode: Turn off line numbers

查看:81
本文介绍了Emacs组织模式:关闭行号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我从 vim 移动到 Emacs ,因为我想使用 org -mode 。我在 Emacs23 Org-mode 中打开了一条〜10000行,50kb文件,并继续添加约10个第一级标题。在Ubuntu 10.04 / 32bit的Emacs23中,具有3GB RAM的四核处理器的性能非常慢,无法使用。我发现两个 线程组织模式电子邮件列表中讨论此。似乎启用 linum 导致性能下降。如果我必须,我可以在 .org 文件中没有行号,但是我不想为所有编辑的文件禁用行号。如果我要在Emacs中活着,我会想要所有其他文件的行号。

I've recently moved from vim to Emacs because I want to use org-mode. I opened a ~10000 line, 50kb file in Emacs23 Org-mode and proceeded to add about 10 first-level headings. Performance on a quad-core with 3GB RAM in Emacs23 under Ubuntu 10.04/32bit was so slow that it was unusable. I found two threads on the Org-mode email list discussing this. It seems that enabling linum causes the slow performance. I can live without line numbers in .org files if I have to, but I don't want to disable line numbers for all files I edit. If I'm going to "live" in `Emacs', I'll want line numbers for all other files.

如何为某些或所有 .org linum c>文件?如果我有几个文件在 Emacs 中打开并在它们之间切换,可以这样做吗?我发现关于禁用主要模式的行号的一些讨论 here ,但没有什么我可以实现(尽管 linum-off.el 脚本提到的在页面上看起来很有希望,我不知道(E)Lisp,所以我不能像我所需要的那样改变)。

How can I disable linum for some or all .org files only? Is it possible to do this if I have several files open in Emacs and switch between them? I found some discussion about disabling line numbers for major modes here, but there was nothing that I could implement (although the linum-off.el script mentioned on the page looks promising, I don't (yet) know (E)Lisp, so I can't change it as I would need).

我从版本6.21b更新了 Org-mode ,附带 Emacs23 到版本7.5,但它没有区别。在 Emacs 中的性能如此糟糕,以至于应用程序根本无法响应。

I updated Org-mode from version 6.21b which came with Emacs23 to version 7.5, but it made no difference. Performance in Emacs GUI is so bad that the application fails to respond at all. Performance with -nw is "better", but still unusable.

推荐答案

在我的quesiton中提到的 linum-off.el 已经解决了这个问题。说明在文件中:将文件放入Emacs加载路径,并将(require'linum-off)添加到〜/ .emacs。此脚本关闭仅指定模式的行号。我已经测试了,它工作正常。

linum-off.el mentioned in my quesiton has solved this. Instructions are in the file: place the file into the Emacs load-path and add (require 'linum-off) to ~/.emacs. This script turns off line numbering for the modes specified only. I've tested it and it works fine.

这篇关于Emacs组织模式:关闭行号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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