Based on Mislav's gist and vim-tmux-navigator.
Since tmux hosts vim I disliked that I had to install a vim plugin for this. Instead I think it's cleaner to control vim from tmux.
My actual goal was to achive the following behaviour though (I have a default setup similar to the one Mislav shows in the gist. Two vertically split tmux panes, where the left one hosts vim, which has two vertically split windows):
- On the leftmost window in vim: when I hit
C-h(do not wrap to the rightmost tmux pane, but) zoom the left tmux pane. - On the rightmost tmux pane: when I hit
C-l(do not wrap to the leftmost tmux pane, but) zoom the right tmux pane. - All other navigation: work as given in Mislav's gist
| # this forces dpkg not to call sync() after package extraction and speeds up install | |
| RUN echo "force-unsafe-io" > /etc/dpkg/dpkg.cfg.d/02apt-speedup | |
| # we don't need and apt cache in a container | |
| RUN echo "Acquire::http {No-Cache=True;};" > /etc/apt/apt.conf.d/no-cache |
| # defining various components of the system | |
| # notice the classes know nothing about the container | |
| # as they require the dependencies to operate, they should be passed into the constructor | |
| class Nails | |
| def to_s | |
| "nails" | |
| end | |
| end | |
| class Glue |
Some scripts/configurations that greatly improve tmux/vim workflows. The shell scripts target zsh but should be adaptable without much effort for other unix shells.
Features:
- Transparently move between tmux panes and vim windows
- Using the shell, open files in one vim instance per project or directory
- Fully integrated copy/paste between tmux, vim and x11 using simple keybinds(need to install the xclip program)
- Easily send text to any tmux pane without breaking your edit workflow(needs slimux
'vim-tmux-move.zsh', '.vimrc' and '.tmux.conf' cooperate so you can move transparently between tmux panes and vim windows using ALT + (arrow keys or jkhl). It was based on this gist
| #!/usr/bin/env bash | |
| # Generates gource video (h.264) out of multiple repositories. | |
| # Pass the repositories in command line arguments. | |
| # Example: | |
| # <this.sh> /path/to/repo1 /path/to/repo2 | |
| i=0 | |
| for repo in $*; do | |
| # 1. Generate a Gource custom log files for each repo. This can be facilitated by the --output-custom-log FILE option of Gource as of 0.29: | |
| logfile="$(mktemp /tmp/gource.XXXXXX)" |
| #This is the "site config" for nginx | |
| upstream django { | |
| # Distribute requests to servers based on client IP. This keeps load | |
| # balancing fair but consistent per-client. In this instance we're | |
| # only using one uWGSI worker anyway. | |
| ip_hash; | |
| server unix:/tmp/uwsgi.sock; | |
| } | |
| server { |
| # | |
| # Put this in spec/support/ | |
| # Will use a sunspot stub session as default in all tests. | |
| # | |
| # To actually test the search you'll need something like: | |
| # describe "something", sunspot: true do | |
| # ...some tests... | |
| # end | |
| # | |
| # If you do this in your spec helper: |