-
-
Notifications
You must be signed in to change notification settings - Fork 136
Expand file tree
/
Copy pathExample.sublime-keymap
More file actions
56 lines (51 loc) · 2.87 KB
/
Example.sublime-keymap
File metadata and controls
56 lines (51 loc) · 2.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
[
// The equivalent of `git status`
{ "keys": ["ctrl+shift+s"], "command": "gs_show_status"},
// "all: true" or not true is up to you, *I* prefer "true" and configure
// git's remotes to not fetch everything upstream, just a subset I'm interested
// in. Any way you decide, when the view is open, `[a]` will toggle that flag
// dynamically.
// Btw. you can use `f` to e.g. pick-axe, but it is IMO easier to just select
// something in any view, and then to open the context menu (e.g. right mouse click),
// choose: `GitSavvy: Pick-axe`.
// By another way, you can use `l` to open a file/folder chooser to limit the
// output, but I usually use the Command Palette (`fh` for `File History`) for that.
{ "keys": ["ctrl+shift+g"], "command": "gs_graph", "args": { "all": true }},
// `gs_commit` is important as you can open it and if you haven't anything
// staged it will show all changes. Use `u` in the diff to unselect parts of
// your changes. `[ctrl+enter]` will commit.
{ "keys": ["ctrl+shift+c"], "command": "gs_commit"},
// *I* think the Line History is the quicker blame, so I use that actually a lot.
// Select some line, e.g. `[ctrl+l]`, and then `[ctrl+shift+l]` to see the history
// of the selected lines. Works also in diffs, e.g. to follow the history of a hunk!
{ "keys": ["ctrl+shift+l"], "command": "gs_line_history"},
// Navigate between changes, works in normal buffers and GitSavvy views.
{ "keys": ["ctrl+."], "command": "gs_super_next" },
{ "keys": ["ctrl+,"], "command": "gs_super_prev" },
// "current_file: true" or not (t.i. show all changes) is up to you. *I* prefer
// to start with "true". `[a]` will toggle between both modes.
// `[l]` will open the file chooser, `[N]` and `[P]` switch to the next or previous
// files immediately.
// Use `[space]` to select individual lines. Or `[,]` and `[.]` and the two super
// move commands above.
// If you're happy, move along with e.g. `[c]` to commit or `[m]` to amend the previous
// commit.
{
"keys": ["ctrl+shift+."],
"command": "gs_diff",
"args": { "current_file": true }
},
// I use the inline diff seldom but it has the `[a]`/`[b]` toggle to see the code
// in one of the two states, before and after. And it has `[n]` and `[p]` to walk
// back and forth in the file history...
{
"keys": ["ctrl+shift+,"],
"command": "gs_inline_diff"
},
// ... but I actually prefer the command `gs_show_file_at_commit` ("Show File at HEAD")
// which also has `[n]` and `[p]` walking but hides the diffing portion but just
// shows Sublime Text's gutter annotations for changes.
// Do note the `[l]` which let's you choose any revision of a file.
// For completeness, e.g.:
{ "keys": ["ctrl+alt+shift+h"], "command": "gs_show_file_at_commit" }
]