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

subryan

by evercyan Mac ALL

A Sublime plugin just for fun

Details

Installs

  • Total 1
  • Win 0
  • Mac 1
  • Linux 0
Feb 18 Feb 17 Feb 16 Feb 15 Feb 14 Feb 13 Feb 12 Feb 11 Feb 10 Feb 9 Feb 8 Feb 7 Feb 6 Feb 5 Feb 4 Feb 3 Feb 2 Feb 1 Jan 31 Jan 30 Jan 29 Jan 28 Jan 27 Jan 26 Jan 25 Jan 24 Jan 23 Jan 22 Jan 21 Jan 20 Jan 19 Jan 18 Jan 17 Jan 16 Jan 15 Jan 14 Jan 13 Jan 12 Jan 11 Jan 10 Jan 9 Jan 8 Jan 7 Jan 6 Jan 5
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",
}