From 6cf9cfac1cf4625f20961276508b6f65d994bd3c Mon Sep 17 00:00:00 2001 From: falsycat Date: Thu, 18 Mar 2021 23:32:35 +0900 Subject: [PATCH] Adds config files. --- .gitmodules | 21 ++++ .vimrc | 77 ++++++++++++ autoload/pathogen.vim | 264 ++++++++++++++++++++++++++++++++++++++++++ bundle/lightline.vim | 1 + bundle/onedark.vim | 1 + bundle/vim-easy-align | 1 + bundle/vim-gitgutter | 1 + bundle/vim-polyglot | 1 + bundle/vim-translator | 1 + 9 files changed, 368 insertions(+) create mode 100644 .gitmodules create mode 100644 .vimrc create mode 100644 autoload/pathogen.vim create mode 160000 bundle/lightline.vim create mode 160000 bundle/onedark.vim create mode 160000 bundle/vim-easy-align create mode 160000 bundle/vim-gitgutter create mode 160000 bundle/vim-polyglot create mode 160000 bundle/vim-translator diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..1273ad1 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,21 @@ +[submodule "bundle/vim-easy-align"] + path = bundle/vim-easy-align + url = https://github.com/junegunn/vim-easy-align +[submodule "bundle/vim-gitgutter"] + path = bundle/vim-gitgutter + url = https://github.com/airblade/vim-gitgutter +[submodule "bundle/vim-polyglot"] + path = bundle/vim-polyglot + url = https://github.com/sheerun/vim-polyglot +[submodule "bundle/lightline.vim"] + path = bundle/lightline.vim + url = https://github.com/itchyny/lightline.vim +[submodule "bundle/onedark.vim"] + path = bundle/onedark.vim + url = https://github.com/joshdick/onedark.vim +[submodule "bundle/translate.vim"] + path = bundle/translate.vim + url = https://github.com/skanehira/translate.vim +[submodule "bundle/vim-translator"] + path = bundle/vim-translator + url = https://github.com/voldikss/vim-translator diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..e452d82 --- /dev/null +++ b/.vimrc @@ -0,0 +1,77 @@ +" +" vim config +" +" author: falsycat +" license: WTFPL +" + +" +" ---- visual ---- +" +set number +set cursorline +set cursorcolumn +set laststatus=2 +set showcmd +set background=dark +set ruler + +syntax enable + + +" +" ---- editing ---- +" +set smartindent +set expandtab +set autoindent +set shiftwidth=2 +set mouse= + +filetype plugin indent on + + +" +" ---- searching ---- +" +set hlsearch +set incsearch +set ignorecase +set smartcase +set wrapscan + +nnoremap :nohlsearch + + +" +" ---- menu ---- +" +set wildmenu + + +" +" ---- plugin: vim-easy-align ---- +" +xmap a (EasyAlign) +nmap a (EasyAlign) + + +" +" ---- plugin: vim-translator ---- +" +let g:translator_target_lang = "ja" + +nmap t Translate +vmap t TranslateV + + +" +" ---- plugin: pathogen ---- +" +execute pathogen#infect() + + +" +" ---- plugin: onedark.vim ---- +" +colorscheme onedark diff --git a/autoload/pathogen.vim b/autoload/pathogen.vim new file mode 100644 index 0000000..b2891cd --- /dev/null +++ b/autoload/pathogen.vim @@ -0,0 +1,264 @@ +" pathogen.vim - path option manipulation +" Maintainer: Tim Pope +" Version: 2.4 + +" Install in ~/.vim/autoload (or ~\vimfiles\autoload). +" +" For management of individually installed plugins in ~/.vim/bundle (or +" ~\vimfiles\bundle), adding `execute pathogen#infect()` to the top of your +" .vimrc is the only other setup necessary. +" +" The API is documented inline below. + +if exists("g:loaded_pathogen") || &cp + finish +endif +let g:loaded_pathogen = 1 + +" Point of entry for basic default usage. Give a relative path to invoke +" pathogen#interpose() or an absolute path to invoke pathogen#surround(). +" Curly braces are expanded with pathogen#expand(): "bundle/{}" finds all +" subdirectories inside "bundle" inside all directories in the runtime path. +" If no arguments are given, defaults "bundle/{}", and also "pack/{}/start/{}" +" on versions of Vim without native package support. +function! pathogen#infect(...) abort + if a:0 + let paths = filter(reverse(copy(a:000)), 'type(v:val) == type("")') + else + let paths = ['bundle/{}', 'pack/{}/start/{}'] + endif + if has('packages') + call filter(paths, 'v:val !~# "^pack/[^/]*/start/[^/]*$"') + endif + let static = '^\%([$~\\/]\|\w:[\\/]\)[^{}*]*$' + for path in filter(copy(paths), 'v:val =~# static') + call pathogen#surround(path) + endfor + for path in filter(copy(paths), 'v:val !~# static') + if path =~# '^\%([$~\\/]\|\w:[\\/]\)' + call pathogen#surround(path) + else + call pathogen#interpose(path) + endif + endfor + call pathogen#cycle_filetype() + if pathogen#is_disabled($MYVIMRC) + return 'finish' + endif + return '' +endfunction + +" Split a path into a list. +function! pathogen#split(path) abort + if type(a:path) == type([]) | return a:path | endif + if empty(a:path) | return [] | endif + let split = split(a:path,'\\\@]','\\&','') + endif +endfunction + +" Like findfile(), but hardcoded to use the runtimepath. +function! pathogen#runtime_findfile(file,count) abort + let rtp = pathogen#join(1,pathogen#split(&rtp)) + let file = findfile(a:file,rtp,a:count) + if file ==# '' + return '' + else + return fnamemodify(file,':p') + endif +endfunction + +" vim:set et sw=2 foldmethod=expr foldexpr=getline(v\:lnum)=~'^\"\ Section\:'?'>1'\:getline(v\:lnum)=~#'^fu'?'a1'\:getline(v\:lnum)=~#'^endf'?'s1'\:'=': diff --git a/bundle/lightline.vim b/bundle/lightline.vim new file mode 160000 index 0000000..8e013f3 --- /dev/null +++ b/bundle/lightline.vim @@ -0,0 +1 @@ +Subproject commit 8e013f32f524157bf14ccaa87d97be3d3a7201e2 diff --git a/bundle/onedark.vim b/bundle/onedark.vim new file mode 160000 index 0000000..b70ed29 --- /dev/null +++ b/bundle/onedark.vim @@ -0,0 +1 @@ +Subproject commit b70ed293f3c3adaea23f9fcd84ef942015664756 diff --git a/bundle/vim-easy-align b/bundle/vim-easy-align new file mode 160000 index 0000000..12dd631 --- /dev/null +++ b/bundle/vim-easy-align @@ -0,0 +1 @@ +Subproject commit 12dd6316974f71ce333e360c0260b4e1f81169c3 diff --git a/bundle/vim-gitgutter b/bundle/vim-gitgutter new file mode 160000 index 0000000..7224d1d --- /dev/null +++ b/bundle/vim-gitgutter @@ -0,0 +1 @@ +Subproject commit 7224d1d8d7bdd88a31fe185efedc79246d5bc15e diff --git a/bundle/vim-polyglot b/bundle/vim-polyglot new file mode 160000 index 0000000..cc63193 --- /dev/null +++ b/bundle/vim-polyglot @@ -0,0 +1 @@ +Subproject commit cc63193ce82c1e7b9ee2ad7d0ddd14e8394211ef diff --git a/bundle/vim-translator b/bundle/vim-translator new file mode 160000 index 0000000..167d864 --- /dev/null +++ b/bundle/vim-translator @@ -0,0 +1 @@ +Subproject commit 167d864db6f2d57e0f7e087e5e3d1c6f356269a7