3 Star 0 Fork 0

Gitee 极速下载/KotlinCodeSorter

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/longforus/KotlinCodeSorter
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Kotlin Code Sorter

A simple plugin for sorting kotlin code. Machine Translate English ReadMe

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

1

特征

  • 支持按照字段->初始化块->构造方法->方法->内部类的默认顺序对代码进行排序.
  • 从1.2开始可以在设置界面自定义排序顺序.

安装

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

    • File > Preferences(Settings) > Plugins > Browse repositories... > 搜索并找到"Kotlin code sorter" > Install Plugin
  • 手动安装:

重启IDE.

使用

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

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

  3. 点击File >Settings >Other Settings >Kotlin Code Sorter 可以调整自己喜欢的排列顺序:

    3

灵感来自Lifecycle Sorter

MIT License Copyright (c) 2018 Void Young Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Kotlin Code Sorter 一个可以对kotlin代码排序的小插件.最近在日常的开发中,发现kotlin的代码排列不如Java的好,在IDEA或者AndroidStudi 展开 收起
README
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors/KotlinCodeSorter.git
git@gitee.com:mirrors/KotlinCodeSorter.git
mirrors
KotlinCodeSorter
KotlinCodeSorter
master

搜索帮助