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

subryan

by evercyan OS X ST2/ST3

A Sublime plugin just for fun

Details

Installs

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