TranslateProject/sources/tech/20201221 Try a text editor inspired by Notepad.md
DarkSun 8bedc1bbe7 选题[tech]: 20201221 Try a text editor inspired by Notepad++
sources/tech/20201221 Try a text editor inspired by Notepad.md
2020-12-22 05:01:41 +08:00

6.2 KiB
Raw Blame History

Try a text editor inspired by Notepad++

Classic notepads are reliable and familiar, and the new, improved versions offer endless plugins to customize your experience. Writing Hand

If you look online for great open source text editors, youre bound to come across Notepad++. An enduring and popular editor, Notepad++ is built only for Windows. I use the open source operating system Linux but was nevertheless curious to experience Notepad++. Fortunately for me, I discovered one way to try Notepad++ (yes, its WINE) and one way to approximate it.

Running Notepad++ in WINE

It seemed like a crazy idea at one time, but long ago, a group of developers wondered whether they could reverse engineer the system-level libraries that made Windows work and then release them as open source software. Thats what WINE is—a rewrite of the core components of Windows, allowing many Windows applications to run on Linux.

Its a staggering achievement and one that has, among other things, helped the ReactOS project launch a Windows-like open source operating system, Valve Software to create Steam Play for running Windows games on Linux, and people who are over-curious about text editors to try Notepad++.

There are two steps involved in this process:

  1. Install WINE on Linux from your software repository.
  2. Download the Notepad++ EXE installer. With WINE, you can launch it like a native application, and install Notepad++ to your system.

Winetricks

Alternatively, you can use Winetricks to install applications, Notepad++ included. Winetricks is a shell script with tried-and-tested build scripts for dozens upon dozens of applications, games, fonts, and more. You can probably install Winetricks from your distribution's software repository. If it's not available, then you can download it yourself:

$ mkdir ~/bin
$ cd ~/bin
$ wget  <https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks>
$ chmod +x winetricks
$ ./winetricks

Winetricks is a simple menu-driven application. Find npp ("Notepad plus plus") in the Install applications menu selection.

Winetricks

There are a few things to get used to when using applications on Linux that believe theyre running on Windows, but nothing serious. You have to get used to the idea of hard drive locations designated by letters, and you might want to download and install some Windows themes to help your WINE environment feel better integrated with the rest of your system. Once youve used Notepad++ running on WINE, you quickly forget WINE is involved at all.

Notepad++ running in WINE on Linux

Running Notepadqq

Theres no affiliation between Notepadqq and Notepad++, except that the former takes inspiration from the latter. Theyre not identical applications, but if youre a casual fan of the original, then you might find Notepadqq a suitable native replacement.

Notepadqq is easy to install as a Flatpak on Linux or a Chromebook. Alternately, you can download and compile it from its source code. Some support is provided for compiling on MacOS, too.

screenshot of black notepad terminal with white lettering

Notepad (improved)

Regardless of how you satiate your Notepad improved hunger, youll be pleased to find you have a responsive, customizable, and extensible editor. Both applications provide syntax highlighting for around 80 programming languages and text formats, including C, C++, Java, Python, Javascript, Lua, Markdown, RPM spec files, and YAML.

They also both use the concept of a session, or sets of files opened in your Notepad editor, which you can save and reload as needed. Using sessions helps you organize your work into projects.

Both Notepad applications can be extended through plugins. Notepad++ features a Plugins Admin panel, where you can browse through available plugins. Notepadqq doesnt have the years of development that Notepad++ has had, and accordingly, doesnt seem to have the abundance of available extensions. However, you can develop your own using Node.js.

Try a Notepad (improved)

Whether you stick with the classic Notepad++ or venture into the newer Notepadqq, youre bound to find satisfaction with these reliable editors. They give you the features you expect for efficient text editing and the access you need so you can hack together your own extensions. These are both fun, reliable, and dependable projects, so give one (or both) a try today!


via: https://opensource.com/article/20/12/notepad-text-editor

作者:Seth Kenlon 选题:lujun9972 译者:译者ID 校对:校对者ID

本文由 LCTT 原创编译,Linux中国 荣誉推出