jreybert / vimagit

Ease your git workflow within Vim
1.31k stars 49 forks source link

Feature Request: Add Files to .gitignore #146

Closed fpnick closed 7 years ago

fpnick commented 7 years ago

Good evening,

Another nice short cut would be if I could place my cursor on a non-tracked file in the Magit Window and add (append) it to the .gitignore file with a single (or two) keystroke. Thinking this one step further, another option would be another keystroke to add all files with the extension of the file under the cursor to the .gitignore file, i.e. *.ext

I do realize that this might be going beyond what you originally wanted to offer with vimagit though and it's maybe one step too far.

Fabian.

jreybert commented 7 years ago

Hi @fpnick,

this feature actually exists, it came in the very beginning of the project. Just press I when your cursor is on a file, and it's filename will be appended to gitignore.

It is a very dumb feature, which does not do much. Your second point is interesting, I keep it in mind.

My concern is that you did not find it in the documentation. I feel the doc is quite exhaustive, but not structured well enough.

Please, think about it a few minutes and tell me how you think you could have found this information another way:

Thanks for your involvement in vimagit!

fpnick commented 7 years ago

Hi @jreybert ,

now that you say it, I found it in the vim help by just searching for 'ignore'. Which I could've done in the first place - sorry!

What I did yesterday was I searched for that feature on the Github page, where I didn't find it. So my suggestion I guess would be to have an exhaustive list of say all the one key commands (having ALL commands in there might be overkill) on the Github page. Although everyone should really be using the vim docs (and I keep saying that to myself, too), something 'clickable' on the web is still a little more comfortable.

Thank you for developing vimagit! I hardly ever do a commit via the command line any more and I code on a daily basis for work...

jreybert commented 7 years ago

Damned, you made a good point. gitignore command was on the github README page, it just disappeared during a merge! Actually, github page and vim doc should have roughly the same content.

Thanks again.

jreybert commented 7 years ago

Feel free to open an issue for your extension ignore feature.