You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Config.md
+6-12Lines changed: 6 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,8 +57,6 @@ gui:
57
57
- blue
58
58
selectedLineBgColor:
59
59
- blue # set to `default` to have no background colour
60
-
selectedRangeBgColor:
61
-
- blue
62
60
cherryPickedCommitBgColor:
63
61
- cyan
64
62
cherryPickedCommitFgColor:
@@ -201,6 +199,9 @@ keybinding:
201
199
toggleWhitespaceInDiffView: '<c-w>'
202
200
increaseContextInDiffView: '}'
203
201
decreaseContextInDiffView: '{'
202
+
toggleRangeSelect: 'v'
203
+
rangeSelectUp: '<s-up>'
204
+
rangeSelectDown: '<s-down>'
204
205
status:
205
206
checkForUpdate: 'u'
206
207
recentRepos: '<enter>'
@@ -249,9 +250,8 @@ keybinding:
249
250
amendAttributeMenu: 'a'
250
251
pickCommit: 'p'# pick commit (when mid-rebase)
251
252
revertCommit: 't'
252
-
cherryPickCopy: 'c'
253
-
cherryPickCopyRange: 'C'
254
-
pasteCommits: 'v'
253
+
cherryPickCopy: 'C'
254
+
pasteCommits: 'V'
255
255
tagCommit: 'T'
256
256
checkoutCommit: '<space>'
257
257
resetCherryPick: '<c-R>'
@@ -264,8 +264,6 @@ keybinding:
264
264
commitFiles:
265
265
checkoutCommitFile: 'c'
266
266
main:
267
-
toggleDragSelect: 'v'
268
-
toggleDragSelect-alt: 'V'
269
267
toggleSelectHunk: 'a'
270
268
pickBothHunks: 'b'
271
269
submodules:
@@ -396,15 +394,13 @@ The available attributes are:
396
394
397
395
## Highlighting the selected line
398
396
399
-
If you don't like the default behaviour of highlighting the selected line with a blue background, you can use the `selectedLineBgColor` and `selectedRangeBgColor` keys to customise the behaviour. If you just want to embolden the selected line (this was the original default), you can do the following:
397
+
If you don't like the default behaviour of highlighting the selected line with a blue background, you can use the `selectedLineBgColor` key to customise the behaviour. If you just want to embolden the selected line (this was the original default), you can do the following:
Some actions can be performed on a range of contiguous items. For example:
4
+
* staging multiple files at once
5
+
* squashing multiple commits at once
6
+
* copying (for cherry-pick) multiple commits at once
7
+
8
+
There are two ways to select a range of items:
9
+
1. Sticky range select: Press 'v' to toggle range select, then expand the selection using the up/down arrow key. To reset the selection, press 'v' again.
10
+
2. Non-sticky range select: Press shift+up or shift+down to expand the selection. To reset the selection, press up/down without shift.
11
+
12
+
The sticky option will be more familiar to vim users, and the second option will feel more natural to users who aren't used to doing things in a modal way.
13
+
14
+
In order to perform an action on a range of items, simply press the normal key for that action. If the action only works on individual items, it will raise an error. This is a new feature and the plan is to incrementally support range select for more and more actions. If there is an action you would like to support range select which currently does not, please raise an issue in the repo.
Copy file name to clipboardExpand all lines: docs/dev/Codebase_Guide.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,6 +58,7 @@
58
58
*`pkg/gui/gui_common.go`: defines gui-specific methods that all controllers and helpers have access to
59
59
*`pkg/i18n/english.go`: defines the set of i18n strings and their English values
60
60
*`pkg/gui/controllers/helpers/refresh_helper.go`: manages refreshing of models. The refresh helper is typically invoked at the end of an action to re-load affected models from git (e.g. re-load branches after doing a git pull)
61
+
*`pkg/gui/controllers/quit_actions.go`: contains code that runs when you hit 'escape' on a view (assuming the view doesn't define its own escape handler)
61
62
*`vendor/github.com/jesseduffield/gocui/gui.go`: defines the gocui gui struct
62
63
*`vendor/github.com/jesseduffield/gocui/view.go`: defines the gocui view struct
63
64
@@ -75,6 +76,8 @@ In terms of dependencies, controllers sit at the highest level, so they can refe
75
76
***Tab**: Each tab in a window (e.g. Files, Worktrees, Submodules) actually has a corresponding view which we bring to the front upon changing tabs.
76
77
***Model**: Representation of a git object e.g. commits, branches, files.
77
78
***ViewModel**: Used by a context to maintain state related to the view.
79
+
***Keybinding**: A keybinding associates a _key_ with an _action_. For example if you press the 'down' arrow, the action performed will be your cursor moving down a list by one.
80
+
***Action**: An action is the thing that happens when you press a key. Often an action will invoke a git command, but not always: for example, navigation actions don't involve git.
78
81
***Common structs**: Most structs have a field named `c` which contains a 'common' struct: a struct containing a bag of dependencies that most structs of the same layer require. For example if you want to access a helper from a controller you can do so with `self.c.Helpers.MyHelper`.
0 commit comments