ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Jan-Erik Hägglöf via ntg-context" <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: "Jan-Erik Hägglöf" <skrantajanneman@gmail.com>
Subject: Re: Text editors
Date: Tue, 28 Mar 2023 20:54:53 +0200	[thread overview]
Message-ID: <06E61F52-8ACA-4C3A-A236-823B452D04D1@gmail.com> (raw)
In-Reply-To: <CALC5-UKeRewDZec94zJDgu_iwLW50r_x370f=q9FTWhQ2mPG8g@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 3649 bytes --]

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
> ___________________________________________________________________________________


[-- Attachment #1.2: Type: text/html, Size: 5125 bytes --]

[-- Attachment #2: Type: text/plain, Size: 496 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

  parent reply	other threads:[~2023-03-28 18:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-26  8:22 Alexandre Christe via ntg-context
2023-03-26  8:39 ` jbf via ntg-context
2023-03-28 13:43   ` Alain Delmotte via ntg-context
2023-03-26 11:00 ` Nicola via ntg-context
2023-03-26 11:20 ` Henning Hraban Ramm via ntg-context
2023-03-28 18:54 ` Jan-Erik Hägglöf via ntg-context [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-10-24 11:41 Henning Hraban Ramm
2016-10-24 12:14 ` Michael Eidenbenz
2016-10-25 15:18   ` Mica Semrick
2016-10-24 13:18 ` Nicola
2016-10-25  8:17 ` Taco Hoekwater
2016-10-25 16:07   ` Mojca Miklavec
2016-10-25 14:57 ` Alan Braslau
2016-10-25 16:19   ` Nicola
2016-10-25 20:11     ` Henning Hraban Ramm
2016-10-25 20:50       ` Nicola
2016-10-27 17:03         ` culleton-p-md
2016-10-28 19:28     ` Alan Braslau
2016-10-28 22:14       ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=06E61F52-8ACA-4C3A-A236-823B452D04D1@gmail.com \
    --to=ntg-context@ntg.nl \
    --cc=skrantajanneman@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).