Closed vanabel closed 6 years ago
It does not work on WIN. It's written in the readme.
vanabel notifications@github.com wrote:
Itype:LLPStartPreviewitsaysnotaeditorcommand...Isuspectitisnotworkforwin?isit?ReplytothisemaildirectlyorviewitonGitHub.
@xuhdev Yap, I see. But did there any issue to say that it is impossible to work on win? I really want a version that will work on win? Where can I start, if I want to modify your plugin?
I have tried to add autocmd FileType tex :autocmd InsertLeave * silent call Tex_RunLaTeX()
in .vimrc, which will auto-compile when return to normal mode. But this is not so perfect, when compile will shot at your plugin?
I found your trigger for compile: CursorHold,CursorHoldI,BufWritePost
, maybe this is not good enough, just try to input math formula like:
$a^2+b^2=c^2$ and $$a^2+b^2=c^2$$
The main obstacle is that, after opening a PDF file, windows PDF viewers don't allow other processes to write the file, while on UNICES this case is very rare. We need to let pdflatex be able to write the file while it is opened by a PDF viewer.
Ok, If this is your problem, It can be solved by use Sumatra PDF, which will auto-refresh after each compile, and needn't to close it when I compile the tex file.
@vanabel OK, can you try it by adding
let g:livepreview_previewer = 'x:\path\to\sumatra.exe'
to your vimrc file? Thanks!
I don't know what's wrong, It says that It is not a command of the editor... when I type the command :LLPStartPreview
Could you post the full error message?
E492: Not an editor command:LLPStartPreview
@vanabel Sorry for the delay, I was sick these days. Could you check whether you have +python
feature built into your Vim? You can check this by:
:echo has('python')
Returns 0
, means no?
@vanabel Yes. Where did you download your Vim binary? Or did you build it yourself?
The :version
output:
I use it in winows 7, and just download it from http://www.vim.org/download.php, the link is:ftp://ftp.vim.org/pub/vim/pc/gvim74.exe
The reason that echo has('python')
returns 0 is that you don't actually have python installed (or not visible by Vim).
Yes, I didn't install python. I need to install python? Shall I install version 2.7 or 3.3?
2.7
Installed, why phthon is not added to the path
, I can use python
in cmd
. And I think that is why echo has('python')
is still return 0
, how to fix this? I mean, when I add the path of python to path
on win7, it will disappear after a restart of win7.
Any way, echo has('python')
is 1
now. Why the error is still here?
Ok, sorry, I find the problem: It seems that I directly put into bundle
(since I install pathogen
to manage plugins) is not working, but when I put it into Vim/vimfiles/plugins/
it works.
Is there any way to call the LLPStartPreview
automatically for tex
file?
Is there any way to use your plugin without install python? I found Automatica latex plugin for vim has the feature.
It need not to set let g:livepreview_previewer = 'x:\path\to\sumatra.exe'
in vimrc
, probably since I set:
let g:Tex_DefaultTargetFormat = 'pdf'
let g:Tex_MultipleCompileFormats='pdf, aux'
let g:Tex_ViewRule_pdf = 'SumatraPDF -reuse-instance -inverse-search "gvim -c \":RemoteOpen +\%l \%f\""'
let g:Tex_CompileRule_pdf = 'xelatex -shell-escape -synctex=1 -src-specials -interaction=nonstopmode $*'
In vimrc?
If you want to call LLPStartPreview
automatically, you can add
autocmd FileType tex :LLPStartPreview<cr>
into your vimrc
.
You need to install python for this plugin because viml doesn't support multithreading, which is critical for this plugin.
I don't understand what your last comment means.
it is working on my windows 10 box
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 30 days if no further activity occurs, but feel free to re-open a closed issue if needed. Thanks for contributing to vim-llp!
I type:
LLPStartPreview
it says not a editor command...I suspect it is not work for win? is it?