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
  • 26 minutes ago
  • 7 years ago

Installs

  • Total 88K
  • Win 62K
  • OS X 19K
  • Linux 6K
Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7 Oct 6 Oct 5 Oct 4 Oct 3 Oct 2 Oct 1 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 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
Windows 3 20 19 16 17 39 33 29 26 12 14 19 39 25 31 43 18 15 22 22 29 20 20 17 14 23 18 26 15 21 15 22 12 27 23 34 32 18 21 24 32 33 40 71 13 24
OS X 2 5 3 5 5 4 5 6 4 4 5 9 14 2 8 6 11 8 4 4 10 7 1 5 6 4 10 3 5 6 3 8 4 2 9 6 12 6 4 9 5 9 8 10 5 4
Linux 0 5 0 3 2 2 1 0 1 1 0 1 2 2 2 0 0 3 2 1 3 0 1 0 4 0 3 3 1 1 1 0 2 1 2 1 0 1 1 1 1 3 3 0 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