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.

" 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>


The above noremap should be all one line! , May 17, 2004 22:55

How would you execute this? Can we map it to a Function Key? , July 6, 2004 8:36