mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-01-06 03:53:59 +02:00
organise keybindings better
This commit is contained in:
parent
32ddf0c296
commit
e68dbeb7eb
@ -10,7 +10,7 @@ Jira? This is the app for you!
|
|||||||
|
|
||||||
- [Installation](https://github.com/jesseduffield/lazygit#installation)
|
- [Installation](https://github.com/jesseduffield/lazygit#installation)
|
||||||
- [Usage](https://github.com/jesseduffield/lazygit#usage),
|
- [Usage](https://github.com/jesseduffield/lazygit#usage),
|
||||||
[Keybindings](https://github.com/jesseduffield/lazygit/blob/master/docs/Keybindings_en.md)
|
[Keybindings](/docs/keybindings)
|
||||||
- [Cool Features](https://github.com/jesseduffield/lazygit#cool-features)
|
- [Cool Features](https://github.com/jesseduffield/lazygit#cool-features)
|
||||||
- [Contributing](https://github.com/jesseduffield/lazygit#contributing)
|
- [Contributing](https://github.com/jesseduffield/lazygit#contributing)
|
||||||
- [Video Tutorial](https://youtu.be/VDXvbHZYeKY)
|
- [Video Tutorial](https://youtu.be/VDXvbHZYeKY)
|
||||||
@ -104,7 +104,7 @@ whichever rc file you're using).
|
|||||||
|
|
||||||
- Basic video tutorial [here](https://youtu.be/VDXvbHZYeKY).
|
- Basic video tutorial [here](https://youtu.be/VDXvbHZYeKY).
|
||||||
- List of keybindings
|
- List of keybindings
|
||||||
[here](/docs/Keybindings_en.md).
|
[here](/docs/keybindings).
|
||||||
|
|
||||||
## Cool features
|
## Cool features
|
||||||
|
|
||||||
|
@ -91,6 +91,19 @@
|
|||||||
<kbd>o</kbd>: open file
|
<kbd>o</kbd>: open file
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
## Main (Merging)
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
<kbd>esc</kbd>: return to files panel
|
||||||
|
<kbd>space</kbd>: pick hunk
|
||||||
|
<kbd>b</kbd>: pick both hunks
|
||||||
|
<kbd>◄</kbd>: select previous conflict
|
||||||
|
<kbd>►</kbd>: select next conflict
|
||||||
|
<kbd>▲</kbd>: select top hunk
|
||||||
|
<kbd>▼</kbd>: select bottom hunk
|
||||||
|
<kbd>z</kbd>: undo
|
||||||
|
</pre>
|
||||||
|
|
||||||
## Main (Normal)
|
## Main (Normal)
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
@ -109,16 +122,3 @@
|
|||||||
<kbd>space</kbd>: stage line
|
<kbd>space</kbd>: stage line
|
||||||
<kbd>a</kbd>: stage hunk
|
<kbd>a</kbd>: stage hunk
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
## Main (Merging)
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
<kbd>esc</kbd>: return to files panel
|
|
||||||
<kbd>space</kbd>: pick hunk
|
|
||||||
<kbd>b</kbd>: pick both hunks
|
|
||||||
<kbd>◄</kbd>: select previous conflict
|
|
||||||
<kbd>►</kbd>: select next conflict
|
|
||||||
<kbd>▲</kbd>: select top hunk
|
|
||||||
<kbd>▼</kbd>: select bottom hunk
|
|
||||||
<kbd>z</kbd>: undo
|
|
||||||
</pre>
|
|
@ -61,7 +61,7 @@ func (gui *Gui) handleStatusSelect(g *gocui.Gui, v *gocui.View) error {
|
|||||||
[]string{
|
[]string{
|
||||||
lazygitTitle(),
|
lazygitTitle(),
|
||||||
"Copyright (c) 2018 Jesse Duffield",
|
"Copyright (c) 2018 Jesse Duffield",
|
||||||
"Keybindings: https://github.com/jesseduffield/lazygit/blob/master/docs/Keybindings.md",
|
"Keybindings: https://github.com/jesseduffield/lazygit/blob/master/docs/keybindings",
|
||||||
"Config Options: https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md",
|
"Config Options: https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md",
|
||||||
"Tutorial: https://youtu.be/VDXvbHZYeKY",
|
"Tutorial: https://youtu.be/VDXvbHZYeKY",
|
||||||
"Raise an Issue: https://github.com/jesseduffield/lazygit/issues",
|
"Raise an Issue: https://github.com/jesseduffield/lazygit/issues",
|
||||||
|
@ -31,7 +31,10 @@ func main() {
|
|||||||
for _, lang := range langs {
|
for _, lang := range langs {
|
||||||
os.Setenv("LC_ALL", lang)
|
os.Setenv("LC_ALL", lang)
|
||||||
mApp, _ := app.NewApp(mConfig)
|
mApp, _ := app.NewApp(mConfig)
|
||||||
file, _ := os.Create("Keybindings_" + lang + ".md")
|
file, err := os.Create(getProjectRoot() + "/docs/keybindings/Keybindings_" + lang + ".md")
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
bindingSections := getBindingSections(mApp)
|
bindingSections := getBindingSections(mApp)
|
||||||
content := formatSections(mApp, bindingSections)
|
content := formatSections(mApp, bindingSections)
|
||||||
@ -126,3 +129,11 @@ func formatSections(mApp *app.App, bindingSections []*bindingSection) string {
|
|||||||
|
|
||||||
return content
|
return content
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func getProjectRoot() string {
|
||||||
|
dir, err := os.Getwd()
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
return strings.Split(dir, "lazygit")[0] + "lazygit"
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user