Skip to content

Instantly share code, notes, and snippets.

@marnixk
Last active September 9, 2025 10:02
Show Gist options
  • Save marnixk/3559f043197e4201f684903f74a13ac6 to your computer and use it in GitHub Desktop.
Save marnixk/3559f043197e4201f684903f74a13ac6 to your computer and use it in GitHub Desktop.
Simple todo list syntax highlight for VIM
" --- matrixvimrc ---
" A minimal, distraction-free Vim configuration for 'zen' editing.
" --- CRITICAL COMPATIBILITY SETTING ---
set nocompatible
" --- Core Setup ---
set termguicolors
set backspace=indent,eol,start
" --- The 'Zen' Interface ---
set laststatus=0
" set noshowmode
set nonumber
set norelativenumber
set scrolloff=5
set tabstop=4
set shiftwidth=4
set autoindent
" --- Text Width and Visual Margin ---
" Enable auto-wrapping at 100 characters.
set textwidth=120
" --- THE FIX for the visual margin ---
" Instead of using the '+1' syntax, we programmatically generate a list
" of all columns from 101 to 1000 and tell Vim to highlight all of them.
" This is the most reliable way to create a shaded right-hand margin.
let &colorcolumn=join(range(&textwidth + 1, 1000), ',')
" --- The Color Scheme ---
highlight clear
if exists("syntax_on")
syntax reset
endif
" Base colors
"highlight Normal guifg=#b08dc3 guibg=#1a1a1a
highlight Normal guifg=#aaaaaa guibg=#1a1a1a
" The darker background for the area past the text width.
highlight ColorColumn guibg=#121212
" UI Element Colors
highlight Cursor guibg=#8dc3b0 guifg=#1a1a1a
highlight link CursorLine Normal
highlight Visual guibg=#2e4f4f
highlight Search guibg=yellow guifg=black
highlight NonText guifg=#b08dc3
" --- Custom Syntax Highlight for '#' lines ---
" Enable syntax highlighting first if it's not already.
" 1. Bright white bold for lines starting with '#'.
syntax match MyCommentLine "^#.*$"
highlight MyCommentLine guifg=white ctermfg=white gui=bold cterm=bold
syntax match MyInProgressTaskLine "\[-].*$"
highlight MyInProgressTaskLine guifg=#BCD963 ctermfg=yellow
syntax match MyCompleteTaskLine "\[x].*$"
highlight MyCompleteTaskLine guifg=#637E80 ctermfg=gray
syntax match MyTabLine "^\s*\[\s\].*$"
" green = #8dc3b0
" dark green = #3a6868
" purple = #b08dc3
highlight MyTabLine guifg=#8dc3b0 ctermfg=gray
syntax match MyDivider "^---*"
highlight MyDivider guifg=#333333 ctermfg=darkgrey
" ----- Jumping to files
nnoremap gf :rightbelow vsplit <cfile><CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment