Re: [NTG-context] how to setup path of ConTeXtLMTX for MacVim?

2021-12-15 Thread Jeong Dal via ntg-context
Dear Jan-Erik,

Thank you for sharing your code.

It will be very helpful for me.
I hope that my problem is solved soon.

Thank you again.

Best regards,

Dalyoung


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] how to setup path of ConTeXtLMTX for MacVim?

2021-12-15 Thread Nicola via ntg-context
On 2021-12-14, Jeong Dal via ntg-context  wrote:
> Although you have explained about the way out of my problem,
> I am still in the problem.

I am maintaining the ConTeXt plugin for Vim, and I also use MacVim: feel
free to contact me off list to help you iron out your issues (email in
the source code of the plugin).

Nicola


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] how to setup path of ConTeXtLMTX for MacVim?

2021-12-14 Thread Jan-Erik Hägglöf via ntg-context
Check if your *.tex file is recognized as a context file and not a plaintex 
file. 

I’ve struggelled a lot with macvim before I got what I want.

I recommend following places learning everything in vim and many nice plugins 
that helps a lot.

If you want I can provide my .vimrc as an inspiration and starting point. Se 
below.

https://wiki.contextgarden.net/Vim 

https://vim.fandom.com/wiki/Mapping_keys_in_Vim_-_Tutorial_(Part_1) 


https://devhints.io/vim  a cheatsheet


In the MacVim application it took some time to figure out why my *.tex files 
never recognizes as context files and the hardcoded solution was to comment out 
the following in

/Applications/MacVim.app/Contents/Resources/vim/runtime/filetype.vim

" TeX
"au BufNewFile,BufRead *.latex,*.sty,*.dtx,*.ltx,*.bbl  setf tex
"au BufNewFile,BufRead *.texcall dist#ft#FTtex()

and instead adding

" ConTeXt
au BufNewFile,BufRead *.tex,*.ctx,*.mkii,*.mkiv,*.mkvi,*.mkxl,*.mklx   setf 
context

It works for Me who only using context as a typesetting engine.

Normally you do not need to do this but it seems that my own filetype.vim on 
upstart never reads.

Here is my .vimrc if you find it useful, enjoy. 

set lines=68
set columns=140
set guifont=Monaco:h16

" Install vim-plug
if empty(glob('~/.vim/autoload/plug.vim'))
  silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
  "autocmd VimEnter * PlugInstall
  "autocmd VimEnter * PlugInstall | source $MYVIMRC
endif

call plug#begin()
" Better Syntax Support
Plug 'sheerun/vim-polyglot'
" File Explorer
Plug 'scrooloose/NERDTree'
" Auto pairs for '(' '[' '{'"call plug#begin('~/.config/nvim/autoload/plugged')
Plug 'jiangmiao/auto-pairs'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
Plug '907th/vim-auto-save'
call plug#end()

" Settings for Ultisnips
let g:UltiSnipsExpandTrigger=""
let g:UltiSnipsJumpForwardTrigger=""
let g:UltiSnipsJumpBackwardTrigger=""

" If you want :UltiSnipsEdit to split your window.
let g:UltiSnipsEditSplit="vertical"

" set leader key
let g:mapleader = "\"
" enable AutoSave on Vim startup
let g:auto_save = 1
set number  " Line numbers
set cmdheight=2 " More space for displaying messages
set cursorline  " Enable highlighting of the current 
line

set clipboard=unnamed

syntax enable   " Enables syntax highlighing

let g:AutoPairsShortcutFastWrap = ""


" Better nav for omnicomplete
" inoremap   ("\")
" inoremap   ("\")

" Use alt + hjkl to resize windows
nnoremap :resize -2
nnoremap :resize +2
nnoremap :vertical resize -2
nnoremap :vertical resize +2

" I hate escape more than anything else
inoremap jk 
inoremap kj 

" Easy CAPS
inoremap  viwUi
nnoremap  viwU

" TAB in general mode will move to text buffer
nnoremap  :bnext

" SHIFT-TAB will go back
nnoremap  :bprevious

" Alternate way to save
nnoremap  :w

" Alternate way to quit
nnoremap  :wq!

" Use control-c instead of escape
nnoremap  


" Better window navigation
nnoremap  h
nnoremap  j
nnoremap  k
nnoremap  l

nnoremap o o^Da
nnoremap O O^Da

nnoremap  :NERDTreeToggle $HOME

Regards

Jan-Erik


> 14 dec. 2021 kl. 15:37 skrev Jeong Dal via ntg-context :
> 
> Dear Nicola, Jan-Erik, and John,
> 
> Although you have explained about the way out of my problem, 
> I am still in the problem.
> 
> I need to learn more about vim.
> I’ll do more try following your advice and  the explanation in wiki.
> 
> Thank you again for your help.
> 
> Best regards,
> 
> Dalyoung
> 
>> 2021. 12. 14. 오전 8:56, ntg-context-requ...@ntg.nl 작성:
>> 
>> Send ntg-context mailing list submissions to
>>  ntg-context@ntg.nl
>> 
>> To subscribe or unsubscribe via the World Wide Web, visit
>>  https://mailman.ntg.nl/mailman/listinfo/ntg-context
>> or, via email, send a message with subject or body 'help' to
>>  ntg-context-requ...@ntg.nl
>> 
>> You can reach the person managing the list at
>>  ntg-context-ow...@ntg.nl
>> 
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of ntg-context digest..."
>> 
>> 
>> Today's Topics:
>> 
>>  1. Re: how to setup path of ConTeXtLMTX for MacVim?
>> (Jan-Erik Hägglöf)
>>  2. Re: circuitikz module seems broken (Hans Hagen)
>>  3. Re: TeXWorks and synctex SOLVED (Bruce Horrocks)
>> 
>> 
>> --
>> 
>> Message: 1
>> Date: Tue, 14 Dec 2021 00:48:25 +0100
>> From: Jan-Erik Hägglöf 
>> To: mailing list for ConTeXt users 
>> Subject: Re: [NTG-context] how to setup path of ConTeXtLMTX for
>>  MacVim?
>> Message-ID: <32566c08-2359-48df-b24c-2aa2e3d02...@gmail.com>
>> Content-Type: text/plain; 

Re: [NTG-context] how to setup path of ConTeXtLMTX for MacVim?

2021-12-14 Thread Jeong Dal via ntg-context
Dear Nicola, Jan-Erik, and John,

Although you have explained about the way out of my problem, 
I am still in the problem.

I need to learn more about vim.
I’ll do more try following your advice and  the explanation in wiki.

Thank you again for your help.

Best regards,

Dalyoung

> 2021. 12. 14. 오전 8:56, ntg-context-requ...@ntg.nl 작성:
> 
> Send ntg-context mailing list submissions to
>   ntg-context@ntg.nl
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>   https://mailman.ntg.nl/mailman/listinfo/ntg-context
> or, via email, send a message with subject or body 'help' to
>   ntg-context-requ...@ntg.nl
> 
> You can reach the person managing the list at
>   ntg-context-ow...@ntg.nl
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of ntg-context digest..."
> 
> 
> Today's Topics:
> 
>   1. Re: how to setup path of ConTeXtLMTX for MacVim?
>  (Jan-Erik Hägglöf)
>   2. Re: circuitikz module seems broken (Hans Hagen)
>   3. Re: TeXWorks and synctex SOLVED (Bruce Horrocks)
> 
> 
> --
> 
> Message: 1
> Date: Tue, 14 Dec 2021 00:48:25 +0100
> From: Jan-Erik Hägglöf 
> To: mailing list for ConTeXt users 
> Subject: Re: [NTG-context] how to setup path of ConTeXtLMTX for
>   MacVim?
> Message-ID: <32566c08-2359-48df-b24c-2aa2e3d02...@gmail.com>
> Content-Type: text/plain; charset="utf-8"
> 
> let g:context_mtxrun = 
> 'PATH=$HOME/context/context-osx-64/tex/texmf-osx-64/bin:$PATH mtxrun'
> 
> nnoremap å :ConTeXt
> nnoremap  ö :call tex#preview()
> nnoremap  ä
>\ :call tex#goto_texshop(expand("%:p"), line('.'), col('.'), 1, 1)
> 
> Here is my snippet from my personal context.vim file
> 
> I see that you have :! and that means that you instruct vim to execute a 
> shell command.
> 
> Just write :ConTeXt and it should work fine
> 
>> 13 dec. 2021 kl. 14:30 skrev Jeong Dal via ntg-context :
>> 
>> Dear John, Nicola,
>> 
>> I created a file context.vim under the folder ~/.vim/after/ftplugin/ which 
>> contains
>> 
>> map > :w:!ConTeXt
>> let g:context_mtxrun = 'PATH=$HOME/ConTeXtLM/tex/texmf-osx-64/bin:$PATH 
>> mtxrun'
>> let g:tex_flavor = "context"
>> 
>> The result is
>> 1. using “:ConTeXt”   issued an error message:  “E492: not an editor 
>> command: ConTeXt
>> 2. using “make” issued an error message: "No targets specified and no 
>> makefile found. …" 
>> Pressing C-h, compiling started and succesfully ended. However, it use 
>> /usr/local/texlive/… not LMTX tex folder.
>> 
>> Without context.vim, “:ConTeXt" and “:make" worked fine.
>> 
>> I’ll do more test. 
>> 
>> Thank you.
>> Best regards,
>> 
>> Dalyoung
>> 
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>> 
>> maillist : ntg-context@ntg.nl / 
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki : http://contextgarden.net
>> ___
> 
> -- next part --
> An HTML attachment was scrubbed...
> URL: 
> 
> 
> --
> 
> Message: 2
> Date: Tue, 14 Dec 2021 00:54:44 +0100
> From: Hans Hagen 
> To: mailing list for ConTeXt users , Aditya
>   Mahajan 
> Subject: Re: [NTG-context] circuitikz module seems broken
> Message-ID: <41f06234-caab-6576-aa5e-8396c8ee3...@xs4all.nl>
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
> 
> Hi,
> 
> This works here:
> 
> \usemodule[circuitikz]
> 
> \starttext
> \startcircuitikz
> \draw (0,2) to[I] (2,2);
> \stopcircuitikz
> \startcircuitikz
> \draw (0,2) to[I] (2,2);
> \stopcircuitikz
> \stoptext
> 
> with the attached. Make sure to put it in the regular context base path 
> and run mtxrun --generate.
> 
> Aditya: can you check if we load enough? We really need to get rid of 
> all these (kind of strange) t-* modules that somehow ended up in tikz 
> and it's way easier and robust to occasionally add something needed to 
> m-tikz than to try to catch hard-to-locate-and-fix stuff in the tikz 
> distribution. If needed we can apply runtime patches too.
> 
> (nyw, it looks like tikz creates empty pfg files during a run but that's 
> probbably has a reason)
> 
> Hans
> 
> -
>   Hans Hagen | PRAGMA ADE
>   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
> -- next part --
> %D \module
> 

Re: [NTG-context] how to setup path of ConTeXtLMTX for MacVim?

2021-12-14 Thread Nicola via ntg-context
On 2021-12-13, Jeong Dal via ntg-context  wrote:
> Dear John, Nicola,
>
> I created a file context.vim under the folder ~/.vim/after/ftplugin/ which 
> contains
>
> map > :w:!ConTeXt
> let g:context_mtxrun = 'PATH=$HOME/ConTeXtLM/tex/texmf-osx-64/bin:$PATH 
> mtxrun'
> let g:tex_flavor = "context"
>
> The result is
> 1. using “:ConTeXt”   issued an error message:  “E492: not an editor command: 
> ConTeXt

:ConTeXt is a buffer-local command, which means that it is available
only when the active buffer has filetype `context`. Make sure that this
is the case before trying to typeset.

> 2. using “make” issued an error message: "No targets specified and no 
> makefile found. …"

Again, I believe that you are typing those commands with an active
buffer whose filetype is not `context`.

> Pressing C-h, compiling started and succesfully ended. However, it use
> /usr/local/texlive/… not LMTX tex folder.

As already pointed out, ! invokes a shell command. Remove the
exclamation mark.

Nicola


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] how to setup path of ConTeXtLMTX for MacVim?

2021-12-13 Thread Jan-Erik Hägglöf via ntg-context
let g:context_mtxrun = 
'PATH=$HOME/context/context-osx-64/tex/texmf-osx-64/bin:$PATH mtxrun'

nnoremap å :ConTeXt
nnoremap  ö :call tex#preview()
nnoremap  ä
\ :call tex#goto_texshop(expand("%:p"), line('.'), col('.'), 1, 1)

Here is my snippet from my personal context.vim file

I see that you have :! and that means that you instruct vim to execute a shell 
command.

Just write :ConTeXt and it should work fine

> 13 dec. 2021 kl. 14:30 skrev Jeong Dal via ntg-context :
> 
> Dear John, Nicola,
> 
> I created a file context.vim under the folder ~/.vim/after/ftplugin/ which 
> contains
> 
> map > :w:!ConTeXt
> let g:context_mtxrun = 'PATH=$HOME/ConTeXtLM/tex/texmf-osx-64/bin:$PATH 
> mtxrun'
> let g:tex_flavor = "context"
> 
> The result is
> 1. using “:ConTeXt”   issued an error message:  “E492: not an editor command: 
> ConTeXt
> 2. using “make” issued an error message: "No targets specified and no 
> makefile found. …" 
> Pressing C-h, compiling started and succesfully ended. However, it use 
> /usr/local/texlive/… not LMTX tex folder.
> 
> Without context.vim, “:ConTeXt" and “:make" worked fine.
> 
> I’ll do more test. 
> 
> Thank you.
> Best regards,
> 
> Dalyoung
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] how to setup path of ConTeXtLMTX for MacVim?

2021-12-13 Thread Jeong Dal via ntg-context
Dear John, Nicola,

I created a file context.vim under the folder ~/.vim/after/ftplugin/ which 
contains

map > :w:!ConTeXt
let g:context_mtxrun = 'PATH=$HOME/ConTeXtLM/tex/texmf-osx-64/bin:$PATH mtxrun'
let g:tex_flavor = "context"

The result is
1. using “:ConTeXt”   issued an error message:  “E492: not an editor command: 
ConTeXt
2. using “make” issued an error message: "No targets specified and no makefile 
found. …" 
Pressing C-h, compiling started and succesfully ended. However, it use 
/usr/local/texlive/… not LMTX tex folder.

Without context.vim, “:ConTeXt" and “:make" worked fine.

I’ll do more test. 

Thank you.
Best regards,

Dalyoung

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] how to setup path of ConTeXtLMTX for MacVim?

2021-12-13 Thread Jeong Dal via ntg-context
Dear John, Nicola,

Thank you for your help.
I have to check the wiki carefully first.

I’ll do what you said and report it later.

Thank you again.

Best regards,

Dalyoung

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] how to setup path of ConTeXtLMTX for MacVim?

2021-12-12 Thread Nicola via ntg-context
On 2021-12-11, Jeong Dal via ntg-context  wrote:
> Hi,
>
> Recently, I have a problem to use vscode, so I tried MacVim for ConTeXt.
> It worked fine. But it uses context in TeXLive instead of using it in 
> ConTeXtLMTX.
> I’d like to use LMTX which is installed in ~/ConTeXtLM/tex/...
>
> How to redirect the path for ConTeXt in MacVim?

This is explained at https://wiki.contextgarden.net/Vim. In a nutshell:

let g:context_mtxrun = 'PATH=$HOME/ConTeXtLM/tex/texmf-osx-64/bin:$PATH 
mtxrun'

You may put this line in your .vimrc or in
~/.vim/after/ftplugin/context.vim (creating the intermediate directories
and file if they do not exist).

Hope this helps,
Nicola


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] how to setup path of ConTeXtLMTX for MacVim?

2021-12-12 Thread John Kitzmiller via ntg-context
>
> How to redirect the path for ConTeXt in MacVim?
>

I put this in .vimrc:
map   :w  :!context % 

and $PATH directs "context" to the right place:

/Users/kitz/lmtx/tex/texmf-osx-64/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin


To open the .pdf:

:!open -a  %r.pdf
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___