Skip to content

Conversation

@Simounet
Copy link

Use case:

<?php

class Test {
    private $var = false;
}

<leader>sg

Result before:

<?php

class Test {
    private $var = false;

    public function setVar ($var )
    {
        $this->var = $var;
    }

    public function getVar ()
    {
        return $this->var;
    }
}

Result after:

<?php

class Test {
    private $var = false;

    public function setVar($var)
    {
        $this->var = $var;
    }

    public function getVar()
    {
        return $this->var;
    }
}

@adoy
Copy link
Owner

adoy commented Jan 23, 2015

Hi, thanks for the patch wouldn't it be easier to just use

normal w"xye

instead of

normal w"xyw

@Simounet
Copy link
Author

Maybe, I'm sorry but I'm not a Vim plugin expert at all! If you think it could do the trick, be my gest! :D

@Simounet Simounet force-pushed the FIX/getters-setters-variable-trimed branch from ffb2306 to 2cc4a8a Compare January 27, 2015 08:31
@Simounet
Copy link
Author

Ok, I get what you want me to do and I did it.

adoy added a commit that referenced this pull request May 21, 2015
Variable trimed on setters/getters creation when default value set
@adoy adoy merged commit 96f0994 into adoy:master May 21, 2015
@adoy adoy self-assigned this May 21, 2015
@adoy adoy added the bug label May 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants