Remove some tabs from ctags.kak
This commit is contained in:
parent
10fa6afa08
commit
f1400e49ab
|
@ -93,21 +93,21 @@ def ctags-generate -docstring 'Generate tag file asynchronously' %{
|
|||
}
|
||||
|
||||
def update-tags -docstring 'Update tags for the given file' %{
|
||||
%sh{ (
|
||||
while ! mkdir .tags.kaklock 2>/dev/null; do sleep 1; done
|
||||
trap 'rmdir .tags.kaklock' EXIT
|
||||
%sh{ (
|
||||
while ! mkdir .tags.kaklock 2>/dev/null; do sleep 1; done
|
||||
trap 'rmdir .tags.kaklock' EXIT
|
||||
|
||||
if ctags -f .file_tags.kaktmp ${kak_opt_ctagsopts} $kak_bufname; then
|
||||
export LC_COLLATE=C LC_ALL=C # ensure ASCII sorting order
|
||||
# merge the updated tags tags with the general tags (filtering out out of date tags from it) into the target file
|
||||
grep -Fv "$(printf '\t%s\t' "$kak_bufname")" tags | grep -v '^!' | sort --merge - .file_tags.kaktmp >> .tags.kaktmp
|
||||
rm .file_tags.kaktmp
|
||||
mv .tags.kaktmp tags
|
||||
msg="tags updated for $kak_bufname"
|
||||
else
|
||||
msg="tags update failed for $kak_bufname"
|
||||
fi
|
||||
if ctags -f .file_tags.kaktmp ${kak_opt_ctagsopts} $kak_bufname; then
|
||||
export LC_COLLATE=C LC_ALL=C # ensure ASCII sorting order
|
||||
# merge the updated tags tags with the general tags (filtering out out of date tags from it) into the target file
|
||||
grep -Fv "$(printf '\t%s\t' "$kak_bufname")" tags | grep -v '^!' | sort --merge - .file_tags.kaktmp >> .tags.kaktmp
|
||||
rm .file_tags.kaktmp
|
||||
mv .tags.kaktmp tags
|
||||
msg="tags updated for $kak_bufname"
|
||||
else
|
||||
msg="tags update failed for $kak_bufname"
|
||||
fi
|
||||
|
||||
printf %s\\n "eval -client $kak_client echo -color Information '${msg}'" | kak -p ${kak_session}
|
||||
) > /dev/null 2>&1 < /dev/null & }
|
||||
printf %s\\n "eval -client $kak_client echo -color Information '${msg}'" | kak -p ${kak_session}
|
||||
) > /dev/null 2>&1 < /dev/null & }
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user