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

Goto-CSS-Declaration

by Razumenko Maksim ST2/ST3

Goto CSS declaration in an open *.css file

Details

  • 2016.02.08.10.03.21
  • github.​com
  • github.​com
  • 3 years ago
  • 10 minutes ago
  • 8 years ago

Installs

  • Total 95K
  • Win 68K
  • OS X 21K
  • Linux 7K
Jul 23 Jul 22 Jul 21 Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5 Jul 4 Jul 3 Jul 2 Jul 1 Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13 Jun 12 Jun 11 Jun 10 Jun 9 Jun 8
Windows 26 30 26 19 31 28 29 30 30 27 26 36 61 35 35 31 33 32 44 40 48 29 40 21 17 20 16 15 13 19 22 14 22 25 22 18 17 15 21 20 21 41 23 17 21 18
OS X 1 4 2 4 4 4 2 5 4 3 3 7 9 4 7 7 4 4 5 6 7 6 5 5 4 2 4 5 3 5 1 2 2 2 6 7 3 3 4 2 4 6 4 7 4 5
Linux 0 0 2 0 1 2 0 2 1 0 2 1 2 6 3 1 0 4 3 3 0 3 6 3 0 3 0 1 0 1 0 1 2 2 4 2 1 0 1 1 0 2 0 2 0 1

Readme

Source
raw.​githubusercontent.​com

Goto-CSS-Declaration

v0.3 - 99% refactoring

v0.2.1 - Fix empty view.file_name


Goto CSS declaration in an open *.css (.less, .sass, .other) file from other file (*.html, *.js, *.other_extantion)

Forum Thread http://www.sublimetext.com/forum/viewtopic.php?f=5&t=4397

Example

html:

<div id="box" class="box"></div>
                      ^
                      |-cursor

js:

$(".box").click(...);
     ^
     |-cursor

Pressing the key super+right or super+left go to the first CSS declaration of box (.class or #id => .box or #box), in this example the id #box

#box .box-shadow {
    background: url(../img/box.jpg);
    }
#box-shadow .box-shadow-1 {
    box-shadow: 0 0 5px #ff0;
    }
    .box__inner {
        box-shadow: 0 0 5px #f00;
        }

and if then press (in CSS file) super+right goes to the next CSS declaration of box, in this example the class .box-shadow, and next => #box-shadow, and next => .box-shadow-1, and next => .box__inner

also you can press (in CSS file) super+left and goes to the previous CSS declaration of box.

goto_css_declaration.sublime-settings

{
    "css_files": [".css", ".sass", ".less"]
}

Default (Linux).sublime-keymap

super + right
super + left

Default (Windows).sublime-keymap

super + .
super + ,

Copyright

Copyright © 2011 Razumenko Maksim razumenko.maksim@gmail.com

MIT License, see http://opensource.org/licenses/MIT