magiblot / turbo Goto Github PK
View Code? Open in Web Editor NEWAn experimental text editor based on Scintilla and Turbo Vision.
License: Other
An experimental text editor based on Scintilla and Turbo Vision.
License: Other
Hi, I was following your project, and I admire your job and continuous effort on this project.
In the future, how about creating a plugin system and implementing Github copilot as a plugin?
Now AI is developing software quite well, so this feature can be a killing point of turbo editor.
Thanks,
Kangmo
Currently "Edit->Find" function is case insensitive for latin, but case sensitive for cyrillic. Probably this behavior should be consistent independently of language used.
following instructions for ubuntu
cmake complains:
-- (tvision) Found 'ncursesw': /usr/lib/x86_64-linux-gnu/libncursesw.so
-- (tvision) Found 'gpm': /usr/lib/x86_64-linux-gnu/libgpm.so
CMake Error at CMakeLists.txt:115 (install):
install TARGETS given target "fmt" which does not exist in this directory.
-- Configuring incomplete, errors occurred!
See also "/home/unxed/turbo/CMakeFiles/CMakeOutput.log".
See also "/home/unxed/turbo/CMakeFiles/CMakeError.log".
Hi,
Any chance of a deb for debian/ubuntu ?
Cheers
S
Hi @magiblot, in commit f278299 the Clipboard
class was dropped. I'm trying to figure out how to fix tmbasic accordingly. Is turbo no longer attempting to integrate with the system clipboard, or am I missing a new spot where that integration happens? Is there an integration point where I can bring back libclipboard as a tmbasic-level dependency? I appreciate any tips you can provide!
You have called ADD_LIBRARY for library scintilla without any source files. This typically indicater
oblem with your CMakeLists.txt file
Yo hve
called ADD_LIBRARY for library scilexers without any source files. This typically indicate a robem w
ith your CMakeLists.txt file
CMake
Error at CMakeLists.txt:61 (add_executable):
add_executable called with incorrect number of arguments
CMake Error at CMakeLists.txt:68 (target_include_directories):
Cannot specify include directories for target "turbo" which is not built by
this project.
CMake Error at CMakeLists.txt:75 (target_sources):
Cannot specify sources for target "turbo" which is not built by this
Errors occurred during the last pass
CMake Version 3.9.3
Press [e] to exit help
hi @magiblot
Can we toggle line comments with CTRL-/ shortcut?
Hi @magiblot
Any API to insert current timestamp like this?:
Wed Oct 12 15:15:00 2022
I successfully pasted some text to turbo under putty4far2l, but it was not possible to copy the text from turbo to desktop clipboard of system running putty4far2l. Don't sure for now if the problem is on the turbo side or on the putty4far2l side.
Under far2l everything is working fine.
Hi
Can Turbo handle tab indentation properly at saving?
Please take a closer look at aabb.cc example. It was written with indentation 4.
It opens correctly in Turbo but when saving it converts my 1 tab 4 spaces indentation to actual 4 empty spaces.
Some people use tab indentation 2 or even indentation 8.
As a workaround I use bcpp utillity which can hadle indentation properly. Is there any easy fix or can we merge bcpp into Turbo?
Following the "Detailed build instructions for Ubuntu 20.04" in readme.md, running on Ubuntu (server) 20.04.2 LTS,
I'm missing the dependency: pkg-config (easy to resolve).
But then I'm also missing the libxcb dependency, as per error:
-- Checking for module 'xcb'
-- No package 'xcb' found
CMake Error at /usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:463 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:643 (_pkg_check_modules_internal)
deps/libclipboard/CMakeLists.txt:66 (pkg_check_modules)
and "apt-cache search libxcb" shows a lot of packages, and I'm not sure which one (or all?) is actually needed.
EDIT: On further inspection, xcb is a (replacement for) X11 library, which may be an issue on my non-GUI Ubuntu Server installation.
I was only installing to test out libtvision, and how it would work over SHH or (in Windows PuTTY). I now moved testing to a GUI version of Ubuntu. As long as libtvision doesn't depend on X11 I'm happy. Unless it is particularly easy to solve the dependency, the simplest solution would be to rename the instructions to "Detailed build instructions for Ubuntu 20.04 (Desktop)"
I'm very impressed with how well it works over SSH/PuTTY, also the window/screen resizing!
hi magiblot
i am going to implement this new feature called List of recently opened files in Turbo.
it it ok to save/open recently opened files metadata as/from JSON file ?
is it ok using parser - dropbox/json11 ?
if yes, i am going to write own recently opened files metadata cpp json writer.
Hi, thanks for the great project.
I use turbo at daily work, but I have to open files that I was using each time I reboot my server.
Can we make turbo editor to remember all open windows when it exits, so that it can open them again when it runs again?
If so, It can save a huge amount of time. Thank you.
It will be great if you can extend turbo to open an entire folder (like VS Code). Example:
turbo .
This will open the current folder and lists all the files in the "Document Tree View".
Hi @magiblot, I'm seeing an issue in drawing the background of some blank cells when line numbers are enabled. Some cells are black instead of the expected background color; thus, this is not detectable when the editor background is black. I pulled turbo commit 3545036 and applied the following diff to source/turbo-core/styles.cc
:
diff --git a/source/turbo-core/styles.cc b/source/turbo-core/styles.cc
index 370b9fd..cad997a 100644
--- a/source/turbo-core/styles.cc
+++ b/source/turbo-core/styles.cc
@@ -123,7 +123,7 @@ Language detectFileLanguage(const char *filePath)
extern constexpr ColorScheme schemeDefault =
{
- /* sNormal */ {{} , {} },
+ /* sNormal */ {{} , '\x9' },
/* sSelection */ {'\x1' , '\x7' },
/* sWhitespace */ {'\x5' , {} },
/* sCtrlChar */ {'\xD' , {} },
Then I get the result shown in the animation below. I get the same behavior in tmbasic with its fully customized color scheme. It's not quite random but I don't know what's going on. The issue vanishes if I disable line numbers. I reproduced in Windows/conhost and in Linux/PuTTY. Let me know if you want me to git bisect this. Cheers!
Hi @magiblot
How to Toggle Syntax Highlighting?
Personally I would like to be able to toggle syntax highlighting on/off for C/CPP.
I will try to make freebsd port of this and add some feature to make it full c++ ide for now
Sorry for not providing all the details, I'm kind of in a hurry, but bad news are: mouse sequences are somehow leaking into edited files.
Platform: Ubuntu 18.04 on WSL / Windows 10 / standard TTY. It has turned out suddenly, as a week or so I was happily editing -and- actually using mouse to switch between windows, arrange windows and access menus.
I might suspect that the bug might be somewhere around seleting text with mouse.
Hi, when building on macOS 12.4, arm64, with cmake --build . -j$(sysctl -n hw.logicalcpu)
) build fails because of multiple build errors, originating in the fmt
package.
Partial build output:
/my-repos/turbo/deps/fmt/src/os.cc:263:25: error: unknown type name 'error_code'; did you mean 'std::error_code'?
void file::dup2(int fd, error_code& ec) FMT_NOEXCEPT {
^~~~~~~~~~
std::error_code
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/system_error:315:24: note: 'std::error_code' declared here
class _LIBCPP_TYPE_VIS error_code
^
/my-repos/turbo/deps/fmt/src/os.cc:266:26: error: use of undeclared identifier 'error_code'; did you mean 'std::error_code'?
if (result == -1) ec = error_code(errno);
^
/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/system_error:315:24: note: 'std::error_code' declared here
class _LIBCPP_TYPE_VIS error_code
^
2 errors generated.
make[2]: *** [deps/fmt/CMakeFiles/fmt.dir/src/os.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
Any pointers to how to resolve this issue?
Another nice feature (for developers) is to integrate a terminal into turbo.
This will allow to run commands (e.g. to compile code, etc.)
Alternatively, add a keyboard shortcut to the "Suspend" option.
Hi @magiblot
Since Turbo is built on Scintilla, can you implement code folding?
In most editors, Home key means "go to the 1st character of a string". In turbo, Home key means "go to the 1st non-space character of a string if pressed once, and go to the 1st character of a string if pressed for the second time".
Can this behavior be made configurable to make turbo react on Home key just like all other editors? Thanks!
Hi, first of all -- what an absolutely lovely editor! After trying out dozens of windows console editors including micro and fte, I've finally fell in love with Turbo. I'd like to use it as a drop-in replacement of Notepad++, and it would be great if there was an option for the editor to remember the document tree from the previous session (or an option to populate it with a specific directory), so I can continue working right away every morning, with all relevant files ready to switch to.
Thanks, and looking forward to all upcoming features!
For sure turbo vision should allow this :)
Result of cmake . -DCMAKE_BUILD_TYPE=Release
Status: R
CMake Error at deps/CMakeLists.txt:24 (add_subdirectory):
The source directory
/usr/local/src/sdm/turbo/trunk/deps/fmt
does not contain a CMakeLists.txt file.
Call Stack (most recent call first):
CMakeLists.txt:81 (include)
CMake Error at deps/CMakeLists.txt:34 (add_subdirectory):
The source directory
/usr/local/src/sdm/turbo/trunk/deps/tvision
Call Stack (most recent call first):
CMakeLists.txt:81 (include)
CMake Error at deps/CMakeLists.txt:34 (add_subdirectory):
The source directory
/usr/local/src/sdm/turbo/trunk/deps/tvision
does not contain a CMakeLists.txt file.
Call Stack (most recent call first):
CMakeLists.txt:81 (include)
CMake Error at CMakeLists.txt:110 (install):
install TARGETS given target "fmt" which does not exist.
-- Configuring incomplete, errors occurred!
does not contain a CMakeLists.txt file.
Thank you for great projects!
Is it time to switch to lexilla? :)
https://github.com/ScintillaOrg/lexilla
This is a very nice CLI editor. I love it. The code is also clean and very well written.
If not done yet, it would be great to have built-in terminal as well, so that one can edit their files and then switch to that terminal window to run 'make' for example to build the project, 'gdb' for debugging for example, etc. This is will make it an ALL IN ONE editor yet still so simple.
I can try to work on it on my free time as it helps me a lot edit and compile code in remote machines (microcontrollers and embedded systems) without need to have multiple ssh sessions or need to use tmux.
I tried git clone
and gh repo clone magiblot/turbo
, none of them work. I constantly get credentials error which is weird as this repository suppose to be read-only public repo, isn't it?
example for git
:
$ git clone --recursive https://github.com/magiblot/turbo.git
Cloning into 'turbo'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
example for gh
:
$ gh repo clone magiblot/turbo
Cloning into 'turbo'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
exit status 128
Very nice job. I have been using SciTE for a long time, I am tired of vi/vim, I refused to learn emacs a long time ago, and I tried textadept curses but it can't handle shift-arrow if you are not it a terminal emulator. Turbo really brings back memories... I have not tried everything but I can't seem to get replace to work. Ctrl+R does nothing and selecting it from the Edit menu also does nothing - the menu doesn't even close. I am running on the latest Arch linux. Other color schemes would be nice. I was going to try and experiment with the code but I figured I'd break something. Thanks for your efforts.
Tested the new improved clipboard support (great job, thanks!). Noticed that in the far2l extension mode, text selection with the shift+arrow_keys works under far2l, but does not work in putti4far2l. Can't figure out for now if the bug is in putty4far2l or in turbo.
Hello!
First of all I'm extremely excited with your revival of TurboVision! It's amazing that someone still remembers it!
I can't compile. I guess it's something related to C++ 17, but I'm not sure since I'm Ruby developer not C++.
Can you help me please?
chernish2@mintbox:/soft$ cd turbo//soft/turbo$ cd tvision/
chernish2@mintbox:
chernish2@mintbox:~/soft/turbo/tvision$ cmake .
CMake Error at CMakeLists.txt:2 (cmake_policy):
Policy "CMP0091" is not known to this version of CMake.
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring incomplete, errors occurred!
See also "/home/chernish2/soft/turbo/tvision/CMakeFiles/CMakeOutput.log".
Please add support to follow those so Turbo does not expand to full terminal space when it is not wanted
( sidenote: can help to solve #12 in a very simple way as demonstrated with another editor here https://pix.mathieui.net/o/kZTPc.png, even more powerfull when using VT420 with configurables margins for drawing children with their own scrolling zones )
Scrolling down using mouse wheel in far2l extensions mode actually does scrolling up.
add support for X11 clipboard interaction using xclip tool
https://linux.die.net/man/1/xclip
Sample attached.
How to reproduce?
I got the following error building turbo for x86_64-w64-mingw32. I'm cross-compiling from Arch Linux using a fresh install.
In file included from /tmp/turbo/src/tpath.cc:2,
from /tmp/turbo/build/CMakeFiles/turbo-ui.dir/Unity/unity_1_cxx.cxx:7:
/usr/x86_64-w64-mingw32/include/tvision/compat/io.h:20:21: error: no include path in which to search for io.h
20 | #include_next <io.h>
| ^
If I comment out that line in compat/io.h
, it builds fine.
Hi @magiblot
turbo needs an icon.
When using putti4far2l, sometimes when exiting turbo, garbage appears in the bash command line. Like this:
./turbof2lAQANABwAIAAAAA0AAABr
Maybe some bug with disabling far2l extensions mode?
aabb.zip
Hi guys
I miss capitalize words function in this text editor.
I want tranform text like aa bb cc into Aa Bb Cc
I suggest ctrl + 3 keyboard shortcut in Settings.
Take a look at this demo:
aabb.cc
Hi, the latest binaries under Action / Builds are now expired. Any chance you could run the build again?
And thanks for the outstanding work! It's so good that I'm just advertising it to my little circle: https://letsdebug.it/post/28-turbo-editor/
I have a fedora33
[ 60%] Built target tvision
Scanning dependencies of target scintilla
[ 61%] Building CXX object CMakeFiles/scintilla.dir/Unity/unity_5_cxx.cxx.o
[ 61%] Building CXX object CMakeFiles/scintilla.dir/Unity/unity_4_cxx.cxx.o
[ 61%] Building CXX object CMakeFiles/scintilla.dir/Unity/unity_3_cxx.cxx.o
[ 62%] Building CXX object CMakeFiles/scintilla.dir/Unity/unity_2_cxx.cxx.o
In file included from /home/pavel/src/turbo/CMakeFiles/scintilla.dir/Unity/unity_2_cxx.cxx:10:
/home/pavel/src/turbo/scintilla/src/EditView.cxx: In member function ‘void Scintilla::EditView::DrawForeground(Scintilla::Surface*, const Scintilla::EditModel&, const Scintilla::ViewStyle&, const Scintilla::LineLayout*, Sci::Line, Scintilla::PRectangle, Scintilla::Range, Sci::Position, int, int, Scintilla::ColourOptional)’:
/home/pavel/src/turbo/scintilla/src/EditView.cxx:1770:13: warning: unused variable ‘drawWhitespaceBackground’ [-Wunused-variable]
1770 | const bool drawWhitespaceBackground = vsDraw.WhitespaceBackgroundDrawn() && !background.isSet;
| ^~~~~~~~~~~~~~~~~~~~~~~~
/home/pavel/src/turbo/scintilla/src/EditView.cxx:1774:19: warning: unused variable ‘indentWidth’ [-Wunused-variable]
1774 | const XYPOSITION indentWidth = model.pdoc->IndentSize() * vsDraw.spaceWidth;
| ^~~~~~~~~~~
In file included from /home/pavel/src/turbo/CMakeFiles/scintilla.dir/Unity/unity_2_cxx.cxx:10:
/home/pavel/src/turbo/scintilla/src/EditView.cxx: At global scope:
/home/pavel/src/turbo/scintilla/src/EditView.cxx:294:13: warning: ‘void DrawTabArrow(Scintilla::Surface*, Scintilla::PRectangle, int, const Scintilla::ViewStyle&)’ defined but not used [-Wunused-function]
294 | static void DrawTabArrow(Surface *surface, PRectangle rcTab, int ymid, const ViewStyle &vsDraw) {
| ^~~~~~~~~~~~
[ 62%] Building CXX object CMakeFiles/scintilla.dir/Unity/unity_1_cxx.cxx.o
[ 62%] Building CXX object CMakeFiles/scintilla.dir/Unity/unity_0_cxx.cxx.o
[ 63%] Linking CXX static library libscintilla.a
[ 63%] Built target scintilla
Scanning dependencies of target scilexers
/home/pavel/src/turbo/scintilla/lexers/LexDMIS.cxx: In member function ‘virtual void LexerDMIS::Lex(Sci_PositionU, Sci_Position, int, Scintilla::IDocument*)’:
/home/pavel/src/turbo/scintilla/lexers/LexDMIS.cxx:253:13: warning: ‘char* strncpy(char*, const char*, size_t)’ source argument is the same as destination [-Wrestrict]
253 | strncpy(tmpStr, this->UpperCase(tmpStr), (MAX_STR_LEN-1));
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 73%] Building CXX object CMakeFiles/scilexers.dir/scintilla/lexers/LexDataflex.cxx.o
[ 74%] Building CXX object CMakeFiles/scilexers.dir/scintilla/lexers/LexDiff.cxx.o
[ 74%] Building CXX object CMakeFiles/scilexers.dir/scintilla/lexers/LexECL.cxx.o
...or some text is being pasted with unnecessary spaces (this sample is copied from turbo's readme on github in firefox):
Building
First of all, you should clone this repository along its submodules with git clone --recursive.
Then, make sure the following dependencies are installed:
CMake.
A compiler supporting C++17.
libncursesw (note the 'w').
libfmt.
Hi @magiblot
how to jump to the end of file/end of line in Turbo?
in mac os big sur cpu usage ( when only open one cc file ) 100% cpu..
What can it be the reason?
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.