This repository contains my terminal config and plugins, mostly focused around zsh and vim. Most of this repository is pieced together from existing configurations and hard work by other programmers. Many thanks to those who released their scripts!
- Installs and configures
solarized
,zsh
,oh-my-zsh
- Syntax highlighting in
less
- Autocomplete in Python shell
- Shortcuts for
git
- Improved
~/.vimrc
key mappings - Packages the best Vim plugins:
ack
autopep8
closetag
coffee-script
ctrlp
django-support
easymotion
fswitch
fugitive
gitignore
gundo
hugefile
javascript
jedi
latex
less
matchit
nerdcommenter
nerdtree
powerline
rainbow-parentheses
seek
showmarks
signify
solarized
startify
supertab
surround
syntastic
tabman
tagbar
vimux
vimux-pyutils
yankstack
- Custom vim scripts: improved text-wrapping with
Q
, delete-trailing-whitespace, render pythonlambda
asλ
, other things I forget - Smart
ls
aftercd
: ifls
takes more than 1 second to respond, it is suppressed - More things I can't think of
These instructions are for Ubuntu, but they can be easily adapted for OSX. I
have term-tools
working on both OSX and Ubuntu.
-
Checkout term-tools:
cd $HOME; git clone git://github.com/seanbell/term-tools.git
If you want to install these elsewhere, you need to search the scripts for
~/term-tools
and change them to the new location (sorry). -
Install patched Ubuntu fonts for the
powerline
plugin. Openubuntu-font-family-0.80/
using the file manager, open each ofUbuntuMono-*-Powerline.ttf
and click install. -
Backup and delete (aka
mv
) your~/.zshrc
,~/.vimrc
,~/.gvimrc
,~/.vim
, and~/.tmux.conf
files if you have them. -
Install everything with
./install.sh
. You shouldn't need to run it withsudo
, though the script will make calls tosudo
internally. It will ask whether each component should be installed. Run with-f
to overwrite any existing config you may have. -
Make sure that this is added to the end of your
~/.bashrc
and~/.zshrc
:[[ -s ~/term-tools/config/shrc.sh ]] && source ~/term-tools/config/shrc.sh
-
Create a Gnome Terminal profile "solarized", run the installer (
installer.sh
) ingnome-terminal-colors-solarized
, and then make "solarized" the default Gnome Terminal profile. In that profile, make the fontUbuntu Mono for Powerline 13
. -
Suggested: remap caps lock to escape -- open "keyboard layout" from the Ubuntu menu (super key) choose "options..." then "Caps lock key behavior". Select "make caps lock an additional escape". This is probably the single best improvement I've done to my workflow.
If on a remote server, you can use this to more quickly run the installer:
wget --no-check-certificate https://raw.github.com/seanbell/term-tools/master/install.sh -O - | bash
This will clone the repository to ~/term-tools
and then run the installer
The Vim commands are detailed in ~/.vimrc
-
Typing is slow in large directories --
zsh-syntax-highlighting
looks at files in the current directory, so the whole terminal becomes slow ifls
is slow. If this is an issue for you, removezsh-syntax-highlighting
from the lineplugins=( ... )
in~/.zshrc
. -
The terminal uses the same keybindings as the
EDITOR
variable (defaults tovim
if not set). To use a different set of keybindings (e.g.emacs
inside the shell butvim
as theEDITOR
), add this to your~/.zshrc
and~/.bashrc
(must be before the line that sources~/term-tools/config/shrc.sh
):export EDITOR="vim" export TERM_EDITOR="emacs"
-
Editing Python hangs sometimes, since jedi is a little buggy. You can disable these features by entering paste mode (F2).
The installers/vim.sh
installer optionally installs vim from source on
Ubuntu. It uses checkinstall
which creates a fake Debian package to track
what was installed. To uninstall, run sudo dpkg -r vim
.