if it's read only, then yes, you'd use a bang to force it. I'd do ":w!" and then ":q" but then that's habit mostly, I'd think that ":x!" should do the same. limits.conf shouldn't be read only for root though, so I'd wonder if you're doing the sudo correctly.
run "sudo -i" and that should give you a full root login, so you'll know without doubt you ARE root, then do a "vi /etc/security/limits.conf". If you're still seeing weirdness, check the permissions... "ls -l /etc/security/limits.conf".