VS Code Cheatsheet
VS Code: Sort lines of code in Ascending (or Descending) Order
Select the code you wish to sort in Visual Studio Code.
Then hit the key combination Ctrl+P
and type the greater than sign (>
). Next type sort and choose Sort Lines Ascending
or choose the Descending
option.
Now the lines you’ve previously selected will be sorted by the option you chose. One thing to keep in mind is that if you have lines which have breaks in them, the second line will also be sorted into the mix. Which may mess up formatting for things like CSS Property values.
文档信息
- 本文作者:SryImNoob
- 本文链接:https://sryimnoob.com/wiki/vscode/
- 版权声明:自由转载-非商用-非衍生-保持署名(创意共享3.0许可证)