Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
#!/bin/bash | |
# Author: Rick Cogley | |
# Updated: 27 Jan 2016 | |
# Purpose: For use in a Mac OS X automator action, set to watch a screenshot folder. | |
# Assumes: | |
# GOPATH is set | |
# drive is installed (https://github.com/odeke-em/drive) | |
# there is a folder initialized with "drive init" | |
DRIVEINITPATH=$HOME/gdrive |
{ | |
"name": "RCC", | |
"version": "1.5.2", | |
"description": "Rick Cogley Central.", | |
"author": { | |
"name": "Rick Cogley", | |
"email": "[email protected]", | |
"url": "http://rick.cogley.info" | |
}, | |
"license": "MIT", |
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
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?)
#!/usr/bin/env python | |
# | |
# PoC: Manage a git repository in ~/.task that gets updated on changes. | |
# Only pending.data and completed.data are included by default. | |
# You can use "git add" to add whatever files you want to track in your | |
# task folder. | |
# | |
# Inspired by https://gist.github.com/Unode/9366218 | |
# | |
# Works with any Taskwarrior version that supports hooks. |
if [[ -o login ]]; then | |
if [ "$TERM" != "screen" -a "$ITERM_SHELL_INTEGRATION_INSTALLED" = "" ]; then | |
export ITERM_SHELL_INTEGRATION_INSTALLED=Yes | |
# Indicates start of command output. Runs just before command executes. | |
iterm2_before_cmd_executes() { | |
printf "\033]133;C;\007" | |
} | |
iterm2_set_user_var() { | |
printf "\033]1337;SetUserVar=%s=%s\007" "$1" $(printf "%s" "$2" | base64) |
" Keeping your lovely 'vimrc' INSIDE of your 'vim' directory is a good idea, | |
" if only because it makes it easier to move your config around. | |
" If you are using 7.4 exclusively, the following will be enough: | |
" | |
" on Unix-like systems ~/.vim/vimrc | |
" on Windows %userprofile%\vimfiles\vimrc | |
" If you use both 7.4 and an older version, or only an older version, | |
" the simplest, future-proof, solution is to put this line and only |
~/d/m/samples ❯❯❯ ./SimpleChatClient.py master ✱ | |
Host (ex: http://localhost:8008 ): https://vector.im | |
Username: rickcogley | |
Password: | |
Room ID/Alias: !QaRABAkxDBNukDoCOY:matrix.org | |
503: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> | |
<html><head> | |
<title>503 Service Temporarily Unavailable</title> | |
</head><body> | |
<h1>Service Temporarily Unavailable</h1> |
Matrix is:
an open standard for decentralised communication, providing simple HTTP APIs and open source reference implementations for securely distributing and persisting JSON over an open federation of servers.
It's pretty fantastic, if you think on the massive problem of fragmentation all across the web. They've created an easy to use API, and you can do a kludgy test using curl from the terminal (*nix
, mac, win). See: http://matrix.org/docs/howtos/client-server.html
It's pretty straightforward to do a quick test. I have an account at https://matrix.org / https://vector.im, so I used that to get a token.