How to add a '.t' filetype to vi's syntax highlighting


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

This allows you to use perl syntax highlighting in vi for test scripts that use the ".t" file extension


Copy this code and paste it in your HTML
  1. Ensure you have a ~/.vim directory
  2. Ensure you have a ~/.vim/ftdetect directory
  3.  
  4. Create the file ~/.vim/ftdetect/t.vim with this as the contents:
  5.  
  6. " definition file for testing scripts
  7. au BufNewFile,BufRead *.t set filetype=perl

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.