Sublime Forum

Best Tricks & Shortcuts for HTML & CSS

#1

Hi guys,

I am falling in love with Sublime and mainly use it for HTML and CSS editing.
As a newbie I would ask you guys for some general tips & tricks.

  1. Shorcuts: For a sublime-newbie like me: What keyboard HTML / CSS shortcuts would you recon me to take a look at? Which ones are your favourite?
  2. Add-Ons: What are your favourite addon-packages you would recon me to install?
  3. Autocomplete: I feel like either sublime does not do a good job at autocomplete for html or I simply don’t get it. Are there packages that do better autocompletion? I would love to have a dreamweaver-style project-based autocompletion for HTML Tags and CSS Tags (with less support if possible). What would you recon me to look at?

Thanks a lot for your tipps
Steven

0 Likes

#2

The **ZenCoding **plugin is highly recommended for both html and css :wink:. You can type

table#tbl>tr*3

and press Tab to obtain

[code]




[/code]

I’ve tackled JS and CSS completions previously, but HTML is much more of a conundrum. The order of attributes is immaterial and nearly all are optional: if all attributes are offered as fields then the user would spend more time deleting than “creating”. [Although it is possible to tailor the completions according to content… mmm]

Some might mention the Sublime **CodeIntel **plug-in - so I feel obliged to mention it - but it’s out-dated, poorly-maintained, and (perhaps) problematic (?).

Andy.

0 Likes

#3

Hi,
I also mainly use Sublime for html and css and here list of my favorite plugins:

  1. Package control
  2. zen coding
  3. Zen coding!! (with zen coding you dont need autocompletion at all)
  4. AutoFileName
  5. BracketHighlighter
  6. SideBarEnhancements
  7. ColorPicker
  8. Goto-CSS-Declaration
  9. zenburn color scheme
  10. StringEncode
0 Likes

#4

I can’t get zencoding to work. I installed it through package control and its listed as installed. Tab or ctrl-alt-enter don’t work. Is there another keyboard shortcut for zencoding?

0 Likes

#5

Be sure to close and re-open ST2 to make sure that it loads the new plugin. Sometimes it’s not necessary, but better safe than sorry. :smile:

0 Likes