Comments (6)
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.
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.
This should be fixed in the newly released version 0.1.1. Please reopen if the issue persists.
from jupytext.vim.
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.
The last line of the debug message says:
DBG: filetype: markdown
from jupytext.vim.
Sorry, my bad, I misunderstood how this was supposed to work.
from jupytext.vim.
Related Issues (15)
- Fails for notebooks with spaces in filename HOT 2
- Linting with ALE not working HOT 1
- Error with format R (with CAPS)
- Ipynb file may get overwritten, causing updates to fail. HOT 6
- Name vim buffer with the jupytext_filename (foo.py) not with the original filename (foo.ipynb) HOT 1
- Auto-reload current file in Jupyter Notebook? HOT 3
- Detect notebook language HOT 3
- g:jupytext_fmt = 'md:myst' doesn't work HOT 2
- Cell title is not saved
- Jupytext plugin works but displays an error message when vimrc is empty HOT 1
- Can we make this work with vim's DiffOrig command?
- Cannot open .ipynb without .md file
- Incompatible with fugitive, git-gutter, and git-signify HOT 4
- Can I use jupytext to convert Rmd to ipynb HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jupytext.vim.