Might be useful. I currently use something such as the InlineEdit plugin to extract the lines I want to modify. (This also helps in big files where syntax highlighting is slow.)
For a Vim-script solution, you'd probably have to remap every single command that can change text (i, a, c, d, r, their upper-case variants, etc.) that would have to check to see whether the range of lines affected contains any of the fixed lines and abort if so.
--
Salman
Salman
On Sun, Dec 29, 2019, 10:44 Efraim Yawitz <efraim.yawitz@gmail.com> wrote:
I wonder if this could be easily hacked into the code of vim by creating a new syntax group called Unchangeable or something and adding code to make it uneditable.Maybe for now, create a syntax group and highlight it in a way that it reminds you not to change that text.--On Fri, 27 Dec 2019 at 09:58, Christian Brabandt <cblists@256bit.org> wrote:
On Fr, 27 Dez 2019, Vladimir Stenbock wrote:
> Is it possible to mark some lines as unchangeable ?
This is not possible. A custom handmade plugin might work around this by
saving/restoring of lines, but in the core, Vim does not support this.
Best,
Christian
--
Eine Erfolgsformel kann ich dir nicht geben; aber ich kann dir sagen,
was zum Mißerfolg führt: Der Versuch, jedem gerecht zu werden.
-- Herbert Swope
--
--
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 because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20191227075846.GN9787%40256bit.org.
--
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 because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAPKXbB6iCUF-Xy%3D_OvgZSCW3nn4UknDcTsxaBWjz%3D80eaY%2By1g%40mail.gmail.com.
--
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 because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CANuxnEcm0hAYwayF_dfcUhsT6mHPZ4YeTOUH%2BicgWi2RUopqWw%40mail.gmail.com.
No comments:
Post a Comment