Skip to content

Instantly share code, notes, and snippets.

@dmsul
dmsul / vim_crash_course.md
Last active May 31, 2025 12:37
Vim Crash Course

NOTE: Specific examples given for options, flags, commands variations, etc., are not comprehensive.

NORMAL MODE

Vim has 2 main "modes", that chance the behavior of all your keys. The default mode of Vim is Normal Mode and is mostly used for moving the cursor and navigating the current file.

Some important (or longer) commands begin with ":" and you will see the text you enter next at the bottom left of the screen.

:q[uit] - quit (the current window of) Vim. ("Window" here is internal to Vim, not if you have multiple OS-level windows of Vim open at once.)
:q! - force quit (if the current buffer has been changed since the last save)
:e[dit] {filename} - read file {filename} into a new buffer.

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@rnaffer
rnaffer / AsyncOperationsLikeSync.js
Last active October 27, 2015 17:22
Uso de nuevas características de javascript (ES6) para hacer operaciones asíncronas de forma estructurada.
// El uso de generadores aún no está estandarizado. 25/10/2015
// Requiere generators.js
// El asterisco '*' lo define como generador
// yield detiene el procedimiento hasta que pueda continuar
// Librerias: bluebird para frontend -usado en el ejemplo-, co para bakcend node.js, q para angular
Promise.coroutine(function* () {
var user = yield $.get('user.json');
// Do stuff with user