remove vim-plug, use native vim packages for copilot

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-03 21:10:20 +09:00
parent 6165841dd9
commit 42225e6793
5 changed files with 8 additions and 93 deletions

View File

@@ -1,10 +0,0 @@
#!/bin/bash
if [ $# -eq 0 ]; then
git commit -v
else
if [ "$1" = "--amend" ]; then
git commit -v --amend
else
git commit -m "$*"
fi
fi

1
.local/bin/git-ci Symbolic link
View File

@@ -0,0 +1 @@
/Users/syui/dotfiles/.local/bin/git-ci

View File

@@ -1,7 +0,0 @@
#!/bin/bash
git checkout --orphan temp
git add -A
git commit -m "init"
git branch -D main
git branch -m temp main
git push -f origin main

1
.local/bin/git-orphan Symbolic link
View File

@@ -0,0 +1 @@
/Users/syui/dotfiles/.local/bin/git-orphan

View File

@@ -1,65 +0,0 @@
#!/bin/zsh
# vren - rename files with vim
# usage: vren [dir]
dir="${1:-.}"
cd "$dir" || exit 1
# git init if no .git
has_git=0
if [ -d .git ]; then
has_git=1
else
git init -q
git add -A
git commit -q -m "before rename"
fi
# list files
old=$(mktemp)
new=$(mktemp)
ls -1 > "$old"
cp "$old" "$new"
# edit
vim "$new"
# check
old_count=$(wc -l < "$old")
new_count=$(wc -l < "$new")
if [ "$old_count" -ne "$new_count" ]; then
echo "error: line count mismatch ($old_count -> $new_count)"
rm "$old" "$new"
exit 1
fi
# diff
changes=0
paste "$old" "$new" | while IFS=$'\t' read -r o n; do
[ "$o" != "$n" ] && echo " $o -> $n" && changes=$((changes+1))
done
if ! diff -q "$old" "$new" >/dev/null 2>&1; then
echo ""
printf "apply? (y/n): "
read -q ans
echo ""
if [ "$ans" = "y" ]; then
paste "$old" "$new" | while IFS=$'\t' read -r o n; do
[ "$o" != "$n" ] && mv -- "$o" "$n"
done
echo "done"
# restore point
if [ "$has_git" -eq 0 ]; then
git add -A
git commit -q -m "after rename"
echo "restore: git log / git checkout HEAD~1 -- ."
fi
else
echo "cancelled"
fi
else
echo "no changes"
fi
rm "$old" "$new"

1
.local/bin/vren Symbolic link
View File

@@ -0,0 +1 @@
/Users/syui/dotfiles/.local/bin/vren

4
.vimrc
View File

@@ -33,10 +33,6 @@ inoremap <C-j> <Esc>
nnoremap Q :q!<CR> nnoremap Q :q!<CR>
vnoremap v V vnoremap v V
call plug#begin('~/.vim/plugged')
Plug 'github/copilot.vim'
call plug#end()
syntax on syntax on
filetype plugin indent on filetype plugin indent on
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g`\"" | endif au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g`\"" | endif

View File

@@ -56,13 +56,11 @@ done
# create vim undo dir # create vim undo dir
mkdir -p "$HOME/.vim/undo" mkdir -p "$HOME/.vim/undo"
# install vim-plug # install copilot.vim
if [ ! -f "$HOME/.vim/autoload/plug.vim" ]; then copilot_dir="$HOME/.vim/pack/github/start/copilot.vim"
curl -fLo "$HOME/.vim/autoload/plug.vim" --create-dirs \ if [ ! -d "$copilot_dir" ]; then
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim git clone https://github.com/github/copilot.vim.git "$copilot_dir" 2>/dev/null
echo "vim-plug: installed" echo "copilot.vim: installed"
vim +PlugInstall +qall 2>/dev/null
echo "vim plugins: installed"
fi fi
# install font # install font