Configs for Bash, Zsh, Vim, Tmux, and Git. Makes for an awesome, programmable development environment.
git clone https://github.com/samholman/dotfiles.git
cd dotfiles
git submodule update --init --recursive
./setup.shYour Git user details can be added to ~/.gitconfig.extra:
[user]
name = Your Name
email = you@yourdomain.com
You will (fairly obviously) need to install at least some of the following:
- Vim
- Tmux
- Tmuxinator
- Git
- Tig
- Ag (The Silver Searcher)
- Exuberant Ctags
- ESLint
- ESLint React Plugin
- Babel ESLint
- PHP Codesniffer
- PHP CS Fixer
Create a tmux profile by copying and modifying one of the files in .tmuxinator/.
You can then start said profile by running tmuxinator start <profile>.
The tmux prefix key is set to Ctrl+\. After pressing this:
- % creates a new vertical split
- " creates a horizontal split
- z zooms into the current pane (making it full screen)
- c creates a new "tab"
- <num> jumps to the numbered tab
- Ctrl+\ twice jumps between splits
Vim is set up with a few sane defaults for development (see .vimrc), and a few plugins are included:
- Fugitive for Git integration
- Ctrl+N toggles NERDtree (file browser pane)
- Ctrl+C toggles Tagbar (uses Ctags)
- Ctrl+P for fuzzy filename searching
- Syntastic for syntax checking (on save)
- Ultisnips for code auto-completion (tab to activate)
- Easy align to aid in aligning multi-line assignments, etc (highlight some lines in Visual mode, press Enter, then a character to align by - such as equals or colon)
- The key combo
\truns the current PHP or JS test file through an appropriate test runner (PHPUnit/Mocha), in a separate Tmux pane. \sruns a recursive search (usingag) for the word under your cursor and lists results in the quickfix panel.\cswill fix PHP codesniffer problems.\\jumps between split panes.\ztoggles "zoom" on the current pane (a bit like tmux).
Suggestions and improvements welcome via Github issues or Twitter.
-
The colours look weird! Make sure your term is set to use 256 colours. Usually
xterm-256color. -
So many words highlighted in Vim? That's probably the spelling/grammar checker which is set to en-GB by default. Use
[sand]sto jump between spelling errors and usez=to see suggestions. You can toggle it on and off with:set spell!.
