Re: [NTG-context] how to setup path of ConTeXtLMTX for MacVim?
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-request@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-request@ntg.nl
You can reach the person managing the list at ntg-context-owner@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-2AA2E3D02488@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 <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 ___________________________________________________________________________________
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://wiki.contextgarden.net/Vim https://vim.fandom.com/wiki/Mapping_keys_in_Vim_-_Tutorial_(Part_1) https://vim.fandom.com/wiki/Mapping_keys_in_Vim_-_Tutorial_(Part_1) https://devhints.io/vim 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 *.tex call 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="<tab>" let g:UltiSnipsJumpForwardTrigger="<tab>" let g:UltiSnipsJumpBackwardTrigger="<c-z>" " If you want :UltiSnipsEdit to split your window. let g:UltiSnipsEditSplit="vertical" " set leader key let g:mapleader = "\<Space>" " 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 = "<C-f>" " Better nav for omnicomplete " inoremap <expr> <c-j> ("\<C-n>") " inoremap <expr> <c-k> ("\<C-p>") " Use alt + hjkl to resize windows nnoremap <M-j> :resize -2<CR> nnoremap <M-k> :resize +2<CR> nnoremap <M-h> :vertical resize -2<CR> nnoremap <M-l> :vertical resize +2<CR> " I hate escape more than anything else inoremap jk <Esc> inoremap kj <Esc> " Easy CAPS inoremap <c-u> <ESC>viwUi nnoremap <c-u> viwU<Esc> " TAB in general mode will move to text buffer nnoremap <TAB> :bnext<CR> " SHIFT-TAB will go back nnoremap <S-TAB> :bprevious<CR> " Alternate way to save nnoremap <C-s> :w<CR> " Alternate way to quit nnoremap <C-Q> :wq!<CR> " Use control-c instead of escape nnoremap <C-c> <Esc> " Better window navigation nnoremap <C-h> <C-w>h nnoremap <C-j> <C-w>j nnoremap <C-k> <C-w>k nnoremap <C-l> <C-w>l nnoremap <Leader>o o<Esc>^Da nnoremap <Leader>O O<Esc>^Da nnoremap <F9> :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-request@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-request@ntg.nl
You can reach the person managing the list at ntg-context-owner@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-2AA2E3D02488@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 <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-14, Jeong Dal via ntg-context
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
participants (3)
-
Jan-Erik Hägglöf
-
Jeong Dal
-
Nicola