Skip to content

Commit

Permalink
🐞fix: f-argsじゃだめだった…
Browse files Browse the repository at this point in the history
  • Loading branch information
utubo committed Oct 2, 2023
1 parent 196f171 commit 9986628
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,10 @@ ec c
echoh Normal
return
else
echoh DiffAdd
ec c
for d in split(c, '\n')
exe 'echoh' (d =~# '^remove' ? 'DiffDelete' : 'DiffAdd')
ec d
endfor
echoh Question
if input('execute ? (y/n) > ', 'y') ==# 'y'
system('git add ' .. a)
Expand All @@ -280,7 +282,7 @@ finally
chdir(b)
endtry
enddef
com! -nargs=* GitAdd I(<f-args>)
com! -nargs=* GitAdd I(<q-args>)
def! g:ConventionalCommits(a: any, l: string, p: number): list<string>
return ['✨feat:', '🐞fix:', '📝docs:', '🔨refactor:', '🎨style:', '⏪revert:', '✅test:', '🔧chore', '🎉release:']
enddef
Expand Down
8 changes: 5 additions & 3 deletions src/.vimrc.src.vim
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,10 @@ def GitAdd(args: string)
echoh Normal
return
else
echoh DiffAdd
echo list
for item in split(list, '\n')
execute 'echoh' (item =~# '^remove' ? 'DiffDelete' : 'DiffAdd')
echo item
endfor
echoh Question
if input('execute ? (y/n) > ', 'y') ==# 'y'
system('git add ' .. args)
Expand All @@ -359,7 +361,7 @@ def GitAdd(args: string)
chdir(current_dir)
endtry
enddef
command! -nargs=* GitAdd GitAdd(<f-args>)
command! -nargs=* GitAdd GitAdd(<q-args>)
def! g:ConventionalCommits(a: any, l: string, p: number): list<string>
return ['✨feat:', '🐞fix:', '📝docs:', '🔨refactor:', '🎨style:', '⏪revert:', '✅test:', '🔧chore', '🎉release:']
enddef
Expand Down

0 comments on commit 9986628

Please sign in to comment.