Why do we need a pattern ?
I prefer using patterns to have better organized and understandable codes for myself and other developers. It has some other features also, but i will not get into those.
How to create a pattern ?
This is a pattern of mine as an example.
How to apply pattern to editor ?
Before starting to write your code, simply insert your pattern and continue.