Bug 129956 - readonly/locked text segments for template editing
Summary: readonly/locked text segments for template editing
Status: RESOLVED INTENTIONAL
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-28 12:23 UTC by Mathias Soeken
Modified: 2012-10-29 04:54 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mathias Soeken 2006-06-28 12:23:42 UTC
Version:            (using KDE KDE 3.5.3)
Installed from:    Ubuntu Packages

Hi,

I think it is a good idea, if it were possible to insert readonly/locked text segments into the katepart. This is i.e. useful for template editing. Imagine a template for a Java file named MyClass.java. It could look like this:

public class MyClass { // locked
  public static void main (String[] args) { // locked
     // user edits his code
  } // locked
} // locked

In this example in the first line only "public class MyClass" and "{" should be locked, so you can write extends ...

I think this technology is used in Netbeans, but Netbeans uses comments which depends on the programming language, in this case Java.

I could need this technique for a textbox, in which a user should enter a LaTeX math formula. Because of syntax highlighting there should be an $$ at the beginning and at the end, but it should not be deleted.

Mathias
Comment 1 Christoph Cullmann 2007-05-28 20:51:45 UTC
This is a wish ;)
Comment 2 Christoph Cullmann 2012-10-29 04:54:38 UTC
Sorry, but Kate is not build to support such a use case and it is too rare to make it optional, given it needs a lot of code.
If you just want to have some template functionality, we support no text snippets in kate.git master, but they only contain predefined fields which you should fill out, not locked areas.