ほんじゃーねっと

おっさんがやせたがったり食べたがったりする日常エッセイ

vim設定最新版

他の環境で使えるように最新版の設定をアップしておく。
たいした内容じゃないですよ。


_vimrc

set number
set fenc=utf-8
set fencs=utf-8,iso-2022-jp,euc-jp,cp932
set enc=utf-8
set backupdir=~/tmp/vim
set directory=~/tmp/vim
set nowrap
set tabstop=4
set shiftwidth=4
set magic
set hlsearch      " Switch on search pattern highlighting.
set incsearch
set smartcase
set backspace=2 " Goto previous line when deleted at start of line
set expandtab " Use spaces for tabs
set autoindent
set smartindent
" set cindent
set smarttab
set browsedir=buffer
set whichwrap=b,s,h,l,<,>,[,]
set nocompatible
set laststatus=2
set statusline=%<[%n]%m%r%h%w%{'['.(&fenc!=''?&fenc:&enc).':'.&ff.']['.&ft.']'}\ %F%=%l,%c%V%8P " Show charset and mode on status line
set foldmethod=marker
sy on
filetype plugin indent on
" Most Recent Used plugin settings
let MRU_File='~/_vim_mru_files'
let MRU_Max_Entries=20
let MRU_Window_Height=15
let MRU_Use_Current_Window=1
" Perl settings
let perl_no_extended_vars=1
" Relate unnamed yank and clipboard
set clipboard=unnamed
" auto commands """"""""""""""""""""""""""""""""""""
" Change color when insert mode
augroup InsertHook
autocmd!
autocmd InsertEnter * highlight StatusLine guifg=#ccdc90 guibg=#2E4340
autocmd InsertLeave * highlight StatusLine guifg=#2E4340 guibg=#ccdc90
augroup END
" Python
autocmd FileType python set tabstop=4 shiftwidth=4
autocmd BufEnter *.py setlocal indentkeys+=0#
" HTML
autocmd FileType htmldjango set tabstop=2 shiftwidth=2
autocmd FileType xhtml set tabstop=2 shiftwidth=2
" Javascript
autocmd FileType javascript set tabstop=4 shiftwidth=4


_gvimrc

if has("win32")
set guifont=M+1VM+IPAG_circle:h9
else
set guifont=DejaVu\ Sans\ Mono\ 10
set guifontwide=VL\ ゴシック\ 10
endif
set columns=100
set lines=40
" au GUIEnter * simalt ~x
winpos 0 0
set guioptions+=b
set guioptions-=T
set mousehide     " Hide the mouse when typing text
" colorscheme desert256
colorscheme xoria256
" colorscheme eclipse
" colorscheme chela_light
" colorscheme blackdust
" colorscheme asu1dark
" colorscheme oceandark
" colorscheme sea
" colorscheme ps_color
" colorscheme desert
" colorscheme evening
" colorscheme murphy
" colorscheme darkblue2
" colorscheme mellow