简体   繁体   中英

Emacs ansi-term maximum buffer size?

I like running shell programs using Emacs ansi-term mode, but I wonder how to set the maximum buffer size in ansi-term mode so I won't lose command history even when there are lot of lines? (Google doesn't seem to give a obvious answer.)

The variable term-buffer-maximum-size controls this value. Setting it to 0 should buffer everything (haven't used it but that is what the doc says). I'd be tempted to use a large value instead so a runaway program doesn't cause serious issues. It defaults to 2048 lines.

(setq term-buffer-maximum-size 0) 

in your term-mode-hook function should do it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM