! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
adding the autocomplete & highlight selected feature for better coding
Status:
RESOLVED: MOVED
Severity:
enhancement
Product:
Mousepad
Component:
General

Comments

Description Evel Liu 2017-05-27 23:56:51 CEST
Can we improve the mousepad by adding the autocomplete and highlight selected words features?

Generaly, these are a common features for the code editor. it would be great if mousepad can support this 2 features.

For example, when I using perl. I input the word "req" then it would hinting me the "require" keyword. when I double click on the keyword "require", all the instances of the keyword used in the code will be highlighted.
Comment 1 Matthew Brush editbugs 2017-05-28 03:49:40 CEST
(In reply to Evel Liu from comment #0)
> Can we improve the mousepad by adding the autocomplete and highlight
> selected words features?
> 
> Generaly, these are a common features for the code editor. it would be great
> if mousepad can support this 2 features.
> 
> For example, when I using perl. I input the word "req" then it would hinting
> me the "require" keyword. when I double click on the keyword "require", all
> the instances of the keyword used in the code will be highlighted.

I think auto-completion is out of scope for a minimal editor like Mousepad. Also it's incredibly complicated to implement for every language. Auto-completing the words found in the same file is a lot easier, but not very useful IMO. Maybe some day Mousepad will get a plugin mechanism, this would make it possible for people to implement it themselves.

Highlighting selected words sounds like a reasonable feature if it was language agnostic. Not sure how it would deal with the difference between languages that have like "some_keyword" vs "some-keyword", without a language-specific setting saying which characters are to be considered part of a word. For example in C if you double clicked the "foo" in "foo-bar" and it selected the whole subtraction expression, that would be kind of annoying.
Comment 2 Evel Liu 2017-05-28 09:44:48 CEST
Thanks Matthew's quick feedback

Yes, agree with you on the item1, it might be not align with the minimal principles of mousepad. it would be great if we can make it by plugin mechanism.

For the highlight feature, now the brackets matching check have the similar feature so I think it would be easy to make it. about your concerns about deal with the difference between languages that have like "some_keyword" vs "some-keyword", I think it's just need check base on the selected words for common usage. like here only hightlight "some" should be enougth.
Comment 3 Git Bot editbugs 2020-05-24 01:30:18 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/apps/mousepad/-/issues/22.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #13597

Reported by:
Evel Liu
Reported on: 2017-05-27
Last modified on: 2020-05-24

People

Assignee:
Matthew Brush
CC List:
1 user

Version

Target Milestone:
Mousepad 0.2.x

Attachments

Additional information