Code Monkey home page Code Monkey logo

Comments (6)

mark2185 avatar mark2185 commented on August 12, 2024 1

vim-fugitive is nice, but it's staging tool is a pure wrapper around git stage -p, which does not support line-by-line staging.

vim-fugitive does support partial staging, you just have to use visual line mode when staging.

lg path/to/file is a lot easier than navigating an interactive Files panel.

You can just use / to search.

I'll stop with the digression now.

from lazygit.

mark2185 avatar mark2185 commented on August 12, 2024 1

This looks pretty close to lazygit to me:
image

image

In any case, this is a discussion better suited for the lazygit discord channel since it is pretty off topic.

from lazygit.

mark2185 avatar mark2185 commented on August 12, 2024

As much as I love lazygit, for this specific thing maybe you would be better off with vim-fugitive or maybe vim-gitgutter for staging the current hunk. Just my two cents, consider it a possible alternative.

from lazygit.

teleshoes avatar teleshoes commented on August 12, 2024
  1. this is a generic feature, not vim-specific at all. i personally would use it from the cmdline about as much as i use it from vim. lg path/to/file is a lot easier than navigating an interactive Files panel.
  2. vim-fugitive is nice, but it's staging tool is a pure wrapper around git stage -p, which does not support line-by-line staging.
  3. vim-gitgutter is less universally endorsed so i haven't checked it out before, but it seems to claim that it supports line-by-line staging. i will look into it for sure, thanks!

EDIT: nevermind, gitgutter is the same deal. it allows you to stage a hunk, and then delete the bits you dont want to stage, just like git stage -p. honestly, as far as i know, only git gui and lazygit have the convenience of selecting a single line and committing it.

from lazygit.

teleshoes avatar teleshoes commented on August 12, 2024

You can just use / to search.

yes, i did mention automating doing /file in my initial report

vim-fugitive does support partial staging, you just have to use visual line mode when staging.

!!! did not know this, will try it out right now and see if it replaces lazygit for me. thanks!

from lazygit.

teleshoes avatar teleshoes commented on August 12, 2024

hmm, line-by-line staging with :Gdiff+:dp works, but it seems that a unified diff like in git gui or lazygit is not feasible, since it is just wrapping vimdiff and writing the index from the resulting buffer.

a quick internet search did not turn up anyone getting functionality in vim similar to the staging ui from lazygit or git-gui, but maybe someone does have this? (all i want, really, is a terminal based, keyboard driven app that shows a nice, hunk-ed, unified diff of a single file against the index, AND allows easily staging a single +LINE or -LINE from within that diff.)

but like you say, this is a tangent, and lazygit could use this feature with or without vim

from lazygit.

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.