feat: add tiling
This commit is contained in:
parent
244839da2e
commit
7d3d1487b4
4 changed files with 62 additions and 27 deletions
16
doc/cp.txt
16
doc/cp.txt
|
|
@ -84,6 +84,14 @@ example, with lazy.nvim (https://github.com/folke/lazy.nvim):
|
|||
...
|
||||
end
|
||||
},
|
||||
tile = function(source_buf, input_buf, output_buf)
|
||||
vim.api.nvim_set_current_buf(source_buf)
|
||||
vim.cmd.vsplit()
|
||||
vim.api.nvim_set_current_buf(output_buf)
|
||||
vim.cmd.vsplit()
|
||||
vim.api.nvim_set_current_buf(input_buf)
|
||||
vim.cmd('wincmd h | wincmd h')
|
||||
end,
|
||||
})
|
||||
end
|
||||
}
|
||||
|
|
@ -101,11 +109,19 @@ snippets LuaSnip snippets by contest type
|
|||
|
||||
hooks Functions called at specific events
|
||||
before_run Called before :CP run
|
||||
function(problem_id)
|
||||
(default: nil, do nothing)
|
||||
before_debug Called before :CP debug
|
||||
function(problem_id)
|
||||
(default: nil, do nothing)
|
||||
|
||||
debug Show info messages during operation
|
||||
(default: false, silent operation)
|
||||
|
||||
tile Custom function to arrange windows
|
||||
function(source_buf, input_buf, output_buf)
|
||||
(default: nil, uses built-in layout)
|
||||
|
||||
WORKFLOW *cp-workflow*
|
||||
|
||||
1. Set up contest environment: >
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue