lib/tex/context/contextsetup.rb
# Return a textual representation for a snippet that can be used
# by the TextMate text editor (see http://macromates.com/).
Return a textual representation for a snippet that can be used
by the TextMate text editor .
Return a textual representation for a snippet that can be used by the TextMate text editor .
def to_tm_snippet
      tmp = cmd_name(true) << " "
      counter=0
      @arguments.each_with_index do |arg,i|
        x = arg.optional? ? "${#{counter += 1}:#{arg.to_tm_snippet( counter += 1 )}}" : "#{arg.to_tm_snippet(counter += 1 )}"
        tmp << x
      end
      tmp = tmp.rstrip << "\n$#{counter + 1}"
      tmp << "\n\\stop#{sequence.cmd_name  }" if@environment
      tmp
    end
def to_tm_snippet tmp = cmd_name ( true ) << " " counter = 0 @arguments . each_with_index do | arg , i | x = arg . optional? ? "${#{counter += 1}:#{arg.to_tm_snippet( counter += 1 )}}" : "#{arg.to_tm_snippet(counter += 1 )}" tmp << x end tmp = tmp . rstrip << "\n$#{counter + 1}" tmp << "\n\\stop#{sequence.cmd_name  }" if @environment tmp end
Return a textual representation for a snippet that can be used
by the TextMate text editor (see http://macromates.com/).
Return a textual representation for a snippet that can be used by the TextMate text editor ( see http : // macromates . com / ) .