在YAML中,我有一个非常长的字符串.我想将它保留在我的编辑器的80列(或左右)视图中,所以我想打破字符串.这是什么语法?
换句话说,我有这个:
Key: 'this is my very very very very very very long string'
Run Code Online (Sandbox Code Playgroud)
我想要这个(或者这个效果):
Key: 'this is my very very very ' +
'long string'
Run Code Online (Sandbox Code Playgroud)
我想使用上面的引号,所以我不需要在字符串中转义任何东西.
我想做这样的事情,我可以按顺序运行多个命令.
db:
image: postgres
web:
build: .
command: python manage.py migrate
command: python manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
ports:
- "8000:8000"
links:
- db
Run Code Online (Sandbox Code Playgroud)