マイvimの構成

2239 ワード

LinuxとMacOSはホームディレクトリの下を修正した.vimrc、Windows対応でユーザーフォルダの下の_を変更vimrc
極簡版:
set nu
set numberwidth=1

"color murphy
syntax on
set nowrap

set guifont=Menlo\ Regular:h24
"set guifont=Consolas:h24
"set guifont=Courier:h24
"set guifont=Courier\ New\ Bold:h24
"1. set guifont=*
"2. set guifont?
"3. write to .vimrc

set nobackup
set noswapfile

set cindent
set autoindent
set smartindent

set tabstop=4
set softtabstop=4
set shiftwidth=4

set encoding=utf-8
set fileencodings=utf-8,ucs-bom,shift-jis,gb18030,gbk,gb2312,cp936,utf-16,big5,euc-jp,latin1  
 "    

set hlsearch "       "
set ignorecase
set incsearch "             

現在(2019)版:
set nu
set numberwidth=1

"    
syntax on

"      ,                      
set showmatch

"    
"set smartindent
"set autoindent
set cindent

"   
"color morning
"set gcr=a:block-blinkon0
color murphy

"          
set guifont=Courier_new:h16:b:cANSI
set guifont=Menlo\ Regular:h20
"set guifont=Consolas:h16:i:cANSI
"set guifont=Consolas:h15:b:cANSI


"set cursorline
"          
set ruler

"     
set nowrap


"  
set tabstop=4
set softtabstop=4
set shiftwidth=4
set backspace=2

" tab        
set expandtab

"        
hi LineNr term=underline ctermfg=darkgray guifg=darkgray

"          
set ignorecase
"       
set hlsearch


"   vim       
"set mouse=a


"      
filetype on
"                
filetype indent on
"      
filetype plugin indent on

"      
inoremap ( ()i
inoremap [ []i
inoremap { {}i
inoremap < <>i

"    y p         
set clipboard=unnamedplus

"     
set nobackup 
"       
set noswapfile


"  
"set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
"set termencoding=utf-8
"set encoding=utf-8

if has("linux") || has("unix") || has("mac")
    set encoding=utf-8
endif
"                
set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1

"          
if has("win32") || has("win64")
    set guioptions-=T
    set guioptions-=m
endif