From e20670f63fe717ba0498ed932c054927f5871faa Mon Sep 17 00:00:00 2001 From: Jerome Reybert <jreybert@gmail.com> Date: Tue, 10 Nov 2015 23:22:16 +0100 Subject: [PATCH] doc: add a section about visual selection (fix #33) --- README.md | 12 ++++++++++++ doc/vimagit.txt | 13 +++++++++++++ 2 files changed, 25 insertions(+) diff --git a/README.md b/README.md index 0d80e04..0ed444e 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,18 @@ There are 5 sections: * only lines starting with a + sign can be modified * no line can be deleted +### Visual selection + +It is possible to stage part of hunk, by different ways: +* By visually selecting some lines, then staging the selection with **S**. +* By marking some lines "to be staged" with **M**, then staging these selected lines with **S**. +* Staging individual lines with **L**. + +Visual selection and marked lines have some limitations for the moment: +* It only work for "staging", not for "unstaging". +* Selection/marks must be within a single hunk. +* Marks not within the hunk currently staged are lost during stage process magit buffer refresh. + ### Commands #### magit#show_magit() diff --git a/doc/vimagit.txt b/doc/vimagit.txt index 66bfaa9..2ee997b 100644 --- a/doc/vimagit.txt +++ b/doc/vimagit.txt @@ -109,6 +109,19 @@ INLINE MODIFICATIONS *vimagit-inline-modification* * only lines starting with a + sign can be modified * no line can be deleted +VISUAL SELECTION *vimagit-visual-selection* + +It is possible to stage part of hunk, by different ways: +* By visually selecting some lines, then staging the selection with S. +* By marking some lines "to be staged" with M, then staging these selected + lines with S. +* Staging individual lines with L. + +Visual selection and marked lines have some limitations for the moment: +* It only work for "staging", not for "unstaging". +* Selection/marks must be within a single hunk. +* Marks not within the hunk currently staged are lost during stage process magit + buffer refresh. COMMANDS *vimagit-commands* -- GitLab