[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Indentation of kate snippets
From:       Yannick Gingras <ygingras () ygingras ! net>
Date:       2022-02-27 17:27:30
Message-ID: f04e4795841cf6180a624d6c0861738cd35b0865.camel () ygingras ! net
[Download RAW message or body]


Is there a way to make my code snippets preserve the indentation of the
insertion point?

Lets say I have this snippet:
<code>
first
second
${cursor}
</code>

And I expand it right at the ... in the following code:

<code>
def bar():
    if True:
        ...
</code>

Then I get:

<code>
def bar():
    if True:
        first
second

</code>

With the cursor at the start of the line.  I would much rather preserve
the indentation of where I invoke the snippet:

<code>
def bar():
    if True:
        first
        second
        
</code>

Is there a way to tell kate that this is the behavior that I want?

Thanks!

-- 
Yannick Gingras
http://ygingras.net


["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic