Loading ...
Sorry, an error occurred while loading the content.

Re: bdelete all buffers with same pattern extension

Expand Messages
  • Tim Chase
    ... I suppose you could do something like ... or ... The latter gives you a little more flexibility in handling the file-names -- you can ignore case with
    Message 1 of 2 , Feb 27, 2010
    • 0 Attachment
      epanda wrote:
      > I would like to bdelete buffers that I don't use anymore and it
      > happens that they all are *.csv
      >
      > Can I bdelete *.csv ?

      I suppose you could do something like

      :sil bufdo if expand('%')[-4]=='.txt' | bdel | endif

      or

      :sil bufdo if expand('%')=~'\.txt$' | bdel | endif

      The latter gives you a little more flexibility in handling the
      file-names -- you can ignore case with "\c", or wipe multiple
      file-types using the "\|" notation of a regexp.

      -tim





      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    Your message has been successfully submitted and would be delivered to recipients shortly.