python --version
Python 3.x.x
, you have Python 3 installed. The second number should be 2 or higher.Download and extract zip from GH repo OR git clone https://github.com/balderekjk2/tailwind-in-vim.git
in desired directory.
Shell into that directory.
Copy and paste the following into your shell, then hit Enter:
python seed_tailwind_classes_table_at_lists_db.py && python tailwind_in_vim.py
You will only ever need to run this one time, so feel free to (re)move these scripts after execution.
Open up vim and type :Twref
aspect-auto, aspect-video, aspect-square, container, mx-auto, max-width, min-width, columns-1, columns-2, columns-3^@
usage: search_tailwind_classes.py [-h] [search_query] [num_matches] [{s,e,any,x}]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Search Tailwind class names in an SQLite database
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
positional arguments:
search_query search query string (default: empty string)
num_matches max number of matches to return (default: 10)
{s,e,any,x} match position: "s" (start), "e" (end), "any" (anywhere), "x" (exact)
optional arguments:
-h, --help show this help message and exit
~~~~~~~~~~
plug n play
~~~~~~~~~~
python twsearch.py "flex" 0 s
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- search for classes matching "flex" / no limit / that start with "flex"
- you will notice class "inline-flex" is excluded (does not start with "flex")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To see the help screen, in this directory run python search_tailwind_classes.py -h
or in vim :Twref -h