Last active
October 8, 2017 05:51
-
-
Save akiya64/18aa518707e785408f5b20a6c3a0c1f4 to your computer and use it in GitHub Desktop.
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
"dein Scripts----------------------------- | |
if &compatible | |
set nocompatible " Be iMproved | |
endif | |
" Required: | |
set runtimepath+=~\.cache\dein\repos\github.com\Shougo\dein.vim | |
" Required: | |
if dein#load_state('~\.cache\dein') | |
call dein#begin('~\.cache\dein') | |
" Let dein manage dein | |
" Required: | |
call dein#add('~\.cache\dein\repos\github.com\Shougo\dein.vim') | |
" Add or remove your plugins here: | |
" Shougo | |
call dein#add('Shougo/neosnippet.vim') | |
call dein#add('Shougo/neosnippet-snippets') | |
call dein#add('Shougo/deoplete.nvim') | |
"call dein#add('Shougo/vimfiler.vim') | |
call dein#add('Shougo/denite.nvim') | |
"Customize StatusLine | |
call dein#add('itchyny/lightline.vim') | |
call dein#add('tpope/vim-fugitive') | |
call dein#add('deris/vim-gothrough-jk') | |
"シンタックスハイライト | |
call dein#add('mattn/emmet-vim') | |
call dein#add('hail2u/vim-css3-syntax') | |
call dein#add('othree/html5.vim') | |
call dein#add('scrooloose/syntastic') | |
"変更箇所の表示 | |
call dein#add('mhinz/vim-signify') | |
"カラースキーム編集用 | |
call dein#add('cocopon/colorswatch.vim') | |
call dein#add('lilydjwg/colorizer') | |
"括弧とかEnd補完プラグイン | |
call dein#add('cohama/lexima.vim') | |
call dein#add('tpope/vim-endwise') | |
call dein#add('Townk/vim-autoclose') | |
call dein#add('kana/vim-smartchr') | |
"テキストオブジェクト 拡張 | |
call dein#add('kana/vim-textobj-user') | |
call dein#add('rhysd/vim-textobj-ruby') | |
"ファイラー | |
call dein#add('cocopon/vaffle.vim') | |
call dein#add('scrooloose/nerdtree') | |
"for MarkDown | |
call dein#add('tpope/vim-markdown') | |
call dein#add('kannokanno/previm') | |
call dein#add('tyru/open-browser.vim') | |
" Required: | |
call dein#end() | |
call dein#save_state() | |
endif | |
" Required: | |
filetype plugin indent on | |
syntax enable | |
"End dein Scripts------------------------- | |
set clipboard=unnamed | |
set guifont=Migu_2M | |
"16進数のカラー表示はデフォルトではOFF | |
let g:colorizer_startup = 0 | |
"全角文字など、エラーにしたい空白文字の設定 | |
augroup AdditionalHighlights | |
autocmd! | |
autocmd ColorScheme * highlight link ZenkakuSpace Error | |
autocmd Syntax * syntax match ZenkakuSpace containedin=ALL / / | |
augroup END | |
"ハイライト設定 全角をエラーとする設定後に記載すること | |
colorscheme Soifon | |
set number | |
set cursorline | |
"タブ、行末、改行の可視設定 | |
set listchars=tab:>\ ,trail:-,extends:>,precedes:< | |
"タブの設定 | |
set tabstop=4 | |
set shiftwidth=4 | |
set softtabstop=4 | |
set expandtab | |
set autoindent | |
"マークダウン用ファイル設定 | |
autocmd BufRead,BufNewFile *.md set filetype=markdown | |
autocmd BufRead,BufNewFile *.md hi Constant guifg=#fffe89 | |
"PHPファイルはほぼWordPressなのでWordPress用辞書を使う | |
autocmd FileType php :set dictionary=~/.config/nvim/dictionary/*.dict | |
"キーアサイン | |
let mapleader = "\<Space>" | |
noremap <leader>fi :<C-U>Vaffle<CR> | |
"プラグイン設定 | |
" 読み込んだプラグインも含め、ファイルタイプの検出、ファイルタイプ別プラグイン/インデントを有効化する | |
filetype plugin indent on | |
"git用プラグインでブランチをステータスバーに表示 | |
set statusline+=%{exists('g:loaded_fugitive')?fugitive#statusline():''} | |
let g:deoplete#enable_at_startup = 1 | |
"lightlineプラグインの設定 長いので常に末尾とする | |
let g:lightline = { | |
\ 'colorscheme': 'wombat', | |
\ 'mode_map': {'c': 'NORMAL'}, | |
\ 'active': { | |
\ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ] ] | |
\ }, | |
\ 'component_function': { | |
\ 'modified': 'LightLineModified', | |
\ 'readonly': 'LightLineReadonly', | |
\ 'fugitive': 'LightLineFugitive', | |
\ 'filename': 'LightLineFilename', | |
\ 'fileformat': 'LightLineFileformat', | |
\ 'filetype': 'LightLineFiletype', | |
\ 'fileencoding': 'LightLineFileencoding', | |
\ 'mode': 'LightLineMode' | |
\ } | |
\ } | |
function! LightLineModified() | |
return &ft =~ 'help\|vimfiler\|gundo' ? '' : &modified ? '+' : &modifiable ? '' : '-' | |
endfunction | |
function! LightLineReadonly() | |
return &ft !~? 'help\|vimfiler\|gundo' && &readonly ? 'x' : '' | |
endfunction | |
function! LightLineFilename() | |
return ('' != LightLineReadonly() ? LightLineReadonly() . ' ' : '') . | |
\ (&ft == 'vimfiler' ? vimfiler#get_status_string() : | |
\ &ft == 'unite' ? unite#get_status_string() : | |
\ &ft == 'vimshell' ? vimshell#get_status_string() : | |
\ '' != expand('%:t') ? expand('%:t') : '[No Name]') . | |
\ ('' != LightLineModified() ? ' ' . LightLineModified() : '') | |
endfunction | |
function! LightLineFugitive() | |
try | |
if &ft !~? 'vimfiler\|gundo' && exists('*fugitive#head') | |
return fugitive#head() | |
endif | |
catch | |
endtry | |
return '' | |
endfunction | |
function! LightLineFileformat() | |
return winwidth(0) > 70 ? &fileformat : '' | |
endfunction | |
function! LightLineFiletype() | |
return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype : 'no ft') : '' | |
endfunction | |
function! LightLineFileencoding() | |
return winwidth(0) > 70 ? (strlen(&fenc) ? &fenc : &enc) : '' | |
endfunction | |
function! LightLineMode() | |
return winwidth(0) > 60 ? lightline#mode() : '' | |
endfunction | |
"lightline end. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
deinの設定はinstall.shを走らせると、インストールパス入りのVimスクリプトが返ってくるので、そのまま貼り付けでOK。