From 87283589c8530e91e4ad6dee87fd44fcd40c10d9 Mon Sep 17 00:00:00 2001 From: "Craig J. Ward" Date: Fri, 19 May 2017 16:57:30 -0500 Subject: [PATCH] Update README.md Thanks! This .vimrc looks great! Just fixed the markdown on the readme so that it's easier to read the keymappings and stuff --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 9ea59cc..5e66229 100644 --- a/README.md +++ b/README.md @@ -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. @@ -17,7 +17,7 @@ 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` @@ -25,16 +25,16 @@ Fonts are from [powerline/fonts](https://github.com/powerline/fonts). * `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 CTRL+p to bring up ctrlP and search tags. -###Fast saving +### Fast saving The configuration has a key map of CTRL+S 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: @@ -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. @@ -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 | | --- | --- | --- | | CTRL+s | Save | Normal | @@ -79,13 +79,13 @@ You can remove this package by deleting the Plugin from `.vimrc`, if not you wil | g,c,c | Toggle line commented | Normal, visual | | c,s | Surround: Click [here](https://github.com/tpope/vim-surround) for further information | Normal, visual | | ``,r | 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 ,s,n in your Blade template. I.e to create a new form type `newform` then \sn. 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 CTRL+d and to go to the previous tabstop hit CTRL+z -##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.