我试过了linum
and nlinum
。两者对于超过 100k 行的文件的性能都很糟糕。
$ for x in {1.100000}; do echo $x; done > 100k.txt
$ emacs -q 100k.txt
M-x load-library linum
M-x linum-mode
M-> ;; it's not too bad to go to end of file
M-< ;; now this completely locks up emacs
与编辑器的操作相同joe
是瞬时的。
除了关闭大文件的行号(正是您想要使用行号导航的文件类型 - 我想在串联的 Javascript 文件中查找错误行)之外,还有其他解决方案吗?
或者只是使用不同的编辑器?
我认为您发现了一个错误,您可以报告(report-emacs-bug)它。根据泰勒的评论,它可能已经解决了。
同时可能对您有帮助的事情......line-number-mode
, goto-line
, narrow-to-region
以及这个廉价的-tmp-buffer中的数字我的行技巧:
(shell-command-on-region (point-min) (point-max)
(concat "grep -n ^ " buffer-file-name)
(get-buffer-create "*tmp-linum*") nil t)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)