vim-marked icon indicating copy to clipboard operation
vim-marked copied to clipboard

:MarkedOpen does nothing

Open carlwr opened this issue 3 years ago • 2 comments

The editor recognizes the commands, but :MarkedOpen has no effect.

Marked is installed through Setapp so Marked is installed on a non-standard path (/Applications/Setapp/Marked.app) - could this lead to vim-marked not finding Marked?

Any hints on how to trouble-shoot this?

:echo &ft returns markdown

NVIM v0.6.1 Marked 2.6.16 (1031)

carlwr avatar May 21 '22 06:05 carlwr

@LeuschkeTressa apologies for missing this for so long.

Does open -a "Marked.app" (or open -a "Marked 2.app") open Marked for you?

I suspect that might not be working as expected.

Could you provide the output for codesign -dr - "/Applications/Setapp/Marked.app"? Specifically I am curious if something like identifier "com.brettterpstra.marked2" is output here.

Assuming the codesign command does output an identifier like above, could you try editing https://github.com/itspriddle/vim-marked/blob/ae74ac624522f266ebbf228c810619d3599e6cff/plugin/marked.vim#L40 locally to something like:

  silent exe "!open -b 'com.brettterpstra.marked2' ".(a:background ? '-g' : '')." '".l:filename."'"

itspriddle avatar Sep 29 '23 18:09 itspriddle

Thanks! Not using Marked for the moment so no longer an issue for me - however, some answers below if of use to you or some else.

$ open -a "Marked.app"
# does open Marked

$ open -a "Marked 2.app"
# "Unable to find application named 'Marked 2.app'"

$ codesign -dr - /Applications/Setapp/Marked.app
# Executable=/Applications/Setapp/Marked.app/Contents/MacOS/Marked
# designated => anchor apple generic and identifier "com.brettterpstra.marked-setapp" and (certificate leaf[field.1.2.840.113635.100.6.1.9] /* exists */ or certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = "47TRS7H4BH")

carlwr avatar Dec 27 '23 14:12 carlwr

That looks like the old version of Marked 1.

I believe this could be fixed by adding the following to ~/.vimrc:

let g:marked_app = "Marked"

Note that version 2 of this plugin requires Marked 2, and the above wouldn't work. Use v1.0.0 of marked.vim if you're still on the old version of Marked.

As an aside: I would be willing to switch to using bundle IDs instead (i.e. com.brettterpstra.marked2) if others are having issues with the various distributions of Marked 2. Open a new issue if that's you :)

itspriddle avatar Jun 02 '24 02:06 itspriddle