D17693: Add option to treat some chars also as "auto bracket" only when we have a selection

2019-04-28 Thread loh tar
loh.tar updated this revision to Diff 57125.
loh.tar retitled this revision from "DocumentPrivate: Treat some chars also as 
"auto bracket" only when we have a selection" to "Add option to treat some 
chars also as "auto bracket" only when we have a selection".
loh.tar edited the summary of this revision.
loh.tar edited the test plan for this revision.
loh.tar added a subscriber: ngraham.
loh.tar added a comment.


  - Make feature optional by new config interface
  - Make feature independent from auto bracket option
  - Remove redundant const QChar typedChar
  - Use dummy config value from dialog
  
  TODO
  
  - Add QLineEdit or similar to config dialog
  - Oops, remove/change special angle bracket stuff
  
  QUESTIONS
  
  - Would it be this way in general OK? @mwolff
  - Is the chosen option name fitting and descriptive enough? @ngraham

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D17693?vs=50061&id=57125

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

AFFECTED FILES
  src/dialogs/katedialogs.cpp
  src/document/katedocument.cpp
  src/utils/kateconfig.cpp
  src/utils/kateconfig.h

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


D17693: Add option to treat some chars also as "auto bracket" only when we have a selection

2019-04-29 Thread loh tar
loh.tar updated this revision to Diff 57192.
loh.tar edited the test plan for this revision.
loh.tar added a comment.


  - Remove special angle bracket check, will be back in a smarter may later 
(hopefully)
  - Move getter config functions into header

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D17693?vs=57125&id=57192

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

AFFECTED FILES
  src/dialogs/katedialogs.cpp
  src/document/katedocument.cpp
  src/utils/kateconfig.cpp
  src/utils/kateconfig.h

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


D17693: Add option to treat some chars also as "auto bracket" only when we have a selection

2019-04-30 Thread Christoph Cullmann
cullmann requested changes to this revision.
cullmann added a comment.
This revision now requires changes to proceed.


  I think this would be some initial solution for this issue. An highlighting 
specific config would be even cooler, but giving the user the choice to add 
additional chars (or alter the wanted ones) is definitely a step in the right 
direction.
  Therefore I would say: proceed with this.
  I think it would be best to have as default value here the current chars that 
we use to allow people even to remove some they dislike.
  With the new config entry framework we can even expose this as mode-line 
thing later.

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

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


D17693: Add option to treat some chars also as "auto bracket" only when we have a selection

2019-05-07 Thread loh tar
loh.tar updated this revision to Diff 57733.
loh.tar edited the summary of this revision.
loh.tar edited the test plan for this revision.
loh.tar added a reviewer: VDG.
loh.tar added a comment.


  - Make feature configurable

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D17693?vs=57192&id=57733

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

AFFECTED FILES
  src/dialogs/editconfigwidget.ui
  src/dialogs/katedialogs.cpp
  src/document/katedocument.cpp
  src/utils/kateconfig.cpp
  src/utils/kateconfig.h

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


D17693: Add option to treat some chars also as "auto bracket" only when we have a selection

2019-05-08 Thread Christoph Cullmann
cullmann added a comment.


  I am not sure about the "UserSetsOfCharsToEncloseSelection" part.
  Wouldn't it be enough to have the "CharsToEncloseSelection" config part and 
have the other thing just internal in the editor config page as "template" the 
user can select to fill the selection of characters?
  I don't see the real benefit to have this as config.

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

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


D17693: Add option to treat some chars also as "auto bracket" only when we have a selection

2019-05-08 Thread Christoph Cullmann
cullmann requested changes to this revision.
This revision now requires changes to proceed.

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

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


D17693: Add option to treat some chars also as "auto bracket" only when we have a selection

2019-05-08 Thread loh tar
loh.tar added a comment.


  Well, I'm also not full convinced about the current way, but how else?
  
  The point is, you can now add as much sets as you like and rel. quickly 
change between your presets. I read you request so, that we have at the end 
only some hardcoded offers which the user can modify, but saved is only one 
setting. Not so user-friendly :-/
  
  When one setting always fit, why at all make it configurable?

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

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


D17693: Add option to treat some chars also as "auto bracket" only when we have a selection

2019-06-30 Thread Christoph Cullmann
cullmann added a comment.


  I think I misunderstood the feature, sorry.
  
  I did now try the patch again (it didn't apply perfectly, but that was just a 
few lines of code to be moved in the katedocument.cpp patch. I tend to agree 
that until we have perhaps some proper config for that in syntax files, some 
presets and the ability for users to add own presets make sense.
  
  On can still later introduce some "syntax defined" enum value to query stuff 
from the syntax defintions.
  
  What I would change is the placement of the SetOfCharsToEncloseSelection 
enum, I think it is only needed in the dialog, or? I got partly confused by 
that as I thought it would be used to store the settings, but the settings are 
just stored as stringlist and the enum is only to make the UI aware of the 
presets, or?

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

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


D17693: Add option to treat some chars also as "auto bracket" only when we have a selection

2019-07-13 Thread Christoph Cullmann
cullmann accepted this revision.
cullmann added a comment.


  I think the latest state here is usable.
  I played more with it, and it behaves well (and is default off).
  Before the patch applies even less than now, I will merge this.
  Thanks for the addition.

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

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


D17693: Add option to treat some chars also as "auto bracket" only when we have a selection

2019-07-13 Thread Christoph Cullmann
This revision was not accepted when it landed; it landed in state "Needs 
Revision".
This revision was automatically updated to reflect the committed changes.
Closed by commit R39:b5d2c4712763: Add option to treat some chars also as 
"auto bracket" only when we have a… (authored by loh.tar, committed 
by cullmann).

CHANGED PRIOR TO COMMIT
  https://phabricator.kde.org/D17693?vs=57733&id=61706#toc

REPOSITORY
  R39 KTextEditor

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D17693?vs=57733&id=61706

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

AFFECTED FILES
  src/dialogs/editconfigwidget.ui
  src/dialogs/katedialogs.cpp
  src/document/katedocument.cpp
  src/utils/kateconfig.cpp
  src/utils/kateconfig.h

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