Code Monkey home page Code Monkey logo

bim's People

Contributors

klange avatar nexos-dev avatar nielsdos 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

bim's Issues

Implement viewports / splits

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...

Refuse to load 24-bit color themes in terminals we know they won't work in

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.

Assembly syntax and relative numbers justify

Hello, first of all I wanted to thank you for making such an amazing and lightweight editor.

I would like to suggest 2 things:

  • Assembly syntax for .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.
  • Justify the current line number to the left when 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):
    image

Tab bar does not handle overflow

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).

Add option to shift whole screen horizontally on long lines

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.

Support terminals without "bce"

"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.

Understand comments when autoindenting

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 :.

Restructure syntax highlighters

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...

Consider backporting fixes from Bim 3 to Bim 2.x

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.

bimrc can cause bim -C to print a misrendered status bar

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

Break out commands into functions

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.

Implement block selection mode

Vim has a "VISUAL BLOCK" mode that would be nice to replicate - it's kind of a light version of multiple cursors as well.

Break out source into multiple files

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.

Syntax hilighter support checklist

  • C/C++
  • Python
  • ToaruOS Esh
  • Make
  • bimrc
  • gitcommit, gitrebase
  • diff
  • rust
  • ToaruOS conf files (ini, .conf)
  • Java
  • XML
  • JSON
  • Bash/Unix sh
  • Markdown (.md)
  • HTML
  • Protobuf (.proto)

Ideas for Improving ctags Support

  • Parse the extended data from "format 2"
  • Exclude locals from other files - should be easy, just ignore stuff with the l extended type when file isn't us
  • Exclude locals from other functions - can we figure out what function we're in without too much parsing hassle?
  • Try to figure out types of struct objects so we can complete struct members after . or ->

Rewrite modes to not be function calls

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.

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.