feat: update outdated variable references
This commit is contained in:
parent
e1ad439781
commit
17cdbf0a50
4 changed files with 45 additions and 54 deletions
24
doc/cp.txt
24
doc/cp.txt
|
|
@ -77,7 +77,7 @@ Optional configuration with lazy.nvim: >
|
|||
opts = {
|
||||
debug = false,
|
||||
contests = {
|
||||
default = {
|
||||
codeforces = {
|
||||
cpp = {
|
||||
compile = {
|
||||
'g++', '-std=c++{version}', '-O2', '-Wall', '-Wextra',
|
||||
|
|
@ -89,7 +89,7 @@ Optional configuration with lazy.nvim: >
|
|||
'-fsanitize=address,undefined', '-DLOCAL',
|
||||
'{source}', '-o', '{binary}',
|
||||
},
|
||||
version = 20,
|
||||
version = 23,
|
||||
extension = "cc",
|
||||
},
|
||||
python = {
|
||||
|
|
@ -97,9 +97,9 @@ Optional configuration with lazy.nvim: >
|
|||
debug = { 'python3', '{source}' },
|
||||
extension = "py",
|
||||
},
|
||||
default_language = "cpp",
|
||||
timeout_ms = 2000,
|
||||
},
|
||||
codeforces = { cpp = { version = 23 } },
|
||||
},
|
||||
hooks = {
|
||||
before_run = function(ctx) vim.cmd.w() end,
|
||||
|
|
@ -115,7 +115,7 @@ Optional configuration with lazy.nvim: >
|
|||
},
|
||||
snippets = { ... }, -- LuaSnip snippets
|
||||
tile = function(source_buf, input_buf, output_buf) ... end,
|
||||
filename = function(contest, problem_id, problem_letter) ... end,
|
||||
filename = function(contest, contest_id, problem_id, config, language) ... end,
|
||||
}
|
||||
}
|
||||
<
|
||||
|
|
@ -131,7 +131,9 @@ Optional configuration with lazy.nvim: >
|
|||
• {tile}? (`function`) Custom window arrangement function.
|
||||
`function(source_buf, input_buf, output_buf)`
|
||||
• {filename}? (`function`) Custom filename generation function.
|
||||
`function(contest, problem_id, problem_letter)`
|
||||
`function(contest, contest_id, problem_id, config, language)`
|
||||
Should return full filename with extension.
|
||||
(default: uses problem_id or contest_id)
|
||||
|
||||
*cp.ContestConfig*
|
||||
|
||||
|
|
@ -243,7 +245,7 @@ Example: Setting up and solving AtCoder contest ABC324
|
|||
|
||||
3. Start with problem A: >
|
||||
:CP a
|
||||
< This creates abc324a.cc and scrapes test cases
|
||||
< This creates a.cc and scrapes test cases
|
||||
|
||||
4. Code your solution, then test: >
|
||||
:CP run
|
||||
|
|
@ -270,13 +272,13 @@ FILE STRUCTURE *cp-files*
|
|||
|
||||
cp.nvim creates the following file structure upon problem setup:
|
||||
|
||||
{contest_id}{problem_id}.cc " Source file (e.g. abc324a.cc)
|
||||
{problem_id}.{ext} " Source file (e.g. a.cc, b.py)
|
||||
build/
|
||||
{contest_id}{problem_id}.run " Compiled binary
|
||||
{problem_id}.run " Compiled binary
|
||||
io/
|
||||
{contest_id}{problem_id}.cpin " Test input
|
||||
{contest_id}{problem_id}.cpout " Program output
|
||||
{contest_id}{problem_id}.expected " Expected output
|
||||
{problem_id}.cpin " Test input
|
||||
{problem_id}.cpout " Program output
|
||||
{problem_id}.expected " Expected output
|
||||
|
||||
The plugin automatically manages this structure and navigation between problems
|
||||
maintains proper file associations.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue