我希望能够在我的 bash 脚本上gg=G
,或者一些不会阻碍简单回显的自动格式变体。
我觉得这样的事情不是问题,我只是还没有找到正确的方法:
- 为这个场景正确地回显一个字符串
- 为工作发出正确的命令
如果有人能帮助我,我将不胜感激。
我输入的内容:
someFun()
{
echo "Some really long string that is going to be automatically
indented.";
}
我在提示中看到的内容
>./someFun
Some really long string that is going to be automatically
indented.
最佳答案
您可以像这样连接字符串:
echo "Some really long string that is going to be automatically" \
"indented."
要么关闭缩进:
:setlocal noautoindent
:setlocal nosmartindent
关于string - 如何防止 vim 在字符串中添加缩进?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13666259/