1

I'm running gVim 7.4 on Windows 7.

I'm editing a text file and I insert text like the following:

 1 - public SomeResult GenerateResult(IInput input, Action<string> forEachEventAction)

If I add a ` before public and after the closing parenthesis then a new line is automatically inserted, resulting in this:

 1 - `public SomeResult GenerateResult(IInput input, Action<string>
forEachEventAction)`

Interestingly, my real text (code) is split into several lines, not just two, tho the only difference from the above is that the identifiers are much longer.

:set all includes:

...
  formatoptions=tcq
...
  textwidth=78
Kenny Evitt
  • 243
  • 1
  • 9

1 Answers1

1

This seems to be due to my editing a file with a .txt extension. You might notice that I'm using Markdown syntax in my example. I've been mostly editing .md files previously.

Based on my formatoptions setting, text is auto-wrapped using textwidth, hence the new lines (and the different number of new lines depending on the length of the text).

The auto-formatting also was unrelated to backtick characters specifically.

Kenny Evitt
  • 243
  • 1
  • 9