5.01.2018 Spotlight: CudaText - A Hot Replacement for Sublime Text, Written in Lazarus

Care for a replacement of Sublime Text, but Open Source? We got you covered...!

By the way, congrats to LazPlanet for its 100th post! Congrats to you all readers for such a great community!


Sublime Text is one of my favorites. It has many features that power users need. I love it so much, but I hate the fact that it is not open source. Well, guess what...? There is an alternative to Sublime Text, and it is written in Lazarus! And the best part is, it can use plugins from Sublime. Cool!

If nothing else, I would request you to visit CudaText homepage. When it comes to websites it is not one of the flashiest ones, but the features and animations present there are bound to impress at least many of us. I got a feeling that it will impress you for sure. Just take 2 minutes to see those animations, and you'll like it even more.

If you are interested to use it in your text editing, let's dive in...

Installation


You can just download the files from here: https://sourceforge.net/projects/cudatext/files/release/

They have versions for Windows, Linux, Linux-arm (for Raspberry Pi etc.) Mac and BSD. Such a nice coverage!

On Windows, you can just install with the setup file given. Python is preinstalled with the package.
On linux/debian It is as easy as installing a deb file. You should be able to install it with a command:
sudo dpkg -i "/path/to/cudatext.deb" && sudo apt-get -f install

If you are not using debian (you don't have apt or dpkg), you may have to look into the tar.xz files, extract and run it directly from a directory, such as /opt or ~/bin. You can create a desktop file for it on /usr/share/local/applications or ~/.local/share/applications to show the shortcut on your Application menu. Such a .desktop file might be like this:

[Desktop Entry]
Name=CudaText
GenericName=Text Editor
Comment=Advanced code editor. Syntax highlighting for 190+ languages. Supports all major encoding. Multi-carets and multi-selections. Implemented many editing commands found in common text editors. UI with tabs and sidebar. Search and replace with regex.
Exec=/usr/bin/cudatext %F
Terminal=false
Type=Application
StartupNotify=true
MimeType=text/plain;
Categories=Utility;TextEditor;
Icon=cudatext


* Make sure to change the Exec line above to match the directory where you installed it.

Arch Linux also has a great way of installing CudaText. Just run:
yaourt -S cudatext --noconfirm

Running and Tweaking it


If you are on linux, when you run it, you will probably get a screen like this:



It might have an error saying:
No Python engine (3.x) found. Python plugins don't work now. To make it ok:
write option "pylib__linux" to user.json. See info in default config: Options / Settings-default.
Loading session: history session.json
Startup: total: 320ms, including plugins: 0ms

This happens only in Linux and is easy to fix.

Just run:
find /usr -name 'libpython3.*so*' 2>/dev/null

You will get some output for where python library files are. I got an output like this on my system:
/usr/lib/libpython3.so
/usr/lib/libpython3.6m.so
/usr/lib/libpython3.6m.so.1.0

We would need that in a minute. Now go to Options - Settings - user. Now paste in this code:
{
  "pylib__linux" : "libpython3.so",
}

Notice that I have used only filename and not path. If this filename does not work, try the above code with the filenames you get on your system. Save and Restart. The error should be gone.



To make some space, you can click View - Toggle Bottom Panel and View - Toggle Side Panel.

Then you can also click on the Project icon on the Sidebar to reveal the Project Manager, which you can use to open browse and view files within a folder.




To spice up things a bit, you can choose an UI theme from Options - Color Themes - UI. If it prompts there is a Syntax theme with the same name, click OK.

To get the same look as Sublime, you can choose ebony or sub. If you like the color of Atom, you should choose darkwolf or zeus. Although they are not exact, you can finetune it by mixing different Syntax themes with UI themes.



I am a fan of the darker ones, but there are lighter themes if you feel like it.



When using darker ones, I have changed the icon color of the Project Manager toolbar, by clicking the cog icon and choosing feather_white_16x16 and restarting CudaText.

Also, I entered these in my Options - Settings - user:
{
  "pylib__linux" : "libpython3.so",
  "tab_size" : 4,
  "font_name__linux" : "DejaVu Sans Mono",
  "font_size__linux" : 11,
  "minimap_show": true,
  "minimap_sel_always": true,
  "minimap_sel_border": false
}

This is some fonts, indentation and minimap stuff. You can find more settings in Options - Settings - default to find out more settings you can tweak. Just copy the entry to the user file and change the setting as you want.

Testing and Features


If you like the ctrl+p in Sublime or ctrl+shift+p in Atom, you can press F1 to bring in the Command Palette. This lists all the commands available in menus and such.

You have very much everything that you need by default. Multi caret, Multi Selection, Snippets, Project Manager - everything I miss from Sublime.

If I miss something dearly, I can install the sublime plugin for that thing.

Plugins


Which brings us to a great feature - Sublime Plugins on CudaText. To install such a plugin simply go to Plugins - Addons Manager - Install. Now you can type in some name of a plugin, for example, "find in files". Select your desired option and press enter. Within some seconds you will get a message if you are sure you want to install it.



Click OK. Then it will install and show the summary in a dialog box. It may tell you to restart CudaText.

When you right click on a folder on Project Manager - Selected Directory - Find in Directory it will find your text in that folder. Neat!


Honestly, it is a very close alternative to Sublime. What is even better is to have a replacement made in Lazarus. If you need any further info or help, visit this wiki page for CudaText.

11 comments:

Unknown said...

Sem duvida um dos melhores blogs sobre lazarus, parabens...

O Católico said...

i knew cudatext by this post, and guy, it's amazing! Thanks for sharing!

shakeel said...

Very informative and It was an awesome post. I love reading your fantastic content. Thanks for sharing it with us.
wincracker.com
Sublime Text Crack

Ali Khan said...






Pretty great post. I simply stumbled upon your blog and wanted to mention that I have really loved surfing around your blog posts. Great set of tips from the master himself. Excellent ideas. Thanks for Awesome tips Keep it
sublime-text-crack
kaspersky-total-security-crack
hitman-pro-crack
avs-video-editor-crack
total-commande-crack

softeir said...

It's a beautiful thing to be appreciated... Keep it up, thanks for sharing.
After looking through a few blog articles on your website,
we sincerely appreciate the way you blogged.
Text Sublime

yashaunayakubov said...

Slots & Casino Hotel - Mapyro
The Hotel at Slots & Casino Hotel features 4 full floors 상주 출장마사지 and a 20,000 square foot casino gaming space. 아산 출장안마 The hotel has an 하남 출장안마 outdoor pool, a bowling 전주 출장마사지 alley, 김제 출장안마

SOFT WARE HUB said...

All of your efforts are much appreciated, and I appreciate you sharing them with us.
CudaText Crack

ascrack.org said...

I'm really impressed with your writing skills, as smart as the structure of your weblog.
MAGIX Video Pro Crack
Movavi Video Editor Plus Crack
Adobe InCopy Crack
UVK Ultra Virus Killer Crack
CudaText Crack
ascrack.org

SOFT WARE HUB said...

Really Good Work Done By You...However, stopping by with great quality writing, it's hard to see any good blog today.../
IObit Uninstaller Pro Crack
Sandbox Crack
Hyper Snap crack
Editor Em Professional Crack

Smith Michael said...

I am very impressed with your post because this post is very beneficial for me and provide a new knowledge to me
Trojan Killer Crack
YTD Video Downloader Crack
Honeycam Crack

priya said...

Thank you so much for sharing all this wonderful info!
Get Cudatext 1.173.4.0 Crack Activation Key [2023]/

 
Copyright 2013 LazPlanet
Carbon 12 Blogger template by Blogger Bits. Supported by Bloggermint