Difference between revisions of "Talk:TextMate"

From Wiki
Jump to navigation Jump to search
m (moved Talk:ConTeXt Bundle for TextMate to Talk:TextMate: More obvious page name)
 
(11 intermediate revisions by 3 users not shown)
Line 3: Line 3:
 
(so that the do not get lost before integrating them into the bundle) --[[User:Mojca Miklavec|Mojca]] 02:55, 28 January 2008 (CET)
 
(so that the do not get lost before integrating them into the bundle) --[[User:Mojca Miklavec|Mojca]] 02:55, 28 January 2008 (CET)
  
 +
== inclusions for lua (as for metafun) ==
 +
 +
== support more engines (--lua) and other preferences ==
 +
 +
See
 +
Bundles -> LaTeX -> Preferences
 +
or
 +
Latex.tmbundle/Support/bin/texMate.py
 +
(hmmm ... it even supports texexec :)
 +
 +
(check how LaTeX does different things through menus)
 +
 +
== implement metafun syntax & autocomplete ==
 +
 +
== autocomplete ==
 +
 +
Try
 +
<a[alt+esc]
 +
on HTML and implement the same for ConTeXt (try to figure out how to implement that with less ''S''-es).
 +
 +
== add texshow's help ==
 +
 +
Parse XML (or some other form) natively, without the need for web version (or both) and display html window.
 +
 +
== [opt+R] on projects ==
 +
 +
Any chance to compile the main file when the file starts with \component?
 +
 +
== scroll down in the log window automatically ==
 +
 +
(and blink or something if compilation fails)
 +
 +
Edit Commands/typeset.tmCommand to include
 +
<key>autoScrollOutput</key>
 +
<true/>
 +
 +
== add support for automatic open after [opt]+R ==
 +
 +
== add support for a different ConTeXt tree ==
  
== parse_texexec_output.rb ==
+
== document creation of autocomplete scripts ==
 +
 
 +
== weird tab completions ==
 +
 
 +
How does one use this one?
 +
<nowiki>\date ${1:[${2:...,...=...,...}]}[${3:...,...,...}]
 +
$4</nowiki>
 +
 
 +
Also, it would be nice to:
 +
* be able do completion as
 +
\definesomething
 +
    [...]
 +
    [...]
 +
* use sensible names instead of dots where possible (maybe misusing italic is possible)
 +
\externalfigure [file][...,...=...,...]
 +
* have the endings:
 +
\stopsomething
 +
 
 +
for example (cloned from HTML):
 +
 
 +
<nowiki>#!/usr/bin/env ruby
 +
 
 +
doc        = STDIN.read
 +
line      = ENV['TM_LINE_NUMBER'].to_i
 +
line_index = ENV['TM_LINE_INDEX'].to_i
 +
 
 +
if ENV.has_key? 'TM_INPUT_START_LINE' then
 +
  line      = ENV['TM_INPUT_START_LINE'].to_i
 +
  line_index = ENV['TM_INPUT_START_LINE_INDEX'].to_i
 +
end
 +
 
 +
before = /(.*\n){#{line-1}}.{#{line_index}}/.match(doc)[0]
 +
 
 +
#before.gsub!(/<[^>]+\/\s*>/i, '')
 +
 
 +
# remove all comments
 +
before.gsub!(/[%].*/, '')
 +
 
 +
stack = [ ]
 +
before.scan(/\\(start|stop)([a-zA-Z]+)/) do |m|
 +
  if m[0] == 'start' then
 +
    stack << m[1]
 +
  else
 +
    until stack.empty? do
 +
      close_tag = stack.pop
 +
      # print ">>#{close_tag}"
 +
      break if close_tag == m[1]
 +
    end
 +
  end
 +
end
 +
 
 +
if stack.empty? then
 +
  %x{ osascript -e beep &>/dev/null & }
 +
else
 +
  print "\\stop#{stack.pop}"
 +
end</nowiki>
 +
 
 +
== disable smart typing \& comments after backslash ==
 +
 
 +
clone from LaTeX bundle (maybe it could be simply inherited yrom TeX somehow?)
 +
 
 +
== more possibilities for tab-completion ==
 +
 
 +
when there are optional parameters, offer all of them for tab-completion and offer their descriptions (see how it's implemented in CSS)
 +
 
 +
= Unicode bundle =
 +
 
 +
* browse (by name/description/code) and insert unicode glyphs
 +
* help about the character under cursor
  
* remove
+
= Graphical =
<nowiki>str.gsub!("\n", "<br>")</nowiki>
 
* add
 
<nowiki>str = str.gsub(/^.*Insecure world writable dir.*?\n/, '')</nowiki>
 
  
*Replace
+
Is it possible to have a graphical menu with math symbols for example?
<nowiki>str = str.gsub(/(.*?):(\d+):(.*)/, "<a href='txmt://open?url=file://#{dir}/#{file}&line=\\2'>\\1:\\2:\\3</a>")</nowiki>
 
with
 
<nowiki>str = str.gsub(/(.*?):(\d+):(.*)/, "<a href='txmt://open?url=file://#{dir}/\\1&line=\\2'>\\1:\\2:\\3</a>")</nowiki>
 
else errors point to wrong locations in case of project structure.
 
  
 +
= Won't fix =
 +
(comments by [[User:Patrick Gundlach|Patrick]])
  
 
== refresh viewer ==
 
== refresh viewer ==
 +
Can't get this to work on my machine (tiger, power pc, german ui)
  
 
* http://www.macosxhints.com/article.php?story=20040314102550515&query=tell%2Bmenu%2Bbar%2B1
 
* http://www.macosxhints.com/article.php?story=20040314102550515&query=tell%2Bmenu%2Bbar%2B1
Line 46: Line 149:
 
   
 
   
 
  open -a ${PDF_VIEWER:=Preview} "${pdf}"
 
  open -a ${PDF_VIEWER:=Preview} "${pdf}"
 +
 +
= Fixed in 0.7 =
 +
 +
== parse_texexec_output.rb ==
 +
 +
* remove
 +
<nowiki>str.gsub!("\n", "<br>")</nowiki>
 +
* add
 +
<nowiki>str = str.gsub(/^.*Insecure world writable dir.*?\n/, '')</nowiki>
 +
 +
*Replace
 +
<nowiki>str = str.gsub(/(.*?):(\d+):(.*)/, "<a href='txmt://open?url=file://#{dir}/#{file}&line=\\2'>\\1:\\2:\\3</a>")</nowiki>
 +
with
 +
<nowiki>str = str.gsub(/(.*?):(\d+):(.*)/, "<a href='txmt://open?url=file://#{dir}/\\1&line=\\2'>\\1:\\2:\\3</a>")</nowiki>
 +
else errors point to wrong locations in case of project structure.
  
 
== $$ pairs ==
 
== $$ pairs ==
Line 69: Line 187:
  
 
== fix env[tab] ==
 
== fix env[tab] ==
 +
 +
<nowiki>\start${1:text}
 +
$0
 +
\stop${1/(\w*)(.*\n*)*/$1/}</nowiki>
  
 
== add itm[tab] ==
 
== add itm[tab] ==
Line 75: Line 197:
 
  \\item $0
 
  \\item $0
 
  \\stopitemize
 
  \\stopitemize
 
== inclusions for lua (as for metafun) ==
 
 
as well as support for --lua switch
 
 
== implement metafun syntax & autocomplete ==
 
 
== autocomplete ==
 
 
Try
 
<a[alt+esc]
 
on HTML and implement the same for ConTeXt (try to figure out how to implement that with less ''S''-es).
 
 
== add texshow's help ==
 
 
Parse XML (or some other form) natively, without the need for web version (or both) and display html window.
 
 
== [opt+R] on projects ==
 
 
Any chance to compile the main file when the file starts with \component?
 
 
== scroll down in the log window automatically ==
 
 
and blink or something if compilation fails
 
 
== add support for automatic open after [opt]+R ==
 
 
== add support for a different ConTeXt tree ==
 
 
== document creation of autocomplete scripts ==
 

Latest revision as of 18:35, 3 July 2012

Feature requests and fixes

(so that the do not get lost before integrating them into the bundle) --Mojca 02:55, 28 January 2008 (CET)

inclusions for lua (as for metafun)

support more engines (--lua) and other preferences

See

Bundles -> LaTeX -> Preferences

or

Latex.tmbundle/Support/bin/texMate.py

(hmmm ... it even supports texexec :)

(check how LaTeX does different things through menus)

implement metafun syntax & autocomplete

autocomplete

Try

<a[alt+esc]

on HTML and implement the same for ConTeXt (try to figure out how to implement that with less S-es).

add texshow's help

Parse XML (or some other form) natively, without the need for web version (or both) and display html window.

[opt+R] on projects

Any chance to compile the main file when the file starts with \component?

scroll down in the log window automatically

(and blink or something if compilation fails)

Edit Commands/typeset.tmCommand to include

<key>autoScrollOutput</key>
<true/>

add support for automatic open after [opt]+R

add support for a different ConTeXt tree

document creation of autocomplete scripts

weird tab completions

How does one use this one?

\date ${1:[${2:...,...=...,...}]}[${3:...,...,...}]
$4

Also, it would be nice to:

  • be able do completion as
\definesomething
    [...]
    [...]
  • use sensible names instead of dots where possible (maybe misusing italic is possible)
\externalfigure [file][...,...=...,...]
  • have the endings:
\stopsomething

for example (cloned from HTML):

#!/usr/bin/env ruby

doc        = STDIN.read
line       = ENV['TM_LINE_NUMBER'].to_i
line_index = ENV['TM_LINE_INDEX'].to_i

if ENV.has_key? 'TM_INPUT_START_LINE' then
  line       = ENV['TM_INPUT_START_LINE'].to_i
  line_index = ENV['TM_INPUT_START_LINE_INDEX'].to_i
end

before = /(.*\n){#{line-1}}.{#{line_index}}/.match(doc)[0]

#before.gsub!(/<[^>]+\/\s*>/i, '')

# remove all comments
before.gsub!(/[%].*/, '')

stack = [ ]
before.scan(/\\(start|stop)([a-zA-Z]+)/) do |m|
  if m[0] == 'start' then
    stack << m[1]
  else
    until stack.empty? do
      close_tag = stack.pop
      # print ">>#{close_tag}"
      break if close_tag == m[1]
    end
  end
end

if stack.empty? then
  %x{ osascript -e beep &>/dev/null & }
else
  print "\\stop#{stack.pop}"
end

disable smart typing \& comments after backslash

clone from LaTeX bundle (maybe it could be simply inherited yrom TeX somehow?)

more possibilities for tab-completion

when there are optional parameters, offer all of them for tab-completion and offer their descriptions (see how it's implemented in CSS)

Unicode bundle

  • browse (by name/description/code) and insert unicode glyphs
  • help about the character under cursor

Graphical

Is it possible to have a graphical menu with math symbols for example?

Won't fix

(comments by Patrick)

refresh viewer

Can't get this to work on my machine (tiger, power pc, german ui)

improve this code & import it into open link:

pdf=${TM_FILEPATH%tex}pdf

PDFFILE=echo "${pdf}" | sed -e 's/.[^.]*$/.pdf/'
PDFBASENAME=basename ${PDFFILE}

echo "
tell application \"System Events\"
 if exists process \"Preview\" then
 tell application \"Preview\" to activate
 tell process \"Preview\"
  tell menu bar 1
   repeat with currentItem in (every menu item of menu \"Window\" of menu bar item \"Window\" whose name contains \"${PDFBASENAME}\")
    click currentItem
    click menu item \"Close\" of menu \"File\" of menu bar item \"File\"
   end repeat
  end tell
 end tell
 end if
end tell
" | osascript
# open ${PDFFILE}

open -a ${PDF_VIEWER:=Preview} "${pdf}"

Fixed in 0.7

parse_texexec_output.rb

  • remove
str.gsub!("\n", "<br>")
  • add
str = str.gsub(/^.*Insecure world writable dir.*?\n/, '')
  • Replace
str = str.gsub(/(.*?):(\d+):(.*)/, "<a href='txmt://open?url=file://#{dir}/#{file}&line=\\2'>\\1:\\2:\\3</a>")

with

str = str.gsub(/(.*?):(\d+):(.*)/, "<a href='txmt://open?url=file://#{dir}/\\1&line=\\2'>\\1:\\2:\\3</a>")

else errors point to wrong locations in case of project structure.

$$ pairs

create a new P

{       highlightPairs = (
                ( '(', ')' ),
                ( '{', '}' ),
                ( '[', ']' ),
                ( '$', '$' ),
        );
        smartTypingPairs = (
                ( '"', '"' ),
                ( '(', ')' ),
                ( '{', '}' ),
                ( '[', ']' ),
                ( '$', '$' ),
        );
 # no idea what that is (copied from text)
        unIndentedLinePattern = '^\s*$';
 }

fix env[tab]

\start${1:text}
$0
\stop${1/(\w*)(.*\n*)*/$1/}

add itm[tab]

\\startitemize
\\item $0
\\stopitemize