git commit期间的固定光标位置

我一直在使用xed来编写提交消息。 xed会记住每个文件的最后一个光标位置。 由于文件.git/COMMIT_EDITMSG已为每个提交消息重用,因此xed会打开,并且光标会在我提交上一次提交时所处的位置。 PITA必须手动将光标重新定位到第一行。

[X]:我希望光标位于哪里。

[Y]:光标所在的位置。

[X]

# Please enter the commit [Y] message for your changes. Lines starting
# with '#' will be ignored,and an empty message aborts the commit.
#
# On branch develop
# Your branch is up to date with 'origin/develop'.
#
smile2010cool123 回答:git commit期间的固定光标位置

可以告诉xed在某一行打开。 在.gitconfig中,只需替换

[core]
  editor = xed

通过

[core]
  editor = xed +1

xed +lineNumber告诉xedlineNumber行打开文件。

+1告诉它在第一行打开文件。

本文链接:https://www.f2er.com/3146042.html

大家都在问