warwick-vim

My dotfiles for VIM

MIT License

Stars
3

Warwick: Vim

My castle for VIM. The objective is to have an environment good for servers and my personal day to day use.

  • Focus on web development
  • No git submodules
  • Minimal dependencies and plugins
  • Fast startup time (~ 2 min on the 1st bootstrap, ~70ms startuptime after)
  • Easy and customizible bootstrap, make yourself at home with 1 command

Quick install, with homeshick and my dotfiles:

$ bash <(curl -L https://git.io/fNMTH)

You can customize my bootstrap script to include your own dotfiles, although you will be able to edit the castles which will be cloned during the installation.

Notable plugins

I use vim-plug to load plugins:

Mappings

I like to use some specific mappings on determined file extensions, ans also use the file type configuration to be sane given an environment:

  • Shell files, Go, XML and JavaScript default to tabs
  • PHP and Markdown default to spaces
  • Git commit messages wrap lines at 72 columns and checks spelling on English

My leader is mapped to \.

  • <leader>s: Searches for the word under cursor and puts it on a quickfix

Mappings: PHP

  • <leader>e: Displays all methods on a given class on a quickfix
  • <leader>l: Lints current file
  • <leader>d: Executes PHPUnit for current test file (uses Composer PHPUnit)
  • <leader>c: Checkstyle current file with PSR2 (uses Composer)

Mappings: Git

  • <leader>d: On the line containing a changed file, displays the diff
  • <leader>c: Over a hash, displays the content of it with git show (useful
    during rebases)

Mappings: JavaScript

  • <leader>l: Lints current file
  • <leader>d: Executes npm test for current test file