Skip to content

Commit

Permalink
use foreach
Browse files Browse the repository at this point in the history
  • Loading branch information
sasaplus1 committed Dec 26, 2024
1 parent c7090ab commit 4e8c016
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
4 changes: 1 addition & 3 deletions vim/.vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ if 1
\ '/mappings.vim',
\ ]

for s:vimrc_file in s:vimrc_files
execute 'source' simplify(s:vimrc_dir . s:vimrc_file)
endfor
call foreach(s:vimrc_files, 'execute "source" simplify(s:vimrc_dir . v:val)')
" }}}

" 環境固有の設定を読み込む {{{
Expand Down
7 changes: 2 additions & 5 deletions vim/plugin-manager.vim
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@ if dein#min#load_state(s:plugin_dir)
call dein#begin(s:plugin_dir)
call dein#add(s:dein_dir)

let plugin_files = split(glob(expand('<script>:h') . '/plugins/*.vim'), '\n')

for plugin_file in plugin_files
execute 'source' plugin_file
endfor
let s:plugin_files = split(glob(expand('<script>:h') . '/plugins/*.vim'), '\n')
call foreach(s:plugin_files, 'execute "source" v:val')

call dein#end()
call dein#save_state()
Expand Down

0 comments on commit 4e8c016

Please sign in to comment.