Skip to content

Commit

Permalink
Merge pull request #82 from limoiie/feat/problem-related-actions-in-l…
Browse files Browse the repository at this point in the history
…eetcode-buffer

Feature: support several useful actions for navigating in "LC Problems" page
  • Loading branch information
kaiwk authored Jan 21, 2021
2 parents f606f11 + e9e085a commit 3f0129c
Show file tree
Hide file tree
Showing 2 changed files with 208 additions and 94 deletions.
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ LeetCode brings you offer, and now Emacs brings you LeetCode!

1. Execute `leetcode` command, and in problem list buffer:

| keymap | command |
| Keymap | Description |
|--------|----------------------------------------|
| n | cursor move down |
| p | cursor move up |
Expand All @@ -21,6 +21,9 @@ LeetCode brings you offer, and now Emacs brings you LeetCode!
| g | refresh without fetching from LeetCode |
| G | refresh all data |
| RET | show current problem description |
| TAB | view current problem description |

More advanced navigation hotkeys can be found [here](#advanced-navigation).

2. Press `<RET>`, show problem description, move cursor to "solve it", press
`<RET>` again, start coding!
Expand All @@ -30,6 +33,21 @@ LeetCode brings you offer, and now Emacs brings you LeetCode!

![leetcode-submit](images/leetcode-submit.png)

## Advanced Navigation

Here are some advanced navigation hotkeys that may be useful in problem list buffer:

| Keymap | Command | Description |
|--------|--------------------------------------------|-------------------------------------|
| o | `leetcode-show-problem` | show/open the current problem |
| O | `leetcode-show-current-problem` | show/open a problem by id |
| v | `leetcode-view-problem` | view the current problem |
| V | `leetcode-view-current-problem` | view a problem by id |
| b | `leetcode-show-problem-in-browser` | show the current problem in browser |
| B | `leetcode-show-current-problem-in-browser` | show a problem by id in browser |
| c | `leetcode-solve-problem` | start coding the current problem |
| C | `leetcode-solve-current-problem` | start coding a problem by id |

# Installation

- Vanilla Emacs: `package-install` it from melpa directly
Expand Down
Loading

0 comments on commit 3f0129c

Please sign in to comment.