ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Page​Lines Snippets

by Tmeister ALL

Sublime Text Snippets for PageLines DMS

Details

  • 2013.09.09.02.44.12
  • github.​com
  • github.​com
  • 11 years ago
  • 1 hour ago
  • 11 years ago

Installs

  • Total 664
  • Win 452
  • Mac 152
  • Linux 60
Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

Sublime Text PageLines Snippets

This is a Sublime Text package which includes a bunch of handy snippets for develop for PageLines DMS by Enrique Chavez.

Installation

With Package Control

  • Bring up the Command Palette (Command+Shift+P on OS X, Control+Shift+P on Linux/Windows).
  • Select Package Control: Install Package.
  • Select PageLines Snippets to install.
  • That's it.

Without Package Control

This package is not yet in wbond's repository, so you gotta use Terminal and git to install it.

I'm using Sublime 3 and it works like a charm.

Mac OS

cd "~/Library/Application Support/Sublime Text 3/Packages"

Windows 7

cd "C:\Users\YOUR_USERNAME\AppData\Roaming\Sublime Text 3\Packages"

Inside Packages

git clone https://github.com/Tmeister/PageLinesSnippets.git "PageLinesSnippets"

Manually

  • Download the .zip file from the GitHub downloads modal
  • Unzip the files and rename the folder to “PageLinesSnippets”
  • Copy the folder to (~/Library/Application Support/Sublime Text 3/Packages) or (C:\Users\YOUR_USERNAME\AppData\Roaming\Sublime Text 3\Packages)
  • Sublime 2 copy the folder to your Sublime Text 2 user packagers directory (~/Library/Application Support/Sublime Text 2/Packages/User/)

Available Snippets

opt_button

${1:\$options}[] = array(
    'key'       => \$this->id.'_${2:key_name}',
    'type'      => 'select_button',
    'title'     => __('${3:title}','${4:domain}'),
);

opt_check

// CheckBox
${1:\$options}[] = array(
    'key'       => \$this->id.'_${2:key_name}',
    'type'      => 'check',
    'title'     => __('${3:title}','${4:domain}')
);

opt_color

// Color Picker
${1:\$options}[] = array(
    'key'       => \$this->id.'_${2:key_name}',
    'type'      => 'color',
    'title'     => __('${3:title}','${4:domain}'),
    'default'   => '#${5:FFFFFF}' // Always set a default value
);

opt_count

// Count Select
${1:\$options}[] = array(
    'key'          => \$this->id.'_${2:key_name}',
    'type'         => 'count_select',
    'title'        => __('${3:title}','${4:domain}'),
    'count_start'  => ${5:1},   // Starting Count Number
    'count_number' => ${6:10},  // Ending Count Number
    ${7:'suffix'       => '%'  // * Added to the end of the value and optional}
);

opt_check

// Icon Selector
${1:\$options}[] = array(
    'key'       => \$this->id.'_${2:key_name}',
    'type'      => 'select_icon',
    'title'     => __('${3:title}','${4:domain}')
);

opt_image

// Image Upload
${1:\$options}[] = array(
    'key'       => \$this->id.'_${2:key_name}',
    'type'      => 'image_upload',
    'title'     => __('${3:title}','${4:domain}'),
    'imgsize'   => '${5:16}',         // * The image preview 'max' size
    'sizelimit' => '${6:512000}',     // * Image upload max size default 512kb
);

opt_link

// Link
${1:\$options}[] = array(
    'key'       => \$this->id.'_${2:key_name}',
    'type'      => 'link',
    'title'     => __('${3:title}','${4:domain}'),
    'url'       => '${5:http://google.com}',
    'classes'   => '${6:btn-info}'  // You can also use btn-primary, btn-warning, btn-success, btn-inverse
);

opt_menu

// Select Menu
${1:\$options}[] = array(
    'key'       => \$this->id.'_${2:key_name}',
    'type'      => 'select_menu',
    'title'     => __('${3:title}','${4:domain}')
);

opt_multi

// Multi Select
${1:\$options}[] = array(
    'type'      => 'multi', // Here you can nest multiple options
    'title'     => __('${2:title}','${3:domain}'),
    'opts'      => array(
        array(
            ${4://Inner options}
        ),
        array(){
            // Another Option
        }
    )
);

opt_template

// Template
${1:\$options}[] = array(
    'span'      => 2
    'key'       => \$this->id.'_${2:key_name}',
    'type'      => 'template',
    'title'     => __('${3:title}','${4:domain}'),
    'template'  => ${5:\$template}
);

opt_text

// Text Field
${1:\$options}[] = array(
    'key'       => \$this->id.'_${2:key_name}',
    'type'      => 'text',
    'title'     => __('${3:title}','${4:domain}')
);

opt_textarea

// TextArea Field
${1:\$options}[] = array(
    'key'       => \$this->id.'_${2:key_name}',
    'type'      => 'textarea',
    'title'     => __('${3:title}','${4:domain}')
);