How to start Vim in insert mode at end of first line when committing Git changes?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












What would be the best way to set Vim up to always put the cursor in insert mode at the end of the first line (to account for commit header templates) when running git commit? Ideally this should be a Vim configuration, because I rely on $VISUAL rather than configuring editors for everything separately.










share|improve this question























  • Do you have a line in your config that activates this behaviour for all files? If so, you could make an exception for git.
    – jasonwryan
    13 mins ago







  • 1




    I'm pretty sure you have to configure it as it does not ship like that.
    – jasonwryan
    8 mins ago










  • Thanks, you're right. I've reformulated the question.
    – l0b0
    3 mins ago










  • I'll cheat: vim.wikia.com/wiki/…
    – jasonwryan
    49 secs ago














up vote
1
down vote

favorite












What would be the best way to set Vim up to always put the cursor in insert mode at the end of the first line (to account for commit header templates) when running git commit? Ideally this should be a Vim configuration, because I rely on $VISUAL rather than configuring editors for everything separately.










share|improve this question























  • Do you have a line in your config that activates this behaviour for all files? If so, you could make an exception for git.
    – jasonwryan
    13 mins ago







  • 1




    I'm pretty sure you have to configure it as it does not ship like that.
    – jasonwryan
    8 mins ago










  • Thanks, you're right. I've reformulated the question.
    – l0b0
    3 mins ago










  • I'll cheat: vim.wikia.com/wiki/…
    – jasonwryan
    49 secs ago












up vote
1
down vote

favorite









up vote
1
down vote

favorite











What would be the best way to set Vim up to always put the cursor in insert mode at the end of the first line (to account for commit header templates) when running git commit? Ideally this should be a Vim configuration, because I rely on $VISUAL rather than configuring editors for everything separately.










share|improve this question















What would be the best way to set Vim up to always put the cursor in insert mode at the end of the first line (to account for commit header templates) when running git commit? Ideally this should be a Vim configuration, because I rely on $VISUAL rather than configuring editors for everything separately.







vim configuration git






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 7 mins ago

























asked 20 mins ago









l0b0

26.7k17107234




26.7k17107234











  • Do you have a line in your config that activates this behaviour for all files? If so, you could make an exception for git.
    – jasonwryan
    13 mins ago







  • 1




    I'm pretty sure you have to configure it as it does not ship like that.
    – jasonwryan
    8 mins ago










  • Thanks, you're right. I've reformulated the question.
    – l0b0
    3 mins ago










  • I'll cheat: vim.wikia.com/wiki/…
    – jasonwryan
    49 secs ago
















  • Do you have a line in your config that activates this behaviour for all files? If so, you could make an exception for git.
    – jasonwryan
    13 mins ago







  • 1




    I'm pretty sure you have to configure it as it does not ship like that.
    – jasonwryan
    8 mins ago










  • Thanks, you're right. I've reformulated the question.
    – l0b0
    3 mins ago










  • I'll cheat: vim.wikia.com/wiki/…
    – jasonwryan
    49 secs ago















Do you have a line in your config that activates this behaviour for all files? If so, you could make an exception for git.
– jasonwryan
13 mins ago





Do you have a line in your config that activates this behaviour for all files? If so, you could make an exception for git.
– jasonwryan
13 mins ago





1




1




I'm pretty sure you have to configure it as it does not ship like that.
– jasonwryan
8 mins ago




I'm pretty sure you have to configure it as it does not ship like that.
– jasonwryan
8 mins ago












Thanks, you're right. I've reformulated the question.
– l0b0
3 mins ago




Thanks, you're right. I've reformulated the question.
– l0b0
3 mins ago












I'll cheat: vim.wikia.com/wiki/…
– jasonwryan
49 secs ago




I'll cheat: vim.wikia.com/wiki/…
– jasonwryan
49 secs ago















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f475187%2fhow-to-start-vim-in-insert-mode-at-end-of-first-line-when-committing-git-changes%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f475187%2fhow-to-start-vim-in-insert-mode-at-end-of-first-line-when-committing-git-changes%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay