Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
feature request: changed flag in statusline #206
Comments
richo
commented
May 26, 2012
|
Maybe you'd be better off committing with either
Which shows you the diff you're committing |
stardiviner
commented
May 26, 2012
|
=> On [2012-05-26 01:15:36 -0700]:
[ stardiviner ] ^^&^^ {I hate all of you ! Leave me alone} |
stardiviner
commented
May 26, 2012
|
And this |
richo
commented
May 26, 2012
|
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. |
stardiviner
commented
May 26, 2012
|
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:
|
richo
commented
May 28, 2012
|
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 |
stardiviner
commented
May 28, 2012
|
Can reference |
tomtom
commented
May 29, 2012
|
|
stardiviner
commented
May 29, 2012
|
=> On [2012-05-29 11:30:00 -0700]:
[ stardiviner ] ^^&^^ {I hate all of you ! Leave me alone} |
colinsullivan
commented
Jun 3, 2012
|
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 :) |
stardiviner
commented
Jun 4, 2012
|
=> On [2012-06-03 11:57:13 -0700]:
[ stardiviner ] ^^&^^ {I hate all of you ! Leave me alone} |
Stubbs
commented
Jun 11, 2012
|
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." |
stardiviner
commented
Jun 12, 2012
|
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. |
richo
commented
Jun 12, 2012
|
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. |
stardiviner
commented
Jul 4, 2012
|
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. |
xanderdunn
commented
May 15, 2015
|
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. |
stardiviner
closed this
May 15, 2015
|
See #219 for an older PR in this regard. @stardiviner |
blueyed
referenced this issue
in vim-airline/vim-airline
Jun 21, 2015
Closed
Display "dirty" status with Git: index / working dir #800
stardiviner
commented
Jun 22, 2015
|
@blueyed sorry, I thought this feature was implemented. |
stardiviner commentedMay 26, 2012
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.