Re: how to suppress "E173: 1 more file to edit"

737 views
Skip to first unread message

Peter Peter

unread,
Jul 8, 2013, 2:28:57 PM7/8/13
to Yakov Lerner, v...@vim.org
I found a solution.  The only con is that it loads all the files up front, so it may take a while if you have large files.

Taken from https://github.com/evaryont/dotfiles/blob/master/vimrc which is maintained by Colin Shea <co...@evaryont.me>.
-- .vimrc
" Avoid E173
if argc() > 1
  silent blast " load last buffer
  silent bfirst " switch back to the first
endif

---


Better late than never?


On Thu, Sep 11, 2003 at 4:10 AM, Yakov Lerner <yakov....@kavado.com> wrote:
Is there way to suppress the "E173: 1 more file to edit"
error which comes from ZZ, :q ?

--
Jacob Lerner

Tony Mechelynck

unread,
Jul 9, 2013, 6:08:51 AM7/9/13
to vim...@googlegroups.com
On 08/07/13 20:28, Peter Peter wrote:
> I found a solution. The only con is that it loads all the files up
> front, so it may take a while if you have large files.
>
> Taken from https://github.com/evaryont/dotfiles/blob/master/vimrc which
> is maintained by Colin Shea <co...@evaryont.me <mailto:co...@evaryont.me>>.
> -- .vimrc
> " Avoid E173
> if argc() > 1
> silent blast " load last buffer
> silent bfirst " switch back to the first
> endif
> ---
>
>
> Better late than never?

This means you will never get E173, not even when you would want to be
reminded that you forgot some of your edits.

Maybe the following? (untested)

command -bang -bar Qfast call Qfast(<q-bang>)
func Qfast(bang)
if a:bang == "" " optional: if no ! write all modified named files
set awa "
endif "
try
exe 'qa' . a:bang
catch /^Vim\%((\a\+)\)\=:E173/
exe 'qa' . a:bang
endtry
endfunc


Best regards,
Tony.
--
Be assured that a walk through the ocean of most Souls would scarcely
get your Feet wet. Fall not in Love, therefore: it will stick to your
face.
-- National Lampoon, "Deteriorata"

Reply all
Reply to author
Forward
0 new messages