Add 2 ways to take code screenshots (maybe unnesearry, but why not).

This commit is contained in:
kj 2022-07-12 16:36:51 -04:00
parent a27d677716
commit 9ee088a832
3 changed files with 17 additions and 0 deletions

1
.gitignore vendored
View File

@ -19,3 +19,4 @@ var/
eclipse.jdt.ls/
workspace/
/.extension/
/diary

View File

@ -270,6 +270,10 @@
(setq mouse-wheel-progressive-speed nil) ; Deshabilita la velocidad progresiva del scroll (mientras más scroll haces, mas rápido va)
)
(use-package silicon
:ensure t
:straight (silicon :type git :host github :repo "iensu/silicon-el"))
(use-package tree-sitter
:defer t
:straight t

View File

@ -7,6 +7,18 @@
;;; Code:
;; Crear captura SVG del frame atual. Fuente: https://www.reddit.com/r/emacs/comments/idz35e/emacs_27_can_take_svg_screenshots_of_itself/
(defun screenshot-svg ()
"Save a screenshot of the current frame as an SVG image.
Saves to a temp file and puts the filename in the kill ring."
(interactive)
(let* ((filename (make-temp-file "Emacs" nil ".svg"))
(data (x-export-frames nil 'svg)))
(with-temp-file filename
(insert data))
(kill-new filename)
(message filename)))
;; Comentar línea o región
(defun comment-or-uncomment-region-or-line ()
"Comments or uncomments the region or the current line if there's no active region."