NAME
App::Codit - IDE for and in Perl
DESCRIPTION
Codit is a versatile text editor / integrated development environment aimed at the Perl programming language.
It is written in Perl/Tk and based on the Tk::AppWindow application framework.
It uses the Tk::CodeText text widget for editing.
Codit has been under development for about one year now. It has gone quite some miles on our systems and can be considered beta software as of version 0.10.
It features a multi document interface that can hold an unlimited number of documents, navigable through the tab bar at the top and a document list in the left side panel.
It has a plugin system designed to invite users to write their own plugins.
It is fully configurable through a configuration window, allowing you to set defaults for editing, the graphical user interface, syntax highlighting and (un)loading plugins.
Tk::CodeText offers syntax highlighting and code folding in plenty formats and languages. It has and advanced word based undo/redo stack that keeps track of selections and save points. It does auto indent, auto brackets, auto complete, bookmarks, comment, uncomment, indent and unindent. Tab size and indent style are fully user configurable.
An online manual can be found here: http://www.perlgui.org/wp-content/uploads/2025/01/manual-0.16.pdf
RUNNING CODIT
You can launch Codit from the command line as follows:
codit [options] [files]
The following command line options are available:
- -c or -config
-
Specifies the configfolder to use. If the path does not exist it will be created.
- -h or -help
-
Displays a help message on the command line and exits.
- -i or -iconpath
-
Point to the folders where your icon libraries are located.*
- -t or -icontheme
-
Icon theme to load.
- -np or -noplugins
-
Launch without any plugins loaded. This supersedes the -plugins option.
- -p or -plugins
-
Launch with only these plugins .*
- -s or -session
-
Loads a session at launch. The plugin Sessions must be loaded for this to work.
- -y or -syntax
-
Specify the default syntax to use for syntax highlighting. Codit will determine the syntax of documents by their extension. This options comes in handy when the file you are loading does not have an extension.
- -v or -version
-
Displays the version number on the command line and exits.
* You can specify a list of items by separating them with a ':'.
TROUBLESHOOTING
Just hoping you never need this.
General troubleshooting
If you encounter problems and error messages using Codit here are some general troubleshooting steps:
- Use the -config command line option to point to a new, preferably fresh settingsfolder.
- Use the -noplugins command line option to launch Codit without any plugins loaded.
- Use the -plugins command line option to launch Codit with only the plugins loaded you specify here.
No icons
If Codit launches without any icons do one or more of the following:
- Check if your icon theme is based on scalable vectors. Install Image::LibRSVG if so. See also the Readme.md that comes with this distribution.
- Locate where your icons are located on your system and use the -iconpath command line option to point there.
- Select an icon library by using the -icontheme command line option.
Session will not load
Sometimes it happens that a session file gets corrupted. You solve it like this:
- Launch the session manager. Menu->Session->Manage sessions.
- Remove the affected session.
- Rebuild it from scratch.
Sorry, that is all we have to offer.
Report a bug
If all fails you are welcome to open a ticket here: https://github.com/haje61/App-Codit/issues.
BASECLASSES
Codit comes with the base class App::Codit::BaseClasses::TextModPlugin. It is used by several plugins. You can use it to define your own plugin.
EXTENSIONS
Codit uses the following extensions from Tk::AppWindow:
- Art see Tk::AppWindow::Ext::Art
- ConfigFolder see Tk::AppWindow::Ext::ConfigFolder
- Daemons see Tk::AppWindow::Ext::Daemons
- Help see Tk::AppWindow::Ext::Help
- Keyboard see Tk::AppWindow::Ext::Keyboard
- MenuBar see Tk::AppWindow::Ext::MenuBar
- Panels see Tk::AppWindow::Ext::Panels
- Plugins see Tk::AppWindow::Ext::Plugins
- Selector see Tk::AppWindow::Ext::Selector
- Settings see Tk::AppWindow::Ext::Settings
- SideBars see Tk::AppWindow::Ext::SideBars
- StatusBar see Tk::AppWindow::Ext::StatusBar
- ToolBar see Tk::AppWindow::Ext::ToolBar
Codit has its own extension as multiple document interface.
- CoditMDI see App::Codit::Ext::CoditMDI
PLUGINS
Codit comes with these plugins:
- Backups see App::Codit::Plugins::Backups
- Bookmarks see App::Codit::Plugins::Bookmarks
- Colors see App::Codit::Plugins::Colors
- Console see App::Codit::Plugins::Console
- Critic see App::Codit::Plugins::Critic
- Diff see App::Codit::Plugins::Diff
- Exporter see App::Codit::Plugins::Exporter
- FileBrowser see App::Codit::Plugins::FileBrowser
- Git see App::Codit::Plugins::Git
- Icons see App::Codit::Plugins::Icons
- PerlSubs see App::Codit::Plugins::PerlSubs
- PodViewer see App::Codit::Plugins::PodViewer
- SearchReplace see App::Codit::Plugins::SearchReplace
- Sessions see App::Codit::Plugins::Sessions
- Snippets see App::Codit::Plugins::Snippets
- SpltView see App::Codit::Plugins::SplitView
CONFIG VARIABLES
Codit defines the following config variables. The -content... variables all have an undefined default value. Most of them can be set through the Settings panel. As long as you do not set them, the factory value of the Tk::CodeText widget is used.
- Switch -contentacpopsize
-
Specifies how many characters you type before an auto complete suggestion list pops up.
- Switch -contentacscansize
-
Specifies the minimum word length for an addition to the database.
- Switch -contentactivedelay
-
Specifies the delay in ms between the moment the user stops typing and the moment an auto complete suggestion list pops up.
- Switch -contentautobrackets
-
Boolean. If set, Every time you type a (, {, {, ' or " it's counterpart will be placed right after it and the insert cursor in between.
- Switch -contentautocomplete
-
Boolean. If set, auto complete is on.
- Switch -contentautoindent
-
Boolean. If set, auto indent is on.
- Switch -contentbackground
-
Background color of the Tk::CodeText widget.
- Switch -contentbgdspace
-
Background color of leading and trailing spaces when showspaces is on.
- Switch -contentbgdtab
-
Background color of leading and trailing tabs when showspaces is on.
- Switch -contentbookmarkcolor
-
Background color of line number indicator of bookmarked lines.
- Switch -contentfindbg
-
Background color search hits.
- Switch -contentfontfamily
-
Font family to be used for editing.
- Switch -contentfontsize
-
Font size to be used for editing.
- Switch -contentforeground
-
Background color of the Tk::CodeText widget.
- Switch -contentindent
-
Set the preferred indent style. You can set it to 'tab' if you use tabs for indenting. Or you set it to the number of spaces you want to use for indenting.
- Switch -contentmatchbg
-
Background color used when matching {}, (), and [].
- Switch -contentmatchfg
-
Foreground color used when matching {}, (), and [].
- Switch -contentshowspaces
-
Boolean. If set, Leading and trailing spaces and tabs are shown with a special background..
- Switch -contentsyntax
-
Default syntax setting for a new text document.
- Switch -contenttabs
-
Specify your tab size. See also Tk::Text.
- Switch -contentwrap
-
Specify your wrap style. See also Tk::Text.
- Switch -highlight_themefile
-
Specify the theme file used for syntax highlighting.
- Switch -showfolds
-
Boolean. If you clear it the fold indicators in the Tk::CodeText widget will be hidden.
- Switch -shownumbers
-
Boolean. If you clear it the line number indicators in the Tk::CodeText widget will be hidden.
- Switch -showstatus
-
Boolean. If you clear it the status bar in the Tk::CodeText widget will be hidden.
- Switch -uniqueinstance
-
Boolean flag. Default value 0. If set only this instance is used for opening files through the command line.
COMMANDS
Codit defines one command.
METHODS
App::Codit inherits Tk::AppWindow and all of its methods.
- mdi
-
Returns a reference to the CoditMDI extension.
- panels
-
Returns a reference to the Panels extension.
-
Returns a reference to the SideBars extension.
- ToolBottomPageAdd($name, $image, $text, $statustext, $initialsize)
-
See also the pageAdd method in Tk::AppWindow::Ext::SideBars. Adds a new page to the tool panel at the bottom of the CENTER window. Creates the notebook widget if it does not exists.
- ToolBottomPageRemove($name)
-
See also the pageDelete method in Tk::AppWindow::Ext::SideBars. Removes page $name from the tool panel at the bottom of the CENTER window. Removes the notebook widget if it holds no more entries.
- ToolLeftPageAdd($name, $image, $text, $statustext, $initialsize)
-
See also the pageAdd method in Tk::AppWindow::Ext::SideBars. Adds a new page to the navigator panel at the left.
- ToolLeftPageRemove($name)
-
See also the pageDelete method in Tk::AppWindow::Ext::SideBars. Removes page $name from the navigator panel at the left.
- ToolRightPageAdd($notebook, $name, $image, $text, $statustext, $initialsize)
-
See also the pageAdd method in Tk::AppWindow::Ext::SideBars. Adds a new page to the tool panel at the right of the application window. Creates the notebook widget if it does not exists.
- ToolRightPageRemove($page)
-
See also the pageDelete method in Tk::AppWindow::Ext::SideBars. Removes page $name from the tool panel at the right of the application window. Removes the notebook widget if it holds no more entries.
LICENSE
Same as Perl.
AUTHOR
Hans Jeuken (hanje at cpan dot org)
BUGS AND CAVEATS
If you find any bugs, please report them here https://github.com/haje61/App-Codit/issues.