dail8859 / notepadnext Goto Github PK
View Code? Open in Web Editor NEWA cross-platform, reimplementation of Notepad++
License: GNU General Public License v3.0
A cross-platform, reimplementation of Notepad++
License: GNU General Public License v3.0
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.
Check if the application is already installed (e.g. by checking the registry) and prompt the user to uninstall it.
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??
https://github.com/alex-spataru/QSimpleUpdater looks promising
Need to handle the zip deployment differently.
Thoughts?
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
Cursor location is useful, would be nice to also so the selection range. Possibly a lighter color.
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.
Update once githubuser0xFFFF/Qt-Advanced-Docking-System#216 is closed/merged
https://nsis.sourceforge.io/Docs/AppendixC.html#multipleinstances
System::Call 'kernel32::CreateMutex(p 0, i 0, t "myMutex") p .r1 ?e'
Pop $R0
StrCmp $R0 0 +3
MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running."
Abort
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
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
?
There was a lively discussion happening at notepad-plus-plus/notepad-plus-plus#8248 (also, see these feature proposals: notepad-plus-plus/notepad-plus-plus#8278, notepad-plus-plus/notepad-plus-plus#8247)
Would you be interesting in accepting this in NotepadNext?
Community discussion: https://community.notepad-plus-plus.org/topic/12722/survey-incremental-search-usefulness
Current implementation of QtSingleApplication seems outdated and not being developed, plus missing Qt6 support. See if it can be replaced with https://github.com/itay-grudev/SingleApplication
Could possibly also have a +
button like Chrome does
067e3f8 enables per-user and per-machine installation. Think it is worth looking into https://github.com/Drizin/NsisMultiUser as an alternative to this as it has better support.
When nothing is selected delete
works as expected.
When text is selected delete
seems to have no effect.
https://www.incrediblelab.com/how-to-replace-notepad-with-notepad-plus/
Example to replace with Notepad++:
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /t REG_SZ /d ""%ProgramFiles(x86)%\Notepad++\notepad++.exe" -notepadStyleCmdline -z" /f
Some languages (especially when no language is assigned) doesn't need folding margins.
Very few settings are currently saved on exit (recent files, gui state)
Though there is not a dedicated lexer, SciTE has some sort of Golang support by using the C++ lexer already implemented.
https://sourceforge.net/p/scintilla/scite/ci/default/tree/src/cpp.properties#l18
CC: @hongnod
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.
Wait till a release is made that officially supports styling the focused DockWidget
Add ability to split an editor horizontally similarly how Visual Studio does it:
Currently https://github.com/dail8859/NotepadNext/blob/master/src/NotepadNext/icons/newfile.ico only has up to 48x48 and even that is a bit blurry since it was created from a 16x16 png
When using the context menu from Explorer, opening a file still has the New 1
file open and doesnt focus on the expected file.
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
Integrate https://github.com/editorconfig/editorconfig-core-qt
Some restructuring needs done to the code to be able to flexibly support this. Currently EOL, tab settings, etc are hard coded.
I think this is what is needed: https://docs.microsoft.com/en-us/windows/win32/shell/app-registration#using-the-applications-subkey
Something like:
[HKEY_CLASSES_ROOT\Applications\NotepadNext.exe\SupportedTypes]
".txt"=""
".py"=""
".c"=""
".cpp"=""
...and more as needed
Middle-mouse click on a editor tab should behave the same as left-clicking the x
icon.
Need to call QDir::toNativeSeparators()
in more places such as recent file list, and tool tip for the editor tabs. Possibly other locations as well (dialog boxes?)
Scintilla v5.1.5 was just released.
During installation or uninstallation, detect if the application is running. Warn the user to kill it, or wait for it to finish or something.
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 ?
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.