Skip to content

Instantly share code, notes, and snippets.

View luis-reyes-a's full-sized avatar

Luis Reyes luis-reyes-a

View GitHub Profile
@luis-reyes-a
luis-reyes-a / dabbrev.py
Created May 22, 2023 14:22
sublime dabbrev expand like emacs
import sublime
import sublime_plugin
import re
resample_word_again = True;
next_option_index = 1;
options = [];
class dabbrev(sublime_plugin.TextCommand):
def run(self, edit):
/*
NOTE this doesn't really check if a specifier is entirely valid in order to highlight
for example if you have %lls we highlight it
we simply check each subspecifier in order to see if it seems valid and move on and don't have logic to see if
the subspecifiers are comptaible or not
we don't highlight if any of the subspecifier checks fail so if you do %.qd we don't highlight it
Also I commented out some checks that I wasn't sure if they were invalid in c++ but valid in C or ones that I just never use
Instructions
In 4coder_draw.cpp there a function draw_cpp_token_colors() that decides what color to draw tokens and draws them.
@luis-reyes-a
luis-reyes-a / word complete
Created August 15, 2020 23:18
word complete with token identifiers in outermost scope
internal b32
my_strings_match_so_far(String_Const_u8 a, String_Const_u8 b, u64 count)
{
b32 match = true;
if((a.size >= count) && (b.size >= count))
{
for(i32 i = 0; i < count; i += 1)
{
if(a.str[i] != b.str[i])
{
@luis-reyes-a
luis-reyes-a / puyo.c7
Created July 13, 2020 00:40
puyo puyo
(= puyo-board-size-x 6)
(= puyo-board-size-y 12)
(= title "puyo puyo")
;(= width puyo-board-size-x)
;(= height puyo-board-size-y)
(= width 35)
(= height 35)