Posted By

nikc on 07/12/10


Tagged

textmate


Versions (?)

Replace tabs with spaces


 / Published in: Bash
 

Respects tab size setting

  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  

You need to login to post a comment.