Skip to content

Instantly share code, notes, and snippets.

@mkacky
Created May 24, 2015 12:26
Show Gist options
  • Save mkacky/a0ff82f6b122566e87bc to your computer and use it in GitHub Desktop.
Save mkacky/a0ff82f6b122566e87bc to your computer and use it in GitHub Desktop.
最初のvimrc
syntax enable
" ウィンドウのタイトルを変更
set title
" 行番号を表示
set number
" 折り返さない
set nowrap
"""""""""""""""""""""""""
"" タブ、インデント関係
"""""""""""""""""""""""""
" タブの空白文字数
set tabstop=5
" タブ文字などの不可視文字を表示する
set list
" listオプションで表示される文字を指定
" set listchars=tab:>-,trail:-,nbsp:%,extends:>,precedes:<,eol:<
set listchars=tab:>.,trail:.,extends:#,nbsp:.
" 改行時にインデントを踏襲
set autoindent
"""""""""""""""""""""""""
"" サーチ関連
"""""""""""""""""""""""""
" インクリメンタルサーチ
set incsearch
" サーチした単語をハイライト
set hlsearch
" <ESC>2連打でハイライトを無効化
nnoremap <ESC><ESC> :nohlsearch<CR>
" サーチ時に大文字小文字を区別しない
set ignorecase
" パターンが大文字を含むときは文字の大小を区別する
set smartcase
"""""""""""""""""""""""""
"" :wと:qと:q!をマッピング
"""""""""""""""""""""""""
nnoremap <Space>w :<C-u>w<CR>
nnoremap <Space>q :<C-u>q<CR>
nnoremap <Space>Q :<C-u>q!<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment