mwolff requested changes to this revision.
mwolff added a comment.
This revision now requires changes to proceed.


  Ok, that behavior you describe is bad. I would get annoyed by that, esp. 
since the list of chars that you use are totally language specific.
  
  If you want to get this behavior for Markdown, then we need to store that 
data in the syntax file and make it accessible at this position. in the 
`<general>` section we already define how single/multiline comments are 
handled. We would need something similar for this feature, e.g. add something 
like the following and make it accessible through the syntax-highlighting API:
  
    <general>
      <brackets>
        <bracket open="(" close=")" />
        <bracket open="[" close="]" />
        <bracket open="{" close="}" />
        <bracket open="&lt;" close="&gt;" />
        <bracket open="&quot;" close="&quot;" />
        <bracket open="'" close="'" />
        <bracket open="´" close="´" />
        <bracket open="`" close="`" />
        <bracket open="_" close="_" />
        <bracket open="." close="." />
        <bracket open="," close="," />
        <bracket open=";" close=";" />
        <bracket open=":" close=":" />
        <bracket open="|" close="|" />
        <bracket open="-" close="-" />
        <bracket open="+" close="+" />
        <bracket open="^" close="^" />
        <bracket open="°" close="°" />
        <bracket open="&amp;" close="&amp;" />
        <bracket open="#" close="#" />
        <bracket open="@" close="@" />
        <bracket open="~" close="~" />
        <bracket open="*" close="*" />
        <bracket open="!" close="!" />
        <bracket open="?" close="?" />
        <bracket open="$" close="$" />
        <bracket open="§" close="§" />
        <bracket open="%" close="%" />
        <bracket open="/" close="/" />
        <bracket open="\" close="\" />
        <bracket open="=" close="=" />
      </brackets>
    </general>
  
  Of course the initial, common, brackets should be the implicit default when 
no `<brackets>` group is specified in a language file. And then we probably 
need more meta data that specified that some of the brackets above only should 
be added when we have a selection. Just add a `requiresSelection` or similar 
attribute?

REPOSITORY
  R39 KTextEditor

REVISION DETAIL
  https://phabricator.kde.org/D17693

To: loh.tar, #ktexteditor, cullmann, mwolff
Cc: mwolff, cullmann, sars, kwrite-devel, kde-frameworks-devel, #ktexteditor, 
hase, michaelh, ngraham, bruns, demsking, dhaumann

Reply via email to