Thursday, January 27, 2011

indenting files, associating data with lines of buffer

Hi!

I've recently been writing a new indent/haskell.vim .

Problem: I want to associate some data with each line in the buffer.

Hacky solution: right now, I can store, "how far the previous line is
indented", and I do that by reading out the previous line, then count
how many leading spaces the previous line has.

However, I want to associate more data (like a list) with each line.
What is the best way to do this?

[This issue arises due to haskell indentation rules -- for a given
line, there can be multiple admissible indentations, depending on what
block it closes.]

Thanks!

--
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

No comments:

Post a Comment