Wikia

Vim Tips Wiki

Watchlist Recent changes

Quick save

Tip 582 Printable Monobook Previous Next

created 2003 · complexity basic · version 5.7


To easily save the current file, while keeping it open, use a mapping in your vimrc:

noremap <Leader>s :update<CR>

With the default leader key, just press \s to save any changes to the current file. If the buffer has not been modified since the last save, the file is not written.

On many Windows systems, the file mswin.vim is sourced when Vim starts. In that case, Ctrl-S is mapped to :update, so the above mapping is not necessary (press Ctrl-S to save).

ReferencesEdit

CommentsEdit

Pages on Vim Tips Wiki

Add a Page
1,586pages on
this wiki
Advertisement | Your ad here

Latest Photos

Add a Photo
71photos on this wiki
See more >

Recent Wiki Activity

See more >

Around Wikia's network

Random Wiki