Local docs using BASH
ri upcase # documents for upcase method
<!--- | |
Name: qbAPI.cfc | |
Author: Gernot Bartels | |
Description: Methods to interact with QuickBase | |
History: Migrated from CF8 to Railo 2010-04-02. | |
Created: 2009-03-25 | |
Updated: 2010-04-02 | |
---> | |
<cfcomponent output="false"> | |
<!--- Login ---> |
for (i = 1; i <= 20; i++) { | |
if (i % 3 === 0) { | |
if (i % 5 === 0) { | |
console.log("FizzBuzz"); | |
} else { | |
console.log("Fizz"); | |
} | |
} else if (i % 5 === 0) { | |
console.log("Buzz"); | |
} else { |
development: &defaults | |
adapter: postgresql | |
encoding: utf8 | |
database: surveys_development | |
pool: 5 | |
username: john | |
password: appleseed | |
test: &test | |
<<: *defaults |
function sieve(max) { | |
var D = [], primes = []; | |
for (var q=2; q<max; q++) { | |
if (D[q]) { | |
for (var i=0; i<D[q].length; i++) { | |
var p = D[q][i]; | |
if (D[p+q]) D[p+q].push(p); | |
else D[p+q]=[p]; | |
} | |
delete D[q]; |
Local docs using BASH
ri upcase # documents for upcase method
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?)