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

109850Re: Reading in and displaying mark list

Expand Messages
  • Tom Link
    Dec 1, 2009
      > 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
      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


      [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
    • Show all 2 messages in this topic