Skip to content

Instantly share code, notes, and snippets.

@bucho666
Last active October 2, 2019 07:18
Show Gist options
  • Save bucho666/7ba901d50ab871761832ac738c62bf25 to your computer and use it in GitHub Desktop.
Save bucho666/7ba901d50ab871761832ac738c62bf25 to your computer and use it in GitHub Desktop.
[[plugins]]
repo = 'Shougo/dein.vim'
[[plugins]]
repo = 'simeji/winresizer'
hook_add = '''
let g:winresizer_start_key = '<C-R>'
'''
[[plugins]]
repo = 'ryanoasis/vim-devicons'
hook_add = '''
let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols = {} " needed
let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols['nim'] = ''
'''
[[plugins]]
repo = 'Shougo/unite.vim'
hook_add = 'nnoremap <leader>f :<C-u>Unite buffer file file_mru<CR>'
lazy = 1
[[plugins]]
repo = 'Shougo/neomru.vim'
on_source = ['unite.vim']
lazy = 1
[[plugins]]
repo = 'cespare/vim-toml'
[[plugins]]
repo = 'tpope/vim-fugitive'
[[plugins]]
repo = 'w0rp/ale'
hook_add = '''
let g:ale_set_loclist = 0
let g:ale_set_quickfix = 1
let g:ale_sign_error = ''
let g:ale_sign_warning = ''
nmap <silent> <C-j> <Plug>(ale_next_wrap)
nmap <silent> <C-k> <Plug>(ale_previous_wrap)
'''
[[plugins]]
repo = 'itchyny/lightline.vim'
hook_add = '''
" colorscheme:
" wombat, solarized, powerline, jellybeans, Tomorrow,
" Tomorrow_Night, Tomorrow_Night_Blue, Tomorrow_Night_Eighties,
" PaperColor, seoul256, landscape, one, darcula, molokai, materia,
" material, OldHope, nord
"
"
let g:lightline = {
\ 'colorscheme': 'wombat',
\ 'separator': {
\ 'left': '', 'right': ''
\ },
\ 'subseparator': {
\ 'left': '', 'right': ''
\ },
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ],
\ 'right': [ [ 'lineinfo' ],
\ [ 'percent' ],
\ [ 'fileformat', 'fileencoding', 'filetype' ],
\ [ 'linter_checking', 'linter_errors', 'linter_warnings', 'linter_ok' ] ],
\ },
\ 'component': {
\ 'lineinfo': ' %3l:%-2v',
\ },
\ 'component_function': {
\ 'readonly': 'LightlineReadonly',
\ 'gitbranch': 'LightlineFugitive',
\ 'filetype': 'MyFiletype',
\ 'fileformat': 'MyFileformat',
\ },
\}
function! LightlineReadonly()
return &readonly ? '' : ''
endfunction
function! LightlineFugitive()
if exists('*fugitive#head')
let branch = fugitive#head()
return branch !=# '' ? ''.branch : ''
endif
return ''
endfunction
function! MyFiletype()
return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype . ' ' . WebDevIconsGetFileTypeSymbol() : 'no ft') : ''
endfunction
function! MyFileformat()
return winwidth(0) > 70 ? (&fileformat . ' ' . WebDevIconsGetFileFormatSymbol()) : ''
endfunction
'''
[[plugins]]
repo = 'maximbaz/lightline-ale'
depends = ['lightline.vim', 'ale']
hook_add = '''
let g:lightline.component_expand = {
\ 'linter_checking': 'lightline#ale#checking',
\ 'linter_warnings': 'lightline#ale#warnings',
\ 'linter_errors': 'lightline#ale#errors',
\ 'linter_ok': 'lightline#ale#ok',
\ }
let g:lightline.component_type = {
\ 'linter_checking': 'left',
\ 'linter_warnings': 'warning',
\ 'linter_errors': 'error',
\ 'linter_ok': 'left',
\ }
let g:lightline#ale#indicator_checking = ""
let g:lightline#ale#indicator_warnings = ""
let g:lightline#ale#indicator_errors = ""
let g:lightline#ale#indicator_ok = ""
'''
[[plugins]]
repo = 'tpope/vim-surround'
# 選択モード: S+(囲う文字)
# cs(元の文字)(変換する文字)
[[plugins]]
repo = 'osyo-manga/vim-precious'
depends = ['context_filetype.vim']
[[plugins]]
repo = 'Shougo/context_filetype.vim'
[[plugins]]
repo = 'prabirshrestha/async.vim'
[[plugins]]
repo = 'prabirshrestha/vim-lsp'
hook_add = '''
let g:lsp_async_completion = 1
if executable('pyls')
" pip install python-language-server
au User lsp_setup call lsp#register_server({
\ 'name': 'pyls',
\ 'cmd': {server_info->['pyls']},
\ 'whitelist': ['python'],
\ })
endif
let g:lsp_highlights_enabled = 0
let g:lsp_textprop_enabled = 0
'''
[[plugins]]
repo = 'prabirshrestha/asyncomplete-lsp.vim'
[[plugins]]
repo = 'prabirshrestha/asyncomplete.vim'
hook_add = '''
inoremap <expr><C-j> pumvisible() ? "\<C-n>" : "\<C-j>"
inoremap <expr><C-k> pumvisible() ? "\<C-p>" : "\<C-k>"
inoremap <expr><CR> pumvisible() ? asyncomplete#close_popup()."\<CR>" : "\<CR>"
'''
[[plugins]]
repo = 'prabirshrestha/asyncomplete-buffer.vim'
hook_add = '''
call asyncomplete#register_source(asyncomplete#sources#buffer#get_source_options({
\ 'name': 'buffer',
\ 'whitelist': ['*'],
\ 'blacklist': ['go'],
\ 'completor': function('asyncomplete#sources#buffer#completor'),
\ }))
'''
[[plugins]]
repo = 'yami-beta/asyncomplete-omni.vim'
hook_add = '''
call asyncomplete#register_source(asyncomplete#sources#omni#get_source_options({
\ 'name': 'omni',
\ 'whitelist': ['*'],
\ 'blacklist': ['c', 'cpp', 'html'],
\ 'completor': function('asyncomplete#sources#omni#completor')
\ }))
'''
[[plugins]]
repo = 'prabirshrestha/asyncomplete-file.vim'
hook_add = '''
au User asyncomplete_setup call asyncomplete#register_source(asyncomplete#sources#file#get_source_options({
\ 'name': 'file',
\ 'whitelist': ['*'],
\ 'priority': 10,
\ 'completor': function('asyncomplete#sources#file#completor')
\ }))
'''
[[plugins]]
repo = 'Shougo/neosnippet.vim'
hook_add = '''
imap <C-o> <Plug>(neosnippet_expand_or_jump)
smap <C-o> <Plug>(neosnippet_expand_or_jump)
xmap <C-o> <Plug>(neosnippet_expand_target)
'''
[[plugins]]
repo = 'Shougo/neosnippet-snippets'
[[plugins]]
repo = 'prabirshrestha/asyncomplete-neosnippet.vim'
hook_add = '''
call asyncomplete#register_source(asyncomplete#sources#neosnippet#get_source_options({
\ 'name': 'neosnippet',
\ 'whitelist': ['*'],
\ 'completor': function('asyncomplete#sources#neosnippet#completor'),
\ }))
'''
[[plugins]]
repo = 'alaviss/nim.nvim'
on_ft = ['nim']
hook_add= '''
au User asyncomplete_setup call asyncomplete#register_source({
\ 'name': 'nim',
\ 'whitelist': ['nim'],
\ 'completor': {opt, ctx -> nim#suggest#sug#GetAllCandidates({start, candidates -> asyncomplete#complete(opt['name'], ctx, start, candidates)})}
\ })
'''
[[plugins]]
repo = 'Shougo/deoplete.nvim'
on_ft = ['perl']
hook_post_source = '''
let g:deoplete#enable_at_startup = 1
let g:asyncomplete_auto_popup = 0
'''
[[plugins]]
repo = 'c9s/perlomni.vim'
[[plugins]]
repo = 'scrooloose/nerdtree'
hook_add = 'nnoremap <silent><C-e> :NERDTreeToggle<CR>'
"dein Scripts-----------------------------
if &compatible
set nocompatible " Be iMproved
endif
set runtimepath+=/home/bucho/.cache/dein/repos/github.com/Shougo/dein.vim
if dein#load_state('/home/bucho/.cache/dein')
call dein#begin('/home/bucho/.cache/dein')
call dein#load_toml('/home/bucho/.cache/dein/dein.toml')
call dein#end()
call dein#save_state()
endif
filetype plugin indent on
syntax enable
"" If you want to install not installed plugins on startup.
"if dein#check_install()
" call dein#install()
"endif
"
"" PluginDelete
"call map(dein#check_clean(), "delete(v:val, 'rf')")
"
""cache clear
"call dein#recache_runtimepath()
"End dein Scripts-------------------------
" 基本設定-------------------------
" basic
set autoindent "改行時に前の行のインデントを継続する
set backspace=start,eol,indent
set shiftwidth=2 "自動インデントでずれる幅
set smartindent "改行時に入力された行の末尾に合わせて次の行のインデントを増減する
set softtabstop=2 "連続した空白に対してタブキーやバックスペースキーでカーソルが動く幅
set tabstop=2 "画面上でタブ文字が占める幅
set expandtab "タブ入力を複数の空白入力に置き換える
" colors
colorscheme peachpuff
" encoding
set encoding=utf-8
" タブと行末半角スペースを強調する
highlight TabSpace ctermbg=DarkBlue
match TabSpace /\t\|\s\+$/
" viminfo
set viminfo='100,<1000,s10,h
" 前回開いた場所から開く
autocmd BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
" Window分割
nmap \| :vsplit<CR>
nmap = :split<CR>
" バックアップファイルを作らない
set nobackup
set noswapfile
" 折り畳み禁止
set nofoldenable
" テンプレートファイル
autocmd BufNewFile *.py 0r ~/.vim/template.py
autocmd BufNewFile *.t 0r ~/.vim/template.t
autocmd BufNewFile *.pl 0r ~/.vim/template.pl
" terminal起動時、自動でinsert mode
autocmd TermOpen term://* startinsert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment