Add a compile function for scad-mode
This commit is contained in:
parent
4ba00793ef
commit
3def657e6a
@ -146,7 +146,13 @@
|
||||
(local-set-key (kbd "S-<tab>") 'markdown-promote)
|
||||
:mode "\\.md\\'")
|
||||
(use-package scad-mode
|
||||
:mode "\\.scad$")
|
||||
:mode "\\.scad$"
|
||||
:config
|
||||
(defun scad-compile (ext)
|
||||
"Compile current buffer using 'scad-command' and the extention 'ext'"
|
||||
(interactive (list (completing-read "Extension: " '("stl" "off" "amf" "dxf" "svg" "csg" "png"))))
|
||||
(compile (concat scad-command " -o " (file-name-sans-extension buffer-file-name) "." ext " " buffer-file-name)))
|
||||
(define-key scad-mode-map (kbd "C-c z") 'scad-compile))
|
||||
(use-package smart-tabs-mode
|
||||
:config
|
||||
(smart-tabs-insinuate 'c 'c++ 'javascript))
|
||||
|
Loading…
Reference in New Issue
Block a user