User command for cd %:h (:Cd) and python % (:Py)
This commit is contained in:
parent
1271a2558b
commit
2f1c1aa3c1
1 changed files with 4 additions and 0 deletions
|
@ -2,6 +2,10 @@
|
||||||
-- See `:help autocmd`
|
-- See `:help autocmd`
|
||||||
-- See `:help lua-guide-autocommands`
|
-- See `:help lua-guide-autocommands`
|
||||||
|
|
||||||
|
-- These should be self-explanatory
|
||||||
|
vim.api.nvim_create_user_command('Cd', 'cd %:h', { desc = 'Change directory to the current file' })
|
||||||
|
vim.api.nvim_create_user_command('Py', 'python %', { desc = 'Execute python file' })
|
||||||
|
|
||||||
-- Instantly move help window to the right
|
-- Instantly move help window to the right
|
||||||
-- This is almost certainly a hacky way to do this)
|
-- This is almost certainly a hacky way to do this)
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
vim.api.nvim_create_autocmd('FileType', {
|
||||||
|
|
Loading…
Reference in a new issue