ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

subryan

by evercyan Mac ALL

a sublime plugin

Details

Installs

  • Total 2
  • Win 0
  • Mac 2
  • Linux 0
Oct 31 Oct 30 Oct 29 Oct 28 Oct 27 Oct 26 Oct 25 Oct 24 Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7 Oct 6 Oct 5 Oct 4 Oct 3 Oct 2 Oct 1 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

subryan


A Sublime plugin just for fun


Install


  • Manual
MacOs:
cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/
git clone https://github.com/evercyan/subryan
  • Sublime Package Control
Package Control: Install Package
input `subryan`

How to use?

In the file edit area, right click, the menu in `Subryan` like this:

- JsonExpand        translate one line json string to BASIC json struct
- JsonShrink        translate json struct to one line json string

- DateFormat        translate `1548058714` to `2019-01-21 16:18:34`
- TimeFormat        translate `2019-01-21 16:18:34` to `1548058714`
- TimeNow           show the current timestamp

- ToUpper           string to upper
- ToLower           string to lower
- StrEscape         string escape
- StrUnescape       string unescape
- UniEncode         string uniencode
- UniDecode         string unidecode
- UrlEncode         url encode
- UrlDecode         url decode

- HalfAngle         format string to half angle, like "。" to "."
- FullAngle         format string to full angle, like "." to "。"

- Json2Go           translate Json string to Go struct
- ToMd5             translate string to md5
- ShowOpenFiles     like ctrl + p, but only show the open files

Json2Go

{
    "name": "ryan",
    "info": [
        1, 2, "3"
    ],
    "detail": {
        "age": 20,
        "height": "172cm"
    },
    "som":[
        {
            "aaa": 1,
            "bbb": 4
        },
        {
            "bbb": "2",
            "ccc": [
                {
                    "a": [
                        "what"
                    ],
                    "b": {
                        "name":"1"
                    },
                    "c":"c"
                }
            ]
        }
    ]
}
type Json2Go struct {
    Detail struct {
        Height string `json:"height"`
        Age    int    `json:"age"`
    } `json:"detail"`
    Info []interface{} `json:"info"`
    Som  []struct {
        Ccc []struct {
            B struct {
                Name string `json:"name"`
            } `json:"b"`
            C string   `json:"c"`
            A []string `json:"a"`
        } `json:"ccc"`
        Bbb interface{} `json:"bbb"`
        Aaa int         `json:"aaa"`
    } `json:"som"`
    Name string `json:"name"`
}

Auto sort open files by filepath

Main.py SortOpenFilesListener

Keymap

For convenience, you can add this to sublime-keymap, all the commands are in the file: Context.sublime-menu

{
    "keys": ["super+t"],
    "command": "subryan_show_open_files",
}