<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>I haven't done any formatting extensions, that's why I didn't
reply to your email, but to the one from Sergiu to complete the
list of syntax highlighting options.</p>
<p>I use rarely gg=G with vim, as pointed in another response, but
for me it shifts left the comments in route blocks, so in most of
the cases I just do the formatting manually, allowing me to also
review/understand config content, as I typically need that when I
do consultancy services. When I build configs, I do it formatted
using tabs indentation (like in default kamailio.cfg).</p>
<p>As another idea, in VSCode you can change the file type (Change
Language Mode) to something else (like javascript, shell, c, ...),
then do document format and see if the result is satisfactory.
With some file types I noted it doesn't work at all, because the
formatter is based on compiler/interpreter for that language and
obviously fails with kamailio.cfg, but maybe worth giving a try
...</p>
<p>And of course, one can write a formatter for kamailio.cfg and
contribute it to the community -- no plans now in my side for
doing one.<br>
</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div class="moz-cite-prefix">On 24.11.20 21:19, marek wrote:<br>
</div>
<blockquote type="cite"
cite="mid:3c3dd4ee-a156-bb5e-7b6f-262dcb8e13d8@gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<p>ok thanks. these things are for highlighting, but i asked about
formatting</p>
<p>something like</p>
<p><a class="moz-txt-link-freetext"
href="https://code.visualstudio.com/docs/languages/typescript"
moz-do-not-send="true">https://code.visualstudio.com/docs/languages/typescript</a></p>
<p>section "Formatting"<br>
</p>
<div class="moz-cite-prefix">any tips?</div>
<div class="moz-cite-prefix">Marek<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Dne 24/11/2020 v 19:42
Daniel-Constantin Mierla napsal(a):<br>
</div>
<blockquote type="cite"
cite="mid:6485ecc5-9194-83ed-f3d0-4153daca46b0@gmail.com">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<p>Besides the vim syntax for Kamailio that you pointed and the
one for VSCode pointed by Marek, I also wrote one for Atom
editor:</p>
<p> * <a class="moz-txt-link-freetext"
href="https://github.com/miconda/atom-extensions/tree/master/language-kamailio"
moz-do-not-send="true">https://github.com/miconda/atom-extensions/tree/master/language-kamailio</a></p>
<p>But probably is not updated with the latest core keywords.</p>
<p>Then, even older and not updated (to my knowledge) is the of
for mcedit (midnight commander editor), I wrote a blog post
about:</p>
<p> * <a class="moz-txt-link-freetext"
href="http://blog.miconda.eu/2010/04/mc-edit-syntax-highlighting-for.html"
moz-do-not-send="true">http://blog.miconda.eu/2010/04/mc-edit-syntax-highlighting-for.html</a></p>
<p>So, to summarize, there should be syntax highlighting
(maintained at different levels) for the editors:</p>
<p> * vim (I guess also neovim)<br>
* vscode<br>
* atom<br>
* mcedit</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div class="moz-cite-prefix">On 24.11.20 18:24, Sergiu Pojoga
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAJZsGCkOaTRFLhc294UTgPMUqBeGVVva0_N-WE8a5mFyrpNVBA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html;
charset=UTF-8">
<div dir="ltr">
<div dir="ltr">The only other Kam syntax I know of is for
vim</div>
<div dir="ltr"><br>
</div>
<div dir="ltr"><a
href="https://github.com/kamailio/vim-kamailio-syntax"
moz-do-not-send="true">https://github.com/kamailio/vim-kamailio-syntax</a><br>
</div>
<div dir="ltr"><br>
</div>
<div>Regards,</div>
<div>--Sergiu</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Nov 24, 2020 at
11:39 AM marek <<a href="mailto:cervajs64@gmail.com"
moz-do-not-send="true">cervajs64@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">hi,<br>
<br>
i'm using <a
href="https://github.com/miconda/vscode-kamailio-syntax"
rel="noreferrer" target="_blank"
moz-do-not-send="true">https://github.com/miconda/vscode-kamailio-syntax</a>
in VScode. <br>
its great!<br>
<br>
But i need format code. Are there some formatters for
kamailio.cfg? It <br>
can be for other editors than VScode.<br>
<br>
Marek<br>
<br>
<br>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org"
target="_blank" moz-do-not-send="true">sr-users@lists.kamailio.org</a><br>
<a
href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
rel="noreferrer" target="_blank"
moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org" moz-do-not-send="true">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com" moz-do-not-send="true">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" moz-do-not-send="true">www.linkedin.com/in/miconda</a>
Funding: <a class="moz-txt-link-freetext" href="https://www.paypal.me/dcmierla" moz-do-not-send="true">https://www.paypal.me/dcmierla</a></pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org" moz-do-not-send="true">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Funding: <a class="moz-txt-link-freetext" href="https://www.paypal.me/dcmierla">https://www.paypal.me/dcmierla</a></pre>
</body>
</html>