Paste Reindent


The paste_reindent module defines a command that reindents pasted text according to the surrounding context and local indentation settings.

When copy-pasting code from an external resource, or just when refactoring your own code, simply pasting it may result in your needing to manually change or adjust indentation. This can be often tedious, so this module is here to help.


After downloading the linked module and saving it to a *~/.textadept/modules/paste_reindent/* directory, put the following in your ~/.textadept/init.lua:


You can also define a key binding for it in the process:

-- Ctrl+Shift+V paste reindents
keys.csv = require('paste_reindent')

The command is also available in the Edit menu as "Paste Reindent"

Edited on Wednesday, October 24th 2018 at 12:44 PM.