Continuous insomnia was more common in patients with anti-CASPR2 encephalitis than with anti-LGI1 encephalitis. This evidence concerns the gene CNTNAP2 and viral encephalitis.