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

Re: Reading in and displaying mark list

Expand Messages
  • Tom Link
    ... Do you want to set marks or display signs? If it s signs you re after, you could use e.g. the quickfixsigns[1] plugin: function! ReadList() let lines =
    Message 1 of 2 , Dec 1, 2009
    • 0 Attachment
      > I would like to read in a list of breakpoints (coming from ipython) and
      > display marks on the corresponding lines.

      Do you want to set marks or display signs? If it's signs you're after,
      you could use e.g. the quickfixsigns[1] plugin:

      function! ReadList()
      let lines = readfile("breakpoints.txt")
      call map(lines, '{"bufnr": bufnr(matchstr(v:val, "^.\\{-}\\ze:\\d\\
      +$")), "lnum": matchstr(v:val, ":\\zs\\d\\+$"), "text": ""}')
      return lines
      endf
      sign define QFS_BP text=_ texthl=Special
      call add(g:quickfixsigns_lists, {'sign': 'QFS_BP', 'get': 'ReadList
      ()', 'event': ['BufEnter']})

      This could go e.g. into ~/vimfiles/after/plugin/quickfixsigns.vim

      Regards,
      Tom

      [1] http://www.vim.org/scripts/script.php?script_id=2584

      --
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
    Your message has been successfully submitted and would be delivered to recipients shortly.