Commit 10aba260 authored by Einenlum's avatar Einenlum

Add abolish and PSR4 snippets

parent fb2f014b
......@@ -10,3 +10,4 @@ app/cache/*
app/logs/*
app/config/parameters.yml
behat.yml
.vimrc
......@@ -157,7 +157,7 @@ bar {
# Starts firefox
bindsym $mod+Shift+f exec firefox
# Starts chromium-browser
bindsym $mod+Shift+c exec chromium-browser
bindsym $mod+Shift+c exec google-chrome
# Starts thunderbird
bindsym $mod+Shift+h exec thunderbird
# xfce4-notify
......
snippet cpsr "PSR0 class"
snippet cpsr "PSR4 class"
<?php
namespace ${3:`!v substitute(substitute(expand("%:h"), '\v^\w+\/(\u)', '\1', ''), '\/', '\', 'g')`};
namespace `!v exists("g:psr_4_prefix") ? g:psr_4_prefix : ""`${3:`!v substitute(substitute(expand("%:h"), '\v^\w+\/(\u)', '\1', ''), '\/', '\', 'g')`};
class ${2:`!v expand('%:t:r', 'myClass')`}
{
......@@ -9,10 +9,10 @@ class ${2:`!v expand('%:t:r', 'myClass')`}
}
endsnippet
snippet ipsr "PSR0 class"
snippet ipsr "PSR4 interface"
<?php
namespace ${3:`!v substitute(substitute(expand("%:h"), '\v^\w+\/(\u)', '\1', ''), '\/', '\', 'g')`};
namespace `!v exists("g:psr_4_prefix") ? g:psr_4_prefix : ""`${3:`!v substitute(substitute(expand("%:h"), '\v^\w+\/(\u)', '\1', ''), '\/', '\', 'g')`};
interface ${2:`!v expand('%:t:r', 'myInterface')`}
{
......@@ -20,10 +20,10 @@ interface ${2:`!v expand('%:t:r', 'myInterface')`}
}
endsnippet
snippet tpsr "PSR0 class"
snippet tpsr "PSR4 trait"
<?php
namespace ${3:`!v substitute(substitute(expand("%:h"), '\v^\w+\/(\u)', '\1', ''), '\/', '\', 'g')`};
namespace `!v exists("g:psr_4_prefix") ? g:psr_4_prefix : ""`${3:`!v substitute(substitute(expand("%:h"), '\v^\w+\/(\u)', '\1', ''), '\/', '\', 'g')`};
trait ${2:`!v expand('%:t:r', 'myTrait')`}
{
......
......@@ -34,9 +34,12 @@ Bundle 'henrik/vim-yaml-flattener'
Bundle 'Yggdroot/indentLine'
Bundle 'joonty/vdebug'
Bundle 'scrooloose/nerdtree'
Bundle 'scrooloose/syntastic'
Bundle 'Rename'
Bundle 'editorconfig/editorconfig-vim'
Bundle 'Herzult/phpspec-vim.git'
Bundle 'karlbright/qfdo.vim'
Bundle 'tpope/vim-abolish'
" All of your Plugins must be added before the following line
call vundle#end() " required
......@@ -53,6 +56,7 @@ filetype plugin indent on " required
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
set exrc
set nocompatible
syntax enable
set hidden
......@@ -130,8 +134,9 @@ let g:ctrlp_working_path_mode = 0
" speed up Ctrl P
let g:ctrlp_cache_dir = $HOME . '/.cache/ctrlp'
if executable('ag')
let g:ctrlp_user_command = 'ag %s -l -U --nocolor -g ""'
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
endif
set grepprg=ag\ --nogroup\ --nocolor
" Ultisnips
let g:UltiSnipsExpandTrigger = '<tab>'
......@@ -271,6 +276,11 @@ map <C-c> <Esc>
ino <C-C> <Esc>
imap <C-C> <Esc>
" Change abolish coerce
nnoremap f <nop>
xnoremap f <nop>
nmap fc <Plug>Coerce
autocmd FileType php set keywordprg=~/.bin/phpdoc.sh
" Remove this f**king conceal of json quotes!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment