HI!
I’ve been using emacs and played around with configuration and finally found a good and very useful setup using LMTX installation.
Also I’ve customized with help from YAsnippet my own snippets så it goes very fast.
Below I have a setup on my macos that uses
- ConTeXt LMTX
- emacs-lisp setting in ~/.emacs.d/init.el
- customized setting for preview with Skim pdf reader
- YASnippet snippets on my dropbox cloudstoring so I can use it on several computers and has a macro syntax easy to learn.
- Bind-keys for fast build and preview on two pane "side by side editor and previewer" in "TeXshop style”.
C-å Build document and C-c C-v for fast preview in Skim
Something to start playing with below to put in your init.el file
;; This is for getting preferred position and size of the emacs editor frame
(add-to-list 'default-frame-alist '(top . 25))
(add-to-list 'default-frame-alist '(left . 1))
(add-to-list 'default-frame-alist '(height . 56))
(add-to-list 'default-frame-alist '(width . 120))
;; For solving path issues install: do M-x package-install RET exec-path-from-shel RETl
(when (memq window-system '(mac ns x))
(exec-path-from-shell-initialize))
;; For configuring context
(add-to-list 'auto-mode-alist '("\\.tex\\'" . context-mode))
(eval-after-load 'tex '(add-to-list 'TeX-command-list
'("LuaMetaTeX"
"mtxrun --autogenerate --script context %t" TeX-run-command nil
(context-mode) :help "Run LuaMetaTeX")))
(defun myctx ()
"Saves the current buffer and runs ConTeXt, all with no prompts or further interaction."
(interactive)
(save-buffer)
(TeX-command "LuaMetaTeX" 'TeX-master-file -1))
;; (add-hook 'ConTeXt-mode-hook 'turn-on-smartparens-strict-mode)
(add-hook 'ConTeXt-mode-hook (lambda () (define-key ConTeXt-mode-map (kbd "C-å") 'myctx)))
(setq TeX-output-view-style '("^pdf$" "." "open -a Skim.app %o"))
(setq TeX-view-program-list
'(("Skim" "open -a Skim.app %o")
))
(add-hook 'ConTeXt-mode-hook (lambda () (setq TeX-view-program-selection '((output-pdf "Skim")))))
;; YASnippet config
(use-package yasnippet
:config
(setq yas-snippet-dirs '("~/Dropbox/filer/system/emacsgrejer/snippets"))
(yas-global-mode 1)
(setq yas/triggers-in-field t))
Hope this helps and gives some inspiration to get started if you choose emacs
/Jan-Erik
26 mars 2023 kl. 10:22 skrev Alexandre Christe via ntg-context <ntg-context@ntg.nl>:
Dear ConTeXt users,
I'm wondering what kind of typesetting system / syntax highlighting / completion you're using.
I've been using myself the simple_Context package for SublimeText which I scavenged a while ago before it was made unavailable (I wanted to attach but it's too big for the list). But it's sort of a dead-end.
Open to anything from vim/neovim to emacs or more exotic. Maybe it would be nice to show the config. (And yes I've seen the Wiki page
https://wiki.contextgarden.net/Text_Editors but I've the feeling some content is outdated.)
Thanks in advance,
Alex
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________