vimでperlを開発するための最小限の設定

必要最小限でvimでのperl開発(utf8)するのにどんな設定渡したらいいかなと考えてまとめてみました。
多分これでいけそうな気がしてる。(要検証)これを作成した過程で不要な設定などいくつか自分の環境における不要な設定が発見できたのはよかった。

代表的な物は以下の2つかな。

  1. termencoding
  2. nocompatible see Vim - set nocompatibleはもういらない - Qiita

fileencodingとfencの関係がいまいちよく分からないので後で調べます。

.vimrc

"must
set expandtab
set shiftwidth=4
set shiftround
set autoindent

set fileencoding=utf-8
set fileencodings=utf-8
set encoding=utf-8 
set fenc=utf-8 

"optional
set number
set hidden
set hlsearch

augroup filetypedetect
autocmd! BufNewFile,BufRead *.t setf perl
autocmd! BufNewFile,BufRead *.psgi setf perl
autocmd! BufNewFile,BufRead *.tt setf tt2html
augroup END