.emacs
(setq inhibit-startup-screen t)
(setq-default indent-tabs-mode nil)
(tool-bar-mode 0)
(global-linum-mode 1)
(column-number-mode 1)
(show-paren-mode 1)
(electric-pair-mode 1)
(load-theme 'tsdh-dark)
(global-set-key [f10] 'shell)
(global-set-key [f9] 'hs-toggle-hiding)
(global-set-key [f5] '(lambda () (interactive) (compile "make -k")))
(add-hook 'c-mode-common-hook 'hs-minor-mode)
(add-hook 'c-initialization-hook '(lambda ()(define-key c-mode-base-map "\C-m" 'c-context-line-break)))
(add-hook 'c-initialization-hook '(lambda ()(define-key c-mode-base-map "\C-j" 'c-context-line-break)))
Makefile(放在代码文件夹下)
CPPFLAGS = -Wall -g -ftrapv -std=c++11 -m32
objects := $(patsubst %.cpp, %, $(wildcard *.cpp))
.PHONY : all clean
all: $(objects)
$(objects): %: %.cpp
clean:rm -f $(objects)