Closed sivakov512 closed 2 years ago
This is actually a feature. You can modify your hunks, following rules in the documentation, you can stage only part of lines.
However, I get your point. This is an advanced feature, and it is not used much. I can do the following:
g:magit_editable_buffer
option to globally enable/disable this featureThis is actually a very good point: restrict this feature will ease future optimization work.
Hm... I can edit staged\unstaged sources inside Magit buffer?
You can edit unstaged sources. Edit stage source is not restricted, but it won't do anything.
Sounds dangerous =)
add a g:magit_editable_buffer option to globally enable/disable this feature
Yes, I realy need it, thank you =)
Previously, I could not return from the Emacs to Vim\Neovim, because I'm dependent on the Magit and especially the ability to stage hunks, but now thanks to you I have a chance to do it =) (too bad English)
Thanks for your feedback usage!
add a g:magit_editable_buffer option to globally enable/disable this feature
Can you inform here when this feature will be implemented?
@cryptomaniac512 could you please:
dev/nomodifiable
branch (please do it a week long, I would to be sure to not break anything, this is quite a big change).Thanks
Looks good.
After I finish editing (started with E
) how to turn off the modifiable
?
How to open file displayed in magit buffer? Previously it was possible with E
(But the file was opened not in the place where E
was pressed)
After I finish editing (started with E) how to turn off the modifiable?
You quit edit mode when you refresh the vimagit buffer: it happens when you stage something (with S
, F
, L
) or when you intentionally refresh the buffer with R
. Maybe pressing E
again when you are in edit mode should leave edit mode.
How to open file displayed in magit buffer? Previously it was possible with E (But the file was opened not in the place where E was pressed)
You are not the first one noticing that. I did not thought this feature was used as much. I was not sure to change this mapping, changing mapping is always a bad idea.. I think before merging this branch to next
I will revert the mapping change. So, in the end, E
will be the mapping to open the file where there is the hunk, and I need to find a new mapping to enter in edit mode.
For the record, the "jump to the hunk in the file" feature is not accurate, but I think I finally found a solution for this.
I did not thought this feature was used as much
This is a cool feature! It works in Emacs Magit and I use it every hour =)
I am working on another branch to get a precise jump.
Thanks! Can you show me link to this branch?
It landed in branch next
.
Short description of the problem
The magit buffer is editable. This causes some confusion, since it raises doubts about the reliability of the situation and the work with its changes.
I think that magit buffer should be read-only and be managed only through commands.
Steps to reproduce
Call
:Magit', type
A,
i,
O` or another command to go into insert-modeEnvironment
vim
ornvim
versionNVIM v.0.2.1
git
versiongit version 2.15.0
current vimagit version or (or SHA1) lastest installed with
Plug
OS VoidLinux
terminal or gvim xfce4-terminal used