vim qol
This commit is contained in:
		| @ -1,31 +1,30 @@ | ||||
| snippet base "tonitch's makefile base" b | ||||
|  | ||||
| .PHONY: all clean run | ||||
| VERSION = 0.0.1 | ||||
|  | ||||
| LIBS =  | ||||
| LIBS = $2 | ||||
| CMACRO = -DVERSION=\"$(VERSION)\" | ||||
|  | ||||
| CC = gcc | ||||
| CFLAGS = -g -Wall -Wextra -pedantic $(shell pkg-config $(LIBS) --cflags) $(CMACRO) | ||||
| LDFLAGS = $(shell pkg-config $(LIBS) --libs) | ||||
|  | ||||
| all: main | ||||
| all: ${1:${VISUAL:main}}  | ||||
|  | ||||
| main: main.o | ||||
| 	$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) | ||||
| $1: $1.o | ||||
| 	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) | ||||
|  | ||||
| %.o: %.c | ||||
| 	$(CC) $(CFLAGS) -c -o $@ $< | ||||
|  | ||||
| $0 | ||||
| clean:  | ||||
| 	rm -f *.o | ||||
| 	rm -f main | ||||
| 	rm -f $1  | ||||
|  | ||||
| bear: clean | ||||
| 	bear -- make | ||||
|  | ||||
| run: main | ||||
| run: $1  | ||||
| 	./$< | ||||
|  | ||||
| endsnippet | ||||
|  | ||||
| @ -27,7 +27,7 @@ function s:make(args) abort | ||||
| 		let cmd .= ' ' . a:args | ||||
| 	endif | ||||
|  | ||||
| 	let options = {'close_cb': function('s:make_callback'), 'term_rows': 16} | ||||
| 	let options = {'close_cb': function('s:make_callback'), 'term_rows': 8} | ||||
|  | ||||
| 	let s:make_buf = term_start(cmd, options) | ||||
| 	let s:making = 1 | ||||
|  | ||||
| @ -94,6 +94,7 @@ set nowrap | ||||
| set nu | ||||
| set rnu | ||||
| set shiftwidth=4 | ||||
| set scrolloff=10 | ||||
| set showcmd | ||||
| set spelllang+=fr | ||||
| set splitbelow splitright | ||||
|  | ||||
		Reference in New Issue
	
	Block a user