Function | Shortcut |
---|---|
New Tab | ⌘ + T |
Close Tab or Window | ⌘ + W (same as many mac apps) |
Go to Tab | ⌘ + Number Key (ie: ⌘2 is 2nd tab) |
Go to Split Pane by Direction | ⌘ + Option + Arrow Key |
Cycle iTerm Windows | ⌘ + backtick (true of all mac apps and works with desktops/mission control) |
#!/bin/sh | |
# | |
# Setup a work space called `work` with two windows | |
# first window has 3 panes. | |
# The first pane set at 65%, split horizontally, set to api root and running vim | |
# pane 2 is split at 25% and running redis-server | |
# pane 3 is set to api root and bash prompt. | |
# note: `api` aliased to `cd ~/path/to/work` | |
# | |
session="work" |
@startuml | |
' uncomment the line below if you're using computer with a retina display | |
' skinparam dpi 300 | |
!define Table(name,desc) class name as "desc" << (T,#FFAAAA) >> | |
' we use bold for primary key | |
' green color for unique | |
' and underscore for not_null | |
!define primary_key(x) <b>x</b> | |
!define unique(x) <color:green>x</color> | |
!define not_null(x) <u>x</u> |
This is a list of custom pseudo-text objects for Vim.
Note the use of "pseudo", here. Conceptually, text object are "special" motions but there is no proper mechanism dedicated to creating text objects, specifically. We are left with the generic mechanism succinctly described under the easy-to-miss :help omap-info
.
Writing one's own pseudo-text objects and motions is a great way to extend Vim without perverting its nature ;-).
FOREWORDS
I don't mean the snippet at the bottom of this gist to be a generic plug-n-play solution to your search needs. It is very likely to not work for you or even break things, and it certainly is not as extensively tested and genericised as your regular third-party plugin.
My goal, here and in most of my posts, is to show how Vim's features can be leveraged to build your own high-level, low-maintenance, workflows without systematically jumping on the plugins bandwagon or twisting Vim's arm.
A modified version of Romain's gist.
See prior revisions for functionality closer to the original. This is now a simplification that aims only to provide prompts that would typically follow basic commands.
function! ExpandCommand(pattern) abort
let aliases =
\ { 'cn' : 'cnext'
You have turned on hlsearch
for some reason in your vim config (well
obviously to highlight your searches) but it gets in your way, right?
Now you try to find a solution to this problem, like
-
spam random searches
/klsdf<CR>
-
do
:nohl
command or
-- | |
-- Encodes/Decodes string in a string of binaries | |
-- | |
-- Each char is converted to a string with eight 0s or 1s | |
-- λ> encode "The darkside of the force is a pathway to many abilities some consider to be unnatural" | |
-- "0101010001101000011001010010000001100100011000010111001001101011011100110110100101100100011001010 | |
-- 01000000110111101100110001000000111010001101000011001010010000001100110011011110111001001100011011 | |
-- 00101001000000110100101110011001000000110000100100000011100000110000101110100011010000111011101100 |
{ | |
"title": "Command + Tab -> Mission Control", | |
"rules": [ | |
{ | |
"description": "Replace Command + Tab -> Mission Control", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "tab", |