Closed rgrinberg closed 9 years ago
Hm, works on my end. Vim version 7.4.712.
I save the following text as world.ml
.
(* Simple "Hello world" program. *)
print_string "Hello world\n"
Opening this file, I get these settings after automatic filetype detection:
:set filetype? comments? commentstring?
filetype=ocaml
comments=sr:(*,mb:*,ex:*)
commentstring=/*%s*/
Unlike some other comment plugins, textobj-comment looks at the 'comments'
setting first. 'commentstring'
is only used as a fall-back. I did it this way to support languages that have both simple and "paired" comment delimiters (think // ...
and /* ... */
and /** ... */
in C-likes).
Check if the filetype is detected correctly. Then make sure 'comments'
has a useful value, or make it empty to fall back to your 'commentstring'
setting.
E.g.
My
commentstring
seems to be set correctly:(*%s*)
EDIT: I forgot to mention that it does work for other file types.