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

using :v/.../normal dd - in a folded file

Expand Messages
  • Samuel Ferencik
    Hi, I have a long SQL script, for which I use folding. Every (multi-line) SQL statement is folded. Suppose I want to delete all the lines which don t contain
    Message 1 of 2 , Dec 27, 2010
    • 0 Attachment
      Hi,

      I have a long SQL script, for which I use folding. Every (multi-line) SQL statement is folded.

      Suppose I want to delete all the lines which don't contain the string "varchar". I run
          :v/varchar/normal dd
      Surprisingly, everything is deleted. It is as if "dd" was pressed on each (closed) fold, deleting all its lines. Since each fold contains at least one line without "varchar", all folds are "dd"-ed.

      Compare with
          :v/varchar/d
      which really deletes only lines which don't contain "varchar".

      Is this a feature, or does it need attention?

      Thanks,
      Sam

      --
      You received this message from the "vim_dev" 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.