klange / bim Goto Github PK
View Code? Open in Web Editor NEWExtensible, lightweight terminal text editor with syntax highlighting and plugin support.
License: ISC License
Extensible, lightweight terminal text editor with syntax highlighting and plugin support.
License: ISC License
Do you have any plan for below support:
There's technically nothing really stopping us from showing multiple views of the same open file, to allow for things like splits, but there's some rendering and mouse input handling to worry about. We'll probably want to disable scrolling, or look into supporting scroll regions in ToaruOS's terminal as well...
Some terminals happily accept 24-bit color escapes but render oddly. Some end up dumping the escapes to the screen - those ones in particular we should try to catch and default back to the ansi
theme.
This can also possibly be done for 256-color themes in a handful of places - all 16-color-only terminals should probably be forced to the ansi
theme or other future 16-color-only themes.
Hello, first of all I wanted to thank you for making such an amazing and lightweight editor.
I would like to suggest 2 things:
.asm
and .s
files. I would like to see intel syntax and I also think it would be easier to implement, but obviously that's up to you.relativenumbers=1
. For example in vim it's displayed like this, and I think it is more readable (of course you could just add an option to toggle justify):When too many buffers are open, the tab bar will be cut off. It should scroll horizontally to ensure the active buffer is visible, and also indicate when more tabs are available to the left or right off screen (as a line does).
Probably a set
command line in Vim.
Also, replacing the current bimrc format with a script containing commands would be a good way to unify things.
Currently, only the highlighting line is scrolled horizontally when it is too long. An option should be added to scroll the whole screen. Needs some checks whenever the coffset is changed to redraw other lines; needs global config option; needs changes to redraw_line to always use coffset when the flag is set.
"bce" - background color erase - is currently an expected feature and allows us to quickly fill the rest of a line with the current background color. Some terminals don't support it - tmux
in particular is known to not support bce. A nobce
option should be added which clears the rest of the line, but this requires some work in certain places where we clear to end without being fully aware of the cursor position.
Sometimes we have code like:
if (foo) { /* Do a thing */
bar();
}
We don't handle indentation for this correctly because we don't see that the previous line ended in a {
. We should backtrack through the comments (FLAG_COMMENT
) and whitespace to find the {
or :
.
Primarily an issue with mouse handling as it's the only place where the "width" of the tab is used. Should use wcswidth
, but need to convert first.
Currently, all of the syntax highlighters are in the main source file and they have a lot of duplicated code. Shared functionality (like "double quoted strings"
, /* comments */
, etc.) should be broken out into macros and the syntax files should be separate C sources.
Eventually, I would like to have syntax definitions as a series of matching scripts - possibly regex, but I need a regex compiler upstream in ToaruOS for that...
A number of fixes have been made to Bim 3 that should be applicable to pre-Kuroko codebase. It would be nice for users looking for a small "pure C" editor to have these bugfixes, several of which were crash fixes.
Some bim commands like tabs
and spaces
cause the status bar to be redrawn. However when using bim -c
or bim -C
and the ~/.bimrc
file contains these commands, this results in an incorrectly rendered status bar on the top of the output.
To reproduce use a .bimrc
file with the following contents and then print a file using bim -C
:
function onload:*
spaces
end
Commands should be registered functions with descriptions, perhaps in two sets (regular commands and prefix commands, to handle s/...
). The registered function list can be used for syntax highlighting.
Vim has a "VISUAL BLOCK" mode that would be nice to replicate - it's kind of a light version of multiple cursors as well.
Add syntax highlighting for Rust
Syntax highlighters and themes should be moved to separate shared objects to be used as dynamically-loaded plugins.
All key bindings should call functions that operate on the current state - changing modes, changing current environment, modifying lines, etc.
Bim being a single C source file is a legacy holdover from ToaruOS's build system. Bim (~6850) is the largest application in ToaruOS at over twice the LoC of the compositor (~2750), and as such stands as an outlier for the single-file build system. While Bim's large size is useful for dogfooding, it has become unruly to manage and navigate, and some elements such as syntax highlighters and themes offer clear opportunities to break things up.
.conf
).md
).proto
)l
extended type when file
isn't us.
or ->
Right now, modes like insert
work by normal
mode calling insert_mode()
and waiting for it to return. Let's rewrite the mode interactions and move all of their state into individual buffers so that we can have a centralized place for obtaining input and then calling the modes.
A handful of modes have submodes which will necessity a sort of "stack" of modes, such as when collecting a verbatim character.
I'm pretty sure these terminals support the scroll escapes, but maybe they require setting a region first.
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.