Skip to content

samholman/dotfiles

Repository files navigation

Sam's dotfiles

Configs for Bash, Zsh, Vim, Tmux, and Git. Makes for an awesome, programmable development environment.

Screenshot of dev environment

To set up:

git clone https://github.com/samholman/dotfiles.git
cd dotfiles
git submodule update --init --recursive
./setup.sh

Your Git user details can be added to ~/.gitconfig.extra:

[user]
    name = Your Name
    email = you@yourdomain.com

Additional software

You will (fairly obviously) need to install at least some of the following:

Basic usage

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)

Extra Vim shortcuts

  • The key combo \t runs the current PHP or JS test file through an appropriate test runner (PHPUnit/Mocha), in a separate Tmux pane.
  • \s runs a recursive search (using ag) for the word under your cursor and lists results in the quickfix panel.
  • \cs will fix PHP codesniffer problems.
  • \\ jumps between split panes.
  • \z toggles "zoom" on the current pane (a bit like tmux).

Feedback

Suggestions and improvements welcome via Github issues or Twitter.

Troubleshooting

  • 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 [s and ]s to jump between spelling errors and use z= to see suggestions. You can toggle it on and off with :set spell!.

About

Configs for Bash, Zsh, Vim, Tmux, and Git

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published