Skip to content

longtran2904/4coder

Repository files navigation

4coder_long

My personal 4coder custom layer (WIP)

image

This repository includes the built executable, so if you’re not interested in the source code, simply download the entire repo and run 4ed.exe.

If you only want my customization layer, copy the 4coder_long folder into your custom folder.
Then, you can either compile 4coder_long.cpp into custom_4coder.dll yourself, or simply run build.bat.

The code currently relies heavily on 4coder_fleury_lang and 4coder_fleury_index.
Removing this is on my roadmap — I’ve already modified most of these files anyway.

Features

For a detailed list of features, see 4coder_long.cpp.
Below are some of the most notable ones:

Custom Render Hook

By registering a custom rendering hook, we can begin customizing the rendering process.
(See Long_Render, Long_Render_Buffer, and Long_WholeScreenRender for more details).
For example, here’s my custom file bar design:

4coder_file_bar

Error Annotations

Highlights lines containing errors and displays the corresponding message at the end of the line:

image

Also works with .4coder files:

image

Digit Rendering

Alternate the color of every 3 decimal digits or 4 binary/hex digits for visual grouping, and highlight 8-digit numbers with a color based on their ARGB value.

image

Theme Lister

Smoothly switch between themes with long_theme_lister.

4coder_theme

The editor also automatically hot-reloads when a theme file is saved and refreshes its associated color table.
This is where the earlier hex coloring feature really shines:

4coder_theme_2

Whitespace Highlight

4coder_whitespace

Comment Styles

Here’s a preview of how different comment styles look:

image

Token Occurrences

Highlights all occurrences of the identifier under the cursor.
You can also easily move between them using long_move_up_token_occurrence and long_move_down_token_occurrence.

4coder_token_occurence

Point Stack

By tracking the cursor position before and after any jump-related command, you can jump back and forward using long_undo_jump and long_redo_jump.
Visualize the entire jump stack with long_point_lister.

4coder_jump_stack

Multi-Cursor

BYP's amazing 4coder_multi_cursor.cpp plugin.

4coder_multi_cursor

long_replace_in_range

4coder_replace_range

long_list_all_locations_xxx

4coder_list_locations

Code Index

Each loaded code file is parsed and indexed into a symbol table.
This enables advanced features like symbol lookup, code peeking, position-based tooltips, go-to definition, and definition search.

4coder_code_index.mp4

Lister

The new lister system includes several improvements over the default one:

  • better filtering (supports inclusive, exclusive, and tag-based searches)
  • cleaner UI design (displays the total count and current index)
  • only renders visible items
  • improved input handling (copy–paste, clear all, etc)
  • each item can include a header, a tooltip, and an optional preview (e.g, code peek for the index lister, docs for the command lister)
4coder_lister_short.mp4

About

My 4coder customization layer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published