We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The key point is to turn off inefficient linum-mode when file is too big.
linum-mode
Set up Emacs to turn off syntax highlight and linum-mode by adding below code into ~/.emacs:
~/.emacs
(defun buffer-too-big-p () (or (> (buffer-size) (* 5000 64)) (> (line-number-at-pos (point-max)) 5000))) (defun generic-setup () ;; turn off `linum-mode' when there are more than 5000 lines (if (buffer-too-big-p) (linum-mode -1))) (add-hook 'prog-mode-hook 'generic-setup) (add-hook 'text-mode-hook 'generic-setup)
My complete Emacs setup is at https://github.com/redguardtoo/emacs.d
Linux cli to create huge 3g.txt: base64 /dev/urandom | head -c 3000000000 > 3g.txt
3g.txt
base64 /dev/urandom | head -c 3000000000 > 3g.txt
Then run emacs -nw 3g.txt, here is the screenshot. I can edit this file without any problem.
emacs -nw 3g.txt
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The key point is to turn off inefficient
linum-mode
when file is too big.Set up Emacs to turn off syntax highlight and
linum-mode
by adding below code into~/.emacs
:My complete Emacs setup is at https://github.com/redguardtoo/emacs.d
Linux cli to create huge
3g.txt
:base64 /dev/urandom | head -c 3000000000 > 3g.txt
Then run
emacs -nw 3g.txt
, here is the screenshot. I can edit this file without any problem.The text was updated successfully, but these errors were encountered: