As Martin suggested, the definition of comment continuation characters happens in 'comments'
(and 'commentstring'
) settings. Comment related plugins like NerdCommenter/EnhancedCommentify/tComment(?)/... have their own way to define which sequences shall be used to comment existing blocks -- some of them use what is defined in &comments
or &commentstring
.
The easy solution would be to add a ~/.vim/after/ftplugin/asm/att.vim
file in your configuration that expands default ASM settings with
setlocal comments+=:#
This way, ;
, //
and /*...*/
are still kept as comments.
If more differences exist, you may want instead to exploit vim default detection of asm flavour (see $VIMRUNTIME/autoload/dist/ft.vim
) by adding # asmsyntax=attasm
in your files, and a ~/.vim/ftplugin/attasm.vim
that contains exactly what you want, and a syntax file that loads default asm syntax highlighting file (w/ :runtime syntax/asm.vim
).
You may want to read :h asm.vim
.
Note, I wonder whether the fact that #
isn't configured as a continuation character is because it may have side effects with GAS preprocessor (according to this Q/A), and thus seen as a bad practice.
comments
setting? I don't quite know how this all works, so you'll have to wait for someone else to give an answer, or you can try reading up on:help comments
and see how far that gets you :-)