Skip to content

Instantly share code, notes, and snippets.

View valencik's full-sized avatar
🍍

Andrew Valencik valencik

🍍
View GitHub Profile
@valencik
valencik / README.md
Created September 25, 2015 22:21 — forked from anonymous/README.md
Quick Gist: The self replicating chrome extension
  • Download this gist as a zip and extract
  • Open chrome://extensions
  • Enable Developer mode
  • Click Load unpacked extension... and select the extracted folder
  • 💵 Profit 💵

Created by the SMU CS Society

#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static char * append (char *field, size_t *size, size_t *len, char c);
static size_t get_field (char **field, size_t *size, FILE *file);
static char const * strip_field (char *field, size_t len);
static bool end_of_file = false;

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

Answer by Jim Dennis on Stack Overflow question: what is your most productive shortcut?

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).