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