小编Pat*_*lac的帖子

使用Lua将0秒格式化为00:00:00

我正在尝试将持续时间(以秒为单位)格式化为时间,并且我得到的结果表明我应该在某个地方占据一个时代.我期望os.date("%X", 0)产生"00:00:00",但它返回"20:00:00"以及日期值"12/31/69"(我不需要日历日期).

有没有一种标准的方法来获取一个持续时间字符串,导致0秒产生一个代表总共零秒的时钟?我似乎无法找到我想要做的任何地方的例子.

谢谢

time lua duration

8
推荐指数
2
解决办法
6191
查看次数

如何在vscode中更改tabSize和insertSpaces

你如何实际更改vscode的"editor.tabSize"和"editor.insertSpaces"值?我打开了文件>首选项>用户设置并添加了:

// Place your settings in this file to overwrite the default settings
{
// Controls the rendering size of tabs in characters. If set to auto, the value will be guessed based on the opened file.
"editor.tabSize": 4,

// Controls if the editor will insert spaces for tabs. If set to auto, the value will be guessed based on the opened file.
"editor.insertSpaces": true,
}
Run Code Online (Sandbox Code Playgroud)

但是,当我打开一个带有两个空格标签的html文件时,按Tab键会插入两个空格,当我打开一个使用\ t标签的文件时,按Tab键插入\ t.

我做错了什么导致vscode不尊重我的设置?

whitespace indentation visual-studio-code

2
推荐指数
1
解决办法
4720
查看次数