Vim Fluency, Tmux Panes and iTerm
Learned some more vim and tmux over the weekend.
Vim
- Learned about folding in vim –
zf<motion>
to fold,zo
to open a fold.:help folding
will give more info. :NERDtree
allows me to navigate much easier.- ControlP bound to
ctrl-p
allows me to use Textmate style file find. - Since I have
set mouse=a
in my.vimrc
, copy and paste to the system clipboard no longer works the same. I can select with my mouse while holding down theopt
button and that will bring my regular copy back. However, this is not as useful since I have numbers in the gutter. Instead, I havectrl-c
bound to:w !pbcopy<Cr><Cr>
.
I’m able to use vim more fluently now.
iTerm
I turned off iTerm Preference General > Window > Use Lion-style Fullscreen windows because there is a delay due to the swiping animation when it has to switch desktop spaces. With it turned off, it’s real zippy.
tmux
Learned that you can detach a pane via <prefix> !
(prefix is ctrl-b
but I
bound it to ctrl-a
because I find the screen binding more convenient – ie
closer). The following is my ~/.tmux.conf
.
The first three lines allow my mouse and tmux to interact as you’d expect from
a GUI interface. The rest is just rebinding to be more like the unix screen
command – something I’m more familiar with.