3

I have just discovered that TeXShop should have this function, as described in section 1.16 Auto Completion of this manual. Now, by default I should have the autocompletion for ", which should be replaced by ``#SEL##INS#'', for ^ with ^{#SEL##INS#} and so on.

The rules for those substitutions are contained in the file autocompletion.plist in such a way:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">

<!--  
    Advanced users can change the default auto completions with this file. 

    The file format is very simple. Each entry is a pair. The first entry is the character
    to be modified. The second entry is the string which will replace it. If this string
    contains #SEL#, then this string should replace the current selection; otherwise it
    will be added to the current selection. If the string contains #INS#, then the cursor
    will be placed at this location.

    For example, the character ^ is replaced by ^{ } and the cursor is placed between
    these brackets using the pair

        <key>^</key>
        <string>^{#SEL##INS#}</string>

--> 


<dict>
    <key>"</key>
    <string>``#SEL##INS#''</string>
    <key>^</key>
    <string>^{#SEL##INS#}</string>
    <key>_</key>
    <string>_{#SEL##INS#}</string>
%... and so on %

The problem is that if i type ", ^, _ on the TeXShop editor I don't get the proper substitution, in fact I don't get an autocompletion at all. Does anyone knows why? And how do I fix this?

  • 1
    Do you have "Key Bindings" clicked in the Editor part of the Source panel of the TeXShop preferences? – Alan Munn Nov 12 '17 at 13:58
  • Ok, that solved the problem, I didn't know I would have had to activate it, thanks! – GiuTeX Nov 12 '17 at 13:59
  • 1
    I'll add an answer. – Alan Munn Nov 12 '17 at 14:00
3

In order to activate the command completion you need to make sure that the Key Bindings option is selected in the TeXShop preferences:

preference panel

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.