Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm not sure how many man-hours were lost to fatfingering :wq as :Wq or :w as :W, but a simple alias has solved that particular bit of grief:

   cnoreabbrev Wq wq
   cnoreabbrev W w
The rest of my .vimrc mostly belongs to the guy I caught the vim addiction from, but sets some useful defaults: https://github.com/duggan/dotfiles/blob/master/.vimrc


Mapping ; to : and vise versa is a more elegant solution in my opinion (no need to press shift).

Here's my .vimrc: https://github.com/ElbertF/dotfiles/blob/master/.vimrc


Using :x kinda solves the :Wq issue


By the way :X is encrypt. Now guess how I know that... :)


I DID NOT know that and I withdraw my advice above :)


Also, :wq always writes; :x only writes when the buffer is modified (like :up | q).


  ZZ




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: