Occasionally, my pinky will graze the ' key while reaching for enter, resulting in :w'<Enter>.I've tried:cabbrev w' :wcabbrev w\' :wcabbrev w' :wNone of them work.  Is there a way to alias :w' to :w?I also use cmdwin (:help cmdwin + nnoremap : :<C-F>) instead of the normal command-line, so bonus points if it works there too.
Is there a way to alias `:w'` to `:w`, to avoid creating files named '?
command line;save;key bindings
As Peter Rincker points out, cmaps can expand in other places as well, so a cnoreabbrev would be better:cnoreabbrev w' wOr, the safest, again thanks to Peter:cnoreabbrev <expr> w' getcmdtype() == : && getcmdline() == w' ? w : w'By explicitly checking if the command line contains only w', unwanted expansions in situations can be avoided.You can use a cmap:cmap w' wYou'd still have to press Enter, but an accidental ' should be ignored now.If you're using cmdwin, a inoremap set by autocmd might be useful:autocmd CmdwinEnter * inoremap w' wautocmd CmdwinLeave * iunmap w'