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

67245Re: Vim7 buf modify functions?

Expand Messages
  • Yegappan Lakshmanan
    Apr 3, 2006

      On 4/3/06, Eric Arnold <eric_p_arnold@...> wrote:
      > - Is there any way to do a setbufline() as with the new getbufline() ? It
      > would be *great* to be able to change a buffer without having to load it into a
      > window.
      > - It would be helpful if setline() would operate like other splicing
      > functions, i.e. setline( expr, list, start, stop ) where it would basically
      > remove the lines between start and stop, and insert the lines from the list.
      > If it worked this way, it would take the place of:
      > - where is the deletebufline() functionality? I can't seem to find out how
      > to remove lines from a buffer via the function interface. I'd like to avoid
      > silent 1,$ d
      > because of all the side effects with registers,

      You can delete the lines to the black-hole register:

      1,$ d_

      For more information, read

      :help quote_

      > and messages that show up in the command window regardless
      > of "silent" (i.e. "### fewer lines" ).

      You can set the 'report' option to a large value to prevent the messages:

      let old_report = &report
      set report=9999
      1,$ d_
      let &report=old_report

      For more information, read

      :help 'report'

      - Yegappan
    • Show all 5 messages in this topic