diff --git a/lua/commands.lua b/lua/commands.lua index 1dc2a0c..811b137 100644 --- a/lua/commands.lua +++ b/lua/commands.lua @@ -16,3 +16,12 @@ local function gitblame_toggle_summary() end vim.api.nvim_create_user_command('GitBlameToggleSummary', gitblame_toggle_summary, {}) + +-- Copy pytest -N to Clipboard +local function copy_pytest_command() + local fp = vim.fn.expand('%:~:.') + local word = vim.fn.expand('') + vim.fn.setreg('+', 'pytest ' .. fp .. ' -N ' .. word) +end + +vim.api.nvim_create_user_command('P', copy_pytest_command, {})