Skip to content

Instantly share code, notes, and snippets.

View andriihomiak's full-sized avatar
🇺🇦

Andrii Khomiak andriihomiak

🇺🇦
  • Ukraine
View GitHub Profile
@Samdal
Samdal / Makefile
Last active August 16, 2023 06:09
General purpose Makefile for C projects
# General purpose Makefile for C projects
# options
CC = gcc
DEBUGGER = gdb
LINKER = $(CC)
CFLAGS = -std=c99 -O0 -pthread
LFLAGS = -ldl -lm -lpthread
# directories
@romainl
romainl / vanilla-linter.md
Last active May 6, 2024 01:48
Linting your code, the vanilla way

Linting your code, the vanilla way

You may want a linter plugin to lint your code in Vim but you probably don't need it. At least try the built-in way before jumping on the plugin bandwagon.

Defining makeprg

autocmd FileType <filetype> setlocal makeprg=<external command>

This autocommand tells Vim to use <external command> when invoking :make % in a <filetype> buffer. You can add as many similar lines as needed for other languages.