set shell=/bin/bash "*********************************************************************** " vim-plug "*********************************************************************** call plug#begin('~/.vim/plugged') " colorscheme Plug 'MaxMEllon/molokai' Plug 'jonathanfilip/vim-lucius' Plug 'cocopon/iceberg.vim' Plug 'cseelus/vim-colors-lucid' Plug 'rakr/vim-two-firewatch' Plug 'tyrannicaltoucan/vim-deep-space' Plug 'AlessandroYorba/Sierra' Plug 'easysid/mod8.vim' Plug 'cabin/cabin-colorscheme' Plug 'duythinht/inori' Plug 'stulzer/heroku-colorscheme' Plug 'uu59/vim-herokudoc-theme' " Plug 'jacoborus/tender' Plug 'nobarudo/tender.vim' Plug 'cocopon/lightline-hybrid.vim' " view " if &filetype != 'tex' if expand('%:e') != 'tex' Plug 'Yggdroot/indentLine' endif Plug 'itchyny/lightline.vim' Plug 'tpope/vim-fugitive' Plug 'mhinz/vim-startify' Plug 'Shougo/vimproc.vim', {'do' : 'make'} Plug 'Shougo/vimshell.vim' Plug 'ekalinin/Dockerfile.vim' Plug 'Shougo/unite.vim' Plug 'rhysd/accelerated-jk' Plug 'tpope/vim-surround' " similar to 'vim-operator-surround' and 'vim-sandwich' Plug 'cohama/lexima.vim' Plug 'osyo-manga/vim-over' Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } Plug 'junegunn/vim-easy-align' Plug 'LeafCage/yankround.vim' Plug 'kana/vim-smartchr' Plug 'Shougo/neocomplete.vim' " Plug 'Shougo/neosnippet' " Plug 'Shougo/neosnippet-snippets' Plug 'SirVer/ultisnips' Plug 'honza/vim-snippets' Plug 'osyo-manga/vim-monster', { 'for': 'ruby' } Plug 'moll/vim-node' Plug 'tpope/vim-abolish' Plug 'tpope/vim-repeat' Plug 'coderifous/textobj-word-column.vim' Plug 'easymotion/vim-easymotion' Plug 'haya14busa/incsearch.vim' Plug 'haya14busa/incsearch-fuzzy.vim' Plug 'haya14busa/incsearch-easymotion.vim' Plug 'haya14busa/vim-asterisk' Plug 'osyo-manga/vim-anzu' Plug 'tmhedberg/matchit' Plug 'osyo-manga/vim-jplus' Plug 'osyo-manga/vim-over' Plug 't9md/vim-quickhl' Plug 'wellle/targets.vim' Plug 'bkad/CamelCaseMotion' Plug 'rking/ag.vim' " Plug 'terryma/vim-multiple-cursors' Plug 'kana/vim-niceblock' Plug 'kshenoy/vim-signature' Plug 'kana/vim-altr' " text object Plug 'kana/vim-textobj-user' Plug 'osyo-manga/vim-textobj-multiblock' Plug 'kana/vim-textobj-function' Plug 'rhysd/vim-textobj-ruby', { 'for': 'ruby' } Plug 'machakann/vim-textobj-delimited' Plug 'glts/vim-textobj-indblock' Plug 'thinca/vim-textobj-between' Plug 'Julian/vim-textobj-variable-segment' " similar to 'machakann/vim-textobj-delimited' Plug 'vimtaku/vim-textobj-sigil' " operator Plug 'kana/vim-operator-user' Plug 'kana/vim-operator-replace' Plug 'tyru/operator-camelize.vim' Plug 'haya14busa/vim-operator-flashy' " highlight Plug 'slim-template/vim-slim', { 'for': 'slim' } Plug 'kchmck/vim-coffee-script', { 'for': 'coffee' } Plug 'maxmellon/vim-jsx-pretty', { 'for': ['javascript.jsx'] } Plug 'elzr/vim-json', { 'for': ['json', 'ika'] } Plug 'tmux-plugins/vim-tmux', { 'for': ['tmux', 'conf'] } " ruby if has('ruby') Plug 'todesking/ruby_hl_lvar.vim', { 'for': 'ruby' } endif Plug 'tpope/vim-rails' " html Plug 'mattn/emmet-vim' call plug#end() filetype off filetype plugin indent off "***** filetype **************************************** let mapleader = "\" "***** filetype **************************************** " set filetype {{{ function! s:set_filetype(...) execute 'autocmd BufRead,BufNewFile ' . '*'.a:1 . ' set filetype=' . a:2 endfunction command! -nargs=* SetFileType call s:set_filetype() let s:MyFileTypes = [ \ {'file' : '.md', 'type' : 'markdown'}, \ {'file' : '.slim', 'type' : 'slim'}, \ {'file' : '.less', 'type' : 'less'}, \ {'file' : '.coffee', 'type' : 'coffee'}, \ {'file' : '.scss', 'type' : 'scss'}, \ {'file' : '.sass', 'type' : 'sass'}, \ {'file' : '.cjsx', 'type' : 'coffee'}, \ {'file' : '.exs', 'type' : 'elixir'}, \ {'file' : '.ex', 'type' : 'elixir'}, \ {'file' : '.toml', 'type' : 'toml'}, \ {'file' : '_spec.rb', 'type' : 'rspec'}, \ {'file' : '.jsx', 'type' : 'javascript.jsx'}, \ {'file' : '.es6', 'type' : 'javascript'}, \ {'file' : '.react.js', 'type' : 'javascript.jsx'}, \ {'file' : '.fish', 'type' : 'fish'}, \ {'file' : '.babelrc', 'type' : 'json'}, \ {'file' : '.ika', 'type' : 'ika'}, \ {'file' : '.eslintrc', 'type' : 'yaml'}, \ {'file' : '.fish', 'type' : 'zsh'}, \ {'file' : '.tex', 'type' : 'tex'}, \ ] for s:e in s:MyFileTypes execute 'SetFileType ' . s:e['file'] . ' ' . s:e['type'] endfor " }}} "***** set ********************************************* " encord set encoding=utf-8 " file encord set fileencodings=utf-8 set fileformats=unix,dos,mac " swapファイルを作成しない set noswapfile " set directory=$HOME/vim_swap " backup set nobackup " set backup " set backupdir=$HOME/vim_backup " liny number display set number " display by relative number set relativenumber " 不可視文字 set list " set listchars=eol:¬,tab:»\ ,trail:_,extends:< set listchars=eol:¬,tab:\ ,trail:_,extends:< " 現在行 set ruler " ペアマッチに <> を追加 set matchpairs& matchpairs+=<:> " 不明 set showmatch " 不明 set matchtime=3 " no Beep set visualbell set t_vb= " if has('mouse') " set mouse=a " endif " set virtualedit=onemore " set viminfo set viminfo='50,\"1877,:0,h,n~/.vim/.viminfo " 画面に余裕を持たせてスクロール set scrolloff=5 " でpaste, nopaste を切り替え set pastetoggle= " bufferが変更されているとき,エラーでなく,保存するかを確認 set confirm " 不明 set infercase " not distinguish upper and lower set ignorecase " height of command line set cmdheight=1 " 不明 set smartcase " 不明 set incsearch " 不明 set hlsearch " show inputing command set showcmd " set whichwrap=b,s,h,l,<,>,[,] " set nowrapscan " set backspace=indent,eol,start " indent if expand('%:e') != 'go' set expandtab " タブ入力を複数の空白入力に置き換える set tabstop=2 " 画面上でタブ文字が占める幅 set shiftwidth=2 " 自動インデントでずれる幅 set softtabstop=2 " 連続した空白に対してタブキーやバックスペースキーでカーソルが動く幅 endif set autoindent " 改行時に前の行のインデントを継続 set smartindent " 改行時に入力された行の末尾に合わせて次の行のインデントを増減 " display cursor line set cursorline " set background color set background=dark " regist undo history if has('persistent_undo') set undodir=~/.vim/undo set undofile endif " share yank data on other vim process " see: http://shirakiya.hatenablog.com/entry/2015/01/30/025257 " Linuxの場合はviminfoを用いてヤンクデータを共有 " let OSTYPE = system('uname') " if OSTYPE == "Linux\n" " noremap y y:wv " noremap p :rv!p " endif " 前回のカーソル位置から augroup vimrcEx au BufRead * if line("'\"") > 0 && line("'\"") <= line("$") | \ exe "normal g`\"" | endif augroup END "***** normal & commandline ********************************************** "noremap ^ "noremap $ "noremap < { "noremap > } "***** normal & visual *********************************************** noremap r r noremap ,d "_d noremap ,c "_c noremap x "_x "***** normal mode *************************************************** " nnoremap ; ^ " nnoremap ; : nnoremap Y y$ nnoremap } }zz nnoremap { {zz nnoremap ]] ]]zz nnoremap [[ [[zz nnoremap x "_x nnoremap X "_X nnoremap ,x x nnoremap ,X X nnoremap s "_s nnoremap ,p "0p nnoremap ,P "0P nnoremap い i " nnoremap / _(":%s//&/gn") " function! s:move_cursor_pos_mapping(str, ...) " let left = get(a:, 1, "") " let lefts = join(map(split(matchstr(a:str, '.*\zs.*\ze'), '.\zs'), 'left'), "") " return substitute(a:str, '', '', '') . lefts " endfunction " function! _(str) " return s:move_cursor_pos_mapping(a:str, "\") " endfunction "***** commandline mode *************************************************** cnoremap cnoremap cnoremap cnoremap cnoremap cnoremap cnoremap " cnoremap " cnoremap cnoremap e getcmdpos() == 1 ? '' : getcmdline()[:getcmdpos()-2] " cnoremap d dw " cnoremap where echo expand("%:p") cnoremap bb ls:buf "***** insert mode *************************************************** " insert inoremap jj inoremap j " move inoremap inoremap inoremap inoremap " inoremap \" 補完と被る " inoremap inoremap b inoremap f " backspase & delete inoremap u inoremap inoremap D " inoremap "\u".(col('.') == col('$') ? 'gJ' : 'D') inoremap d dw " add a newline & move the newline inoremap "***** visual mode *************************************************** " vnoremap * "zy:let @/ = @zn vnoremap "zx"zP`[V`] vnoremap "zx"zp`[V`] "***** binary ******************************************************** augroup BinaryXXD autocmd! autocmd BufReadPre *.bin let &binary =1 autocmd BufReadPost * if &binary | silent %!xxd -g 1 autocmd BufReadPost * set ft=xxd | endif autocmd BufWritePre * if &binary | %!xxd -r | endif autocmd BufWritePost * if &binary | silent %!xxd -g 1 autocmd BufWritePost * set nomod | endif augroup END "**** カーソル下の単語を検索&置換 " nnoremap * * nnoremap * "zyiw:let @/ = '\<' . @z . '\>':set hlsearch nmap # *:%s////g xnoremap * mz:call set_vsearch():set hlsearch`z xnoremap # :call set_vsearch()// xmap # *:%s////g function! s:set_vsearch() silent normal gv"zy let @/ = '\V' . substitute(escape(@z, '/\'), '\n', '\\n', 'g') endfunction nnoremap ; : nnoremap : ; vnoremap ; : vnoremap : ; "***** plugins *************************************************** let s:plug = { \ "plugs": get(g:, 'plugs', {}) \ } function! s:plug.is_installed(name) return has_key(self.plugs, a:name) ? isdirectory(self.plugs[a:name].dir) : 0 endfunction " }}} if s:plug.is_installed('vim-startify') " {{{ " startifyのヘッダー部分に表示する文字列を設定する(dateコマンドを実行して日付を設定している) let g:startify_custom_header = \ map(split(system('date'), '\n'), '" ". v:val') + ['',''] " デフォルトだと、最近使ったファイルの先頭は数字なので、使用するアルファベットを指定 " let g:startify_custom_indices = ['f', 'g', 'h', 'r', 'i', 'o', 'b'] let g:startify_custom_indices = ['f', 'd', 'n', 'm', 'v', 'g', 'u', 'r', 'i', 's', 'l', 'a', 'c', 'x', 'w', 'o', 'h', 'y', 't', 'b', 'z', 'p'] " よく使うファイルをブックマークとして登録しておく let g:startify_bookmarks = [ \ '~/.vimrc', \ '~/.zshrc', \ '~/.zshenv', \ '~/.zsh_history', \ '~/.dotfiles/zsh/alias.zsh', \ '~/.dotfiles/zsh/keybind.zsh', \ '~/.dotfiles/zsh/env_vars.zsh', \ '~/.dotfiles/zsh', \ '~/.dotfiles/tmux/.tmux.conf', \ '~/.dotfiles/tig', \ ] endif if s:plug.is_installed('indentLine') " {{{ let g:indentLine_faster = 1 nmap i :IndentLinesToggle let g:indentLine_color_term = 207 let g:indentLine_color_gui = '#708090' let g:indentLine_char = '¦' endif " }}} if s:plug.is_installed('lightline.vim') "{{{ let g:lightline = { \ 'colorscheme': 'default', \ 'active': { \ 'left': [ [ 'mode', 'paste' ], \ [ 'readonly', 'filename', 'modified' ] ] \ }, \ 'separator': { 'left': "\ue0c6", 'right': "" }, \ 'subseparator': { 'left': '|', 'right': '|' },} " \ 'component_function': { " \ 'fugitive': 'LightLineFugitive', " \ },} let g:lightline.colorscheme = 'hybrid' function! LightLineFugitive() return exists('*fugitive#head') ? fugitive#head() : '' endfunction set laststatus=2 endif " }}} if s:plug.is_installed('vim-easy-align') "{{{ vnoremap :EasyAlign xmap ga (EasyAlign) nmap ga (EasyAlign) endif " }}} if s:plug.is_installed('yankround.vim') nmap p (yankround-p) xmap p (yankround-p) nmap P (yankround-P) nmap gp (yankround-gp) xmap gp (yankround-gp) nmap gP (yankround-gP) nmap (yankround-prev) nmap (yankround-next) endif if s:plug.is_installed('neocomplete.vim') "Note: This option must be set in .vimrc(_vimrc). NOT IN .gvimrc(_gvimrc)! " Disable AutoComplPop. let g:acp_enableAtStartup = 0 " Use neocomplete. let g:neocomplete#enable_at_startup = 1 " Use smartcase. let g:neocomplete#enable_smart_case = 1 " Set minimum syntax keyword length. let g:neocomplete#sources#syntax#min_keyword_length = 3 let g:neocomplete#lock_buffer_name_pattern = '\*ku\*' " Define dictionary. let g:neocomplete#sources#dictionary#dictionaries = { \ 'default' : '', \ 'vimshell' : $HOME.'/.vimshell_hist', \ 'scheme' : $HOME.'/.gosh_completions' \ } " Define keyword. if !exists('g:neocomplete#keyword_patterns') let g:neocomplete#keyword_patterns = {} endif let g:neocomplete#keyword_patterns['default'] = '\h\w*' " Plugin key-mappings. inoremap neocomplete#undo_completion() inoremap neocomplete#complete_common_string() " Recommended key-mappings. " : close popup and save indent. inoremap =my_cr_function() function! s:my_cr_function() return (pumvisible() ? "\" : "" ) . "\" " For no inserting key. "return pumvisible() ? "\" : "\" endfunction " : completion. inoremap pumvisible() ? "\" : "\" " , : close popup and delete backword char. inoremap neocomplete#smart_close_popup()."\" inoremap neocomplete#smart_close_popup()."\" " Close popup by . "inoremap pumvisible() ? "\" : "\" " AutoComplPop like behavior. "let g:neocomplete#enable_auto_select = 1 " Shell like behavior(not recommended). "set completeopt+=longest "let g:neocomplete#enable_auto_select = 1 "let g:neocomplete#disable_auto_complete = 1 "inoremap pumvisible() ? "\" : "\\" " Enable omni completion. autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS autocmd FileType python setlocal omnifunc=pythoncomplete#Complete autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags " Enable heavy omni completion. if !exists('g:neocomplete#sources#omni#input_patterns') let g:neocomplete#sources#omni#input_patterns = {} endif "let g:neocomplete#sources#omni#input_patterns.php = '[^. \t]->\h\w*\|\h\w*::' "let g:neocomplete#sources#omni#input_patterns.c = '[^.[:digit:] *\t]\%(\.\|->\)' "let g:neocomplete#sources#omni#input_patterns.cpp = '[^.[:digit:] *\t]\%(\.\|->\)\|\h\w*::' " For perlomni.vim setting. " https://github.com/c9s/perlomni.vim let g:neocomplete#sources#omni#input_patterns.perl = '\h\w*->\h\w*\|\h\w*::' endif if s:plug.is_installed('neosnippet') " Plugin key-mappings. " Note: It must be "imap" and "smap". It uses mappings. imap (neosnippet_expand_or_jump) smap (neosnippet_expand_or_jump) xmap (neosnippet_expand_target) " SuperTab like snippets behavior. " Note: It must be "imap" and "smap". It uses mappings. imap (neosnippet_expand_or_jump) "imap " \ pumvisible() ? "\" : " \ neosnippet#expandable_or_jumpable() ? " \ "\(neosnippet_expand_or_jump)" : "\" smap neosnippet#expandable_or_jumpable() ? \ "\(neosnippet_expand_or_jump)" : "\" " For conceal markers. if has('conceal') set conceallevel=2 concealcursor=niv endif " Tell Neosnippet about the other snippets let g:neosnippet#snippets_directory='~/.vim/after/snippets/' end if s:plug.is_installed('ultisnips') " Trigger configuration. " Do not use if you use https://github.com/Valloric/YouCompleteMe. let g:UltiSnipsExpandTrigger='' let g:UltiSnipsJumpForwardTrigger='' let g:UltiSnipsJumpBackwardTrigger='' " let g:UltiSnipsListSnippets='' " If you want :UltiSnipsEdit to split your window. let g:UltiSnipsEditSplit='vertical' let g:UltiSnipsSnippetsDir = ['~/.vim/UltiSnips'] " let g:UltiSnipsSnippetDirectories = ['~/.vim/after/snippets/'] end if s:plug.is_installed('vim-monster') " Use neocomplete.vim let g:neocomplete#sources#omni#input_patterns = { \ "ruby" : '[^. *\t]\.\w*\|\h\w*::', \} " Set async completion. let g:monster#completion#rcodetools#backend = "async_rct_complete" " With neocomplete.vim let g:neocomplete#sources#omni#input_patterns = { \ "ruby" : '[^. *\t]\.\w*\|\h\w*::', \} " With deoplete.nvim let g:monster#completion#rcodetools#backend = "async_rct_complete" let g:deoplete#sources#omni#input_patterns = { \ "ruby" : '[^. *\t]\.\w*\|\h\w*::', \} endif if s:plug.is_installed('todesking/ruby-hl-lvar.vim') " Highligt group name for local variable " Default: 'Identifier' let g:ruby_hl_lvar_hl_group = 'RubyLocalVariable' " Auto enable and refresh highlight when text is changed. Useful but bit slow. " Default: 1 let g:ruby_hl_lvar_auto_enable = 0 " If you wish to control the plugin manually, map these functions. nmap he (ruby_hl_lvar-enable) nmap hd (ruby_hl_lvar-disable) nmap hr (ruby_hl_lvar-refresh) endif if s:plug.is_installed('moll/vim-node') autocmd User Node \ if &filetype == "javascript" | \ nmap f NodeVSplitGotoFile | \ nmap NodeVSplitGotoFile | \ endif endif if s:plug.is_installed('vim-easymotion') map (easymotion-prefix) let g:EasyMotion_do_mapping = 0 " Disable default mappings " let g:EasyMotion_keys='jkfdnmvgurieslacxwohytbzqpJKFDNMVGURIESLACXWOHYTBZQP' let g:EasyMotion_keys='jkfdnmvgurieslacxwohytbzqp;,.' let g:EasyMotion_leader_key=";" " 1 ストローク選択を優先 " let g:EasyMotion_grouping=1 " カラー設定変更 hi EasyMotionTarget ctermbg=none ctermfg=red hi EasyMotionShade ctermbg=none ctermfg=blue " JK motions: Line motions map h (easymotion-linebackward) map j (easymotion-j) map k (easymotion-k) map l (easymotion-lineforward) nmap l (easymotion-lineanywhere) let g:EasyMotion_startofline = 0 " keep cursor column when JK motion " Move to line map L (easymotion-bd-jk) nmap L (easymotion-overwin-line) " f{char}{char} to move to {char} map f (easymotion-bd-f2) map F (easymotion-F2) nmap f (easymotion-overwin-f2) map t (easymotion-bd-t2) map T (easymotion-T2) " Gif config nmap s (easymotion-s2) " Move to word map w (easymotion-w) map W (easymotion-W) nmap w (easymotion-overwin-w) map b (easymotion-b) map B (easymotion-B) map e (easymotion-e) map E (easymotion-E) map ge (easymotion-ge) map gE (easymotion-gE) " Jump to latest '/' or '?' nmap n (easymotion-vim-n) nmap N (easymotion-vim-N) nmap ; (easymotion-next) nmap , (easymotion-prev) " Turn on case insensitive feature let g:EasyMotion_smartcase = 1 " nmap a (easymotion-iskeyword-b) " nmap c (easymotion-n) endif if s:plug.is_installed('incsearch.vim') map / (incsearch-forward) map ? (incsearch-backward) map g/ (incsearch-stay) " :h g:incsearch#auto_nohlsearch set hlsearch let g:incsearch#auto_nohlsearch = 1 map n (incsearch-nohl-n) map N (incsearch-nohl-N) " coexist with vim-anzu if s:plug.is_installed('vim-anzu') nmap n (incsearch-nohl)(anzu-n-with-echo) nmap N (incsearch-nohl)(anzu-N-with-echo) endif if s:plug.is_installed('vim-asterisk') " coexist with vim-asterisk map * (incsearch-nohl)(asterisk-*) map # (incsearch-nohl)(asterisk-#) map g* (incsearch-nohl)(asterisk-g*) map g# (incsearch-nohl)(asterisk-g#) map z* (incsearch-nohl0)(asterisk-z*) map gz* (incsearch-nohl0)(asterisk-gz*) map z# (incsearch-nohl0)(asterisk-z#) map gz# (incsearch-nohl0)(asterisk-gz#) let g:asterisk#keeppos = 1 else map * (incsearch-nohl-*) map # (incsearch-nohl-#) map g* (incsearch-nohl-g*) map g# (incsearch-nohl-g#) endif " see: https://github.com/haya14busa/incsearch.vim#example " function! s:noregexp(pattern) abort " return '\V' . escape(a:pattern, '\') " endfunction " function! s:config() abort " return {'converters': [function('s:noregexp')]} " endfunction " noremap z/ incsearch#go(config()) endif if s:plug.is_installed('incsearch-fuzzy.vim') map z/ (incsearch-fuzzy-/) map z? (incsearch-fuzzy-?) map zg/ (incsearch-fuzzy-stay) " Use both fuzzy & fuzzyspell feature function! s:config_fuzzyall(...) abort return extend(copy({ \ 'converters': [ \ incsearch#config#fuzzy#converter(), \ incsearch#config#fuzzyspell#converter() \ ], \ }), get(a:, 1, {})) endfunction noremap z/ incsearch#go(config_fuzzyall()) noremap z? incsearch#go(config_fuzzyall({'command': '?'})) noremap zg? incsearch#go(config_fuzzyall({'is_stay': 1})) endif if s:plug.is_installed('incsearch-easymotion.vim') map / (incsearch-easymotion-/) map ? (incsearch-easymotion-?) map g/ (incsearch-easymotion-stay) " incsearch.vim x fuzzy x vim-easymotion if s:plug.is_installed('incsearch-fuzzy.vim') function! s:config_easyfuzzymotion(...) abort return extend(copy({ \ 'converters': [incsearch#config#fuzzy#converter()], \ 'modules': [incsearch#config#easymotion#module()], \ 'keymap': {"\": '(easymotion)'}, \ 'is_expr': 0, \ 'is_stay': 1 \ }), get(a:, 1, {})) endfunction noremap / incsearch#go(config_easyfuzzymotion()) endif endif if s:plug.is_installed('vim-anzu') " mapping " nmap n (anzu-n-with-echo) " nmap N (anzu-N-with-echo) " nmap * (anzu-star-with-echo) " nmap # (anzu-sharp-with-echo) " clear status nmap (anzu-clear-search-status) " statusline set statusline=%{anzu#search_status()}) endif if s:plug.is_installed('vim-asterisk') " map * (asterisk-*) " map # (asterisk-#) " map g* (asterisk-g*) " map g# (asterisk-g#) " map z* (asterisk-z*) " map gz* (asterisk-gz*) " map z# (asterisk-z#) " map gz# (asterisk-gz#) let g:asterisk#keeppos = 1 endif if s:plug.is_installed('vim-jplus') " Jの挙動を jplus.vim で行う " nmap J (jplus) " vmap J (jplus) " getchar() を使用して挿入文字を入力します nmap J (jplus-getchar) vmap J (jplus-getchar) " input() を使用したい場合はこちらを使用して下さい " nmap J (jplus-input) " vmap J (jplus-input) " (jplus-getchar) 時に左右に空白文字を入れたい場合 " %d は入力した結合文字に置き換えられる let g:jplus#config = { \ "_" : { \ "delimiter_format" : ' %d ' \ } \} endif if s:plug.is_installed('vim-quickhl') nmap m (quickhl-manual-this) xmap m (quickhl-manual-this) nmap M (quickhl-manual-reset) xmap M (quickhl-manual-reset) " nmap j (quickhl-cword-toggle) nmap ] (quickhl-tag-toggle) " map H (operator-quickhl-manual-this-motion) endif " if s:plug.is_installed('vim-textobj-between') " omap iA (textobj-function-i) " omap aA (textobj-function-a) " vmap iA (textobj-function-i) " vmap aA (textobj-function-a) " endif if s:plug.is_installed('CamelCaseMotion') " call camelcasemotion#CreateMotionMappings('') map ,w CamelCaseMotion_w map ,b CamelCaseMotion_b map ,e CamelCaseMotion_e map ,ge CamelCaseMotion_ge sunmap ,w sunmap ,b sunmap ,e sunmap ,ge " omap iw CamelCaseMotion_iw " xmap iw CamelCaseMotion_iw " omap ib CamelCaseMotion_ib " xmap ib CamelCaseMotion_ib " omap ie CamelCaseMotion_ie " xmap ie CamelCaseMotion_ie endif if s:plug.is_installed('vim-operator-replace') map r (operator-replace) endif if s:plug.is_installed('operator-camelize.vim') map c (operator-camelize) map C (operator-decamelize) endif if s:plug.is_installed('vim-multiple-cursors') let g:multi_cursor_next_key='' let g:multi_cursor_prev_key='' let g:multi_cursor_skip_key='' " let g:multi_cursor_start_key='' let g:multi_cursor_start_word_key='g' let g:multi_cursor_quit_key='' " nnoremap :call_multiple_cursor#quit() endif if s:plug.is_installed('vim-operator-flashy') map y (operator-flashy) nmap Y (operator-flashy)$ endif if s:plug.is_installed('vim-niceblock') xmap I (niceblock-I) xmap A (niceblock-A) endif if s:plug.is_installed('vim-smartchr') inoremap , smartchr#loop(', ', ',') inoremap > smartchr#loop('>', '=>', '->') inoremap = smartchr#loop('=', ' == ') endif " let g:accelerated_jk_acceleration_limit = 100000 " let g:accelerated_jk_enable_deceleration = 1 if s:plug.is_installed('accelerated-jk') nmap j (accelerated_jk_j) nmap k (accelerated_jk_k) endif " カラースキーマの設定-------------------------------------------------- " syntax on " 色の設定(syntax onのあと) molokai try set termguicolors catch " do nothing endtry " set t_Co=256 try " colorscheme heroku-terminal colorscheme iceberg " let g:molokai_original = 1 catch colorscheme pablo endtry set t_ut= " see https://sunaku.github.io/vim-256color-bce.htmlet syntax on filetype plugin indent on set secure