Looking for a new editor to replace your old one? Look no further than Lapce – a lightning-fast and powerful code editor
The user can choose from many different code editors, such as Vim, Emacs, Sublime Text, VS Code, VSCodium, which is an alternative to VSCode that doesn’t collect telemetry data, and so on.
And it can be hard to decide which one is best for you, but Lapce stands out from the crowd with its intuitive user interface, helpful features, and incredibly fast performance.
So let’s start this guide by listing some of the features of Lapce, an installation guide for Linux distributions, and how to get started with Lapce.
Table of Contents
Lapce: Lightning-fast And Powerful Code Editor
Lapce is an early-stage editor that is based on the Rust programming language with a UI in Druid and uses rope science from the Xi-Editor to ensure efficient and reliable computation while leveraging OpenGL for rendering.
Features of Lapce
Lapce has the following features:
- Vim’s Modal editing features without installing any plugin
- Syntax highlighting using Tree-Sitter
- Support LSP (Language Server Protocol) for auto-completion of code, etc
- Remote Development, so you can edit the file from your current window
- Built-in terminal support means you don’t need to leave the editor to run other task
- WASI plugin system to write plugins
- Support for multiple themes
- Keybinding for ease of work
- and many more features that you will discover once you begin using it
Installation of Lapce
Lapce is currently in pre-alpha, so you won’t find it in your distribution’s repository, but you can download and install it either from the Github or Flathub repo.
Installing Lapce using Flatpak
One of the easiest and most efficient ways to install Lapce on your system is to use Flatpak, which is now available in most popular Linux distributions. However, if you don’t have Flatpak on your system, check out this guide to install it.
If you already have Flatpak, simply run one of the lines of commands shown below and press “Y” when prompted for confirmation.
$ flatpak install flathub dev.lapce.lapce
The output of the above command is shown below:
After the installation is done, type “Lapce” into the application menu to open Lapce.
Installing Lapce using Binary file
Alternatively, you can install Lapce on your system by downloading the archive package from the release section of the project.
As of now, the latest version of Lapce is 0.2.5, which you can download using the below command. Open your terminal window and execute the following command:
$ wget https://github.com/lapce/lapce/releases/download/v0.2.5/Lapce-linux.tar.gz
After downloading the file, please extract it and copy the binary file to the /usr/bin/ directory:
$ tar xvf Downloads/Lapce-linux.tar.gz
$ sudo mv Lapce/lapce /usr/bin
Now you can run Lapce from the new terminal by invoking “lapce
“, which is not convenient to launch every time so to make executable from app menu follow this extra steps
To begin, use the wget command to download the two files: lapce.desktop and lapce.png, which will be saved in the /.local/share/applications/ directory for later use.
$ wget https://trendoceans.com/wp-content/uploads/2023/02/lapce.txt -O ~/.local/share/applications/lapce.desktop
$ wget https://trendoceans.com/wp-content/uploads/2023/02/lapce.png -O ~/.local/share/applications/lapce.png
After downloading file you need to replace your username in lapce.desktop by opening it you favorite editor and save the file to reflect changes
[Desktop Entry]
Type=Application
Name=Lapce
Icon=/home/replace-username/.local/share/applications/lapce.png
Exec=/usr/bin/lapce
Categories=Code Editor, Editor
Terminal=false
Once you have completed the above task, you will be able to launch Lapce from the application menu.
In comparison to the previous method, this one is quite intensive.
Get started with Lapce
After making so much effort, let’s see how you can start with Lapce.
So first, open Lapce from the application menu, and you’ll find yourself presented with a powerful yet intuitive interface that makes it easy to get up and running quickly, which you can clearly see in the below image where I have highlighted the option to get started with Lapce.
Enable Modal Support:
If you have used Vim, then you may be used to Modal editing, which helps you switch easily between modes of editing such as insert, replace, and command mode. This is something that Lapce includes by default, making it much easier for Vim users to transition to Lapce with minimal effort.
To enable this, you just need to click on the setting (gear) icon, which is on the right side of top menu and choose open setting or else use shortcut Ctrl + ,
And make a check on “Enable modal editing (Vim-like)” as shown in the below image.
Key Bindings
I would advise you to set up key bindings for the tasks you use most often, as it will help you increase your efficiency when editing and make it easier to find the functions you need.
If you are currently on setting tab you just need to scroll down and look for “keybindings” or else you can invoke the same by executing Ctrl + K
Now it’s up to you which keybindings you would like to assign.
This can be anything from using Ctrl + Shift + F for searching the entire project to something more simple, such as a single shortcut key for running the project.
Plugins
Lapce also has several plugins that can be used to extend the functionality of Lapce. To add plugins, you need to click on the extension icon, which is on the left side of the application window and next to commit.
On the top section, you will find the already-installed plugin, and the bottom will be given to you to choose the plugin that you want to have on Lapce.
I have already installed the two theme plugins, “Tokyo Night” and “Dracula,” but to apply them there is a slight twist. So to apply a new theme on Lapce, you need to open the settings window (Ctrl + ,) and under Color theme, specify the theme name like shown below, which will change the current theme.
Wrap up
As you become more comfortable using Lapce, you can explore the deeper features it has to offer. To learn more, you can read the official documentation.
If you have been using Lapce for a longer period of time, then please share your experience with us.
Also see: Micro: Modern and Intuitive Terminal-Based Text Editor
Anyway, if there is something I need to consider, please use the space below to provide any additional information or feedback.
Till then, put your feet up and relax. As always, the next article will be up shortly.
A man with a tech effusive who has explored some of the amazing technology stuff and is exploring more. While moving towards, I had a chance to work on Android development, Linux, AWS, and DevOps with several open-source tools.