Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way (or a plugin) to make Vim generate a code outline for CSS?

I was trying to install taglist (but I couldn't install ctags), but I realized that it doesn't support css, is there another way or plugin to perform this job?

PS: I checked the install file of ctags, but I couldn't find any steps which looked like an installation manual.

it just says:

Installation Notes
==================

For non-Unix platforms, simple makefiles are provided:

    descrip.mms   For VMS using either DEC C or VAX C
    mk_bc3.mak    For MSDOS using Borland C/C++ 3.x
    mk_bc5.mak    For Win32 using Borland C++ 5.5
    mk_djg.mak    For MSDOS using DJGPP Gnu GCC (better to follow Unix install)
    mk_manx.mak   For Amiga using Aztec/Manx C 5.0
    mk_mingw.mak  For Win32 using MinGW
    mk_mpw.mak    For Macintosh using MPW
    mk_mvc.mak    For Win32 using Microsoft Visual C++
    mk_os2.mak    For OS/2 using GCC (EMX)
    mk_qdos.mak   For QDOS using C68
    mk_riscos.mak For RISC OS using the GCC SDK <http://hard-mofo.dsvr.net>
    mk_sas.mak    For Amiga using SAS/C

There's a complited ctag.exe. What I'm suppose to do with that?

like image 743
alexchenco Avatar asked Jan 25 '10 13:01

alexchenco


People also ask

Is vim good for HTML and CSS?

In fact, it can make writing HTML and CSS a much more enjoyable experience. The VIM is free and open source, and you should be familiar with VIM plugins. To follow this tutorial, I will be using vim-plug as my plugin manager of choice, just as I do in my personal work.

Does vim support HTML?

Emmet is an amazing tool for high-speed coding and editing, it allows you to create complex HTML structures with one line of code.

Does Vim have plugins?

Vim is a widely used terminal editor in the Linux world and like many other Linux applications, it runs on Unix, Windows, and macOS too. One of the things people love most about Vim is that it is highly customizable and extensible via plugins.

Where are vim plugins located?

Install plugins manually (Vim 8 and above) A Vim package is a directory containing one or more plugins. By default, your Vim settings are contained in ~/. vim, so that's where Vim looks for plugins when you launch it.


1 Answers

To expand Conspicuous Compiler's good suggestion, you can try this (I do it often):

:set foldmethod=marker
:set foldmarker={,}

which, assuming your definitions are in this form:

#topbar {
    ....
}

automatically gives a view like this:

+--  5 lines: body -----------------------
+-- 12 lines: #topbar --------------------
+--  4 lines: #topbar input --------------
+--  4 lines: #topbar li -----------------
....

i.e. one line per block, expandable on request.

like image 136
Matteo Riva Avatar answered Oct 06 '22 00:10

Matteo Riva