[NTG-context] Text editors
skrantajanneman at gmail.com
Tue Mar 28 20:54:53 CEST 2023
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))
;; For configuring context
(add-to-list 'auto-mode-alist '("\\.tex\\'" . context-mode))
(eval-after-load 'tex '(add-to-list 'TeX-command-list
"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."
(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"))
'(("Skim" "open -a Skim.app %o")
(add-hook 'ConTeXt-mode-hook (lambda () (setq TeX-view-program-selection '((output-pdf "Skim")))))
;; YASnippet config
(setq yas-snippet-dirs '("~/Dropbox/filer/system/emacsgrejer/snippets"))
(setq yas/triggers-in-field t))
Hope this helps and gives some inspiration to get started if you choose emacs
> 26 mars 2023 kl. 10:22 skrev Alexandre Christe via ntg-context <ntg-context at 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,
> If your question is of interest to others as well, please add an entry to the Wiki!
> maillist : ntg-context at 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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ntg-context