Hello,
I'm trying to enhance the Matlab bundle. Especially by trying to make
matlab and texmate to interact (shortcut to launch a script etc...).
And I must say I'm pretty bad with shell scripts and regular
expressions.
I've nevertheless managed to do that, and now I'm trying to recreate
matlab "cell mode" : matlab source files are scripts, and it is
possible to divide the script in "cells". When you are in the (awful)
matlab editor, you can run the current cell just with cmd+enter. This
is very useful. The problem is that the cell separator is just a line
like this :
%% Title of the new cell
...That's it, there is no ending marker for a cell : the current cell
ends where the new one starts ! What I've done now is creating a new
"cell" scope delimited by these lines, but as soon as one "%% ...."
line is used to mark the end of a scope, it can't be used to start the
following one.
Here's my descriptor.
contentName = 'meta.cell.matlab';
begin = '%%.*$\n';
end = '%%.*$\n';
captures = { 0 = { name = 'meta.celltitle.matlab'; }; };
patterns = (
# Here I include all the other scope descriptors, because they can
be contained in a cell !
)
For my solution to work, I then have to use two of these "%% ..."
lines, one to end the previous cell scope, and one to start the new
one. This means matlab files need to be modified to work, which is not
so good !
Do you have an idea on how to solve this problem ?
A linked problem (but less important) is that I can't get code folding
to work with cells : a start marker can't be the same as an end marker.
Thank you !
Hello,
When accessing various bundle features I get (LoadErrors).
This is on 10.3.9 using 1.5.7 (1436). On 10.4.9 same version, no errors.
First question, is this version 10.3.9 functional. I could not find anything in
the notes or on the site.
If this is not a 10.3 issue then these are the errors I have been receiving:
This is the Error I get issue php-help:
/Applications/TextMate.app/Contents/SharedSupport/Support/lib/web_preview.rb:1:in
`require': No such file to load -- erb (LoadError) from
/Applications/TextMate.app/Contents/SharedSupport/Support/lib/web_preview.rb:1
env: ruby -wKU: No such file or directory
I also the this error when issue html tidy:
env: ruby -wKU: No such file or directory
I get both the above from numerous commands.
I searched the thread, and based upon what I can find, I believe my environment
variables are correct.
One guess is an issue with this could be a result of an older Ruby install:
10.3.9 uses Ruby ver. 1.6.8; 10.4.9 uses 1.8.2.
One post referenced a ruby test:
feed these lines to Terminal do you see this output?
=====
$ /usr/bin/ruby -r erb -e 'p url_encode("a test")'
-e:1: undefined method `url_encode' for main:Object (NoMethodError)
$ /usr/bin/ruby -r cgi -e 'p CGI.escape("a test")'
"a+test"
my results:
$ /usr/bin/ruby -r erb -e 'p url_encode("a test")'
/usr/bin/ruby: No such file to load -- erb (LoadError)
But the suggestion confused me.
Suggestions?
Thank You,
dmp
Another example of something to avoid, aka things textMate really wasn't
designed for.
-- Open a large file (mine was > 7000 lines)
-- Select the entire file
-- Edit each line in selection
-- start typing.
This brought the computer to its knees.
My bad. Just thought y'all could have a laugh at my expense.
There are, of course, at least a dozen other ways to do what I started to
do: Filter through command, Command, Search and replace ( $ with
[replacement value]), etc
Tschuss,
Brad Tittle
Tech Support
I'm using git to keep different versions and branches of my projects
in repositories. Unfortunately, Project Plus does not properly
recognize files that git watches as well as the status of files that
it (correctly) recognizes as part of my git repository.
I am using `freely' managed projects, i. e. those you can create via
File > New Project and drag files into. I do not (want to) drag my
whole project folder onto the TextMate icon. If I do that, Project
Plus correctly labels the status of my files (part of repository or
not, modified or not modified). The problem is not just cosmetic, I've
discovered that files which Project Plus does not properly recognize
are not part of commits!
The solution is that you need to move the location of a file (e. g. by
reshuffling or so), then, apparently, Project Plus updates the
properties of all files.
Is this a known problem?
Max
Thanks, Allan, for both the replies.
> I?d argue that ?name? is meta data for the ?content? with the agreed
> upon convention that it uses a format like ??title?[.?type?]? ? a
> resource fork is just another piece of content meta data which is very
> fragile since it won?t survive a lot of the mechanisms used to
> transfer content (unlike the name), so there is little reason trying
> to split up the name into ?title? and ?type? and then store the ?type?
> in a new meta data field.
I agree completely about the resource fork. I'm afraid my comment was
confusing and it seemed like I longed for the days of resource forks
getting lost when you transferred files across platforms. (I'd be just
as happy to be rid of the extension.)
And I filed my first bug report with Apple.
> Make a column selection of the desired width (and with desired indent)
> then hit ?Q and TM will reflow the paragraph to be ?in a box?.
Doh! I knew that and had forgotten it. I feel like such a punk now.
(I'd still like to automate the process, but I want to try to do it
myself.)
Hello, how in TM when I have a few windows open can I get them into a
unified window with tabs? These are usually remote files opened over
ssh in Interarchy.
--
Scott * If you contact me off list replace talklists@ with scott@ *
I am starting to use cmd-Shift-R a lot more to run code through TM in
it's window. Very nice. For quick one off shell scripts I am finding
it invaluable.
I have a few issues. There are more times for me where I am working
in php and I want the output to be html'ized. I see a raw <br /> over
a rendered one. I end up putting in a lot of \n's and such to get
somewhat readable.
Is there any way to toggle the mode on how it deals with this?
Second is control-H, which I use a lot to get to docs in php, this is
suer handy, and I bet it uses webkit to do it's secret little deed.
However, One function may lead me to another, as there are links in
the window. But there is no back button. Is there any way to get
more standard browser buttons in this window? Or heck, I would be
happy to have it just use Safari.
The TM pop up seems to always be set to sort of work like
target="_blank" and spawn a new window, which clutters me up some, and
I end up with 20 windows hiding around. I would like control-h to
replace windows.
Thanks
--
Scott * If you contact me off list replace talklists@ with scott@ *
As the subject line begins: git from the Bundle menu works (as does
working from the CLI), but CTRL+SHIFT+G... gives me the following tool
tip pop-up:
/tmp/temp_testmate.AQcVtg:26:in `open': No such file or directory -
pages (Errno::ENOENT)
from /tmp/temp_testmate.AQcVtg:26:in `entries'
from /tmp/temp_testmate.AQcVtg:26
"AQcVtg" above is variable. Everything else remains the same.
The short version of my question is: what's wrong and how do I fix it?
TM has made me a lazy man, reliant upon keyboard shortcuts. Please
save me from using the pull-down menu.
john
#!/usr/bin/ruby -w
require "#{ENV['TM_SUPPORT_PATH']}/lib/setuplibs"
require 'svn_diff_directory'
require 'shellwords'
#require 'exit_codes'
def get_dirs()
dirs = []
if ENV['TM_SELECTED_FILES']
dirs = Shellwords.shellwords(ENV['TM_SELECTED_FILES']).delete_if
{ |file|
(! File.directory?(file)) or (! File.directory?(file+'/.svn'))
}
end
if dirs.empty? and ENV['TM_PROJECT_DIRECTORY']
dirs = [ENV['TM_PROJECT_DIRECTORY']].delete_if { |file|
(! File.directory?(file)) or (! File.directory?(file+'/.svn'))
}
end
if dirs.empty?
TextMate.exit_show_tool_tip "Neither the selected directories nor
the Project directory are versioned"
end
dirs
end
STDOUT.sync = true
dirs = get_dirs()
dirs.each() { |d|
Dir.chdir(d)
svn = ENV['TM_SVN']? ENV['TM_SVN']:'svn'
puts `#{svn} diff -r 1 .`
}
This script is supposed to generate a full svn diff for the currently
selected directory.
However, it generates no output.
I've set input to none, and output to new document
------------------------------------------------------
"Home is not where you are born, but where your heart finds peace" -
Tommy Nordgren, "The dying old crone"
tommy.nordgren(a)comhem.se
Hello all. I'm trying to figure out a way to write a command that will
take a selected block of soft-wrapped text, hard-wrap it to a given
length, and then indent a given number of spaces. I do a lot of
writing using Markdown, and I would like to find a way to make
bulleted lists more clearly marked as such while in plain text mode.
None of the current options under the TEXT menu do what I want. I
don't need the command to ask for the wrap length or the spaces to be
indented, I'm happy to adjust that within the command itself -- once I
get what I want, I won't fool with it for months if not years.
If someone could even point me in the right direction, I'd be happy to
try to hack at something on my own, but I honestly don't know where to
start.
john
--
John Laudun
laudun(a)louisiana.edu
http://johnlaudun.org/
Twitter/Facebook/Flickr: johnlaudun