3Blue1Brown

(defun 3b1b ()

    (interactive)

    (setq is-python-mode (string= major-mode "python-mode"))

    (if (not is-python-mode)
        (print "This is not a python file.")


        (print buffer-file-name)

        (setq the-command (format "%s %s %s" 
                                "manim -p"
                                buffer-file-name  
                                "JustAShape")) 

        (print the-command)                        

        (shell-command the-command) 
    )  
)

(global-set-key (kbd "C-p") '3b1b)

(global-set-key (kbd "C-/") 'comment-region)

(global-set-key (kbd "C-.") 'uncomment-region)

— Me@2022-06-05 04:00:37 PM

.

.

2022.06.05 Sunday (c) All rights reserved by ACHK