Sublime Forum

Locking A Line of Text In Place So New Typing Skips Over That Line

#1

As suggested by the title, I’m wondering: Is there a way to lock a line of text in place, so that any new text that pushes lines down will skip over that line instead of push that line down as well?

Example:

1 Word
2
3 Locked
4
5

If I type enough text to push “word” down to line 2, or shift it down with enter, line 3 should remain the same.

1 Text
2 Word
3 Locked
4
5 Word

I’m using codes to link to with searches in a long document, and I’ve spaced those codes from the absolute top of the section of text each one pertains to. However, to do that, the code is mixed with all of the other text surrounding it. I’d rather be able to lock that line in place, so the spacing from that line to the top of the section of text doesn’t change or need to be adjusted when I add text.

Someone let me know if this feature is already present, I’d absolutely appreciate it!

0 Likes

#2

There’s currently no built in feature that does this no. For that you would need a plugin that takes the same actions automatically that you would make manually, which is upon every edit find all such lines and physically modify the file to put them where you want them. That would likely be very intrusive and jarring, particularly if you happend to be editing in the vicinity (the view would “jump” as it noticed and made a change).

0 Likes