zyedidia / micro

A modern and intuitive terminal-based text editor
https://micro-editor.github.io
MIT License
24.42k stars 1.16k forks source link

(feature req) Virtual Space /Space on Demand column editing? #3143

Open indigomirage opened 4 months ago

indigomirage commented 4 months ago

Is there a way to have micro select a multiline block (columnar multi cursor editing) and have it automatically pad spaces in for any rows in the selection that are shorter than the position of selection column? I've seen this called by a few names (virtual space/Space on demand, etc.) and it's a feature I use heavily in UltraEdit, Notepad++, and Geany (it has it, surprisingly). Neither Vscode nor NeoVim have this capability.

Here's a quick screen capture of what I mean (from geany - a gui, but the principle is the same).

https://github.com/zyedidia/micro/assets/85891520/3456ecea-2760-4b42-a281-8dd3aa19b462

If there's a way to allow this as an option, I'm not sure where to find it. If it's not an option now, can it be added as a feature request? It is mind-bogglingly useful.

JoeKar commented 4 months ago

The real column selection is a good feature I was missing too. Unfortunately the multi-cursor mode can't fulfill this, but definitely has different advantages. So yes, it should be added to the TODOs, where ever they're tracked.

dmaluka commented 4 months ago

It could be implemented via a plugin?

JoeKar commented 4 months ago

Should be possible...at least in the first place. How to decide what shall be added as an plugin and what internally or merged afterwards?

But yes, as a plugin it would be a good starter.

dmaluka commented 4 months ago

How to decide what shall be added as an plugin

Pretty much any non-trivial feature that can be implemented as a plugin without loss of functionality and performance?

BTW it could be merged afterwards still as a plugin (a built-in one).

I'm coming from the angle of avoiding unnecessary extra complication of the existing micro (Go) code base.

indigomirage commented 4 months ago

As someone who is not capable of writing a plugin, is the best course of action to just let this stay as a open feature request and hope someone with ability tackles it? (that's fine of course - just trying to figure out if there's anything I can do to help advocate, etc)