autoindent for python
notwidow opened this issue · 3 comments
notwidow commented
Hi, There is an issue from start with cosynvim .. whenever i create a list in python it auto adds 8 spaces instead of 4 in lists... how to make it 4..?
create a .py file and code lis = []
and then hit enter between square brackets and it will be indented 8 spaces.. thanks
NikolaM-Dev commented
@notwidow Add the following code to the ./after/ftplugin/python.lua
path
vim.opt_local.expandtab = true
vim.opt_local.shiftwidth = 4
vim.opt_local.softtabstop = 4
vim.opt_local.tabstop = 4
notwidow commented
@notwidow Add the following code to the
./after/ftplugin/python.lua
pathvim.opt_local.expandtab = true vim.opt_local.shiftwidth = 4 vim.opt_local.softtabstop = 4 vim.opt_local.tabstop = 4
no python.lua file
NikolaM-Dev commented
@notwidow Add the following code to the
./after/ftplugin/python.lua
pathvim.opt_local.expandtab = true vim.opt_local.shiftwidth = 4 vim.opt_local.softtabstop = 4 vim.opt_local.tabstop = 4no python.lua file
You have to create it in the path that it indicates you