Friday, 15 August 2014

How to define a set of CSS class names so Vim knows how to autocomplete -


Broadly speaking, I am very happy the way Vim automatically completes the words for me. Currently, I have an HTML / CML / JavaScript / CSS framework, which styled one style for a defined set of CSS class names. Class names like

  frameworkgauatable frameworkers_groupInput FrameworkPitaptive   

that will use

  .framework_Table {}. .FramWork_NumberInput {} .framework_TextOutput {}   

The question is, how to / where will I tell these class names to auto-complete the VIM?

You can make full use of dictionary-based.

  1. Enter all your identifiers in a file, / say path / to /project/cssdict.txt .

    framework_tomet frameworkarm_inumber frameworkcast output
  2. In Vim, : Setlocal dictionary = / path / to / project / cssdict .txt .

  3. Hit & lt; C-x & gt; & Lt; C-k & gt;

    Read : help 'dictionary' and : help- compl-dictionary >.

No comments:

Post a Comment