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