Hi,
Does anyone know what would be the vim regex for getcmdline() =~ for both 'q' and 'q!' ?
ie, something like:
cnoreabbrev <expr> q (getcmdtype() == ':' && getcmdline() =~ '\s*q\s*$') ? 'call Quit()' : 'q'
cnoreabbrev <expr> q! (getcmdtype() == ':' && getcmdline() =~ '\s*q!\s*$') ? 'call QuitBang()' : 'q!'
But this clearly isn't right because the q! cmd is picked up by the q here.
I think we need an exact match on the string between whitespace ?
thx for everything vim,
-m