Skip to content

Instantly share code, notes, and snippets.

@wipiano
Last active September 16, 2017 16:14
Show Gist options
  • Save wipiano/a8d7a6bb451e68a513471d35ce144d77 to your computer and use it in GitHub Desktop.
Save wipiano/a8d7a6bb451e68a513471d35ce144d77 to your computer and use it in GitHub Desktop.
.vimrc
" http://qiita.com/mfujimori/items/9fd41bcd8d1ce9170301
" setting
"文字コードをUFT-8に設定
set fenc=utf-8
" バックアップファイルを作らない
set nobackup
" スワップファイルを作らない
set noswapfile
" 編集中のファイルが変更されたら自動で読み直す
set autoread
" バッファが編集中でもその他のファイルを開けるように
set hidden
" 入力中のコマンドをステータスに表示する
set showcmd
" 見た目系
" 行番号を表示
set number
" 現在の行を強調表示
set cursorline
" 現在の行を強調表示(縦)
set cursorcolumn
" 行末の1文字先までカーソルを移動できるように
set virtualedit=onemore
" インデントはスマートインデント
set smartindent
" ビープ音を可視化
set visualbell
" 括弧入力時の対応する括弧を表示
set showmatch
" ステータスラインを常に表示
set laststatus=2
" コマンドラインの補完
set wildmode=list:longest
" 折り返し時に表示行単位での移動できるようにする
nnoremap j gj
nnoremap k gk
" Tab系
" 不可視文字を可視化(タブが「▸-」と表示される)
set list listchars=tab:\▸\-
" Tab文字を半角スペースにする
set expandtab
" 行頭以外のTab文字の表示幅(スペースいくつ分)
set tabstop=4
" 行頭でのTab文字の表示幅
set shiftwidth=4
" 検索系
" 検索文字列が小文字の場合は大文字小文字を区別なく検索する
set ignorecase
" 検索文字列に大文字が含まれている場合は区別して検索する
set smartcase
" 検索文字列入力時に順次対象文字列にヒットさせる
set incsearch
" 検索時に最後まで行ったら最初に戻る
set wrapscan
" 検索語をハイライト表示
set hlsearch
" ESC連打でハイライト解除
nmap <Esc><Esc> :nohlsearch<CR><Esc>
" NeoBundle
" http://qiita.com/iwaseasahi/items/93db781ef08bcdb15004
" Note: Skip initialization for vim-tiny or vim-small.
if 0 | endif
if &compatible
set nocompatible " Be iMproved
endif
" Required:
set runtimepath+=~/.vim/bundle/neobundle.vim/
" Required:
call neobundle#begin(expand('~/.vim/bundle/'))
" Let NeoBundle manage NeoBundle
" Required
NeoBundleFetch 'Shougo/neobundle.vim'
" My Bundles here:
" Refer to |:NeoBundle-examples|.
" Note: You don't set neobundle setting in .gvimrc!
" rust support
NeoBundle 'rust-lang/rust.vim'
NeoBundle 'racer-rust/vim-racer'
" ファイルを tree 表示
NeoBundle 'scrooloose/nerdtree'
call neobundle#end()
" Required:
filetype plugin indent on
" If there are uninstalled bundles found on startup,
" this will conveniently prompt you to install them.
NeoBundleCheck
" rust support
let g:rustfmt_autosave = 1
set hidden
let g:racer_cmd = "~/.cargo/bin"
let g:racer_experimental_completer = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment