When developing and writing code, a code editor can be extremely helpful and save you a lot of time. Of course, you could even develop your code in a Shell terminal, using vim for example. But even though vim offers syntax highlighting, vim won't help you to analyze your code, reference to includes or spot errors (except errors in string declaration).
One really neat fact is that CodeLobster can be installed on all major Operating Systems: Windows, macOS, and yes, Linux! A lot of other editors only support one operating system so this helps you keep the same application and therefore user interface no matter on what kind of platform you are working on.
As I'm on a Linux Mint 20.1 workstation, I downloaded the deb package from the CodeLobster download page and then installed the package. You can do this by either using the dpkg command or by opening the downloaded deb file with the GDebi Package Installer (which is part of Linux Mint).
From far away, all the code editors kind of look the same. That's something good because it helps you to use different editors which may be better suited for a different coding language. Or because you just want to try out a new editor. The default user interface layout is split into 3 columns:
These columns can also be removed so that only the code is seen.
For large files such as the Python script check_esxi_hardware, the map is helpful to quickly navigate to a certain spot in the file.
However as you can see, there is no syntax highlighting in this case. This is, as mentioned above, because CodeLobster clearly focuses on Bootstrap HTML and PHP code.
Opening a HTML page nicely shows the syntax, which helps to identify errors.
The preview tab below the code allows to quickly see a visual result from the code:
The biggest use-case (at least speaking for myself) is creating PHP code in CodeLobster.
Not only does the syntax highlighting help a lot writing code, there are also a lot of cool features (helper tools) embedded.
A double-click on such a variable listed in the Class View, highlights all the occurrences of this variable. This is very helpful, for example when you need to replace a variable name and you need to find the variable in the document. Once you've replaced the variable with the new name, the variable automatically disappears from the Variables overview on the left side.
Another cool feature is the immediate function description when hovering over it. For example when hovering with the mouse above the "unset" function, the description of this function shows up.
When typing in code, CodeLobster automatically adds (or suggests) the correct code format. For example defining a variable $var with a string value, the closing double-quote is automatically appended after the value. Or when using a PHP function, such as echo(), the brackets are automatically added, too! Even better, inside the echo function CodeLobster shows a list with the available variables to use. This helps to avoid typos which would cost time later on. See the following GIF to see how this works.
To save (troubleshooting) time, CodeLobster allows to integrate code validation. This means the PHP code is checked for errors and these errors are then highlighted. However this is not enabled by default and needs to be configured first.
Let's take the following PHP code as an example:
After the echo() function there is clearly a semicolon missing. However no error is showing up by default. Imagine a file with thousands of lines - finding this typo requires time.
To validate code, CodeLobster uses the PHP binary itself in the background. This means PHP needs to be installed on your workstation. On my Linux Mint, I used apt to install the PHP CLI:
ck@mintp ~ $ sudo apt-get install php-cli
Then the binary's path needs to used. You can use whereis to find the correct path for the php command:
ck@mintp ~ $ whereis php
php: /usr/bin/php7.4 /usr/bin/php /usr/lib/php /etc/php /usr/share/php7.4-json /usr/share/php7.4-common /usr/share/php7.4-readline /usr/share/php7.4-opcache /usr/share/man/man1/php.1.gz
In this case the path I'm interested in is /usr/bin/php7.4. Back in CodeLobster, this can be configured in Tools -> Preferences -> Code Analyzer. As this is a PHP 7.x binary, the path is added into the "Path to php 7 file" field:
After saving this, CodeLobster now shows a yellow icon and below the code information of discovered errors:
Note that the Code Analyzer points to line 5 here but the actual error happens in line 3. This is because PHP itself only runs into the error when trying to run code AFTER the error.
The error message below the code clearly indicates that (after the echo), the keyword "if" was unexpected and that a semicolon or comma was expected.
For many developers (me not included), a dark mode is a must for an editor. The design of the editor can be changed. Either just for the current session using View -> Visual Style or as a permanent setting in Tools -> Preferences -> Visual Styles.
In this example, the selected Visual Style was "Modern Dark".
For many programmers the free version of CodeLobster will be enough. However the commercial version offers additional features, which are very helpful for (in particular) CMS developers. For example if you are a Wordpress developer, the commercial edition comes with a pack of pre-configured Wordpress-internal variables and functions (for example: wp_list_bookmarks() ).
After installing the free version, there is a 30-day free trial of the commercial version enabled. After the 30 day trial period, a license key needs to be bought and activated (Help -> Registration).
No comments yet.
AWS Android Ansible Apache Apple Atlassian BSD Backup Bash Bluecoat CMS Chef Cloud Coding Consul Container Containers CouchDB DB DNS Database Databases Docker ELK Elasticsearch Filebeat FreeBSD Galera GlusterFS Grafana Graphics HAProxy HTML Hacks Hardware Icinga Icingaweb Icingaweb2 InfluxDB Internet Java KVM Kibana Kodi Kubernetes LXC Linux Logstash Mac Macintosh Mail MariaDB Minio MongoDB Monitoring Multimedia MySQL NFS Nagios Network Nginx OSSEC OTRS Office PGSQL PHP Perl Personal PostgreSQL Postgres PowerDNS Proxmox Proxy Python Rancher Rant Redis Roundcube SSL Samba Seafile Security Shell SmartOS Solaris Surveillance Systemd TLS Tomcat Ubuntu Unix VMWare VMware Varnish Virtualization Windows Wireless Wordpress Wyse ZFS Zoneminder