Replace tabs with spaces


/ Published in: Bash
Save to your folder(s)

Respects tab size setting


Copy this code and paste it in your HTML
  1. #!/bin/bash
  2.  
  3. _TAB_REPLACEMENT_STR=$(jot -b ' ' -s '' $TM_TAB_SIZE)
  4. cat $TM_FILEPATH | perl -pe "s/\t/$_TAB_REPLACEMENT_STR/g"

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.