(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
import re | |
from django import template | |
from django.utils.functional import allow_lazy | |
from django.template.defaultfilters import stringfilter | |
from django.utils.safestring import mark_safe, SafeData | |
from django.utils.encoding import force_unicode | |
from django.utils.html import escape | |
from django.utils.text import normalize_newlines | |
register = template.Library() |
;;; https://lists.ourproject.org/pipermail/implementations-list/2012-February/001513.html | |
(add-to-list 'load-path "~/programmingStuff/evil/") | |
(require 'evil) | |
;; remove all keybindings from insert-state keymap | |
(setcdr evil-insert-state-map nil) | |
;; but [escape] should switch back to normal state | |
(define-key evil-insert-state-map [escape] 'evil-normal-state) | |
(define-key evil-insert-state-map (kbd "jk") 'evil-normal-state) | |
(define-key evil-insert-state-map (kbd "jj") 'insert-jay) |
I use tmux splits (panes). Inside one of these panes there's a Vim process, and it has its own splits (windows).
In Vim I have key bindings C-h/j/k/l
set to switch windows in the given direction. (Vim default mappings for windows switching are the same, but prefixed with C-W
.) I'd like to use the same keystrokes for switching tmux panes.
An extra goal that I've solved with a dirty hack is to toggle between last active panes with C-\
.
Here's how it should work:
" Cycle metasyntactic variables | |
function! s:CycleMetasyntacticVariables(num) | |
if type(a:num) != type(0) | |
return | |
endif | |
let vars = ['foo', 'bar', 'baz', 'qux', 'quux', 'corge', 'grault', 'garply', 'waldo', 'fred', 'plugh', 'xyzzy', 'thud'] | |
let cvar = expand('<cword>') | |
let i = index(vars, cvar) |
#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
var React = require('react'); | |
var assign = require('react/lib/Object.assign'); | |
var TrackerHeaderRow = React.createClass({ | |
render: function () { | |
var columns = this.props.columns.map(function (column) { | |
return ( | |
<th key={column.id}> | |
{column.title} | |
</th> |
/** | |
* Fancy ID generator that creates 20-character string identifiers with the following properties: | |
* | |
* 1. They're based on timestamp so that they sort *after* any existing ids. | |
* 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs. | |
* 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly). | |
* 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the | |
* latter ones will sort after the former ones. We do this by using the previous random bits | |
* but "incrementing" them by 1 (only in the case of a timestamp collision). | |
*/ |