colinta / SublimeStringEncode

Converts characters from one "encoding" to another using a transformation (think HTML entities, not character encodings)
Other
150 stars 22 forks source link

Paste encoded ... #29

Closed katerlouis closed 8 years ago

katerlouis commented 8 years ago

Hi, I get you a date with Ryan Reynolds or Jessica Alba if you implement the following idea:

"StringEncode: Paste Encoded ..."

that command opens a new palette with all the encoding methods there are. Reason for second level palette: otherwise the commands would double and flood the palette.

What the command does is pretty straight forward. It takes whatever is in the clipboard history, encodes it and THEN pastes it.

I'd love to have some optional string formatting here aswell, like join_lines and such. But that's maybe too much to ask.

Or is it? Reynolds and Alba are in the mix!

colinta commented 8 years ago

I like this idea! Available in 2.2.0.

katerlouis commented 8 years ago

Uuuuh, I love it! How about this, to skip the extra menu if needed (which I do, because I paste a loooot of text):

{ "keys": ["super+shift+v"], "command": "string_encode_paste", "args": { "encode_function": "safe_html_entitize" } }

Then I'll see about that date ;)

colinta commented 8 years ago

If you want to add it and submit a pull request I'd very likely accept this feature, but the current functionality is good enough for me.

katerlouis commented 8 years ago

Unfortunately I don't know python :O How about another function, called:

"string_encode_paste_last"

which simply pastes with the last chosen encode-function :)