File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -638,11 +638,20 @@ or file path may exist now."
638
638
639
639
(use-package comint
640
640
:hook (comint-mode . minemacs-reduced-font-size)
641
+ :commands (+comint-clear-buffer)
642
+ :bind (:map comint-mode-map (" C-l" . +comint-clear-buffer))
641
643
:custom
642
644
(comint-scroll-to-bottom-on-input 'this ) ; Move to bottom on input in the current window
643
645
(comint-scroll-to-bottom-on-output 'this ) ; Move to bottom on output in the current window
644
646
(comint-buffer-maximum-size (* 64 1024 )) ; Increase the maximum buffer size (def. 1024)
645
- (comint-input-ring-size 5000 )) ; Increase the size of the input history ring (def. 500)
647
+ (comint-input-ring-size 5000 ) ; Increase the size of the input history ring (def. 500)
648
+ :config
649
+ (defun +comint-clear-buffer ()
650
+ " Clears the current comint buffer, removing all its content."
651
+ (interactive )
652
+ (when (derived-mode-p 'comint-mode )
653
+ (let ((comint-buffer-maximum-size 0 ))
654
+ (comint-truncate-buffer )))))
646
655
647
656
(use-package compile
648
657
:hook (compilation-filter . ansi-color-compilation-filter) ; Enable ANSI colors in compilation buffer
You can’t perform that action at this time.
0 commit comments