Vim Tips Wiki

Previous TipNext Tip

Tip: #725 - Quick mapping for backing up the file

Created: May 17, 2004 22:54 Complexity: basic Author: Devin Weaver Version: 5.7 Karma: 1/1 Imported from: Tip#725

Add this simple mapping into your vimrc to make a quick way to backup your document by typing "\b" from command mode.

" For safe measures lets make a quick backup mapping. 
noremap <Leader>b :let x=&backup<Bar>set backup<Bar>write<Bar>let &backup=x<Bar>unlet x<Cr>