Skip to content

Commit

Permalink
use <localleader> instead of <leader>
Browse files Browse the repository at this point in the history
  • Loading branch information
Groz17 authored and GuillaumeLagrange committed Nov 17, 2024
1 parent 3f9f945 commit 51f1808
Show file tree
Hide file tree
Showing 4 changed files with 149 additions and 149 deletions.
148 changes: 74 additions & 74 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,89 +168,89 @@ require"octo".setup({
mappings_disable_default = false, -- disable default mappings if true, but will still adapt user mappings
mappings = {
issue = {
close_issue = { lhs = "<leader>ic", desc = "close issue" },
reopen_issue = { lhs = "<leader>io", desc = "reopen issue" },
list_issues = { lhs = "<leader>il", desc = "list open issues on same repo" },
close_issue = { lhs = "<localleader>ic", desc = "close issue" },
reopen_issue = { lhs = "<localleader>io", desc = "reopen issue" },
list_issues = { lhs = "<localleader>il", desc = "list open issues on same repo" },
reload = { lhs = "<C-r>", desc = "reload issue" },
open_in_browser = { lhs = "<C-b>", desc = "open issue in browser" },
copy_url = { lhs = "<C-y>", desc = "copy url to system clipboard" },
add_assignee = { lhs = "<leader>aa", desc = "add assignee" },
remove_assignee = { lhs = "<leader>ad", desc = "remove assignee" },
create_label = { lhs = "<leader>lc", desc = "create label" },
add_label = { lhs = "<leader>la", desc = "add label" },
remove_label = { lhs = "<leader>ld", desc = "remove label" },
goto_issue = { lhs = "<leader>gi", desc = "navigate to a local repo issue" },
add_comment = { lhs = "<leader>ca", desc = "add comment" },
delete_comment = { lhs = "<leader>cd", desc = "delete comment" },
add_assignee = { lhs = "<localleader>aa", desc = "add assignee" },
remove_assignee = { lhs = "<localleader>ad", desc = "remove assignee" },
create_label = { lhs = "<localleader>lc", desc = "create label" },
add_label = { lhs = "<localleader>la", desc = "add label" },
remove_label = { lhs = "<localleader>ld", desc = "remove label" },
goto_issue = { lhs = "<localleader>gi", desc = "navigate to a local repo issue" },
add_comment = { lhs = "<localleader>ca", desc = "add comment" },
delete_comment = { lhs = "<localleader>cd", desc = "delete comment" },
next_comment = { lhs = "]c", desc = "go to next comment" },
prev_comment = { lhs = "[c", desc = "go to previous comment" },
react_hooray = { lhs = "<leader>rp", desc = "add/remove 🎉 reaction" },
react_heart = { lhs = "<leader>rh", desc = "add/remove ❤️ reaction" },
react_eyes = { lhs = "<leader>re", desc = "add/remove 👀 reaction" },
react_thumbs_up = { lhs = "<leader>r+", desc = "add/remove 👍 reaction" },
react_thumbs_down = { lhs = "<leader>r-", desc = "add/remove 👎 reaction" },
react_rocket = { lhs = "<leader>rr", desc = "add/remove 🚀 reaction" },
react_laugh = { lhs = "<leader>rl", desc = "add/remove 😄 reaction" },
react_confused = { lhs = "<leader>rc", desc = "add/remove 😕 reaction" },
react_hooray = { lhs = "<localleader>rp", desc = "add/remove 🎉 reaction" },
react_heart = { lhs = "<localleader>rh", desc = "add/remove ❤️ reaction" },
react_eyes = { lhs = "<localleader>re", desc = "add/remove 👀 reaction" },
react_thumbs_up = { lhs = "<localleader>r+", desc = "add/remove 👍 reaction" },
react_thumbs_down = { lhs = "<localleader>r-", desc = "add/remove 👎 reaction" },
react_rocket = { lhs = "<localleader>rr", desc = "add/remove 🚀 reaction" },
react_laugh = { lhs = "<localleader>rl", desc = "add/remove 😄 reaction" },
react_confused = { lhs = "<localleader>rc", desc = "add/remove 😕 reaction" },
},
pull_request = {
checkout_pr = { lhs = "<leader>po", desc = "checkout PR" },
merge_pr = { lhs = "<leader>pm", desc = "merge commit PR" },
squash_and_merge_pr = { lhs = "<leader>psm", desc = "squash and merge PR" },
rebase_and_merge_pr = { lhs = "<leader>prm", desc = "rebase and merge PR" },
list_commits = { lhs = "<leader>pc", desc = "list PR commits" },
list_changed_files = { lhs = "<leader>pf", desc = "list PR changed files" },
show_pr_diff = { lhs = "<leader>pd", desc = "show PR diff" },
add_reviewer = { lhs = "<leader>va", desc = "add reviewer" },
remove_reviewer = { lhs = "<leader>vd", desc = "remove reviewer request" },
close_issue = { lhs = "<leader>ic", desc = "close PR" },
reopen_issue = { lhs = "<leader>io", desc = "reopen PR" },
list_issues = { lhs = "<leader>il", desc = "list open issues on same repo" },
checkout_pr = { lhs = "<localleader>po", desc = "checkout PR" },
merge_pr = { lhs = "<localleader>pm", desc = "merge commit PR" },
squash_and_merge_pr = { lhs = "<localleader>psm", desc = "squash and merge PR" },
rebase_and_merge_pr = { lhs = "<localleader>prm", desc = "rebase and merge PR" },
list_commits = { lhs = "<localleader>pc", desc = "list PR commits" },
list_changed_files = { lhs = "<localleader>pf", desc = "list PR changed files" },
show_pr_diff = { lhs = "<localleader>pd", desc = "show PR diff" },
add_reviewer = { lhs = "<localleader>va", desc = "add reviewer" },
remove_reviewer = { lhs = "<localleader>vd", desc = "remove reviewer request" },
close_issue = { lhs = "<localleader>ic", desc = "close PR" },
reopen_issue = { lhs = "<localleader>io", desc = "reopen PR" },
list_issues = { lhs = "<localleader>il", desc = "list open issues on same repo" },
reload = { lhs = "<C-r>", desc = "reload PR" },
open_in_browser = { lhs = "<C-b>", desc = "open PR in browser" },
copy_url = { lhs = "<C-y>", desc = "copy url to system clipboard" },
goto_file = { lhs = "gf", desc = "go to file" },
add_assignee = { lhs = "<leader>aa", desc = "add assignee" },
remove_assignee = { lhs = "<leader>ad", desc = "remove assignee" },
create_label = { lhs = "<leader>lc", desc = "create label" },
add_label = { lhs = "<leader>la", desc = "add label" },
remove_label = { lhs = "<leader>ld", desc = "remove label" },
goto_issue = { lhs = "<leader>gi", desc = "navigate to a local repo issue" },
add_comment = { lhs = "<leader>ca", desc = "add comment" },
delete_comment = { lhs = "<leader>cd", desc = "delete comment" },
add_assignee = { lhs = "<localleader>aa", desc = "add assignee" },
remove_assignee = { lhs = "<localleader>ad", desc = "remove assignee" },
create_label = { lhs = "<localleader>lc", desc = "create label" },
add_label = { lhs = "<localleader>la", desc = "add label" },
remove_label = { lhs = "<localleader>ld", desc = "remove label" },
goto_issue = { lhs = "<localleader>gi", desc = "navigate to a local repo issue" },
add_comment = { lhs = "<localleader>ca", desc = "add comment" },
delete_comment = { lhs = "<localleader>cd", desc = "delete comment" },
next_comment = { lhs = "]c", desc = "go to next comment" },
prev_comment = { lhs = "[c", desc = "go to previous comment" },
react_hooray = { lhs = "<leader>rp", desc = "add/remove 🎉 reaction" },
react_heart = { lhs = "<leader>rh", desc = "add/remove ❤️ reaction" },
react_eyes = { lhs = "<leader>re", desc = "add/remove 👀 reaction" },
react_thumbs_up = { lhs = "<leader>r+", desc = "add/remove 👍 reaction" },
react_thumbs_down = { lhs = "<leader>r-", desc = "add/remove 👎 reaction" },
react_rocket = { lhs = "<leader>rr", desc = "add/remove 🚀 reaction" },
react_laugh = { lhs = "<leader>rl", desc = "add/remove 😄 reaction" },
react_confused = { lhs = "<leader>rc", desc = "add/remove 😕 reaction" },
review_start = { lhs = "<leader>vs", desc = "start a review for the current PR" },
review_resume = { lhs = "<leader>vr", desc = "resume a pending review for the current PR" },
react_hooray = { lhs = "<localleader>rp", desc = "add/remove 🎉 reaction" },
react_heart = { lhs = "<localleader>rh", desc = "add/remove ❤️ reaction" },
react_eyes = { lhs = "<localleader>re", desc = "add/remove 👀 reaction" },
react_thumbs_up = { lhs = "<localleader>r+", desc = "add/remove 👍 reaction" },
react_thumbs_down = { lhs = "<localleader>r-", desc = "add/remove 👎 reaction" },
react_rocket = { lhs = "<localleader>rr", desc = "add/remove 🚀 reaction" },
react_laugh = { lhs = "<localleader>rl", desc = "add/remove 😄 reaction" },
react_confused = { lhs = "<localleader>rc", desc = "add/remove 😕 reaction" },
review_start = { lhs = "<localleader>vs", desc = "start a review for the current PR" },
review_resume = { lhs = "<localleader>vr", desc = "resume a pending review for the current PR" },
},
review_thread = {
goto_issue = { lhs = "<leader>gi", desc = "navigate to a local repo issue" },
add_comment = { lhs = "<leader>ca", desc = "add comment" },
add_suggestion = { lhs = "<leader>sa", desc = "add suggestion" },
delete_comment = { lhs = "<leader>cd", desc = "delete comment" },
goto_issue = { lhs = "<localleader>gi", desc = "navigate to a local repo issue" },
add_comment = { lhs = "<localleader>ca", desc = "add comment" },
add_suggestion = { lhs = "<localleader>sa", desc = "add suggestion" },
delete_comment = { lhs = "<localleader>cd", desc = "delete comment" },
next_comment = { lhs = "]c", desc = "go to next comment" },
prev_comment = { lhs = "[c", desc = "go to previous comment" },
select_next_entry = { lhs = "]q", desc = "move to next changed file" },
select_prev_entry = { lhs = "[q", desc = "move to previous changed file" },
select_first_entry = { lhs = "[Q", desc = "move to first changed file" },
select_last_entry = { lhs = "]Q", desc = "move to last changed file" },
close_review_tab = { lhs = "<C-c>", desc = "close review tab" },
react_hooray = { lhs = "<leader>rp", desc = "add/remove 🎉 reaction" },
react_heart = { lhs = "<leader>rh", desc = "add/remove ❤️ reaction" },
react_eyes = { lhs = "<leader>re", desc = "add/remove 👀 reaction" },
react_thumbs_up = { lhs = "<leader>r+", desc = "add/remove 👍 reaction" },
react_thumbs_down = { lhs = "<leader>r-", desc = "add/remove 👎 reaction" },
react_rocket = { lhs = "<leader>rr", desc = "add/remove 🚀 reaction" },
react_laugh = { lhs = "<leader>rl", desc = "add/remove 😄 reaction" },
react_confused = { lhs = "<leader>rc", desc = "add/remove 😕 reaction" },
react_hooray = { lhs = "<localleader>rp", desc = "add/remove 🎉 reaction" },
react_heart = { lhs = "<localleader>rh", desc = "add/remove ❤️ reaction" },
react_eyes = { lhs = "<localleader>re", desc = "add/remove 👀 reaction" },
react_thumbs_up = { lhs = "<localleader>r+", desc = "add/remove 👍 reaction" },
react_thumbs_down = { lhs = "<localleader>r-", desc = "add/remove 👎 reaction" },
react_rocket = { lhs = "<localleader>rr", desc = "add/remove 🚀 reaction" },
react_laugh = { lhs = "<localleader>rl", desc = "add/remove 😄 reaction" },
react_confused = { lhs = "<localleader>rc", desc = "add/remove 😕 reaction" },
},
submit_win = {
approve_review = { lhs = "<C-a>", desc = "approve review" },
Expand All @@ -259,37 +259,37 @@ require"octo".setup({
close_review_tab = { lhs = "<C-c>", desc = "close review tab" },
},
review_diff = {
submit_review = { lhs = "<leader>vs", desc = "submit review" },
discard_review = { lhs = "<leader>vd", desc = "discard review" },
add_review_comment = { lhs = "<leader>ca", desc = "add a new review comment" },
add_review_suggestion = { lhs = "<leader>sa", desc = "add a new review suggestion" },
focus_files = { lhs = "<leader>e", desc = "move focus to changed file panel" },
toggle_files = { lhs = "<leader>b", desc = "hide/show changed files panel" },
submit_review = { lhs = "<localleader>vs", desc = "submit review" },
discard_review = { lhs = "<localleader>vd", desc = "discard review" },
add_review_comment = { lhs = "<localleader>ca", desc = "add a new review comment" },
add_review_suggestion = { lhs = "<localleader>sa", desc = "add a new review suggestion" },
focus_files = { lhs = "<localleader>e", desc = "move focus to changed file panel" },
toggle_files = { lhs = "<localleader>b", desc = "hide/show changed files panel" },
next_thread = { lhs = "]t", desc = "move to next thread" },
prev_thread = { lhs = "[t", desc = "move to previous thread" },
select_next_entry = { lhs = "]q", desc = "move to next changed file" },
select_prev_entry = { lhs = "[q", desc = "move to previous changed file" },
select_first_entry = { lhs = "[Q", desc = "move to first changed file" },
select_last_entry = { lhs = "]Q", desc = "move to last changed file" },
close_review_tab = { lhs = "<C-c>", desc = "close review tab" },
toggle_viewed = { lhs = "<leader><space>", desc = "toggle viewer viewed state" },
toggle_viewed = { lhs = "<localleader><space>", desc = "toggle viewer viewed state" },
goto_file = { lhs = "gf", desc = "go to file" },
},
file_panel = {
submit_review = { lhs = "<leader>vs", desc = "submit review" },
discard_review = { lhs = "<leader>vd", desc = "discard review" },
submit_review = { lhs = "<localleader>vs", desc = "submit review" },
discard_review = { lhs = "<localleader>vd", desc = "discard review" },
next_entry = { lhs = "j", desc = "move to next changed file" },
prev_entry = { lhs = "k", desc = "move to previous changed file" },
select_entry = { lhs = "<cr>", desc = "show selected changed file diffs" },
refresh_files = { lhs = "R", desc = "refresh changed files panel" },
focus_files = { lhs = "<leader>e", desc = "move focus to changed file panel" },
toggle_files = { lhs = "<leader>b", desc = "hide/show changed files panel" },
focus_files = { lhs = "<localleader>e", desc = "move focus to changed file panel" },
toggle_files = { lhs = "<localleader>b", desc = "hide/show changed files panel" },
select_next_entry = { lhs = "]q", desc = "move to next changed file" },
select_prev_entry = { lhs = "[q", desc = "move to previous changed file" },
select_first_entry = { lhs = "[Q", desc = "move to first changed file" },
select_last_entry = { lhs = "]Q", desc = "move to last changed file" },
close_review_tab = { lhs = "<C-c>", desc = "close review tab" },
toggle_viewed = { lhs = "<leader><space>", desc = "toggle viewer viewed state" },
toggle_viewed = { lhs = "<localleader><space>", desc = "toggle viewer viewed state" },
},
},
})
Expand Down Expand Up @@ -443,7 +443,7 @@ Octo search assignee:pwntester is:pr
- Enter review mode for the current branch with `Octo review`. Alternatively open the PR (e.g. `Octo <PR url>` or `Octo pr list` or `Octo pr edit <PR number>`) then use `Octo review` in the PR buffer to enter review mode for a specific PR.
- A new tab will show a panel with changed files and two windows showing the diff on any of them.
- Change panel entries with `]q` and `[q` or by selecting an entry in the window
- Add comments with `<leader>ca` or suggestions with `<leader>sa` on single or multiple visual-selected lines
- Add comments with `<localleader>ca` or suggestions with `<localleader>sa` on single or multiple visual-selected lines
- A new buffer will appear in the alternate diff window. The cursor will be positioned in the new buffer
- When ready, save the buffer to commit changes to GitHub
- Move back to the diff window and move the cursor, the thread buffer will hide
Expand Down
2 changes: 1 addition & 1 deletion doc/octo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ PR REVIEW *octo-pr-review*
* Start a review with `Octo review start` or resume a pending review with `Octo review resume`
A new tab will show a panel with changed files and two windows showing the diff on any of them.
Change panel entries with `]q` and `[q` or by selecting an entry in the window.
* Add comments with `<leader>ca` or suggestions with `<leader>sa` on single or
* Add comments with `<localleader>ca` or suggestions with `<localleader>sa` on single or
multiple visual-selected lines
* A new buffer will appear in the alternate diff window. Cursor will be
positioned in the new buffer
Expand Down
Loading

0 comments on commit 51f1808

Please sign in to comment.