Skip to content

Commit

Permalink
👍 update
Browse files Browse the repository at this point in the history
  • Loading branch information
PiroHiroPiro committed Jul 13, 2023
1 parent aeb9c62 commit 6d5b2be
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 22 deletions.
16 changes: 10 additions & 6 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ echo "##### setup vim #####"
install_if_not_exist vim

echo "----- link vim setting files -----"
LINK_FILES=(.vimrc dein.toml dein_lazy.toml .config/dein)
LINK_FILES=(dein.toml dein_lazy.toml .config/dein)
for file in ${LINK_FILES[@]}; do \
unlink ~/$file&>/dev/null
ln -sf $DOTPATH/vim/$file ~/$file
Expand All @@ -214,11 +214,8 @@ echo "----- install dein.vim -----"
if [ -d ~/.config/dein/repos/github.com/Shougo/dein.vim/ ]; then
echo "dein.vim is already installed"
else
if [ ! -f ~/.config/dein/installer.sh ]; then
echo "install dein installer.sh"
curl https://raw.githubusercontent.com/Shougo/dein.vim/master/bin/installer.sh > ~/.config/dein/installer.sh
fi
bash ~/.config/dein/installer.sh ~/.config/dein/ &>/dev/null
echo "install dein"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Shougo/dein-installer.vim/master/installer.sh)"
fi

# Permission deniedでinstallに失敗するので、予めsudoで作成
Expand All @@ -228,6 +225,13 @@ for dir in ${MAKE_DIRS[@]}; do \
sudo chmod -R 777 ~/.config/dein/$dir; \
done

LINK_FILES=(.vimrc)
for file in ${LINK_FILES[@]}; do \
rm -f ~/$file
ln -sf $DOTPATH/vim/$file ~/$file
echo "Linked: ${file}"; \
done

echo "##### finish to setup vim #####"

cd ~
Expand Down
49 changes: 37 additions & 12 deletions vim/.vimrc
Original file line number Diff line number Diff line change
@@ -1,41 +1,66 @@
"""" dein """"
" Ward off unexpected things that your distro might have made, as
" well as sanely reset options when re-sourcing .vimrc
if &compatible
set nocompatible
endif

" Required:
" Add the dein installation directory into runtimepath
" ~/.config/deinで
" sh installer.sh .
" ~/install.shで
" sh -c "$(curl -fsSL https://raw.githubusercontent.com/Shougo/dein-installer.vim/master/installer.sh)"
" したと仮定
let deinroot = "~/.config/dein/."
let $DEIN_PATH= deinroot . "/repos/github.com/Shougo/dein.vim"
let $DEIN_ROOT = "~/.config/dein/."
let $DEIN_PATH= $DEIN_ROOT . "/repos/github.com/Shougo/dein.vim"
let tomlroot = "~/."

" Required:
set runtimepath+=$DEIN_PATH
" Set Dein base path (required)
let s:dein_base = '~/.cache/dein'

" Set Dein source path (required)
let s:dein_src = $DEIN_PATH

" Set Dein runtime path (required)
execute 'set runtimepath+=' . s:dein_src

" Required:
if dein#load_state(deinroot)
call dein#begin(deinroot)
if dein#load_state($DEIN_ROOT)
" Call Dein initialization (required)
call dein#begin(s:dein_base)

" Let dein manage dein
" Required:
call dein#add($DEIN_PATH)

call dein#add(s:dein_src)
" Your plugins go here:
call dein#load_toml(tomlroot . "/dein.toml", {'lazy': 0})
call dein#load_toml(tomlroot . "/dein_lazy.toml", {'lazy': 1})

" not installed python...
" call dein#add('Shougo/deoplete.nvim')

" Finish Dein initialization (required)
call dein#end()

call dein#save_state()
endif

" Required:
filetype plugin indent on
syntax enable
" Attempt to determine the type of a file based on its name and possibly its
" contents. Use this to allow intelligent auto-indenting for each filetype,
" and for plugins that are filetype specific.
if has('filetype')
filetype indent plugin on
endif

" Enable syntax highlighting
if has('syntax')
syntax on
endif

" Uncomment if you want to install not-installed plugins on startup.
"if dein#check_install()
" call dein#install()
"endif

" If you want to install not installed plugins on startup.
if dein#check_install()
Expand Down
5 changes: 1 addition & 4 deletions zsh/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,13 @@ setopt interactive_comments
alias -g C="| xsel --input --clipboard"

# zplug
zplug "denysdovhan/spaceship-prompt", use:spaceship.zsh, from:github, as:theme
zplug "spaceship-prompt/spaceship-prompt", use:spaceship.zsh, from:github, as:theme
zplug "zsh-users/zsh-syntax-highlighting"
zplug "zsh-users/zsh-history-substring-search"
zplug "zsh-users/zsh-autosuggestions"
zplug "zsh-users/zsh-completions"
zplug "plugins/git", from:oh-my-zsh
zplug "junegunn/fzf-bin", as:command, from:gh-r, rename-to:fzf
zplug "stedolan/jq", from:gh-r, as:command, rename-to:"jq"
zplug "b4b4r07/enhancd", use:init.sh
zplug "b4b4r07/httpstat", as:command, use:"(*).sh", rename-to:"$1"
zplug "supercrabtree/k"

# source plugins and add commands to the PATH
Expand Down

0 comments on commit 6d5b2be

Please sign in to comment.