App-Codit
view release on metacpan or search on metacpan
- Moved code for upper and lower case module to Tk::CodeText.
0.15 Sun Jan 05 2025
- Moved autocomplete code from plugin WordCompletion to module Tk::CodeText.
- Integrated the new Tk::CodeText in Codit.
- Reorganized the settings form.
- Removed plugin WordCompletion. It is now obsolete.
- Updated Readme.md
0.14 Fri Dec 27 2024
- Search input in plugin SearchReplace is validated and quoted.
- Replaces can be made with $1, $2 etc captures from the search on regular expression.
- Results in searches are now shown in the text using the Tk::XText Find tag.
- Plugin WordCompletion responds to command key_released instead of modified.
- Plugin Sessions loads and saves the current folder of the FileBrowser plugin.
- New plugin: Exporter.
- Added a context menu to plugin Console.
- Plugin Git opens files in external application if they cannot be opened in Codit.
- Fixed sorting on subs in plugin PerlSubs.
- Updated manual and documentation.
lib/App/Codit/Plugins/Colors.pm view on Meta::CPAN
-textvariable => \$color,
)->pack(@padding, -fill => 'x');
$entry->bind('<Key>', [$self, 'updateEntry']);
$self->{ENTRY} = $entry;
my $bframe = $fframe->Frame->pack(-fill => 'x');
$bframe->Button(
-text => 'Insert',
-command => sub {
if ($picker->validate($color)) {
$self->cmdExecute('edit_insert', 'insert', $color);
$picker->historyAdd($picker->getHEX);
$picker->historyUpdate;
}
},
)->pack(@padding, -side => 'left', -expand => 1, -fill => 'x');
$bframe->Button(
-text => 'Copy',
-command => sub {
if ($picker->validate($color)) {
$self->clipboardClear;
$self->clipboardAppend($color);
$picker->historyAdd($picker->getHEX);
$picker->historyUpdate;
}
},
)->pack(@padding, -side => 'left', -expand => 1, -fill => 'x');
my $indicator = $eframe->Label(
-width => 4,
lib/App/Codit/Plugins/Colors.pm view on Meta::CPAN
return $self->{PICKER}
}
sub SelectionCheck {
my $self = shift;
my @sel = $self->cmdExecute('doc_get_sel');
my $pick = $self->_pick;
if (@sel) {
my $text = $self->cmdExecute('doc_get_text', @sel);
chomp($text);
if ($self->_pick->validate($text)) {
$pick->put($text);
$self->_ent($pick->notationCurrent);
$self->updateEntry;
}
}
}
sub Unload {
my $self = shift;
# $self->extGet('ToolPanel')->deletePage('Colors');
$self->ToolRightPageRemove('Colors');
return $self->SUPER::Unload
}
sub updateEntry {
my ($self, $value) = @_;
$value = $self->_ent->get unless defined $value;
my $pick = $self->_pick;
if ($self->_pick->validate($value)) {
$self->_ind($pick->getHEX);
$self->_ent->configure(-foreground => $self->configGet('-foreground'));
$self->_pick($value);
} else {
$self->_ind($self->configGet('-background'));
$self->_ent->configure(-foreground => $self->configGet('-errorcolor'));
}
}
sub updatePicker {
( run in 0.667 second using v1.01-cache-2.11-cpan-4d50c553e7e )