-
Notifications
You must be signed in to change notification settings - Fork 0
/
encoding.rc.vim
38 lines (32 loc) · 1.22 KB
/
encoding.rc.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
"---------------------------------------------------------------------------
" Encoding:
"
" Setting of the encoding to use for a save and reading.
" Make it normal in UTF-8 in Unix.
set encoding=utf-8
" Default fileformat.
set fileformat=unix
" Automatic recognition of a new line cord.
set fileformats=unix,dos,mac
" Command group opening with a specific character code again."{{{
" In particular effective when I am garbled in a terminal.
" Open in UTF-8 again.
command! -bang -bar -complete=file -nargs=? Utf8 edit<bang> ++enc=utf-8 <args>
" Open in UTF-16 again.
command! -bang -bar -complete=file -nargs=? Utf16 edit<bang> ++enc=ucs-2le <args>
" Open in UTF-16BE again.
command! -bang -bar -complete=file -nargs=? Utf16be edit<bang> ++enc=ucs-2 <args>
" Aliases.
command! -bang -bar -complete=file -nargs=? Unicode Utf16<bang> <args>
"}}}
" Appoint a line feed."{{{
command! -bang -complete=file -nargs=? WUnix
\ write<bang> ++fileformat=unix <args> | edit <args>
command! -bang -complete=file -nargs=? WDos
\ write<bang> ++fileformat=dos <args> | edit <args>
command! -bang -complete=file -nargs=? WMac
\ write<bang> ++fileformat=mac <args> | edit <args>
"}}}
if has('multi_byte_ime')
set iminsert=0 imsearch=0
endif