I'd like to know how to write a *.cwl file for Kile (the LaTeX editor for KDE Debian 7.3) with a list of shortcut words, that I use often such as bcc= because, e--= electrons, h0= holes and so forth. I've read the Kile handbook but it isn't clear on what is the correct formatting.

  1. How do I write the cwl file?
  2. Where do I save it so that Kile sees it and accepts it?
  3. How do I call the different shortcuts while typing in Kile? Spacebar + smth...?

Is there a tutorial or a more detailed guide and examples? I'm looking for something equivalent to the "Macros" feature of TEXStudio.

EDIT: I think what I'm looking for are Abbreviations.


These are indeed abbreviations.

I did a quick search on my linux system and found example.cwl:

# abbreviation mode: example
# dani/8.1.2004
bab=babel package
bar=baselineskip rubber length
bdc=book document class
bi=bibliography styles
bip=bibliography style parameters
kile=KDE integrated LaTeX editor

I think the format is quite clear: you type the abbreviation followed by a = followed by the expanded item. Lines starting with # are used for comment.

You install such a file by specifying it in Settings > Configure Kile... > Complete > Abbreviation

You can also enable Abbreviation mode. In case the abbreviation should only be expanded occasionally, you hit Ctrl+Alt+Space after typing for instance bip.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.