vimでperlを開発するための最小限の設定
必要最小限でvimでのperl開発(utf8)するのにどんな設定渡したらいいかなと考えてまとめてみました。
多分これでいけそうな気がしてる。(要検証)これを作成した過程で不要な設定などいくつか自分の環境における不要な設定が発見できたのはよかった。
代表的な物は以下の2つかな。
- termencoding
- 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
参照
- http://vim-jp.org/vimdoc-ja/
- http://perl-users.jp/articles/advent-calendar/2012/casual/13
- http://qiita.com/yu_suke1994/items/e0a19574994a57c8fe17
- http://vimblog.hatenablog.com/entry/vimrc_key_mapping
- http://nanasi.jp/articles/howto/editing/et-inserttab.html
- http://vimwiki.net/?%27shiftround%27
- http://17-m.seesaa.net/article/196516530.html
- http://nanasi.jp/articles/howto/note/top10-viuser-need-to-know-about-vim.html
- http://d.hatena.ne.jp/wiredool/20120618/1340019962