[TxMt] Re: End of screen

Andrea Crotti kerny404 at gmail.com
Fri Jan 16 21:53:57 UTC 2009


I tried to code something to solve this, it's not elegant at all and it
doesn't always work but it's a start

tot=$(wc -l $TM_FILEPATH)
tot=$(echo $tot | cut -d ' ' -f 1)
echo $tot, $TM_LINE_NUMBER
if [ $tot == $((TM_LINE_NUMBER - 1)) ]
  # we are at the end of the file
then
 	ruby -e 'puts "\n"*30'
fi

If appears that we are at the end of the file it print 30
newlines.
The problems are:
- sometimes (wc -l) executed in this way gives me a wrong
result (don't understand why)
- the caret goes to the last line

When this will be solved for me it will be fine...
Maybe would be better to use macros?
-- 
View this message in context: http://www.nabble.com/End-of-screen-tp21319865p21509238.html
Sent from the textmate users mailing list archive at Nabble.com.




More information about the textmate mailing list