Skip to main content
Share Your Experience: Take the 2024 Developer Survey

New answers tagged

1 vote

Problem using the edit command in a function defined in vimrc

The root cause of the error is that some time ago, thinking I was clever, I created an "after" script for my file-type. In this "after" script I sourced my vimrc. For anyone who ...
efru's user avatar
  • 13
1 vote
Accepted

Problem using the edit command in a function defined in vimrc

Beside the XY Problem-ness of your question, I think that the main problem we have with it is that your function is fine as-is and there is no obvious reason for it to have the effect that you ...
romainl's user avatar
  • 41k
1 vote

Problem using the edit command in a function defined in vimrc

If your goal is to replace short commands with longer commands in the file you're just editing, the solution is to use abbreviations, as commented by romainl. In that case, do something like :iabbrev ...
Friedrich's user avatar
  • 2,033

Top 50 recent answers are included