Bar*_*lly 6 emacs performance line-numbers
我已经尝试linum
过并且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
Run Code Online (Sandbox Code Playgroud)
与编辑器相同的操作joe
是瞬时的。
除了关闭大文件的行号(正是您想要使用行号导航的文件类型 - 我想在串联的 Javascript 文件中查找错误行)之外,还有其他解决方案吗?
或者只是使用不同的编辑器?
我认为您发现了一个错误,您可以报告(report-emacs-bug)它。根据泰勒的评论,它可能已经解决了。
同时可能对您有帮助的事情...... line-number-mode
,goto-line
以及narrow-to-region
这个廉价的-number-my-lines-in-a-tmp-buffer技巧:
(shell-command-on-region (point-min) (point-max)
(concat "grep -n ^ " buffer-file-name)
(get-buffer-create "*tmp-linum*") nil t)
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
2071 次 |
最近记录: |