Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Introduction
A vim configuration designed for PHP and optimised for Laravel.

##Installation
## Installation
This installation assumes running on an ubuntu system. However, changing the installation
steps for another OS shouldn't be too dificult.

Expand All @@ -17,24 +17,24 @@ steps for another OS shouldn't be too dificult.
Fonts must be installed on the target machine and if using an SSH client must also be installed on the host.
Fonts are from [powerline/fonts](https://github.com/powerline/fonts).

####Target Machine
#### Target Machine

* In the home directory run `git clone https://github.com/powerline/fonts.git`
* Now `cd fonts`
* Run `./install.sh`
* `fc-cache -vf ~/.fonts/`


####Host Machine
#### Host Machine
* [Click here](https://github.com/powerline/fonts/archive/master.zip) to download the fonts.
* In the downloaded directory follow your PC instructions to install *Sauce Code Powerline Regulat.otf*.
* In your SSH client select that as the font.

###Ctags
### Ctags
Some key mappings for ctags have been used. To install ctags run `sudo apt-get install exuberant-ctags`.
Then in your working directory run `ctags -R` to generate the ctags file. You can then hit <kbd>CTRL</kbd>+<kbd>p</kbd> to bring up ctrlP and search tags.

###Fast saving
### Fast saving
The configuration has a key map of <kbd>CTRL</kbd>+<kbd>S</kbd> to save a file, as is common in most text editors.
However, in most terminals this will freeze the terminal so some things must be added to your `.bashrc` file to stop this:

Expand All @@ -43,7 +43,7 @@ However, in most terminals this will freeze the terminal so some things must be
* Append `stty ixoff -ixon` to the bottom of the file.
* Exit vim.

###Codesniffer and Mess Detector
### Codesniffer and Mess Detector
The package uses PHP QA Tools to check for code errors. Custom Code Sniffer and Mess Detector rulesets have been included
that are complementary to Laravel. Ofcourse these can be easily customised and are defined in the *rulesets/* file.

Expand All @@ -54,12 +54,12 @@ To utilise PHP QA some prerequisites must be installed:
* `sudo pear channel-discover pear.phpmd.org`
* `sudo pear install phpmd/PHP_PMD-1.5.0`

###Omnicomplete
### Omnicomplete
The configuration uses phpcomplete-extended for additional omnicomplete settings.
The package is useful in retrieving omnicomplete data for composer (i.e Laravel) projects although is not neccesary with ctags.
You can remove this package by deleting the Plugin from `.vimrc`, if not you will be asked to scan the composer classmaps on initially starting vim.

##Key maps
## Key maps
| Key | Function | Mode |
| --- | --- | --- |
| <kbd>CTRL</kbd>+<kbd>s</kbd> | Save | Normal |
Expand All @@ -79,13 +79,13 @@ You can remove this package by deleting the Plugin from `.vimrc`, if not you wil
| <kbd>g</kbd>,<kbd>c</kbd>,<kbd>c</kbd> | Toggle line commented | Normal, visual |
| <kbd>c</kbd>,<kbd>s</kbd> | Surround: Click [here](https://github.com/tpope/vim-surround) for further information | Normal, visual |
| `<leader>`,<kbd>r</kbd> | Open PHP refactoring tools | Visual mode |
##Snippets
## Snippets
Some blade snippets have been included in the `.vim/UltiSnips` directory. To use them type in the name of the snippet followed by
<leader>,<kbd>s</kbd>,<kbd>n</kbd> in your Blade template. I.e to create a new form type `newform` then <kbd>\sn</kbd>.
Run `:help UltiSnips` to get more information on snippets.

Snippets contain tabstops to allow you to easily edit information in them. To jump to the next tabstop hit <kbd>CTRL</kbd>+<kbd>d</kbd> and
to go to the previous tabstop hit <kbd>CTRL</kbd>+<kbd>z</kbd>
##Configuration
###Leader
## Configuration
### Leader
The leader key is set to `\` and is used in many key mappings. To change this add the line `let mapleader=` followed by the key of choice.