Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don't use ST3 as my daily driver (I use BBEdit instead - still not on the VSCode train), but I do use it for lots of random editing and scratch needs.

Shameless plug - I wrote a plugin ages ago which makes it possible to replace and sort text using Python code (https://nneonneo.github.io/sublime-replace-with-python/). This little plugin has been incredibly useful for certain tasks, and serves both as a useful prototyping tool (playing with text modifications before implementing a full-blown script) as well as a general-purpose text wrangling utility. Basically, you can select some text (or find it with regex), then activate the plugin and type a line of Python code; it will then run the code for each selection region and produce the replacement. Sorting works similarly - select some regions, enter an expression as a sort key, and the selections will be rearranged according to the key.

I love how a plugin I wrote nearly a decade ago is still working with essentially no changes needed since 2017. Stable software is reliable software!



> Shameless plug - I wrote a plugin ages ago which makes it possible to replace and sort text using Python code [...]

I've been trying out Lite XL, and I have a crude (WIP) plugin that can pipe selected text thru any shell command (sed, sort, etc), and either output to a new buffer, or replace the selection. Then I started writing some scripts to supply the commands I miss from Emacs, like align-regexp. Since it's just shell commands, you can write them in any language.

I'm not sure if I like Lite XL, but the scripts I already wrote would be easily reusable in any editor that supports piping selections. Perhaps it would be a fun project to create a collection of such portable scripts, sort of like what LSP did.


nice to see another lite XL enjoyer. Neat editor and its stupid easy to write plugins for it.


Why BBEdit? What languages do you code in?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: