Kotlin 代码排序插件 KotlinCodeSorter

码农软件 · 软件分类 · 其他开发相关 · 2019-10-16 10:58:52

软件介绍

Kotlin Code Sorter

一个可以对kotlin代码排序的小插件.最近在日常的开发中,发现kotlin的代码排列不如Java的好,在IDEA或者AndroidStudio里面Java的字段一般在前,方法在后,看起来比较感觉比较好.但是在kotlin中覆写的变量和函数是根据覆写的先后顺序来排列的,后写的在前面,先写的在后面.而且字段和函数是穿插排列的,真是逼死强迫症, 有了这个小插件,轻轻一按瞬间排好,美滋滋.


特征

  • 支持按照字段->初始化块->构造方法->方法->内部类的顺序对代码进行排序.

安装

  • 使用 IDE 内置插件系统安装:

    • File > Preferences(Settings) > Plugins > Browse repositories... > 搜索并找到"Kotlin code sotrer" > Install Plugin

  • 手动安装:

重启IDE.

使用

  1. 默认快捷键 Ctrl + Alt + K.可自行修改: 2

  2. 当然也可以点击Code > Sort kotlin code > fields->initializer->constructors->functions

灵感来自Lifecycle Sorter

本文地址:https://www.codercto.com/soft/d/16872.html

More Eric Meyer on CSS (Voices That Matter)

More Eric Meyer on CSS (Voices That Matter)

Eric A. Meyer / New Riders Press / 2004-04-08 / USD 45.00

Ready to commit to using more CSS on your sites? If you are a hands-on learner who has been toying with CSS and want to experiment with real-world projects that will enable you to see how CSS......一起来看看 《More Eric Meyer on CSS (Voices That Matter)》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具