Git Product home page Git Product logo

dail8859 / notepadnext Goto Github PK

View Code? Open in Web Editor NEW
8.4K 8.4K 508.0 16.22 MB

A cross-platform, reimplementation of Notepad++

License: GNU General Public License v3.0

C++ 63.93% QMake 0.29% C 7.88% Lua 4.67% CSS 0.02% Python 2.40% Objective-C 0.23% Objective-C++ 2.64% Shell 0.04% Batchfile 0.04% HTML 16.27% Makefile 1.34% Perl 0.14% Nim 0.01% PHP 0.02% Ruby 0.04% Tcl 0.01% Visual Basic .NET 0.01% Raku 0.01% Module Management System 0.02%
desktop editor linux macos notepad notepad-plus-plus qt qt5 qt6

notepadnext's Introduction

Notepad Next

Build Notepad Next

A cross-platform, reimplementation of Notepad++.

Though the application overall is stable and usable, it should not be considered safe for critically important work.

There are numerous bugs and half working implementations. Pull requests are greatly appreciated.

screenshot

Installation

Packages are available for Windows, Linux, and MacOS.

Windows packages are available as an installer or a stand-alone zip file on the release page. The installer provides additional components such as an auto-updater and Windows context menu integration. You can easily install it with Winget:

winget install dail8859.NotepadNext

Linux packages can be obtained by downloading the stand-alone AppImage on the release page or by installing the flatpak by executing:

flatpak install flathub com.github.dail8859.NotepadNext

MacOS disk images can be downloaded from the release page.

MacOS Tweaks

By default, MacOS enables font smoothing which causes text to appear quite differently from the Windows version. This can be disabled system-wide using the following command:

defaults -currentHost write -g AppleFontSmoothing -int 0

A restart is required for this to take effect.

Development

Current development is done using QtCreator with the Microsft Visual C++ (msvc) compiler. Qt 6.5 is the prefered Qt version but this can also be built with Qt 5.15. This is also known to build successfully on various Linux distributions and macOS. Other platforms/compilers should be usable with minor modifications.

If you are familiar with building C++ Qt desktop applications with Qt Creator, then this should be as simple as opening src/NotepadNext.pro and build/run the project.

If you are new to building C++ Qt desktop applications, there is a more detailed guide here.

License

This code is released under the GNU General Public License version 3.

notepadnext's People

Contributors

actions-user avatar akmll avatar azq2 avatar cidqu avatar czlitony avatar dail8859 avatar data-man avatar dchapyshev avatar dependabot[bot] avatar detinho avatar elcuco avatar erickwei avatar eson57 avatar exposedcranium avatar flyingbeanss avatar fncontroloption avatar followerofbigboss avatar gitoffthelawn avatar inkydragon avatar jakobdev avatar kocio-pl avatar mandyedi avatar merajmasuk avatar peterdavehello avatar sitiom avatar wayne-zhang avatar yaldysse avatar yangyangdaji avatar zhongqingsong avatar zocker-160 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

notepadnext's Issues

[Question] Notepad++ plugin compatibility

Hello, congratulations on this interesting project.

Is it compatible with Notepad++ plugins, and if not is there any plan to support them in the future?

Thank you

Add 'Find in files'

Add functionality to search through files. The Find dialog needs alot of attention prior to that. Also it would be worth first implementing the search results docked dialog for searching since that would be needed also.

CC: @hongnod

Enable CFG in VS2019 project

Checking the latest artefact from AppVeyor, v0.3.0.68:

> Get-PESecurity -File .\NotepadNext.exe

ARCH             : AMD64
DotNET           : False
ASLR             : True
DEP              : True
Authenticode     : False
StrongNaming     : N/A
SafeSEH          : N/A
ControlFlowGuard : False  <-- CFG
HighentropyVA    : True

Could you please try building with the /guard:cf?

Update LuaBridge

Looks like it has been actively developed. LuaBridge might not be a long term solution but still worth keeping updated since it is easy to integrate.

error OS2

Hello
I tried to build it for OS/2
Using Qt 5.15.2 and gcc 9.2.0

I get a error running make

g++ -c -Zomf -march=i686 -O2 -mno-avx -std=gnu++1z -Wall -Wextra -DQT_NO_IPV6 -DAPP_VERSION=""0.4.2"" -DAPP_COPYRIGHT=""Copyright 2019-2021 Justin Dailey"" -DSCI_OWNREGEX -DADS_STATIC -DQAPPLICATION_CLASS=QApplication -DSCINTILLA_QT=1 -DMAKING_LIBRARY=1 -DSCI_LEXER=1 -D_CRT_SECURE_NO_DEPRECATE=1 -DNDEBUG=1 -DLUA_PATH_DEFAULT="" -DLUA_CPATH_DEFAULT="" -DQSU_INCLUDE_MOC=1 -DLUA_VERSION_NUM=503 -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I../../NotepadNext -I. -I../../singleapplication -I../../scintilla/qt/ScintillaEditBase -I../../scintilla/qt/ScintillaEdit -I../../scintilla/include -I../../scintilla/src -I../../lexilla/access -I../../lexilla/lexlib -I../../lexilla/include -I../../uchardet/src -I../../lua/src -I../../ads/src -I../../editorconfig-core-qt -I../../QSimpleUpdater/include -I../../NotepadNext/decorators -I../../NotepadNext/dialogs -I../../NotepadNext/widgets -I../../LuaBridge -I../../../src -I../../lexilla/include -I/@unixroot/usr/include/qt5 -I/@unixroot/usr/include/qt5/QtPrintSupport -I/@unixroot/usr/include/qt5/QtWidgets -I/@unixroot/usr/include/qt5/QtGui -I/@unixroot/usr/include/qt5/QtNetwork -I/@unixroot/usr/include/qt5/QtCore -Ibuild/moc -Ibuild/ui -I/@unixroot/usr/lib/qt5/mkspecs/os2-g++ -o build/obj/LuaExtension.obj ../../NotepadNext/LuaExtension.cpp
../../NotepadNext/IFaceTable.cpp:28:7: error: need 'typename' before 'std::iterator_traits<_Iterator>::value_type' because 'std::iterator_traits<_Iterator>' is a dependent scope
28 | const std::iterator_traits::value_type binary_find(Iter begin, Iter end, const char name) {
| ^~~
| typename
../../NotepadNext/IFaceTable.cpp: In member function 'virtual const IFaceConstant
IFaceTable::FindConstant(const char
) const':
../../NotepadNext/IFaceTable.cpp:42:12: error: 'binary_find' was not declared in this scope
42 | return binary_find(constants.cbegin(), constants.cend(), name);
| ^~~~~~~~~~~
../../NotepadNext/IFaceTable.cpp: In member function 'virtual const IFaceFunction* IFaceTable::FindFunction(const char*) const':
../../NotepadNext/IFaceTable.cpp:46:12: error: 'binary_find' was not declared in this scope
46 | return binary_find(functions.cbegin(), functions.cend(), name);
| ^~~~~~~~~~~
../../NotepadNext/IFaceTable.cpp: In member function 'virtual const IFaceProperty* IFaceTable::FindProperty(const char*) const':
../../NotepadNext/IFaceTable.cpp:79:12: error: 'binary_find' was not declared in this scope
79 | return binary_find(properties.cbegin(), properties.cend(), name);
| ^~~~~~~~~~~
make[1]: *** [build/obj/IFaceTable.obj] Error 1

Any idea about this??

Update ADS

Wait till a release is made that officially supports styling the focused DockWidget

Feature Request

Nice to see this editor,
1、“Find in files” has a menu item, but can't open the operational panel
2、Encoding is not started
3、Golang is not supported.

Qt 6+

Evaluate Qt 6+ since the open source channel is stuck on 5.15.2

I think most of the external dependencies are Qt 6 compatible but need to actually try it out and see what needs done.

Ideally support but Qt 5.15 and 6+ if possible.

Zip deployment incorrectly downloads installer

Need to handle the zip deployment differently.

  • Potentially the zip deployment could not check for auto-updates at all. (installer could add registry entry to disable checks)
  • Auto updater could read a different entry in the updates.json file (e.g. 'windows-zip') and either download the zip for the user or just open up the github releases page.

Thoughts?

Properly handling file Encoding

There is no file encoding support currently.

I don't understand file encodings enough to know I'm doing it correctly. The uchardet library is linked in which can detect file encodings.

CC: @hongnod

Compiling OS2

Hello,
Try to get this build to OS/2
I use QT v5.13.1 and gcc v9.2.0

When compiling i get this:
../../NotepadNext/LuaExtension.cpp: In member function 'bool LuaExtension::RunFile(const wchar_t*)':
../../NotepadNext/LuaExtension.cpp:778:71: error: no matching function for call to 'std::basic_ifstream::basic_ifstream(const wchar_t*&, std::_Ios_Openmode)'
778 | std::ifstream filestream(filename, std::ios::in | std::ios::binary);
| ^
g++ -c -Zomf -march=i686 -mtune=i686 -O2 -std=gnu++1z -Wall -W -DQT_NO_IPV6 -DAPP_VERSION=""0.3.3"" -DAPP_COPYRIGHT=""Copyright 2019-2020 Justin Dailey"" -DSCI_OWNREGEX -DADS_STATIC -DEXPORT_IMPORT_API= -DLUA_VERSION_NUM=503 -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I../../NotepadNext -IE:/qt5-src/Editors/NotepadNext/src/os2/NotepadNext -I../../NotepadNext/decorators -I../../NotepadNext/dialogs -I../../NotepadNext/widgets -I../../scintilla/qt/ScintillaEditBase -I../../scintilla/qt/ScintillaEdit -I../../scintilla/include -I../../scintilla/src -I../../scintilla/lexlib -I../../qtsingleapplication/src -I../../lua/src -I../../uchardet/src -I../../LuaBridge -I../../../src -I../../ads/src -isystem /@unixroot/usr/include/qt5 -isystem /@unixroot/usr/include/qt5/QtPrintSupport -isystem /@unixroot/usr/include/qt5/QtWidgets -isystem /@unixroot/usr/include/qt5/QtGui -isystem /@unixroot/usr/include/qt5/QtNetwork -isystem /@unixroot/usr/include/qt5/QtCore -IE:/qt5-src/Editors/NotepadNext/src/os2/NotepadNext -IE:/qt5-src/Editors/NotepadNext/src/os2/NotepadNext -I/@unixroot/usr/lib/qt5/mkspecs/os2-g++ -o ScintillaNext.obj ../../NotepadNext/ScintillaNext.cpp
In file included from ../../NotepadNext/LuaExtension.cpp:30:
C:/usr/include/c++/9/fstream:587:7: note: candidate: 'std::basic_ifstream<_CharT, _Traits>::basic_ifstream(std::basic_ifstream<_CharT, _Traits>&&) [with _CharT = char; _Traits = std::char_traits]'
587 | basic_ifstream(basic_ifstream&& __rhs)
| ^~~~~~~~~~~~~~
C:/usr/include/c++/9/fstream:587:7: note: candidate expects 1 argument, 2 provided
C:/usr/include/c++/9/fstream:579:2: note: candidate: 'template<class _Path, class _Require> std::basic_ifstream<_CharT, _Traits>::basic_ifstream(const _Path&, std::ios_base::openmode)'
579 | basic_ifstream(const _Path& __s,
| ^~~~~~~~~~~~~~
C:/usr/include/c++/9/fstream:579:2: note: template argument deduction/substitution failed:
C:/usr/include/c++/9/fstream:578:32: error: request for member 'make_preferred' in 'std::declval<const wchar_t*&>()', which is of non-class type 'const wchar_t*'
578 | template<typename _Path, typename _Require = _If_fs_path<_Path>>
| ^~~~~~~~

Any idea to fix ?

Compiling error on OS/2

Just let you know that i have ported you're NotepadNext to good old OS/2
Yes its still alive

I used Qt v5.1.3 and GCC 9.2.0

The only trouble i came across where:

../../NotepadNext/IFaceTable.h:143:22: error: 'string' is not a member of 'std'

Fixed with by adding to IFacceTable.h #include

next error i faced where....

../../NotepadNext/LuaExtension.cpp: In member function 'bool LuaExtension::RunFile(const wchar_t*)':
../../NotepadNext/LuaExtension.cpp:774:71: error: no matching function for call to 'std::basic_ifstream::basic_ifstream(const wchar_t*&, std::_Ios_Openmode)'
774 | std::ifstream filestream(filename, std::ios::in | std::ios::binary);
| ^
In file included from ../../NotepadNext/LuaExtension.cpp:30:
C:/usr/include/c++/9/fstream:587:7: note: candidate: 'std::basic_ifstream<_CharT, _Traits>::basic_ifstream(std::basic_ifstream<_CharT, _Traits>&&) [with _CharT = char; _Traits = std::char_traits]'
587 | basic_ifstream(basic_ifstream&& __rhs)
| ^~~~~~~~~~~~~~
C:/usr/include/c++/9/fstream:587:7: note: candidate expects 1 argument, 2 provided
C:/usr/include/c++/9/fstream:579:2: note: candidate: 'template<class _Path, class _Require> std::basic_ifstream<_CharT, _Traits>::basic_ifstream(const _Path&, std::ios_base::openmode)'
579 | basic_ifstream(const _Path& __s,
| ^~~~~~~~~~~~~~
C:/usr/include/c++/9/fstream:579:2: note: template argument deduction/substitution failed:
C:/usr/include/c++/9/fstream:578:32: error: request for member 'make_preferred' in 'std::declval<const wchar_t*&>()', which is of non-class type 'const wchar_t*'
578 | template<typename _Path, typename _Require = _If_fs_path<_Path>>
| ^~~~~~~~
I think this is a dirty fix ...
--- LuaExtension-os2.cpp 2020-05-24 11:19:38.000000000 +0200
+++ LuaExtension.cpp 2020-05-24 11:18:40.000000000 +0200
@@ -770,7 +770,6 @@
return true;
}

-#ifndef OS2
bool LuaExtension::RunFile(const wchar_t *filename) {
std::ifstream filestream(filename, std::ios::in | std::ios::binary);
std::string buff;
@@ -790,7 +789,6 @@

 return RunString(&buff.c_str()[idx]);

}
-#endif

bool LuaExtension::OnExecute(const char *s) {
static bool isFirstLine = true;

Maybe you have a better solution for this.

Language Inspector not updating

Language Inspector is not updating when a new file is opened, or when the language is changed. It only updates when switching to a preexisting editor.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.