cd current directory

This commit is contained in:
Your Name 2026-07-17 17:41:41 +08:00
parent 8ed02b751e
commit f2096f7925
1 changed files with 11 additions and 2 deletions

View File

@ -1,6 +1,6 @@
-- noswap -- noswap
vim.o.swapfile = false vim.o.swapfile = false
vim.o.guifont = 'JetBrainsMono Nerd Font Mono:h14:sb' vim.o.guifont = 'JetBrainsMono NFM:h14:sb'
vim.o.list = false vim.o.list = false
-- disable spell for pandoc -- disable spell for pandoc
@ -59,6 +59,15 @@ else
}) })
end end
-- auto cd to current directory
vim.api.nvim_create_autocmd("VimEnter", {
callback = function()
if vim.fn.isdirectory(vim.fn.expand("%:p")) == 0 then
vim.cmd("cd %:p:h")
end
end,
})
if isWindows then vim.g.python3_host_prog = 'C:\\Users\\yokow\\miniforge3\\envs\\labs\\python.exe' end if isWindows then vim.g.python3_host_prog = 'C:\\Users\\yokow\\miniforge3\\envs\\labs\\python.exe' end
-- independent clipboard -- independent clipboard