我最近开始使用 Gnuplot 作为我的绘图解决方案,我开始更多地使用终端,并发现了 Vim,我立刻爱上了它。我终于可以使用 latexmk 进行编译vimtex
,但无法使用 LuaLaTeX 进行fontspec
包编译。
PS:我不是程序员......
这是我的“init.vim”文件
1 call plug#begin('~/.vim/plugged')
2 Plug 'ervandew/supertab'
3 Plug 'sainnhe/edge'
4 Plug 'joshdick/onedark.vim'
5 Plug 'wadackel/vim-dogrun'
6 Plug 'arcticicestudio/nord-vim'
7 Plug 'preservim/nerdtree'
8 Plug 'dracula/vim', { 'as': 'dracula' }
9 Plug 'lervag/vimtex'
10 call plug#end()
11
12 source $HOME/.config/nvim/themes/airline.vim
13 source $HOME/.config/nvim/themes/onedark.vim
14
15 set nu
16
17 let g:tex_flavor = 'latex'
18 let g:tex_conceal = ''
19 let g:vimtex_fold_manual = 1
20 let g:vimtex_latexmk_continuous = 1
21 let g:vimtex_compiler_progname = 'nvr'
22 let g:vimtex_view_method = 'skim'
23
24 " NCM2
25 augroup NCM2
26 autocmd!
27 " some other settings...
28 " uncomment this block if you use vimtex for LaTex
29 autocmd Filetype tex call ncm2#register_source({
30 \ 'name': 'vimtex',
31 \ 'priority': 8,
32 \ 'scope': ['tex'],
33 \ 'mark': 'tex',
34 \ 'word_pattern': '\w+',
35 \ 'complete_pattern': g:vimtex#re#ncm2,
36 \ 'on_complete': ['ncm2#on_complete#omni', 'vimtex#complete#omnifun c'],
37 \ })
38 augroup END
我在这里找到了这些设置:https://yufanlu.net/2018/09/03/neovim-latex/