X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=.vimrc;h=d743be717f83686b9ed92935f7260d87224116f9;hb=3096274104377e1d4db7a2d8394fa03d7aa69495;hp=470a8007fe54115fb94e4006a4d2e7b2a59abc32;hpb=d8552c03165aaccbe177fd9da7125cfe45b07fab;p=dotfiles.git diff --git a/.vimrc b/.vimrc index 470a800..d743be7 100644 --- a/.vimrc +++ b/.vimrc @@ -343,7 +343,9 @@ function! SetupEncoding(encoding) call RestorePosition() let b:encoding_set = 1 - execute "edit ++enc=" . a:encoding + if len(expand('%')) + execute "edit ++enc=" . a:encoding + endif endfunction