Skip to content

Instantly share code, notes, and snippets.

View Bad-ptr's full-sized avatar

Constantin Kulikov Bad-ptr

View GitHub Profile
@Bad-ptr
Bad-ptr / go-mode-indentation-enhance-v1.el
Last active January 1, 2016 11:49
Trying to fix go-mode indentation issues.
(with-eval-after-load "go-mode"
(defconst go-dangling-operators-regexp "[^-]-\\|[^+]\\+\\|[/,*&><.=|^%]")
(defun go--find-indent-info-for-current-line (maxpoint)
(let ((start-pos (progn
(beginning-of-line)
(skip-chars-forward "\s\t")
(current-column)))
(start-type :start)
prev-start-pos prev-ending ending eq-l
@Bad-ptr
Bad-ptr / company-minibuffer.el
Last active May 2, 2020 11:14
Allow company-mode in minibuffer.
(with-eval-after-load "company-autoloads"
(global-company-mode 1)
(setq company-tooltip-limit 20
company-minimum-prefix-length 1
company-echo-delay 0
company-begin-commands '(self-insert-command
c-electric-lt-gt c-electric-colon
completion-separator-self-insert-command)
company-idle-delay 0.2
@Bad-ptr
Bad-ptr / startkillemacsd.sh
Last active December 29, 2015 06:19
start or kill emacs daemon
#!/bin/bash
# https://gist.github.com/Bad-ptr/7628186
DAEMON='server';
if [ -n "$1" ];
then
DAEMON="$1"
fi
@Bad-ptr
Bad-ptr / make_gitignore.sh
Last active December 19, 2015 23:59
Construct .gitignore file
#!/bin/bash
INCLUDE="Emacs vim Archives CVS SVN Mercurial Tags OSX Windows Linux C Go"
EXCLUDE="Bancha Objective-C"
if [ -d "./gitignore" ]; then
cd "./gitignore"
echo "-> git pull"