Open wadetb opened 10 years ago
I'm recently thinking that the best way to implement this is both of the above options.
If there is a selection spanning multiple lines, treat that as the region of text to operate on. Otherwise, scan from the cursor(s) and operate on each surrounding block.
A more general way to implement this would be:
Note that for commands which are destructive, we have to be careful that the individual regions work cumulatively (e.g. select column).
When working in a large Markdown document, sometimes it's nice to quickly paste some text in CSV format and do some calculations on it.
Identify the table either by one of:
Maybe provide global modes like "operate on selection" vs "operate on file".