Skip to content

Instantly share code, notes, and snippets.

View anfelor's full-sized avatar

Anton Felix Lorenzen anfelor

View GitHub Profile
@sdiehl
sdiehl / diehl_2019.md
Created March 17, 2020 10:50
2019 Reading List
  • Absolution Gap - Alastair Reynolds
  • Abundance - Peter H Diamandis
  • Advances in Active Portfolio Management - Richard Grinold
  • Advances in Unconventional Computing - Andrew Adamatzky
  • Creating Modern Capitalism - Thomas Mccraw
  • Exhalation - Ted Chiang
  • From Bacteria to Bach and Back - Daniel C. Dennett
  • Human Compatible - Russell Stuart
  • Look To Windward - Iain M. Banks
  • Lost in Math - Sabine Hossenfelder
Control.Arrow
=============
"compose/arr" forall f g .
(arr f) . (arr g) = arr (f . g)
"first/arr" forall f .
first (arr f) = arr (first f)
"second/arr" forall f .
second (arr f) = arr (second f)
"product/arr" forall f g .
arr f *** arr g = arr (f *** g)
@gmccreight
gmccreight / master.vim
Last active June 19, 2024 15:30
A script that gives you a playground for mastering vim
" copy all this into a vim buffer, save it, then...
" source the file by typing :so %
" Now the vim buffer acts like a specialized application for mastering vim
" There are two queues, Study and Known. Depending how confident you feel
" about the item you are currently learning, you can move it down several
" positions, all the way to the end of the Study queue, or to the Known
" queue.
" type ,, (that's comma comma)
@nifl
nifl / grok_vi.mdown
Created August 29, 2011 17:23
Your problem with Vim is that you don't grok vi.

Answer by Jim Dennis on Stack Overflow question http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118

Your problem with Vim is that you don't grok vi.

You mention cutting with yy and complain that you almost never want to cut whole lines. In fact programmers, editing source code, very often want to work on whole lines, ranges of lines and blocks of code. However, yy is only one of many way to yank text into the anonymous copy buffer (or "register" as it's called in vi).

The "Zen" of vi is that you're speaking a language. The initial y is a verb. The statement yy is a simple statement which is, essentially, an abbreviation for 0 y$:

0 go to the beginning of this line. y yank from here (up to where?)