Re: [NTG-context] how to setup path of ConTeXtLMTX for MacVim?
Dear John, Nicola, I created a file context.vim under the folder ~/.vim/after/ftplugin/ which contains map <C-h>><Esc> :w<CR>:!ConTeXt<CR> 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
let g:context_mtxrun = 'PATH=$HOME/context/context-osx-64/tex/texmf-osx-64/bin:$PATH mtxrun' nnoremap <leader>å :ConTeXt<CR> nnoremap <silent><buffer> <leader>ö :<c-u>call tex#preview()<cr> nnoremap <silent><buffer> <leader>ä \ :<c-u>call tex#goto_texshop(expand("%:p"), line('.'), col('.'), 1, 1)<cr> 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<CR> 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 <C-h>><Esc> :w<CR>:!ConTeXt<CR> 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 ___________________________________________________________________________________
On 2021-12-13, Jeong Dal via ntg-context
Dear John, Nicola,
I created a file context.vim under the folder ~/.vim/after/ftplugin/ which contains
map <C-h>><Esc> :w<CR>:!ConTeXt<CR> 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
participants (3)
-
Jan-Erik Hägglöf
-
Jeong Dal
-
Nicola