Skip to content

Instantly share code, notes, and snippets.

@dbeckham
Created September 17, 2013 15:53
Show Gist options
  • Save dbeckham/6596308 to your computer and use it in GitHub Desktop.
Save dbeckham/6596308 to your computer and use it in GitHub Desktop.
:Saveas[!] {file} Save the current buffer under the name {file} in the current buffer's path.
" :Saveas[!] {file}
"
" Saves the current buffer under the name {file} in the
" current buffer's path. Works like :saveas, but accepts
" a (relative) filename instead of the full path. File
" completion and ! are supported.
"
" Add to your ~/.vimrc and restart vim to enable
"
command -nargs=1 -complete=file_in_path -bang Saveas saveas<bang> %:h/<args>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment