Giter Club home page Giter Club logo

Comments (12)

patrickdavey avatar patrickdavey commented on May 22, 2024 1

is vimwiki_markdown available on your PATH? (what happens if you type which vimwiki_markdown ?

As mentioned at the top of the thread, this is unlikely to be a vimwiki_markdown issue, and probably more to do with where it's installed (e.g. the SUSE install changing the name of the binary). Also, #9 (comment) has it working in neovim...

But, chances are that vimwiki_markdown isn't on your PATH.

from vimwiki_markdown.

patrickdavey avatar patrickdavey commented on May 22, 2024

Hmmmm, honestly, I have no idea. I don't use neovim (yet, though it does sound promising)

Is your vimwiki up to date? As it does require this commit to be part of your vimwiki plugin.

If you work out the issue (and it is neovim specific) please do submit a PR :)

from vimwiki_markdown.

has2k1 avatar has2k1 commented on May 22, 2024

I use vimwiki with neovim without any issues
.

from vimwiki_markdown.

patrickdavey avatar patrickdavey commented on May 22, 2024

Well, I'm going to close this issue seeing as @has2k1 has it working with Neovim. I'd double check the commit I referenced above, just to make sure your version of vimwiki can use binaries.

This gem itself, in a way, has nothing to do with vimwiki.. it's just a script that can be called passing in a few arguments (where files are, templates etc.) and then parses them. It's not really anything to do with vimwiki (unless vimwiki changed the arguments it was sending through).

from vimwiki_markdown.

copyme avatar copyme commented on May 22, 2024

In fact, I found the source of the problem. In the binary file created by gem install is named vimwiki_markdown.ruby2.1 and not vimwiki_markdown.

from vimwiki_markdown.

patrickdavey avatar patrickdavey commented on May 22, 2024

That's bizarre! If you look in the bin folder -> https://github.com/patrickdavey/vimwiki_markdown/tree/master/bin you'll see the binary is called vimwiki_markdown That is something I've not seen before! What operating system are you using @copyme ? Are you using rvm or anything else to manage your ruby version(s) and gems?

from vimwiki_markdown.

copyme avatar copyme commented on May 22, 2024

@patrickdavey I use openSUSE Leap 42.3 and I mostly use ruby related packages provided by the operating system repositories, with some exceptions. For the exceptions I just use the gem command. Sorry I am not very familiar with the ruby ecosystem, etc.

from vimwiki_markdown.

NikosAlexandris avatar NikosAlexandris commented on May 22, 2024

The settings in vimwiki.rc sourced within from vimrc:

set nocompatible
filetype plugin on
syntax on
set foldmethod=syntax

set runtimepath+=~/archive/notes/vimwiki
let g:vimwiki_root = $HOME . '/archive/notes/vimwiki'
let g:vimwiki_list = [{
            \ 'path': $HOME . '/archive/notes/vimwiki',
            \ 'path_html': $HOME . '/archive/notes/vimwiki/html',
            \ 'syntax': 'markdown',
            \ 'ext': '.md',
            \ 'template_path': '/archive/notes/vimwiki/templates/',
            \ 'template_default': 'default',
            \ 'template_ext': '.tpl',
            \ 'custom_wiki2html': 'vimwiki_markdown',
            \ 'html_filename_parameterization': 1}]
let g:vimwiki_global_ext = 0

and the default.tpl:

<!DOCTYPE html>
<html lang="en">
  <head>
  <title>%title%</title>
  %date%

  %pygments%
</head>
<body id="%title%">
  <h2 id="title">%title%</h2>
  %content%
</body>
</html>

I run on vimwiki version 2.4 (2019-03-24) and I just installed vimwiki_markdown today.
Any attempt to :Vimwiki2HTML fails with:

Vimwiki Error: Conversion to HTML is not supported for this syntax

How can I "debug" this problem?

from vimwiki_markdown.

NikosAlexandris avatar NikosAlexandris commented on May 22, 2024

is vimwiki_markdown available on your PATH? (what happens if you type which vimwiki_markdown ?

As mentioned at the top of the thread, this is unlikely to be a vimwiki_markdown issue, and probably more to do with where it's installed (e.g. the SUSE install changing the name of the binary). Also, #9 (comment) has it working in neovim...

But, chances are that vimwiki_markdown isn't on your PATH.

Probably this is the case.

→ which vimwiki_markdown
bash: type: vimwiki_markdown: not found

Here's where it is:

→ gem which 'vimwiki_markdown'
/home/nik/.gem/ruby/2.4.0/gems/vimwiki_markdown-0.3.3/lib/vimwiki_markdown.rb

Actually, the binary is under:

/home/nik/.gem/ruby/2.4.0/bin/vimwiki_markdown

I am not sure what is best: add "$HOME/.gem" to PATH or install gem(s) under /usr/local/bin (i.e. via gem: --bindir /usr/local/bin or similar under /usr/bin)?

In fact, the following

GEM_PATH="$HOME/.gem"
export PATH="${GEM_PATH}:$PATH"

won't work as the binary(-ies) are not exactly under ~/.gem. Off-topic, but I wonder if I should add all bin sub-directories under ~/.gem?

from vimwiki_markdown.

NikosAlexandris avatar NikosAlexandris commented on May 22, 2024

I manually soft-linked the binary under /usr/local/bin and here's what I get for a test page, written in Markdown:

WARNING: Nokogiri was built against LibXML version 2.9.9, but has dynamically loaded 2.9.8^@/home/nik/.gem
/ruby/2.4.0/gems/vimwiki_markdown-0.3.3/lib/vimwiki_markdown/template.rb:24:in `initialize': No such file
or directory @ rb_sysopen - /archive/notes/vimwiki/templates/default.tpl (Errno::ENOENT)^@^Ifrom /home/nik
/.gem/ruby/2.4.0/gems/vimwiki_markdown-0.3.3/lib/vimwiki_markdown/template.rb:24:in `open'^@^Ifrom /home/n
ik/.gem/ruby/2.4.0/gems/vimwiki_markdown-0.3.3/lib/vimwiki_markdown/template.rb:24:in `get_template_conten
ts'^@^Ifrom /home/nik/.gem/ruby/2.4.0/gems/vimwiki_markdown-0.3.3/lib/vimwiki_markdown/template.rb:9:in `i
nitialize'^@^Ifrom /home/nik/.gem/ruby/2.4.0/gems/vimwiki_markdown-0.3.3/lib/vimwiki_markdown.rb:13:in `ne
w'^@^Ifrom /home/nik/.gem/ruby/2.4.0/gems/vimwiki_markdown-0.3.3/lib/vimwiki_markdown.rb:13:in `convert_wi
kimarkdown_to_html'^@^Ifrom /home/nik/.gem/ruby/2.4.0/gems/vimwiki_markdown-0.3.3/bin/vimwiki_markdown:4:i
n `<top (required)>'^@^Ifrom /usr/local/bin/vimwiki_markdown:23:in `load'^@^Ifrom /usr/local/bin/vimwiki_m
arkdown:23:in `<main>'^@
Vimwiki: HTML conversion is done, output: /home/nik/archive/notes/vimwiki/html/

The conversion is not done. Maybe the error/warning message is mis-leading?
Looks like a dependency (version) problem.

from vimwiki_markdown.

NikosAlexandris avatar NikosAlexandris commented on May 22, 2024

OK, I had a mis-typed path to the default.tlp file. It works now. Although the warning message still persists.

from vimwiki_markdown.

patrickdavey avatar patrickdavey commented on May 22, 2024

@NikosAlexandris possibly the answers https://stackoverflow.com/questions/29800482/nokogiri-was-built-against-libxml-version-2-9-1-but-has-dynamically-loaded-2-8/35481702 will help with the warning.

from vimwiki_markdown.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.