Edit file without swap or backup files, in one command

12 views
Skip to first unread message

Lifepillar

unread,
Oct 18, 2017, 5:25:55 AM10/18/17
to vim...@googlegroups.com
Is it possible to :edit a file forcing Vim not to create
any swap files or backups? Something like:

enew
setl noswapfile nobackup
read ++edit #

but in one command? I have tried

:edit ~/my/file +set\ noswapfile

but it creates a new buffer called '~/my/file +set noswapfile'.

Thanks,
Life.

Lifepillar

unread,
Oct 18, 2017, 5:55:31 AM10/18/17
to vim...@googlegroups.com
Aaah, +cmd goes before the path. I should have read the docs more
carefully. Somehow, I can never wrap my head around +cmd and ++opt!

Sorry for the noise,
Life.

Reply all
Reply to author
Forward
0 new messages