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

Installs

  • Total 92K
  • Win 65K
  • OS X 20K
  • Linux 6K
Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6 Mar 5 Mar 4 Mar 3 Mar 2 Mar 1 Feb 28 Feb 27 Feb 26 Feb 25 Feb 24 Feb 23 Feb 22 Feb 21 Feb 20 Feb 19 Feb 18 Feb 17 Feb 16 Feb 15 Feb 14 Feb 13 Feb 12 Feb 11 Feb 10 Feb 9 Feb 8 Feb 7
Windows 24 25 33 19 25 32 27 23 25 22 48 23 30 24 20 20 30 32 21 36 38 24 19 23 21 24 26 30 18 21 23 22 22 18 24 23 19 31 33 20 26 24 17 18 18 23
OS X 2 4 6 8 6 4 3 8 3 12 8 6 5 8 3 2 7 4 5 6 6 6 3 5 13 12 12 4 3 5 7 5 8 6 5 3 3 11 9 4 10 6 8 3 7 7
Linux 3 2 0 1 1 4 1 0 0 1 1 3 6 2 1 0 4 1 1 4 2 1 1 0 1 2 0 1 0 0 1 1 3 3 1 2 3 2 0 0 2 2 1 0 0 0

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