if empty(glob('~/.vim/autoload/plug.vim')) silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim autocmd VimEnter * PlugInstall --sync | source $MYVIMRC endif "#####表示設定##### set number "行番号を表示する set title "編集中のファイル名を表示 set showmatch "括弧入力時の対応する括弧を表示 syntax on "コードの色分け set expandtab set shiftwidth=4 set tabstop=4 "インデントをスペース4つ分に設定 set smartindent "オートインデント let g:indentLine_setConceal = 0 set conceallevel=0 " json とかで quote を表示する "#####検索設定##### set ignorecase "大文字/小文字の区別なく検索する set smartcase "検索文字列に大文字が含まれている場合は区別して検索する set wrapscan "検索時に最後まで行ったら最初に戻る set hlsearch set incsearch "####バックスペース制御 set backspace=2 " 改行時にコメントアウトしない set formatoptions-=ro " ファイル編集時に別ファイルを開ける set hidden set completeopt+=preview,menuone " syntax on set background=dark set laststatus=2 " swap ファイルの場所 if empty(glob('~/.vim/tmp')) silent !mkdir -p ~/.vim/tmp endif set directory=~/.vim/tmp nmap t :term ++close zsh -i nmap T :vert term ++close zsh -i nmap nmap :noh:redraw let mapleader = "\" let maplocalleader = "\" " custom command command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ \ | diffthis | wincmd p | diffthis " git commit 時にはプラグインは読み込まない " if $HOME != $USERPROFILE && $GIT_EXEC_PATH != '' " " call plug#begin('~/.vim/plugged') " Plug 'tpope/vim-fugitive' " call plug#end() " " finish " end let g:plug_shallow = 0 call plug#begin('~/.vim/plugged') if has('python3') " 無効化しておかないとうるさい Plug 'SirVer/ultisnips' endif Plug 'prabirshrestha/async.vim' Plug 'prabirshrestha/asyncomplete.vim' Plug 'prabirshrestha/asyncomplete-lsp.vim' Plug 'prabirshrestha/vim-lsp' Plug 'mattn/vim-lsp-settings' Plug 'thomasfaingnaert/vim-lsp-snippets' if has('python3') Plug 'thomasfaingnaert/vim-lsp-ultisnips' endif " Plug 'yami-beta/asyncomplete-omni.vim' " Plug 'machakann/asyncomplete-ezfilter.vim' " ALE " Plug 'w0rp/ale' " php " Plug 'felixfbecker/php-language-server', {'do': 'composer install && composer run-script parse-stubs'} " theme Plug 'arcticicestudio/nord-vim' " for lit-html Plug 'jonsmithers/vim-html-template-literals' Plug 'pangloss/vim-javascript' Plug 'leafgarland/typescript-vim' Plug 'tpope/vim-unimpaired' Plug 'tpope/vim-abolish' Plug 'itchyny/lightline.vim' Plug 'qpkorr/vim-bufkill' " to treat whitespace Plug 'ntpeters/vim-better-whitespace' Plug 'tpope/vim-surround' Plug 'tpope/vim-repeat' " auto detect indent Plug 'tpope/vim-sleuth' " Plug 'docunext/closetag.vim' Plug 'yggdroot/indentline' " file manager Plug 'scrooloose/nerdtree' " Plug 'lambdalisue/fern.vim' " treat file Plug 'tpope/vim-eunuch' " for git Plug 'tpope/vim-fugitive' Plug 'tpope/vim-rhubarb' Plug 'airblade/vim-gitgutter' Plug 'tommcdo/vim-fubitive' "git clone https://github.com/junegunn/fzf.git ~/.fzf && ~/.fzf/install Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } Plug 'junegunn/fzf.vim' "apt install ripgrep Plug 'mileszs/ack.vim' Plug 'andymass/vim-matchup' " for markdown Plug 'plasticboy/vim-markdown' Plug 'kannokanno/previm' " open url or so Plug 'tyru/open-browser.vim' " for comment Plug 'scrooloose/nerdcommenter' " sneak " Plug 'justinmk/vim-sneak' " easymotion Plug 'easymotion/vim-easymotion' " Plug 'thinca/vim-quickrun' call plug#end() colorscheme nord " function! s:fuzzy(lhs, rhs) abort " return a:lhs =~ join(map(split(a:rhs, '\zs'), "printf('[\\x%02x].*', char2nr(v:val))"), '') " endfunction " " 各種設定の読み込み call map(sort(split(globpath(&runtimepath, '_config/*.vim'))), {->[execute('exec "so" v:val')]})