Tuesday, July 27, 2010

Re: Is "read-only text" possible in vim?

On Tue, 2010-07-27 at 15:55 +0800, winterTTr wrote:
> I know that we can use the "set nomodifiable" to make a buffer
> read-only,
> which makes all the text in it not modifiable.
>
> But is it possible to make some text in a buffer read-only but not for
> the whole buffer?
> I mean maybe we can "bind" a property to the string ( or text, or
> character ) , which can
> make the text read-only in a modifiable buffer.
> Or even finally, We can make the text not only a plain text, but
> text binding some properties
> set to different value to control the different aspects, such as
> highlighting, read-only, or even font.
> Maybe, "conceal" can also be one property of a text. :-)

Vim is, by design, a text editor, not a word-processor. Storing
properties and such in files automatically would be highly undesirable.
Note, however, that with the 'conceal' feature, you can already control
the highlighting of arbitrary portions of text within the file. Txtfmt
(The Vim Highlighter) is just one example: http://www.txtfmt.webs.com/

The difference here is that the Vim user explicitly adds the
highlighting tokens (or "properties", to use your terminology), and he
can easily remove them, as they are really just ordinary text that Vim
has been instructed not to display in certain modes.

Sincerely,
Brett Stahlman


>
> OK, you can consider this mail like a feature suggestion or just a
> brainstorm about the vim.
> Any discussion ?
>
>
>
>
> --
> 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

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