diff --git a/.vim/rc/dein.toml b/.vim/rc/dein.toml new file mode 100644 index 0000000..8c04fd7 --- /dev/null +++ b/.vim/rc/dein.toml @@ -0,0 +1,45 @@ +[[plugins]] +repo = 'Shougo/dein.vim' + + +[[plugins]] +repo = 'dhruvasagar/vim-table-mode' + +[[plugins]] +repo = 'Shougo/unite.vim' + +[[plugins]] +repo = 'Shougo/neomru.vim' + +[[plugins]] +repo = 'scrooloose/nerdtree' + +[[plugins]] +repo = 'vim-airline/vim-airline' + +[[plugins]] +repo = 'vim-airline/vim-airline-themes' + +[[plugins]] +repo = 'ryanoasis/vim-devicons' + +[[plugins]] +repo = 'posva/vim-vue' + +[[plugins]] +repo = 'previm/previm' + +[[plugins]] +repo = 'tyru/open-browser.vim' + +[[plugins]] +repo = 'aklt/plantuml-syntax' + +[[plugins]] +repo = 'Shougo/context_filetype.vim' + +[[plugins]] +repo = 'cespare/vim-toml' +on_ft = 'toml' + + diff --git a/.vim/rc/dein.toml b/.vim/rc/dein.toml new file mode 100644 index 0000000..8c04fd7 --- /dev/null +++ b/.vim/rc/dein.toml @@ -0,0 +1,45 @@ +[[plugins]] +repo = 'Shougo/dein.vim' + + +[[plugins]] +repo = 'dhruvasagar/vim-table-mode' + +[[plugins]] +repo = 'Shougo/unite.vim' + +[[plugins]] +repo = 'Shougo/neomru.vim' + +[[plugins]] +repo = 'scrooloose/nerdtree' + +[[plugins]] +repo = 'vim-airline/vim-airline' + +[[plugins]] +repo = 'vim-airline/vim-airline-themes' + +[[plugins]] +repo = 'ryanoasis/vim-devicons' + +[[plugins]] +repo = 'posva/vim-vue' + +[[plugins]] +repo = 'previm/previm' + +[[plugins]] +repo = 'tyru/open-browser.vim' + +[[plugins]] +repo = 'aklt/plantuml-syntax' + +[[plugins]] +repo = 'Shougo/context_filetype.vim' + +[[plugins]] +repo = 'cespare/vim-toml' +on_ft = 'toml' + + diff --git a/.vim/rc/dein_lazy.toml b/.vim/rc/dein_lazy.toml new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/.vim/rc/dein_lazy.toml diff --git a/.vim/rc/dein.toml b/.vim/rc/dein.toml new file mode 100644 index 0000000..8c04fd7 --- /dev/null +++ b/.vim/rc/dein.toml @@ -0,0 +1,45 @@ +[[plugins]] +repo = 'Shougo/dein.vim' + + +[[plugins]] +repo = 'dhruvasagar/vim-table-mode' + +[[plugins]] +repo = 'Shougo/unite.vim' + +[[plugins]] +repo = 'Shougo/neomru.vim' + +[[plugins]] +repo = 'scrooloose/nerdtree' + +[[plugins]] +repo = 'vim-airline/vim-airline' + +[[plugins]] +repo = 'vim-airline/vim-airline-themes' + +[[plugins]] +repo = 'ryanoasis/vim-devicons' + +[[plugins]] +repo = 'posva/vim-vue' + +[[plugins]] +repo = 'previm/previm' + +[[plugins]] +repo = 'tyru/open-browser.vim' + +[[plugins]] +repo = 'aklt/plantuml-syntax' + +[[plugins]] +repo = 'Shougo/context_filetype.vim' + +[[plugins]] +repo = 'cespare/vim-toml' +on_ft = 'toml' + + diff --git a/.vim/rc/dein_lazy.toml b/.vim/rc/dein_lazy.toml new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/.vim/rc/dein_lazy.toml diff --git a/.vim/settings/dein.vim b/.vim/settings/dein.vim new file mode 100644 index 0000000..401acd3 --- /dev/null +++ b/.vim/settings/dein.vim @@ -0,0 +1,38 @@ +" ============================================================================== +" dein.vim +" Copyright 2019 Nomura Kei +" ============================================================================== +" +if &compatible + set nocompatible +endif + +let s:dein_dir = expand('~/.vim/cache/dein') +let s:dein_repo_dir = s:dein_dir . '/repos/github.com/Shougo/dein.vim' + +if &runtimepath !~# '/dein.vim' + if !isdirectory(s:dein_repo_dir) + execute '!git clone https://github.com/Shougo/dein.vim' fnameescape(s:dein_repo_dir) + endif + execute 'set runtimepath^=' . fnameescape(s:dein_repo_dir) +endif + +if dein#load_state(s:dein_dir) + call dein#begin(s:dein_dir) + + " For Uninstall + " call map(dein#check_clean(), "delete (v:val, 'rF')") + + let g:rc_dir = expand('~/.vim/rc') + let s:toml = g:rc_dir . '/dein.toml' + let s:lazy_toml = g:rc_dir . '/dein_lazy.toml' + call dein#load_toml(s:toml, {'lazy': 0}) + call dein#load_toml(s:lazy_toml, {'lazy': 1}) + call dein#end() + call dein#save_state() +endif +filetype plugin indent on +if dein#check_install() + call dein#install() +endif + diff --git a/.vim/rc/dein.toml b/.vim/rc/dein.toml new file mode 100644 index 0000000..8c04fd7 --- /dev/null +++ b/.vim/rc/dein.toml @@ -0,0 +1,45 @@ +[[plugins]] +repo = 'Shougo/dein.vim' + + +[[plugins]] +repo = 'dhruvasagar/vim-table-mode' + +[[plugins]] +repo = 'Shougo/unite.vim' + +[[plugins]] +repo = 'Shougo/neomru.vim' + +[[plugins]] +repo = 'scrooloose/nerdtree' + +[[plugins]] +repo = 'vim-airline/vim-airline' + +[[plugins]] +repo = 'vim-airline/vim-airline-themes' + +[[plugins]] +repo = 'ryanoasis/vim-devicons' + +[[plugins]] +repo = 'posva/vim-vue' + +[[plugins]] +repo = 'previm/previm' + +[[plugins]] +repo = 'tyru/open-browser.vim' + +[[plugins]] +repo = 'aklt/plantuml-syntax' + +[[plugins]] +repo = 'Shougo/context_filetype.vim' + +[[plugins]] +repo = 'cespare/vim-toml' +on_ft = 'toml' + + diff --git a/.vim/rc/dein_lazy.toml b/.vim/rc/dein_lazy.toml new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/.vim/rc/dein_lazy.toml diff --git a/.vim/settings/dein.vim b/.vim/settings/dein.vim new file mode 100644 index 0000000..401acd3 --- /dev/null +++ b/.vim/settings/dein.vim @@ -0,0 +1,38 @@ +" ============================================================================== +" dein.vim +" Copyright 2019 Nomura Kei +" ============================================================================== +" +if &compatible + set nocompatible +endif + +let s:dein_dir = expand('~/.vim/cache/dein') +let s:dein_repo_dir = s:dein_dir . '/repos/github.com/Shougo/dein.vim' + +if &runtimepath !~# '/dein.vim' + if !isdirectory(s:dein_repo_dir) + execute '!git clone https://github.com/Shougo/dein.vim' fnameescape(s:dein_repo_dir) + endif + execute 'set runtimepath^=' . fnameescape(s:dein_repo_dir) +endif + +if dein#load_state(s:dein_dir) + call dein#begin(s:dein_dir) + + " For Uninstall + " call map(dein#check_clean(), "delete (v:val, 'rF')") + + let g:rc_dir = expand('~/.vim/rc') + let s:toml = g:rc_dir . '/dein.toml' + let s:lazy_toml = g:rc_dir . '/dein_lazy.toml' + call dein#load_toml(s:toml, {'lazy': 0}) + call dein#load_toml(s:lazy_toml, {'lazy': 1}) + call dein#end() + call dein#save_state() +endif +filetype plugin indent on +if dein#check_install() + call dein#install() +endif + diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..9125c98 --- /dev/null +++ b/.vimrc @@ -0,0 +1,61 @@ +" vim: ts=4 sw=4 sts=4 +" ============================================================================== +" .vimrc 設定ファイル +" Copyright (c) 2009 Nomura Kei +" ============================================================================== + +" ------------------------------------------------------------------------------ +" dein.vim 読み込み +" ------------------------------------------------------------------------------ +let s:script_dir = expand(':p:h') " 本ファイルの位置を取得 +let s:dein_script = s:script_dir . '/.vim/settings/dein.vim' +if filereadable(s:dein_script) + exe("source" . s:dein_script) +endif + + +" ------------------------------------------------------------------------------ +" 設定 +" ------------------------------------------------------------------------------ +syntax enable + +" ---- NERDTree 設定 +let g:NERDTreeShowBookmarks = 1 +if !argc() + autocmd vimenter * Msys2 + autocmd vimenter * NERDTree|normal gg3j +endif +autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif + + +" --- ブラウザ利用設定 +let g:netrw_nogx = 1 " disable netrw's gx mapping +nmap gx (openbrowser-smart-search) +vmap gx (openbrowser-smart-search) +let g:openbrowser_browser_commands = [ + \ { 'name' : 'chrome.exe', + \ 'args' : [ 'start', '{browser}', '{uri}' ] } + \] + +" --- Markdown 設定 +" パス区切りの問題で、shellslash を ON にする +set shellslash +autocmd BufRead,BufNewFile *.md set filetype=markdown +nnoremap :PrevimOpen " Ctrl+P でプレビュー + +" --- PlantUML 設定 +autocmd BufWritePost *.uml silent !puml + +" command Msys2 terminal /c/Tools/msys2/usr/bin/bash.exe +command Msys2 terminal + +set splitbelow +set termwinsize=7x0 +set number +set fileencoding=utf-8 +set fileencodings=utf-8,sjis,iso-2202-jp-3,euc-jisx0213,guess,ucs-bom,ucs-2le,ucs-2 +set fileformat=unix +set ts=4 sw=4 sts=4 +set backupdir=/tmp/vim-backup +set undodir=/tmp/vim-backup + diff --git a/.vim/rc/dein.toml b/.vim/rc/dein.toml new file mode 100644 index 0000000..8c04fd7 --- /dev/null +++ b/.vim/rc/dein.toml @@ -0,0 +1,45 @@ +[[plugins]] +repo = 'Shougo/dein.vim' + + +[[plugins]] +repo = 'dhruvasagar/vim-table-mode' + +[[plugins]] +repo = 'Shougo/unite.vim' + +[[plugins]] +repo = 'Shougo/neomru.vim' + +[[plugins]] +repo = 'scrooloose/nerdtree' + +[[plugins]] +repo = 'vim-airline/vim-airline' + +[[plugins]] +repo = 'vim-airline/vim-airline-themes' + +[[plugins]] +repo = 'ryanoasis/vim-devicons' + +[[plugins]] +repo = 'posva/vim-vue' + +[[plugins]] +repo = 'previm/previm' + +[[plugins]] +repo = 'tyru/open-browser.vim' + +[[plugins]] +repo = 'aklt/plantuml-syntax' + +[[plugins]] +repo = 'Shougo/context_filetype.vim' + +[[plugins]] +repo = 'cespare/vim-toml' +on_ft = 'toml' + + diff --git a/.vim/rc/dein_lazy.toml b/.vim/rc/dein_lazy.toml new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/.vim/rc/dein_lazy.toml diff --git a/.vim/settings/dein.vim b/.vim/settings/dein.vim new file mode 100644 index 0000000..401acd3 --- /dev/null +++ b/.vim/settings/dein.vim @@ -0,0 +1,38 @@ +" ============================================================================== +" dein.vim +" Copyright 2019 Nomura Kei +" ============================================================================== +" +if &compatible + set nocompatible +endif + +let s:dein_dir = expand('~/.vim/cache/dein') +let s:dein_repo_dir = s:dein_dir . '/repos/github.com/Shougo/dein.vim' + +if &runtimepath !~# '/dein.vim' + if !isdirectory(s:dein_repo_dir) + execute '!git clone https://github.com/Shougo/dein.vim' fnameescape(s:dein_repo_dir) + endif + execute 'set runtimepath^=' . fnameescape(s:dein_repo_dir) +endif + +if dein#load_state(s:dein_dir) + call dein#begin(s:dein_dir) + + " For Uninstall + " call map(dein#check_clean(), "delete (v:val, 'rF')") + + let g:rc_dir = expand('~/.vim/rc') + let s:toml = g:rc_dir . '/dein.toml' + let s:lazy_toml = g:rc_dir . '/dein_lazy.toml' + call dein#load_toml(s:toml, {'lazy': 0}) + call dein#load_toml(s:lazy_toml, {'lazy': 1}) + call dein#end() + call dein#save_state() +endif +filetype plugin indent on +if dein#check_install() + call dein#install() +endif + diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..9125c98 --- /dev/null +++ b/.vimrc @@ -0,0 +1,61 @@ +" vim: ts=4 sw=4 sts=4 +" ============================================================================== +" .vimrc 設定ファイル +" Copyright (c) 2009 Nomura Kei +" ============================================================================== + +" ------------------------------------------------------------------------------ +" dein.vim 読み込み +" ------------------------------------------------------------------------------ +let s:script_dir = expand(':p:h') " 本ファイルの位置を取得 +let s:dein_script = s:script_dir . '/.vim/settings/dein.vim' +if filereadable(s:dein_script) + exe("source" . s:dein_script) +endif + + +" ------------------------------------------------------------------------------ +" 設定 +" ------------------------------------------------------------------------------ +syntax enable + +" ---- NERDTree 設定 +let g:NERDTreeShowBookmarks = 1 +if !argc() + autocmd vimenter * Msys2 + autocmd vimenter * NERDTree|normal gg3j +endif +autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif + + +" --- ブラウザ利用設定 +let g:netrw_nogx = 1 " disable netrw's gx mapping +nmap gx (openbrowser-smart-search) +vmap gx (openbrowser-smart-search) +let g:openbrowser_browser_commands = [ + \ { 'name' : 'chrome.exe', + \ 'args' : [ 'start', '{browser}', '{uri}' ] } + \] + +" --- Markdown 設定 +" パス区切りの問題で、shellslash を ON にする +set shellslash +autocmd BufRead,BufNewFile *.md set filetype=markdown +nnoremap :PrevimOpen " Ctrl+P でプレビュー + +" --- PlantUML 設定 +autocmd BufWritePost *.uml silent !puml + +" command Msys2 terminal /c/Tools/msys2/usr/bin/bash.exe +command Msys2 terminal + +set splitbelow +set termwinsize=7x0 +set number +set fileencoding=utf-8 +set fileencodings=utf-8,sjis,iso-2202-jp-3,euc-jisx0213,guess,ucs-bom,ucs-2le,ucs-2 +set fileformat=unix +set ts=4 sw=4 sts=4 +set backupdir=/tmp/vim-backup +set undodir=/tmp/vim-backup + diff --git a/README.md b/README.md new file mode 100644 index 0000000..3230dc7 --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +# Vim 設定ファイル + +dein.vim を使用した vim 環境設定ファイル一式です。 +``` + +-- .vimrc : vim 設定ファイル + +-- .vim/ + +--settings/ : 各種設定ファイルを格納する。 + +--rc/ : 利用するプラグイン管理用の tmol ファイルを格納する。 +``` +