Skip to content

Instantly share code, notes, and snippets.

View hschlichter's full-sized avatar

Henrik Schlichter hschlichter

  • Denmark
View GitHub Profile

New Parens Indentation Option

So we have some issues with how we handle indentation and closing parens under certain weird cases. We shouldn't fix the current set of options to make it "work" with what we want. Instead we should create a new option that indents and closes parens with the wanted behavior. Then we enable the option in our configs separately.

The rules are as follows

Rule 1

While having open parens, doing line break will only result in 1 indentation per line break.

@hschlichter
hschlichter / Makefile
Last active August 23, 2016 09:03
Simple makefile for building C/C++ programs.
CC = clang++
CFLAGS = -std=c++14 -O0 -g -Wall -MMD
LDFLAGS =
INCLUDE = -I.
LDINCLUDE =
SRCS = main.cpp\
helper.cpp
OUTDIR = ./out
"\e[A": history-search-backward
"\e[B": history-search-forward
set show-all-if-ambiguous on
set completion-ignore-case on
@hschlichter
hschlichter / .bash_profile
Last active December 15, 2016 09:26
bash_profile that, for the current directory, shows the branch of the used git or mercurial repository.
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagacedj
export PATH="/usr/local/sbin:$PATH"
source /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-prompt.sh
hg_in_repo() {
hg branch 2> /dev/null | awk '{print "on "}'
}
version 6.0
if &cp | set nocp | endif
let s:cpo_save=&cpo
set cpo&vim
inoremap <D-BS>
inoremap <M-BS>
inoremap <M-Down> }
inoremap <D-Down> <C-End>
inoremap <M-Up> {
inoremap <D-Up> <C-Home>