Skip to content

turn off different tab sizes for each language #141

Answered by nshen
uxfion asked this question in Q&A
Discussion options

You must be logged in to vote

研究了一下,tabstop应该是被插件覆盖了,在 autocmds.lua 里添加一个自动命令可行

autocmd("FileType", {
  group = myAutoGroup,
  callback = function()
    --  print(vim.o.filetype) 根据类型设置
    vim.o.tabstop = 4
    vim.o.shiftwidth = 4
    vim.o.expandtab = true
  end,
})

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@uxfion
Comment options

Answer selected by nshen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #138 on November 12, 2022 18:15.