start new:
tmux
start new with session name:
tmux new -s myname
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:
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
#!/bin/sh | |
set -e | |
set -x | |
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3) | |
do | |
npm -g install "$package" | |
done |
# requires >= Bash 4.3 | |
# note: the prompt will not be updated if you use a custom PS1 which contains a newline character | |
set editing-mode vi | |
set keymap vi-command | |
set show-mode-in-prompt on | |
# if it's configured correctly, your prompt will be prefixed with a `+` while in insert mode and a `:` when in command mode. |
There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore
is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules
directory) as well as files that are generated (and regenerated) as artifacts of a build process.
All other files should be in your own global gitignore file:
.gitignore
in your home directory and add any filepath patterns you want to ignore.Note: The specific name and path you choose aren't important as long as you configure git to find it, as shown below. You could substitute
.config/git/ignore
for.gitignore
in your home directory, if you prefer.
"""Download Dash User Docsets and install them in Zeal""" | |
import configparser | |
import json | |
import tarfile | |
import urllib.request | |
from pathlib import Path | |
from sys import platform | |
import easygui |
" save all the completions | |
let s:completions = [] | |
function! asyncomni#omnifunc(findstart, base) | |
if a:findstart | |
let l:line_string = getline('.') | |
let l:line = line('.') | |
let l:col = col('.') | |
" locate start of the word | |
let l:start = l:col -1 |
if exists('g:loaded_qfsign') | |
finish | |
endif | |
let g:loaded_qfsign=1 | |
sign define QFErr texthl=QFErrMarker text=E | |
sign define QFWarn texthl=QFWarnMarker text=W | |
sign define QFInfo texthl=QFInfoMarker text=I | |
augroup qfsign |