All Projects → qbbr → vim-symfony

qbbr / vim-symfony

Licence: other
Symfony Vim plugin

Programming Languages

Vim Script
2826 projects
Vim Snippet
174 projects

Projects that are alternatives of or similar to vim-symfony

miniSnip
Lightweight snippet plugin for Vim
Stars: ✭ 45 (+66.67%)
Mutual labels:  snippets
Tutorials
Repository for my YouTube tutorials + code snippets
Stars: ✭ 224 (+729.63%)
Mutual labels:  snippets
devs-codex
A repo of helpful front end development and design links
Stars: ✭ 16 (-40.74%)
Mutual labels:  snippets
zurb-ink-sublime-snippets
ZURB Ink Sublime Snippets
Stars: ✭ 25 (-7.41%)
Mutual labels:  snippets
atom-standardjs-snippets
⚡ A collection of JavaScript snippets for Atom, Standard Style
Stars: ✭ 47 (+74.07%)
Mutual labels:  snippets
VSCode-LaTeX-Inkscape
✍️ A way to integrate LaTeX, VS Code, and Inkscape in macOS
Stars: ✭ 62 (+129.63%)
Mutual labels:  snippets
vscode-gcode-syntax
G Code Language Extension for Visual Studio Code. Turn VSCode into a fully capable G-Code editor, including language support & more.
Stars: ✭ 59 (+118.52%)
Mutual labels:  snippets
interview-refresh-java-bigdata
a one-stop repo to lookup for code snippets of core java concepts, sql, data structures as well as big data. It also consists of interview questions asked in real-life.
Stars: ✭ 25 (-7.41%)
Mutual labels:  snippets
getx-snippets-intelliJ
An extension to accelerate the process of developing applications with flutter, aimed at everyone using the GetX package.
Stars: ✭ 52 (+92.59%)
Mutual labels:  snippets
language-mjml
Atom Editor package providing syntax support for MJML
Stars: ✭ 48 (+77.78%)
Mutual labels:  snippets
duck
Create command snippets for repetitive development task. Share them to an online repository system (self hosted options available).
Stars: ✭ 40 (+48.15%)
Mutual labels:  snippets
testcafe-snippets
Code snippets for TestCafe
Stars: ✭ 54 (+100%)
Mutual labels:  snippets
fixes
Random development problems and solutions
Stars: ✭ 38 (+40.74%)
Mutual labels:  snippets
material2-snippets
Visual studio extension & Intellij plugin for Angular Material 2, Teradata Covalent 1, Angular Flex layout 1 & Material icon snippets
Stars: ✭ 14 (-48.15%)
Mutual labels:  snippets
snippets
A Chrome extension that allows you to create and edit JavaScript code snippets, which are synced to all your computers
Stars: ✭ 46 (+70.37%)
Mutual labels:  snippets
vim-nayvy
🌑 Enriching python coding in Vim 🐍
Stars: ✭ 66 (+144.44%)
Mutual labels:  snippets
snippets
My code snippets
Stars: ✭ 29 (+7.41%)
Mutual labels:  snippets
simple-recaptcha-v3
🤖 This repository contains simple reCAPTCHA v3 integration for your Laravel application.
Stars: ✭ 25 (-7.41%)
Mutual labels:  snippets
friendly-snippets
Set of preconfigured snippets for different languages.
Stars: ✭ 824 (+2951.85%)
Mutual labels:  snippets
bits
Bits by Creative Tim - Code Snippets for easier coding
Stars: ✭ 142 (+425.93%)
Mutual labels:  snippets

Symfony Vim plugin

for SF2/3 see sf-2-3 branch

Autocomplete routes and services

<C-x><C-u>

Jumps

<leader>v

  • jump to controller from routes.yaml
  • jump to view (twig) from controller
  • jump to view (twig) from view (twig)

Examples

index:
    path: /
    controller: App\Controller\DefaultController::index
    # will be open: src/Controller/DefaultController.php and goto action line
class DefaultController extends Controller
{
    public function index()
    {
        // will be open: templates/default/index.html.twig
        return $this->render('default/index.html.twig', [ // cursor here and press <leader>v
            'controller_name' => 'IndexController',
        ]);
    }
}
{% extends 'base.html.twig' %}
{# will be open: templates/base.html.twig #}

Snippets

Annotations

  • @a - @Assert\
  • @o - @ORM\
  • @oc - @ORM\Column()
  • @oe - @ORM\Entity(repositoryClass="")
  • @og - @ORM\GeneratedValue(strategy="AUTO")
  • @oi - @ORM\Id
  • @olife - @ORM\HasLifecycleCallbacks()
  • @ot - @ORM\Table(name="")
  • @r - @Route("")
  • @rn - @Route("", name="")
  • @m - @Method("")
  • @t - @Template()
  • @pc - @ParamConverter("")

Use statements

  • usearray - use Doctrine\Common\Collections\ArrayCollection;
  • useassert - use Symfony\Component\Validator\Constraints as Assert;
  • usecache - use Sensio\Bundle\FrameworkExtraBundle\Configuration\Cache;
  • usecontroller - use Symfony\Bundle\FrameworkBundle\Controller\Controller;
  • usefile - use Symfony\Component\HttpFoundation\File\UploadedFile;
  • usemethod - use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
  • usenotfound - use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
  • useorm - use Doctrine\ORM\Mapping as ORM;
  • useparamconverter - use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
  • userequest - use Symfony\Component\HttpFoundation\Request;
  • useresponse - use Symfony\Component\HttpFoundation\Response;
  • usejsonresponse - use Symfony\Component\HttpFoundation\JsonResponse;
  • useroute - use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
  • usesecurity - use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
  • usetemplate - use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;

Controller

  • controller - controller skeleton class
  • dump, d - dump() function
  • get - $this->get('')
  • am - action method for controller
  • em - $em = $this->getDoctrine()->getManager();
  • notfound - throw $this->createNotFoundException('');
  • redirect - $this->redirectToRoute('');
  • repository - $this->getDoctrine()->getRepository('')

Form

  • form - form type skeleton class

Text Fields

  • texttype - use Symfony\Component\Form\Extension\Core\Type\TextType;
  • textareatype - use Symfony\Component\Form\Extension\Core\Type\TextareaType;
  • emailtype - use Symfony\Component\Form\Extension\Core\Type\EmailType;
  • integertype - use Symfony\Component\Form\Extension\Core\Type\IntegerType;
  • moneytype - use Symfony\Component\Form\Extension\Core\Type\MoneyType;
  • numbertype - use Symfony\Component\Form\Extension\Core\Type\NumberType;
  • passwordtype - use Symfony\Component\Form\Extension\Core\Type\PasswordType;
  • percenttype - use Symfony\Component\Form\Extension\Core\Type\PercentType;
  • searchtype - use Symfony\Component\Form\Extension\Core\Type\SearchType;
  • urltype - use Symfony\Component\Form\Extension\Core\Type\UrlType;
  • rangetype - use Symfony\Component\Form\Extension\Core\Type\RangeType;

Choice Fields

  • choicetype - use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
  • entitytype - use Symfony\Bridge\Doctrine\Form\Type\EntityType;
  • countrytype - use Symfony\Bridge\Doctrine\Form\Type\CountryType;
  • languagetype - use Symfony\Bridge\Doctrine\Form\Type\LanguageType;
  • localetype - use Symfony\Bridge\Doctrine\Form\Type\LocaleType;
  • timezonetype - use Symfony\Bridge\Doctrine\Form\Type\TimezoneType;
  • currencytype - use Symfony\Bridge\Doctrine\Form\Type\CurrencyType;

Date and Time Fields

  • datetype - use Symfony\Component\Form\Extension\Core\Type\DateType;
  • datetimetype - use Symfony\Component\Form\Extension\Core\Type\DateTimeType;
  • timetype - use Symfony\Component\Form\Extension\Core\Type\TimeType;
  • birthdaytype - use Symfony\Component\Form\Extension\Core\Type\BirthdayType;

Other Fields

  • checkboxtype - use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
  • filetype - use Symfony\Component\Form\Extension\Core\Type\FileType;
  • radiotype - use Symfony\Component\Form\Extension\Core\Type\RadioType;

Field Groups

  • collectiontype - use Symfony\Component\Form\Extension\Core\Type\CollectionType;
  • repeatedtype - use Symfony\Component\Form\Extension\Core\Type\RepeatedType;

Hidden Fields

  • hiddentype - use Symfony\Component\Form\Extension\Core\Type\HiddenType;

Buttons

  • buttontype - use Symfony\Component\Form\Extension\Core\Type\ButtonType;
  • resettype - use Symfony\Component\Form\Extension\Core\Type\ResetType;
  • submittype - use Symfony\Component\Form\Extension\Core\Type\SubmitType;

Base Fields

  • formtype - use Symfony\Component\Form\Extension\Core\Type\FormType;
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].