From 401afb205e37337480861905fce7a9fbe81408ff Mon Sep 17 00:00:00 2001 From: Barrett Ruth <62671086+barrettruth@users.noreply.github.com> Date: Thu, 5 Mar 2026 19:51:06 -0500 Subject: [PATCH] feat(commands): document :CP open [problem|contest|standings] (#321) forgot to document `:CP open` --- doc/cp.nvim.txt | 49 ++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 40 insertions(+), 9 deletions(-) diff --git a/doc/cp.nvim.txt b/doc/cp.nvim.txt index 2c0cc5c..94e4762 100644 --- a/doc/cp.nvim.txt +++ b/doc/cp.nvim.txt @@ -24,15 +24,16 @@ CONTENTS *cp-contents* 16. Race .......................................................... |cp-race| 17. Credentials ............................................ |cp-credentials| 18. Submit ...................................................... |cp-submit| - 19. ANSI Colors ................................................... |cp-ansi| - 20. Highlight Groups ........................................ |cp-highlights| - 21. Terminal Colors .................................... |cp-terminal-colors| - 22. Highlight Customization .......................... |cp-highlight-custom| - 23. Helpers .................................................... |cp-helpers| - 24. Statusline Integration .................................. |cp-statusline| - 25. Panel Keymaps .......................................... |cp-panel-keys| - 26. File Structure ................................................ |cp-files| - 27. Health Check ................................................ |cp-health| + 19. Open ......................................................... |cp-open| + 20. ANSI Colors ................................................... |cp-ansi| + 21. Highlight Groups ........................................ |cp-highlights| + 22. Terminal Colors .................................... |cp-terminal-colors| + 23. Highlight Customization .......................... |cp-highlight-custom| + 24. Helpers .................................................... |cp-helpers| + 25. Statusline Integration .................................. |cp-statusline| + 26. Panel Keymaps .......................................... |cp-panel-keys| + 27. File Structure ................................................ |cp-files| + 28. Health Check ................................................ |cp-health| ============================================================================== INTRODUCTION *cp.nvim* @@ -487,6 +488,17 @@ COMMANDS *cp-commands* credentials are saved. --lang: Submit solution for a specific language. + :CP open [problem|contest|standings] + Open the URL for the current problem, contest, + or standings page in the browser via + |vim.ui.open|. Defaults to "problem" if no + argument is given. Warns if the URL is not + available (e.g. CSES has no standings). + Examples: > + :CP open + :CP open contest + :CP open standings +< State Restoration ~ :CP Restore state from current file. Automatically detects platform, contest, problem, @@ -580,6 +592,9 @@ through the same code path as |:CP|. *(cp-submit)* (cp-submit) Submit current solution. Equivalent to :CP submit. + *(cp-open)* +(cp-open) Open current problem URL in browser. Equivalent to :CP open. + *(cp-race-stop)* (cp-race-stop) Cancel active race countdown. Equivalent to :CP race stop. @@ -1021,6 +1036,22 @@ Submit the current solution to the online judge. AtCoder Fully implemented. Others Not yet implemented. +============================================================================== +OPEN *cp-open* + +Open a platform URL for the current contest in the browser. + +:CP open [problem|contest|standings] + Open the URL for the active problem, contest page, or standings. + Defaults to "problem" if no argument is given. Uses |vim.ui.open|. + Warns if the URL is unavailable (e.g. CSES has no standings page). + + Platform support: + AtCoder problem, contest, standings + Codeforces problem, contest, standings + CSES problem, contest (no standings) + Others Not yet implemented. + ============================================================================== ANSI COLORS AND HIGHLIGHTING *cp-ansi*