Suggestion: Automatic indent on paste
Original Reporter info from Mantis: jon4th4n
-
Reporter name: Jonathan Annett
Original Reporter info from Mantis: jon4th4n
- Reporter name: Jonathan Annett
Description:
a feature to auto indent when pasting a code block in the editor.
Steps to reproduce:
n/a
Additional information:
basically, reindent the pasted text to match the current cursor indent
this feature is implemented in the ZED editor (https://github.com/zedapp/zed) which is a browser based editor based on the ACE editor.
see uploaded video
pseudocode:
- reident text to be pasted to zero chars indent (keeping relative indents on each line)
- take current column index, call it c
- add c spaces to start of each line to be pasted (but not on first line)
- insert pasted text
optionally, collapse leading spaces into tabs, if ide settings have that set.
Mantis conversion info:
- Mantis ID: 37054