implement #2835 : TexShop preview#3200
Conversation
|
Maybe another comment, I don't really know where to put that, but a "correct" configuration for using TexShop could be : return {
"lervag/vimtex",
lazy = false,
build = function()
os.execute("defaults write TeXShop OtherEditorSync YES")
os.execute("defaults write TeXShop UseExternalEditor -bool true")
os.execute("sudo mkdir -p /usr/local/bin/")
local tmp_path = "/tmp/othereditor"
local f = io.open(tmp_path, "w")
assert(f, "Failed to open temp file for writing")
f:write([[nvim --headless -c "VimtexInverseSearch $1 '$2'"]])
f:close()
local othereditor = " /usr/local/bin/othereditor"
os.execute("sudo mv " .. tmp_path .. othereditor)
os.execute("sudo chmod +x" .. othereditor)
end,
init = function()
-- VimTeX configuration goes here, e.g.
vim.g.vimtex_view_method = "texshop"
vim.g.vimtex_view_texshop_activate = 0
end
}Not sure if it works completely as intended (I did the modifications manually) but trying out something like that should correspond to the docs |
Great, thanks! As I don't use neither MacOS nor TeXShop I will have to take your word for it that this indeed works as expected. I have no means of testing it myself. So, let me know when you want me to consider it for merging.
Glad you like it!
Well, I really don't like a suggestion that asks users to run commands with sudo. I think instead we should ask people to create a local script e.g. under |
|
Alright, I fixed the problem (my LSP config was wrong and fired two instances of the LSP seems like) ! |
|
about the config, I just wanted to maybe suggest something that was plug and play, but I agree that asking for |
|
Cool, thanks! I've merged this locally now. Thanks for the contribution! |
I implemented the modifications suggested by griffinwxk in #2835. Nothing much, but it seems that this was what was broken.
There is still some work to do (at least on my computer, forward search is a bit strange, I have two previews open on startup and SyncTex only seems to work on one of the previews). Thought I should also mention that, inside TexShop,
Settings > PDF Preview > External editor > Automatic preview updateshould be toggled on.Thanks for the great plugin!