Skip to content

Instantly share code, notes, and snippets.

@hmkz
Created February 6, 2014 07:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hmkz/8839587 to your computer and use it in GitHub Desktop.
Save hmkz/8839587 to your computer and use it in GitHub Desktop.
.vimrc my sets
set ignorecase
set smartcase
set backspace=indent,eol,start
set startofline
set ruler
set confirm
set visualbell
set t_vb=
set mouse=a
set notimeout ttimeout ttimeoutlen=200
set pastetoggle=<F11>
set tabstop=4
set autoindent
set expandtab
set shiftwidth=4
set number
set nocompatible
filetype off
syntax on
set hidden
set wildmenu
set showcmd
set hlsearch
set nomodeline
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
Bundle 'pangloss/vim-javascript'
Bundle 'FuzzyFinder'
map Y y$
nnoremap <C-L> :nohl<CR><C-L>
if &encoding !=# 'utf-8'
set encoding=japan
set fileencoding=japan
endif
if has('iconv')
let s:enc_euc = 'euc-jp'
let s:enc_jis = 'iso-2022-jp'
if iconv("\x87\x64\x87\x6a", 'cp932', 'eucjp-ms') ==# "\xad\xc5\xad\xcb"
let s:enc_euc = 'eucjp-ms'
let s:enc_jis = 'iso-2022-jp-3'
elseif iconv("\x87\x64\x87\x6a", 'cp932', 'euc-jisx0213') ==# "\xad\xc5\xad\xcb"
let s:enc_euc = 'euc-jisx0213'
let s:enc_jis = 'iso-2022-jp-3'
endif
if &encoding ==# 'utf-8'
let s:fileencodings_default = &fileencodings
if has('mac')
let &fileencodings = s:enc_jis .','. s:enc_euc
let &fileencodings = &fileencodings .','. s:fileencodings_default
else
let &fileencodings = s:enc_jis .','. s:enc_euc .',cp932'
let &fileencodings = &fileencodings .','. s:fileencodings_default
endif
unlet s:fileencodings_default
else
let &fileencodings = &fileencodings .','. s:enc_jis
set fileencodings+=utf-8,ucs-2le,ucs-2
if &encoding =~# '^\(euc-jp\|euc-jisx0213\|eucjp-ms\)$'
set fileencodings+=cp932
set fileencodings-=euc-jp
set fileencodings-=euc-jisx0213
set fileencodings-=eucjp-ms
let &encoding = s:enc_euc
let &fileencoding = s:enc_euc
else
let &fileencodings = &fileencodings .','. s:enc_euc
endif
endif
unlet s:enc_euc
unlet s:enc_jis
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment