Skip to content

Commit 7e18bf0

Browse files
committed
add .vimrc.encoding
1 parent 82c5e05 commit 7e18bf0

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.vimrc.encoding

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
"-------------------------------------------------------------------------------
2+
" エンコーディング関連 Encoding
3+
"-------------------------------------------------------------------------------
4+
set ffs=unix,dos,mac " 改行文字
5+
set encoding=utf-8 " デフォルトエンコーディング
6+
set fileencoding=utf-8 "デフォルトの文字コード
7+
8+
autocmd FileType svn :set fileencoding=utf-8
9+
autocmd FileType js :set fileencoding=utf-8
10+
autocmd FileType css :set fileencoding=utf-8
11+
autocmd FileType html :set fileencoding=utf-8
12+
autocmd FileType xml :set fileencoding=utf-8
13+
autocmd FileType json :set fileencoding=utf-8
14+
autocmd FileType java :set fileencoding=utf-8
15+
autocmd FileType scala :set fileencoding=utf-8
16+
autocmd FileType clojure :set fileencoding=utf-8
17+
autocmd FileType ruby :set fileencoding=utf-8
18+
autocmd FileType * setlocal formatoptions-=ro
19+
20+
" ワイルドカードで表示するときに優先度を低くする拡張子
21+
set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc
22+
23+
" 指定文字コードで強制的にファイルを開く
24+
command! Cp932 edit ++enc=cp932
25+
command! Eucjp edit ++enc=euc-jp
26+
command! Iso2022jp edit ++enc=iso-2022-jp
27+
command! Utf8 edit ++enc=utf-8
28+
command! Jis Iso2022jp
29+
command! Sjis Cp932

0 commit comments

Comments
 (0)