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
  • 4 years ago
  • 2 hours ago
  • 8 years ago

Installs

  • Total 96K
  • Win 69K
  • OS X 21K
  • Linux 7K
Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7 Sep 6 Sep 5 Sep 4 Sep 3 Sep 2 Sep 1 Aug 31 Aug 30 Aug 29 Aug 28 Aug 27 Aug 26 Aug 25 Aug 24 Aug 23 Aug 22 Aug 21 Aug 20 Aug 19 Aug 18 Aug 17 Aug 16 Aug 15 Aug 14 Aug 13 Aug 12 Aug 11 Aug 10 Aug 9 Aug 8 Aug 7 Aug 6 Aug 5 Aug 4 Aug 3 Aug 2 Aug 1
Windows 34 29 27 25 28 21 36 23 25 26 43 38 39 42 34 24 25 36 29 32 19 26 18 21 26 35 22 38 25 24 33 25 32 39 29 24 20 27 32 45 30 41 20 26 38 39
OS X 6 0 2 7 2 9 15 2 5 4 3 3 5 8 4 3 5 9 4 1 1 4 2 4 6 3 4 3 5 4 5 5 4 2 2 4 1 4 5 5 9 8 2 4 2 6
Linux 0 3 0 1 0 4 2 0 0 1 2 2 3 5 2 1 2 3 2 1 5 1 1 1 1 2 1 1 2 1 1 3 5 4 2 3 0 3 5 0 1 1 2 1 2 2

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