kaiwk / leetcode.el

An Emacs LeetCode client.
GNU General Public License v3.0
396 stars 70 forks source link

Feature: support several useful actions for navigating in "LC Problems" page #82

Closed limoiie closed 3 years ago

limoiie commented 3 years ago

Support to directly navigate in LC-Problems page by specifying a problem id which is the number in column '#'. These actions can be performed by single-char hotkeys or by calling related interactive functions. Additionally, each action has its own 'current' version that performs on the current problem with no need to specify one manually.

A more complete specification is shown in the table below:

action interactive function hotkey in LC-Problems
show* leetcode-show-current-problem o or RET
show leetcode-show-problem O
show-in-browser* leetcode-show-current-problem-in-browser b
show-in-browser leetcode-show-problem-in-browser B
view* leetcode-view-current-problem v or TAB
view leetcode-view-problem V
start-coding* leetcode-solve-current-problem c
start-coding leetcode-solve-problem C

Note the actions that end with '*' are the 'current' version.

Besides, the action view is similar to the action show, except that view will stay in the LC-Problems buffer after opening the description page. This could be very useful when someone just wants to glance over the problems to find an appropriate one.

Solves issue #66.