Last active
April 30, 2019 15:01
-
-
Save bilzard/bff6a802529c123d89e08804d5b226d6 to your computer and use it in GitHub Desktop.
VImrc の便利な設定
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" | |
" Plug でインストールするプラグインの指定 | |
" | |
call plug#begin('~/.vim/plugged') | |
Plug 'leafgarland/typescript-vim' | |
call plug#end() | |
" | |
" 基本設定 | |
" | |
set nocompatible | |
syntax enable | |
filetype plugin on | |
" タブの設定 - ソフトタブ; space x2 | |
set tabstop=2 | |
set shiftwidth=2 | |
set expandtab | |
" クリップボードの内容をコピー&ヤンクできるようにする | |
set clipboard+=unnamed | |
set backspace=indent,eol,start | |
" | |
" ファイル検索 | |
" | |
" サブフォルダを再帰的に検索 | |
set path+=** | |
" タブ補完したときにすべての候補をリストする | |
set wildmenu | |
" | |
" タグジャンプ | |
" | |
" ^] で宣言された名前(変数、クラス、関数など)の定義箇所にジャンプ | |
" ctags がインストールされている必要がある | |
command! MakeTags !ctags -R . | |
" | |
" 補完 | |
" | |
" INSERT モードで以下をタイプすると補完の候補が表示される | |
" ^n : 一般的なキーワードで補完 | |
" ^x^n : ファイル中で定義されたキーワードで補完 | |
" ^x^f : ファイル名を挿入する | |
" | |
" ファイルブラウジング | |
" | |
" `vim .` などディレクトリを開いたときの挙動を指定 | |
let g:netrw_banner=0 " バナーを非表示に | |
let g:netrw_browse_split=4 " open in prior window | |
let g:netrw_altv=1 " open splits to the right | |
let g:netrw_liststyle=3 " ツリービューで表示 | |
let g:netrw_list_hide=netrw_gitignore#Hide() | |
let g:netrw_list_hide.=',\(^\|\s\s\)\zs\.\s\+' | |
" | |
" コードスニペット | |
" | |
" `,html` をタイプすると HTML のコードスニペットを挿入する | |
"nnoremap ,html :-1read $HOME/.vim/.skeleton.html<CR>3jwf>a | |
" | |
" BUILD INTEGRATION | |
" | |
" Configure the `make` command to run RSpec | |
" :make - run RSpec | |
" :cl - list error | |
" :cc# - jump the error by number | |
" :cn (cp) - navigate forward and back | |
"set makeprg=bundle\ exec\ rspec\ -f\ QuickfixFormatter | |
" | |
" ファイルタイプごとの設定 | |
" | |
autocmd BufRead,BufNewFile *.ts set filetype=typescript |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
.vimrc の設定はここの video で紹介されているものです。
https://www.youtube.com/watch?v=XA2WjJbmmoM