You are not logged in.
Which Linux terminal can automatically replaces tab and newline with plain space (spacebar) in which it's pasted, and how is the configuration setting for that?
Last edited by almahdi (2020-12-18 07:15:56)
Offline
Do you mean that when you pastes text from clipboard into terminal, the terminal would change pasted text (with tabs and newlines replaced by spaces)?
If so I do not know any terminal with similar function.
If I needed something like this I would use AutoKey:
I would make a Python script, which would do this text change.
I would configure a shortcut key for this script.
I would make this script (and shortcut key) working only in preferred terminal application (by setting a Window Filter).
The script could look like this:
# Changes text in clipboard and pastes it to terminal
# (window filter: xfce4-terminal\.Xfce4-terminal)
import platform, time
newClip = clipboard.get_clipboard()
# Text change
output = newClip.replace("\n"," ")
output = output.replace("\t"," ")
# Put changed text into clipboard
clipboard.fill_clipboard(output)
time.sleep(0.3)
# Paste text to terminal window
keyboard.send_keys("<ctrl>+<shift>+v")
#time.sleep(0.5)
# Cleaning
del newClip, output
and Scipt Settings (in AutoKey) in case of using the Xfce terminal could be:
Hotkey: <ctrl>+b
Window Filter: xfce4-terminal\.Xfce4-terminal
Offline
[ Generated in 0.019 seconds, 9 queries executed - Memory usage: 521.77 KiB (Peak: 522.61 KiB) ]