如何在现有文件中将制表符转换为空格,反之亦然 [英] How can I convert tabs to spaces and vice versa in an existing file
本文介绍了如何在现有文件中将制表符转换为空格,反之亦然的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
除了在 4 个空格上进行查找替换并转换为制表符(版本 0.10.2)之外,我无法弄清楚如何在我的生活中做到这一点.我想不出没有特定功能来执行此操作的编辑器/IDE.VSCode 吗?
I cannot figure out how to do this for the life of me apart from doing a find-replace on 4 spaces and converting to tabs (Version 0.10.2). I can't think of an editor/IDE that doesn't have a specific feature to do this. Does VSCode?
推荐答案
自从修复:https://github.com/Microsoft/vscode/issues/1228 编辑器支持它开箱即用.只需:
Since fix of: https://github.com/Microsoft/vscode/issues/1228 the editor supports it out of the box. Simply go for:
F1
,indentationToSpaces
或indentationToTabs
(取决于您的需要)回车
.
F1
,indentationToSpaces
orindentationToTabs
(depending on your need)Enter
.
这篇关于如何在现有文件中将制表符转换为空格,反之亦然的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文