Git Product home page Git Product logo

Comments (6)

EmilRehnberg avatar EmilRehnberg commented on May 18, 2024 1

Hi @Atcold

The reason is likely because the filetype get set as py and not python. Either run :set filetype=python as you enter vim after conversion or add the below to your vim settings

let g:jupytext_filetype_map = { 'py': 'python' }

from jupytext.vim.

goerz avatar goerz commented on May 18, 2024 1

That's very plausible... looks like the plugin has a bug, where the default s:jupytext_filetype_map includes

...
  \   'py': 'py',
  \   'jl': 'jl',
...

which should be

...
  \   'py': 'python',
  \   'jl': 'julia',
...

I'm not quite sure how that happened, but thanks for finding the problem!

@Atcold, can you confirm that setting the filetype-map solves your issue?

from jupytext.vim.

goerz avatar goerz commented on May 18, 2024 1

This should be fixed in the newly released version 0.1.1. Please reopen if the issue persists.

from jupytext.vim.

SultanOrazbayev avatar SultanOrazbayev commented on May 18, 2024

I run across the same problem: the converted ipynb doesn't show syntax highlighting. Running :set filetype=python works (the code within python blocks is highlighted), but adding let g:jupytext_filetype_map = { 'py': 'python' } doesn't work.

I am using the latest version, 0.1.1, and I can see that the fix you mentioned above is included in the plugin file. My Vim version is 8.1.1343.

from jupytext.vim.

SultanOrazbayev avatar SultanOrazbayev commented on May 18, 2024

The last line of the debug message says:

DBG: filetype: markdown

from jupytext.vim.

SultanOrazbayev avatar SultanOrazbayev commented on May 18, 2024

Sorry, my bad, I misunderstood how this was supposed to work.

from jupytext.vim.

Related Issues (15)

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.