Closed lunelson closed 5 years ago
Can you give an example here? In picture or code here
Sure. In the following capture from sublime, I copy a block of code which is already indented by several spaces, and then place my cursor at a position indented another several spaces, and when I do sublime's indented paste my pasted block starts exactly where I put the cursor. Doing the same operation with your extension, the original indentation would also be kept, leaving the final block indented by the position of the cursor plus the copied block's original indentation.
Thank you. Now I get it. I'll fix it next month, or month after the next, have no time for now=)
Good News! Managed to scrape up couple hours to fix it!=D
This works very closely to Sublime's paste-and-indent but I notice one difference: if I copy an indented block by dragging a selection in the gutter, selecting entire lines, the pasted block will be indented by the position where I've pasted it PLUS however much the copied block was indented. The solution I believe, would be to note the indentation of the first line in the copied block, and subtract that from the indentation being applied. Any chance of this?