-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature request: changed flag in statusline #206
Comments
Maybe you'd be better off committing with either
Which shows you the diff you're committing |
=> On [2012-05-26 01:15:36 -0700]:
[ stardiviner ] ^^&^^ {I hate all of you ! Leave me alone} |
And this |
Until you write to either the index or the work tree git can't tell you whether or not you've changed anything. In that instance you're interested in whether or not you've changed the buffer, which vim supports. |
I'm wrong on this. But there is a similar script called "quickfixsigns", it can do similar work. |
I've thought about this. In addition to the unpersisted buffer issue you guys have already discussed, there are a couple of caveats:
|
The best idea I could come up with is a :Gstatus buffer that keeps itself out of the way for the most part (similar to NERDtree in it's default config) and post- hooks on most |
Can reference |
|
=> On [2012-05-29 11:30:00 -0700]:
[ stardiviner ] ^^&^^ {I hate all of you ! Leave me alone} |
I would like this as well. Ideally, I would like to see the first few characters of: git status --porcelain ${FILENAME} (where From Vim with fugitive: :Git status --porcelain % For example, on a modified file, this command prints Personally I'd find this more useful in my editor than which branch I'm on. Showing the branch is a useful reminder, but typically I want to be reminded more frequently that I haven't committed changes. Thanks for all the awesome tools :) |
=> On [2012-06-03 11:57:13 -0700]:
[ stardiviner ] ^^&^^ {I hate all of you ! Leave me alone} |
I've recently switched to using zsh as my default shell, and some of the themes that you get with it make really nice usage of different characters to express the current state of a repo. https://github.com/robbyrussell/oh-my-zsh/blob/master/themes/muse.zsh-theme shows the various characters used in the theme I'm using right now. It would be good if fugitive by default used the output of porcelain as Colin suggested, but also provided a way to display other characters if the user wants to. |
In @Stubbs, that's kind of orthogonal as it shows you the status of the entire repo rather than an individual file (although obviously there are some parallels). As far as customization goes, I don't know what I can do that will make things any simpler than "write your own statusline function." |
There are many different states. And there is a workflow: Maybe there are some other states about file. welcome complete this. And, I think if a person work much on :Gstatus instead of command line, those repo states about "merged", "unmerged", "dirty", "clean" is meaningful too. |
In my opinion it would get unmanagable pretty fast. Particularly because 9 times out of 10 Vim telling me that I have staged part of a file is not helpful until I git diff --cached to work out which parts I've staged. it's also worth noting that the statusline is only redrawn when you focus that pane (afaik?) so if you manipulate git externally you may see out of date info in vim. |
About out of date into in vim. yes, this is a problem if somebody manipulate git in external command line. But we should notice that we use fugitive because it is simple and easy to do git things in Vim. So we will reduce the time do work in command line, and I think there are many other functional features plugins will be developed about git in vim. So this is not a big problem. |
An awesome extension of this would be the option to show flags for lines that have been changed within the past x days. This would be super helpful for debugging. I know a bug was introduced within the past x days, so now I need to figure out which lines of code caused it. Having a gutter indicator on the lines that were changed would be amazingly helpful. |
See #219 for an older PR in this regard. @stardiviner |
@blueyed sorry, I thought this feature was implemented. |
Is there any update? |
My update is that if people are going to nag me about dormant but not abandoned feature requests in the issue tracker then I guess I will have to close them. |
I hope fugitive can give out a flag in statusline indicates that this file in Git or any VCS else is changed (different with file in Vim buffer or Disk).
I always use fugitive to modify config file, etc, sometimes the file is long, I do not know where I modified.
So a statusline flag will notice me. I do not always go to see git diff. It waste time very much. Because usually I just modify, then commit.
The text was updated successfully, but these errors were encountered: