Giter Site home page Giter Site logo

Comments (4)

goerz avatar goerz commented on August 16, 2024

Related question on Stackoverflow: https://stackoverflow.com/questions/54068308/override-gitattributes-from-command-line

from jupytext.vim.

goerz avatar goerz commented on August 16, 2024

A problem with git-gutter that will prevent this approach is the presence of --no-ext-diff in https://github.com/airblade/vim-gitgutter/blob/1d422b9f98194e38bc56e54192c9bc66d95c21f1/autoload/gitgutter/diff.vim#L135

Edit: actually, this can help in some way, as it disables the standard nbdime command, making place for a --textconv.

from jupytext.vim.

goerz avatar goerz commented on August 16, 2024

In theory, assuming nbdime is installed, the following settings should make it work with git-gutter:

let g:gitgutter_git_args = "-c diff.jupyternotebook.textconv='jupytext --from=ipynb --to=md -o -'"
let g:gitgutter_diff_args = "--textconv"

Except that git-gutter tries to convert both the current buffer and the index to md, but this fails because the current buffer is already in md!

from jupytext.vim.

BlueDrink9 avatar BlueDrink9 commented on August 16, 2024

I think the better solution might be, instead of opening and writing the ipnb as different to the buffer, you auto-open the equivalent .py etc. That's the desired VCed file anyway in most cases, and prevents accidentally overwriting the ipynb file.

from jupytext.vim.

Related Issues (18)

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.