Skip to content
Snippets Groups Projects
Commit 3ab04b28 authored by Jerome Reybert's avatar Jerome Reybert
Browse files

doc: update all docs with new commands

parent aa9c0649
Branches
Tags
No related merge requests found
...@@ -27,6 +27,7 @@ Take a look at [TL;DR](#tldr) to start using it immediatly. ...@@ -27,6 +27,7 @@ Take a look at [TL;DR](#tldr) to start using it immediatly.
* [x] See all your changes, staged changes, untracked/removed/renamed files in one unique buffer. * [x] See all your changes, staged changes, untracked/removed/renamed files in one unique buffer.
* [x] Staged/unstaged/discard changes with one key press, moving the cursor around. Stage at hunk or file level. Line and partial line staging are ongoing. * [x] Staged/unstaged/discard changes with one key press, moving the cursor around. Stage at hunk or file level. Line and partial line staging are ongoing.
* [x] Stage part of hunks, by visual select, lines or selecting bunch of lines with marks.
* [x] Start to write the commit message in one key press, commit also in one key press. * [x] Start to write the commit message in one key press, commit also in one key press.
* [x] Modify in line the content just before staging it. * [x] Modify in line the content just before staging it.
* [x] Visualize stashes. Apply, pop, drop are on going. * [x] Visualize stashes. Apply, pop, drop are on going.
...@@ -34,7 +35,6 @@ Take a look at [TL;DR](#tldr) to start using it immediatly. ...@@ -34,7 +35,6 @@ Take a look at [TL;DR](#tldr) to start using it immediatly.
* [ ] Chase all corner cases. Please remember that vimagit is at an early development stage. If you try vimagit and nothing is working, please don't throw it, fill an issue on github :heart: ! * [ ] Chase all corner cases. Please remember that vimagit is at an early development stage. If you try vimagit and nothing is working, please don't throw it, fill an issue on github :heart: !
More to come: More to come:
* Partial hunk staging (next release).
* Vizualize and checkout branches. * Vizualize and checkout branches.
* Go through history, cherry-pick changes. * Go through history, cherry-pick changes.
* Something is missing? Open an [issue](https://github.com/jreybert/vimagit/issues/new)! * Something is missing? Open an [issue](https://github.com/jreybert/vimagit/issues/new)!
...@@ -123,6 +123,8 @@ Following mappings are set locally, for magit buffer only, in normal mode. ...@@ -123,6 +123,8 @@ Following mappings are set locally, for magit buffer only, in normal mode.
**S** **S**
* If cursor is in a hunk, stage/unstage hunk at cursor position. * If cursor is in a hunk, stage/unstage hunk at cursor position.
* If cursor is in diff header, stage/unstage whole file at cursor position. * If cursor is in diff header, stage/unstage whole file at cursor position.
* If some lines in the hunk are selected (using **v**), stage only visual selected lines (only works for staging).
* If some lines in the hunk are marked (using **M**), stage only marked lines (only works for staging).
* When cursor is in "Unstaged changes" section, it will stage the hunk/file. * When cursor is in "Unstaged changes" section, it will stage the hunk/file.
* On the other side, when cursor is in "Staged changes" section, it will unstage hunk/file. * On the other side, when cursor is in "Staged changes" section, it will unstage hunk/file.
...@@ -131,6 +133,14 @@ Following mappings are set locally, for magit buffer only, in normal mode. ...@@ -131,6 +133,14 @@ Following mappings are set locally, for magit buffer only, in normal mode.
* When cursor is in "Unstaged changes" section, it will stage the file. * When cursor is in "Unstaged changes" section, it will stage the file.
* On the other side, when cursor is in "Staged changes" section, it will unstage file. * On the other side, when cursor is in "Staged changes" section, it will unstage file.
**L**
* Stage the line under the cursor.
**M**
* Mark the line under the cursor "to be staged".
* If some lines in the hunk are selected (using **v**), mark selected lines "to be staged".
* To staged marked lines in a hunk, move cursor to this hunk and press **S**.
**DDD** **DDD**
* If cursor is in a hunk, discard hunk at cursor position. * If cursor is in a hunk, discard hunk at cursor position.
* If cursor is in diff header, discard whole file at cursor position. * If cursor is in diff header, discard whole file at cursor position.
......
...@@ -152,10 +152,15 @@ Following mappings are set locally, for magit buffer only, in normal mode. ...@@ -152,10 +152,15 @@ Following mappings are set locally, for magit buffer only, in normal mode.
zc,zC Typing zc on a file will hide its diffs. zc,zC Typing zc on a file will hide its diffs.
*vimagit-S* *magit#stage_hunk(0)* *vimagit-S* *magit#stage_hunk(0)*
*magit#stage_vselect()*
*vimagit-g:magit_stage_hunk_mapping* *vimagit-g:magit_stage_hunk_mapping*
S If cursor is in a hunk, stage/unstage hunk at cursor position. S If cursor is in a hunk, stage/unstage hunk at cursor position.
If cursor is in diff header, stage/unstage whole file at cursor If cursor is in diff header, stage/unstage whole file at cursor
position. position.
If some lines in the hunk are selected (see |visual-use|), stage
only selected lines (only works for staging).
If some lines in the hunk are marked (see |vimagit-M|), stage only
these lines (only works for staging).
When cursor is in "Unstaged changes" section, it will stage the When cursor is in "Unstaged changes" section, it will stage the
hunk/file. hunk/file.
On the other side, when cursor is in "Staged changes" section, it On the other side, when cursor is in "Staged changes" section, it
...@@ -169,6 +174,16 @@ Following mappings are set locally, for magit buffer only, in normal mode. ...@@ -169,6 +174,16 @@ Following mappings are set locally, for magit buffer only, in normal mode.
On the other side, when cursor is in "Staged changes" section, it On the other side, when cursor is in "Staged changes" section, it
will unstage file. will unstage file.
*vimagit-L* *magit#stage_vselect()*
L Stage the line under the cursor (only works for staging)
*vimagit-M* *magit#mark_vselect()*
M
Mark the current line to be staged.
If some lines in the hunk are selected (see |visual-use|), mark
selected lines.
To staged marked lines, press S (see |vimagit-S|) in the current
hunk.
*vimagit-DDD* *magit#stage_hunk(1)* *vimagit-DDD* *magit#stage_hunk(1)*
*vimagit-g:magit_discard_hunk_mapping* *vimagit-g:magit_discard_hunk_mapping*
......
...@@ -68,19 +68,26 @@ execute "nnoremap <silent> " . g:magit_show_magit_mapping . " :call magit#show_m ...@@ -68,19 +68,26 @@ execute "nnoremap <silent> " . g:magit_show_magit_mapping . " :call magit#show_m
" s:magit_inline_help: Dict containing inline help for each section " s:magit_inline_help: Dict containing inline help for each section
let s:magit_inline_help = { let s:magit_inline_help = {
\ 'staged': [ \ 'staged': [
\'S if cursor in diff header, unstage file', \'S if cursor on filename header, unstage file',
\' if cursor in hunk, unstage hunk', \' if cursor in hunk, unstage hunk',
\'F if cursor in diff header or hunk, unstage file', \'F if cursor on filename header or hunk, unstage whole file',
\], \],
\ 'unstaged': [ \ 'unstaged': [
\'S if cursor in diff header, stage file', \'S if cursor on filename header, stage file',
\' if cursor in hunk, stage hunk', \' if cursor in hunk, stage hunk',
\'F if cursor in diff header or hunk, stage file', \' if visual selection in hunk (with v), stage selection',
\' if lines marked in hunk (with M), stage marked lines',
\'L stage the line under the cursor',
\'M if cursor in hunk, mark line under cursor "to be staged"',
\' if visual selection in hunk (with v), mark selected lines "to be'
\' staged"',
\'F if cursor on filename header or hunk, stage whole file',
\'DDD discard file changes (warning, changes will be lost)', \'DDD discard file changes (warning, changes will be lost)',
\'I add file in .gitgnore', \'I add file in .gitgnore',
\], \],
\ 'global': [ \ 'global': [
\'C CC set commit mode to normal, and show "Commit message" section', \'<CR> if cursor on filename header line, unhide diffs for this file',
\'CC set commit mode to normal, and show "Commit message" section',
\'CA set commit mode amend, and show "Commit message" section with previous', \'CA set commit mode amend, and show "Commit message" section with previous',
\' commit message', \' commit message',
\'CF amend staged changes to previous commit without modifying the previous', \'CF amend staged changes to previous commit without modifying the previous',
...@@ -93,8 +100,8 @@ let s:magit_inline_help = { ...@@ -93,8 +100,8 @@ let s:magit_inline_help = {
\'You will still be able to toggle inline help with h', \'You will still be able to toggle inline help with h',
\], \],
\ 'commit': [ \ 'commit': [
\'C CC commit all staged changes with commit mode previously set (normal or', \'CC,:w commit all staged changes with commit mode previously set (normal or',
\':w<cr> amend) with message written in this section', \' amend) with message written in this section',
\], \],
\} \}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment