0

Is it possible to change the way a \t indentation is displayed in a text editor? For example, in Atom, Notepad++ or Kate?

Most people use spaces as identation (e.g.: pressing TAB once produces 2 spaces), but ideally one should be able to only use \t for indentation and the text editor should let the user choose how to display the \t (e.g., as 2 or 4 spaces). This would also solve conflicts when one of the developers prefers 2 spaces over 4, etc.

To be clear, what I want is to change the way \t are displayed in text editors. I'd like to change an option on the fly where I'd visualize a \t as equal in length to 4 spaces, or 5 spaces, or n spaces.

I couldn't find any information about this option, only about making TAB produce spaces instead of \t, like in: https://stackoverflow.com/questions/29972396/how-can-i-customize-the-tab-to-space-conversion-factor

flen
  • 299
  • 1
  • 7
  • 21
  • 1
    If I understand what you are asking, this is specific to each text editor. I don't understand because these settings were easy to find for me. For instance, ***in notepad++*** go to 'settings'->'Language'->'Tab settings' (on the right). You can select the number of spaces a tab will visually produce and opt to have actual spaces vs visual ones. I use ***UltraEdit*** and it also has this feature+ but also lets me see '>>' to know it is a REAL tab if I choose so. ***Kate*** Configure->Editing->Indentation. ***Atom***.. dunno (refuse to install). Let me know if I am missing the point. – Señor CMasMas May 17 '22 at 03:21
  • @SeñorCMasMas I love you! Yes, that's what I was looking for. I swear I couldn't find it before. For Kate, just a heads-up: you need to uncheck "Autodetect indentation" and, although I clicked on "apply" and "ok", the new settings only worked after I restarted Kate. Also related: https://superuser.com/questions/1567247/kate-editor-indentation-in-python – flen May 17 '22 at 19:42
  • Nice! :) Glad it worked out for you. – Señor CMasMas May 17 '22 at 20:09

0 Answers0