Plain text files do not have formatting options like a word processor does. If you want that WYSIWYG functionality like a traditional word processor, then I recommend a word processor like LibreOffice.
However, there are document formats that support common formatting with additional syntax. Markdown is a lightweight syntax that is still readable as a ...
You just need to do this:
That'll add a flag to "recognize numbered lists" to 'formatoptions' ('fo' for short).
Note the details/limitations:
This actually uses the 'formatlistpat' option, thus any kind of list can be used. The indent of the text after the number is used for the next line. The default is to find a number, optionally ...
Well, it is not that simple.
What you can come up with -- use syntax definitions. But this bold text you will create would be temporary, it will not be saved with your file like word processing software does.
So to the code.
hi MyBold gui=bold
let l_start = getpos("'<")
let l_end = getpos("'>")
let c_start = ...
Line continuation in Ex commands is done by prepending a backslash to the beginning of the continuation lines themselves, not appending it to the end of the preceding lines.
See :help line-continuation:
Long lines in a :sourced Ex command script file can be split by inserting a line continuation symbol \ (backslash) at the start of the next line. There ...