Indentation of kate snippets

Yannick Gingras <[email protected]>
Newsgroups gmane.comp.kde.devel.kwrite
Message-ID <[email protected]>
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, 659 B)
-----BEGIN PGP SIGNATURE-----

iQGzBAABCgAdFiEEQBAbmQFumbsYmkRfiKQ8CLil3UMFAmIbtIIACgkQiKQ8CLil
3UNSgQv/YzWQllsnO8T4tWewRRivNplA4//xTC9O/th7yLQ71uJYRzVUfd0Emseu
QmEOTlSKKRJboiM7fo5mBMbP2I0adl/CCY32qHBtIzfHStOac+/B28Ukjr8bKAMJ
t6RTMDsrkase4+6FVZ57Ga3Srg8osVMQVVSFp1vIQREYVS9wxCHBvejhBT5dJXN6
z6IdMHKB9V0cXp5ECV5rtZU4Vs85mJcmQjYnXTxp7tZThfPg6MNolPShsIaqy/Bx
Tr28pqOMl3qbtX1hqvql3TSiXgD+1UkgAmOavUJ8Y0Vh0/u/P2bNLDLqeIqj9qqY
mXO+VjNxopODQ7s5Z4+SgQdswPplWV/m2aq9HeU0IceRK1TVFQ1sELTS7kuhif0Q
rurUDHd/2WKR/UmzxS1ByJi3Ac0m/07zQ7aGYAkeEEQ8sdxLudXuEje486KjYtD/
Bn+YZpwEdrZ15eXsG+DGfP9wq6VYl8AVthLFgEQOjiZ9ponE1EdazJTKra3beR0g
Ev4zu86l
=LNYs
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.