kaishin / markoff

A lightweight Markdown (CommonMark) previewer for macOS.
ISC License
793 stars 43 forks source link

Feature Request: Launch from command line #32

Closed neckhair closed 8 years ago

neckhair commented 8 years ago

It would be very nice to launch Markoff directly from the command line (markoff file.md).

frou commented 8 years ago

This is already possible - put this in your shell's dotfile:

alias markoff="open -a Markoff"
neckhair commented 8 years ago

OK, thanks @frou. That solves it for me. An included "binary" would nice anyway ;-)

atticoos commented 7 years ago

It would be nice if you could specify the file to open. Do we know if this is possible?

snoblenet commented 7 years ago

@ajwhite You would do that with open -a Markoff filename.md.

This is now in my init.vim:

augroup Markdown
  autocmd FileType markdown nnoremap <buffer> <leader>m :call OpenMarkoff()<CR>
  autocmd FileType markdown :call OpenMarkoff()<CR>
augroup END

function OpenMarkoff()
  if (&diff ==# 0)
    exe '! open -a Markoff '.expand('%')
  endif
endfunction

What I'd really like is a way to tell Markoff to open at a specific line number (which I would set to be the current line Neovim).

stlewis commented 5 years ago

Even better would be a clean way to have Markoff "open" STDOUT