Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
.vimrc environment
" display/view setting
set tabstop=4
set shiftwidth=4
set laststatus=2
set ruler
set wildmenu
set nocompatible
set showmode
set title
set showcmd
set showmatch
set number
" edit setting
set list
set listchars=tab:>\ ,extends:<
set backspace=indent,eol,start
set autoindent
highlight ZenkakuSpace cterm=reverse ctermfg=white guibg=darkgray
match ZenkakuSpace / /
syntax on
filetype on
" encode setting
set enc=utf-8
" set enc=sjis
set fenc=utf-8
" set fenc=sjis
" search setting
set ignorecase
set smartcase
set wrapscan
set incsearch
set hlsearch
" file type settings
autocmd FileType c,cpp,java,sh,command,perl,rb,php,html,js,erl set cindent
autocmd FileType python set tabstop=4 shiftwidth=4 expandtab
autocmd BufNewFile,BufRead *.scpt,*applescript :setl filetype=applesctipt
autocmd BufNewFile,BufRead .vimperatorrc set filetype=vimperator
autocmd FileType html,xml,xsl source ~/.vim/scripts/closetag.vim
" plugin install
" ruby
" Bundle 'vim-ruby/vim-ruby'
au InsertEnter * hi StatusLine guifg=DarkBlue guibg=DarkYellow gui=none ctermfg=Blue ctermbg=Yellow cterm=none
au InsertLeave * hi StatusLine guifg=DarkBlue guibg=DarkGray gui=none ctermfg=Blue ctermbg=DarkGray cterm=none
" 行末の空白文字を可視化
highlight WhitespaceEOL cterm=underline ctermbg=red guibg=#FF0000
au BufWinEnter * let w:m1 = matchadd("WhitespaceEOL", ' +$')
au WinEnter * let w:m1 = matchadd("WhitespaceEOL", ' +$')
" 行頭のTAB文字を可視化
highlight TabString ctermbg=red guibg=red
au BufWinEnter * let w:m2 = matchadd("TabString", '^\t+')
au WinEnter * let w:m2 = matchadd("TabString", '^\t+')
" 改行を可視化
" highlight EndOfLine cterm=underline guifg=Red
" 全角スペースの表示
highlight ZenkakuSpace cterm=underline ctermbg=red guibg=#666666
au BufWinEnter * let w:m3 = matchadd("ZenkakuSpace", ' ')
au WinEnter * let w:m3 = matchadd("ZenkakuSpace", ' ')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment