Find and Replace: how to replace tabs chars...

Asked by Ramakrishnan

i need to replace the tab characters by 8 spaces. i Cannot Find Tab Spaces through FIND and REPLACE option.
Help me.pls

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu gedit Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Mesut Can GÜRLE (mesutcang) said :
#1

Hello,

You can use expand command for this. Such as

$expand --tabs=8 documentName

This command will replace all your tab characters with 8 space and write new content to console. If you want to use this content. You can use

$expand --tabs=8 documentName > newDocumentName

Revision history for this message
Curtis Hovey (sinzui) said :
#2

Gedit's find and replace supports escaped characters: tab=\t newline=\n
Find: \t

Revision history for this message
dustin lope (dustinlope415) said :
#3

Hi Ramakrishnan,

To replace tab characters with spaces using the "Find and Replace" option, you can follow these steps:

Open the document or text editor where you want to perform the replacement.
Press "Ctrl + H" to open the "Find and Replace" dialog box.
In the "Find" field, enter the tab character. To insert a tab character, you can usually press "Ctrl + Tab" or use the "^t" notation.
In the "Replace" field, enter eight spaces (or however many spaces you desire).
Click on the "Replace All" button or use the "Replace" button to replace the tab characters one by one.
If you're unable to find the tab character using the "Find and Replace" option, it's possible that the tab characters in your document are represented differently. In that case, you may need to manually locate and replace them.

Hope this helps! Let me know if you have any further questions. For more visit : https://technology-geek.com/garage-door-springs-how-to-identify-repair-and-replace/

Can you help with this problem?

Provide an answer of your own, or ask Ramakrishnan for more information if necessary.

To post a message you must log in.