Skip to content

Instantly share code, notes, and snippets.

View al3xandru's full-sized avatar

Alex Popescu al3xandru

View GitHub Profile
Value: (keymap
(12 . company-complete-selection)
(11 . company-select-previous)
(10 . company-select-next)
(4 . company-show-doc-buffer)
(67108911 . company-search-candidates)
(backtab . spacemacs//company-complete-common-or-cycle-backward)
(S-tab . spacemacs//company-complete-common-or-cycle-backward)
(19 . company-search-candidates)
(23 . company-show-location)
(defun alpo/ispell-complete-word ()
(interactive)
(save-excursion
(ispell-complete-word))
(forward-word))
(evil-define-key 'insert markdown-mode-map (kbd "C-c C-d") 'alpo/ispell-complete-word)
@al3xandru
al3xandru / macvim.vim
Created March 19, 2016 09:54
MacVim auto-transparency
augroup VimTransparency
autocmd!
autocmd FocusGained * set transparency=0
autocmd FocusLost * set transparency=25
augroup END
@al3xandru
al3xandru / .spacemacs.el
Created March 18, 2016 19:02
Org-mode settings in Spacemacs
(with-eval-after-load 'org
(setq org-directory "~/Dropbox/Dox/active/"
org-default-notes-file "04-notes.org"
org-agenda-files '(org-default-notes-file))
(setq org-capture-templates
'(("l" "Log" item (file+datetree org-default-notes-file)
"+ [%<%H:%M>] %?")
("t" "Todo" entry (file+datetree org-default-notes-file)
"* TODO %?\n %U\n %i" :empty-lines 1)
("T" "Todo with clipboard" entry (file+datetree org-default-notes-file)
;;; markdown-edit-mode.el --- provide markdown-editing environment
(make-local-variable
(defvar markdown-prev-theme spacemacs--cur-theme))
(defcustom markdown-edit-mode-hook nil
"The hook to run when markdown-edit-mode is toggled."
:type 'hook)
(defcustom markdown-edit-theme 'leuven
"Theme to load for markdown environment."
(defun alpo/markdown-edit-mode ()
"Markdown writing optimized environment"
(interactive)
(unless (local-variable-p 'alpo/markdown-in-edit-mode (current-buffer))
(make-local-variable 'alpo/markdown-in-edit-mode)
(setq alpo/markdown-in-edit-mode 0)
(make-local-variable 'alpo/markdown-prev-theme)
(setq alpo/markdown-prev-theme spacemacs--cur-theme))
(message "alpo/markdown-in-edit-mode(1): %d" alpo/markdown-in-edit-mode)
(if (eq alpo/markdown-in-edit-mode 0)

Spacemacs layout and eyebrowse layers

The “layout” layer is quite confusing. It is basically meant to offer an option to isolate a set of buffers and configure a set of windows.

This is the workflow I have that seems to work for me (nb: I'm using most of the time projects in their own frame):

Creating:

All tests run LAN Speed Test with a 2GB file written to a NAS wired to the modem and connected to through AFP.
# Cat6 cable:
Write: 82.64Mbs
Read: 439.14Mbs
# Cat5e cable:
Write: 48Mbs
Read: 74.88Mbs
@al3xandru
al3xandru / spacemacs.md
Created January 31, 2016 18:02
How to do stuff in Spacemacs/Emacs
  1. Frame, Window, Buffer manipulation

    • open/close/navigate buffers
    • open/close/navigate windows
    • open/close/navigate frames
    • open/close/navigate tabs(?)
  2. Basic moves

    • next word, back word, end of word
    • next/prev sentence
  • next/prev paragraph
@al3xandru
al3xandru / preprocessor_fun.h
Last active September 13, 2015 06:52 — forked from aras-p/preprocessor_fun.h
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,