How to replace with Tab character in Editor? Use Ctrl+Q

You have encountered a problem using Far Manager? Here you can get help.
Post Reply
przemoc
Posts: 30
Joined: Sat 27 Feb, 2010 20:55
Has thanked: 9 times
Been thanked: 3 times

How to replace with Tab character in Editor? Use Ctrl+Q

Post by przemoc »

Self-reply post, as I had much harder time to find the answer than I expected. (I knew it in the past, but simply forgot.)

You may have already used \t to mean Tab in "Search for" field when "Regular expressions" is enabled in Replace dialog (Ctrl+F7) in Editor (F4) in Far Manager. One could think \t would work in "Replace with" field as well, but unfortunately that's not the case.

How to input Tab without moving to next field?

Answer can be found in Editor's help page (F1 when in Editor without any dialogs opened or hlf:Editor in command life), but you need to know what to look for.
https://github.com/FarGroup/FarManager/blob/builds/3.0.6644/far/FarEng.hlf.m4#L3227 wrote: Ctrl+Q Treat the next key combination as a character code
So when you are in Replace dialog in "Replace with" field you have to do following key combo:
Ctrl+Q Tab
which will show little right arrow (→) unless it is followed by non-horizontal-space character (in such case it turns into pure horizontal space).

References:
https://bugs.farmanager.com/view.php?id=1890
Shmuel
Posts: 7217
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 48 times
Been thanked: 627 times

How to replace with Tab character in Editor? Use Ctrl+Q

Post by Shmuel »

\t works when [x] Regular expressions is checked
przemoc
Posts: 30
Joined: Sat 27 Feb, 2010 20:55
Has thanked: 9 times
Been thanked: 3 times

How to replace with Tab character in Editor? Use Ctrl+Q

Post by przemoc »

Shmuel wrote: Mon 02 Mar, 2026 22:50 \t works when [x] Regular expressions is checked
As has been written in the post: not in "Replace with" field.
Shmuel
Posts: 7217
Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 48 times
Been thanked: 627 times

How to replace with Tab character in Editor? Use Ctrl+Q

Post by Shmuel »

przemoc wrote: Mon 02 Mar, 2026 22:54 As has been written in the post: not in "Replace with" field.
My bad.
You may want to try plugins: RESearch or/and LF Search, it must work in both fields there.
przemoc
Posts: 30
Joined: Sat 27 Feb, 2010 20:55
Has thanked: 9 times
Been thanked: 3 times

How to replace with Tab character in Editor? Use Ctrl+Q

Post by przemoc »

Shmuel wrote: Mon 02 Mar, 2026 22:57 You may want to try plugins: RESearch or/and LF Search, it must work in both fields there.
I'm aware of RESearch (have it downloaded in my far3-bootstrap for a long time). It's worth pointing out that RESearch does not need [ ] Regular expression turned on for \t to work.
Anyway, I simply wanted to provide canonical solution that could be (hopefully) easily googled and would work out-of-the-box without installing any plugins/macros/etc. I'm assuming that self-reply posts/threads are not frowned upon here.
Post Reply

Return to “Support and Troubleshooting”