On May 4, 2009, at 8:00 AM, textmate-request(a)lists.macromates.com wrote:
> Does the presence of "HTML.tmbundle" just mean that I made some
> customization to it, and removing it will restore TM to the default in
> that particular bundle? What do you suggest so I am using your new
> bundle, and the default TM one?
That's right. To get a clean version, just removing HTML and mHTML in
both folders (if you have one in both folders) and restarting should
do the trick.
> Looking at your bundle, looks nice, thank you.
> Take the <br /> for example, I made my own at some point in the past,
> using this:
> <br${TM_XHTML}>
>
> This allows the XHTML closing style to be preference defined, not hard
> coded in. What do you think about applying that to all applicable
> cases?
Sounds interesting, but to be honest, I do everything in XHTML, so I
probably won't spend the time to get the bundle to be both HTML/XHTML
ready... unless I go back to HTML for HTML 5, which is not impossible :)
> I see perhaps some left over testing items, there are "cite copy" and
> "code copy", not sure if those are intentional.
This is actually on purpose and is there to add a extra tab trigger
(as far as I know, you can't add to different tab triggers to a single
snippet...). The idea was that, although the bundle works by typing
the 3 first letter of an element for all tab triggers, I'm guessing,
for four letter words it might be more intuitive to be able to type
"code" than "cod" so both are available... hope that makes sense.
Thanks!
Hi guys,
I've updated my HTML bundle to be it's own bundle so it doesn't
overwrite the default's HTML bundle anymore. I also rewrote the
commands in Ruby to make it easier to read+ customized and improved
snippets. Info there:
http://minimaldesign.net/articles/read/textmate-html-bundle-v.1.5
Let me know if you manage to break anything ;) Or if you'd like to see
any additions...
PS: I'll be updating my CSS bundle to be its own bundle too, soon...
But there are so many snippets in that one, it'll take a little
longer...
Hi,
call it good or bad, I'm using soft tabs (spaces) for just about
everything. The shop I work in doesn't even allow tabs in (most) source
files. Soft tabs in TextMate work great – except that I really need hard
tabs (just like everyone else) in Makefiles. So, what I currently keep
doing is to copy&paste a tab character from some other place. I'd really
love to tell TextMate to use hard tabs for everything in scope of the
Makefile bundle, without changing my global setting. Is that possible?
(If yes, why is it not active in the Makefile bundle?) Will it be
possible in 2.0?
Christopher
Hello,
As matlab code can't get compiled, I'm assuming you talk about running
matlab code from textmate.
I implemented an integration between MATLAB and Textmate, which allows
to run a script or the current cell in matlab when you are in
textmate. It only works when matlab runs in the terminal, as there is
NO WAY to communicate with the matlab java/X11 GUI.
Because the terminal is quite awful to use in interactive mode (no
mouse, different shortcuts, no syntax highlighting, problem with long
lines), I'm working on a matlab console bundle too, which works in a
similar way as the R-Console Bundle. I can communicate with matlab
both ways now. It's possible send commands to matlab and receive
matlab's output.
I sent an email to Thomas to discuss the integration of this in the
matlab bundle, but he seems busy now.
If you want more information about what I did, want to try, or better
if you want to help with this project (I'm quite bad at ruby, shell
scripts and other needed languages), send me an email.
Pierre
When editing comments in TextMate, I frequently use the Reformat
Selection text routine to fix paragraphs who's lines have gone past 80
characters long (my Wrap Column). Unfortunately this has some
unexpected side-effects in Java, which along with nicely reformatting
my selected comments (respecting the *s in the beginning of the line
even!) adds redundant starting and ending comments: /* and */. Why
does this happen? What can I do to fix this?
To reproduce, select a few lines inside a javadoc-formatted Java
comment (/** * */), and hit ^Q.
Thanks,
--
Elliot
Hello all, I'm trying to make use of some external refactoring tools
for Haskell, and I've written the following script:
#!/usr/local/bin/ runghc
import System.Cmd
where
main = do
c <- getContents
system ("/Users/ian/.cabal/bin/pointfree \"" ++ c ++ "\"")
Here's the problem:
Whenever I try to run the script, the output I get says "interpreter
failed: Permission denied". Now, I'm pretty sure that the script
execution fails even without executing the local program pointfree.
Any ideas what I'm doing wrong?
-Ian Duncan
Hello,
I have read this page
http://blog.macromates.com/2005/handling-encodings-utf-8/ and I use
UTF8 wherever I can. But, sometimes I have to open czech text-files,
made on MS Windows (not made by me), that are, almost without
exception, in "Central European (Windows Latin)", or, Windows 1250 (
http://en.wikipedia.org/wiki/Windows-1250 ).
ISO-8859-1 is different from Windows-1250, some of the czech letters
appear weird - for example, http://en.wikipedia.org/wiki/Ø instead of
http://en.wikipedia.org/wiki/Ř
Right now, when I get file like that, I need to
1) open it in TextMate, only to find out I cannot open it
2) open TextEdit, open the file in TextEdit, re-save it in UTF8
3) open it in TextMate again, swearing on all sides
I personally find this procedure stupid and I would love to have the
opportunity to, at least, open the file in Windows-1250 and convert it
to UTF8 and not having to start another text editor.
Karel Bilek
Hi,
I recently opened one of my old Java files and remembered I used some
snippet to create a method and automatically create a header comment
and javadoc comment like this:
/**
* doSteps
*
* calculate n steps each lasting 0.005s
*
* @param steps number of steps each of which accounts for
0.005s
*/
public void doSteps(int steps) {
//do smth...;
}
I can't find this anywhere anymore. Can anyone help me out here? The
snippet automatically jumped to the return type, then the function
name (also inserting it at the top in the comment), then to the @param
thingy to enter text and finally to the function itself to write some
code. At least that's how I think it went. Might be that I idealize a
bit from bad memory :P
Does someone know of a snippet like this? I already searched the web
but couldn't find something. (Yeah I also searched the Javadoc
bundle... but it isn't there :( )
Maybe I was just dreaming of this snippet :(
Thanks,
Thomas Krajacic
Hi,
I'm sure that question must have been asked over and over, but I
couldn't find any similar question, so please forgive my ignorance.
I'm just wondering if there's any simple shortcut to navigate between
blocks. Suppose I'm in the middle of a big block, I want to go to the
end of it, or to the beginning. What's I'm currently doing is either
an F1 to fold the block, if I want to go outside (right after or right
before), but which is not ideal since I don't always want to actually
make the block invisible, or I use the Cmd-Shift-T to open the go to
symbol panel, then type Enter if I want to go to the beginning of the
block, or Down then Enter if I want to go to the end of the block. But
that's too many strikes.
Is there any direct shortcut for what I want - or how can I define
one? What are your habits on that topic? (I particularly use that when
writing LaTeX documents.)
Thanks,
enas
I think I got misunderstood by JiHo : I want to avoid the matlab GUI
as much as possible. The matlab-console I developed is an
implementation of the matlab console IN textmate.
For what I described I use a very similar command as JiHo, except that
I tend to use the cell mode (which Thomas added in the last version of
the bundle). And in this cases because the commands that are sent to
the terminal can be long, I use an temporary m-file (called cellrunner
in the following code).
I've came up with a better applescript thought, which is more robust
when you have several terminal windows or tabs running :
osascript<<END
tell application "Terminal"
set termwin to id of windows
set nwin to count of termwin
repeat with i from 1 to nwin
set ntab to number of tab of window i
repeat with j from 1 to ntab
set pr to processes of tab j of window i
set npr to count of pr
set runsmatlab to false
repeat with k from 1 to npr
set runsmatlab to "MATLAB" = item k of pr
end repeat
if runsmatlab then
set selected of tab j of window i to true
do script with command "cellrunner" in tab j of window i
end if
end repeat
end repeat
end tell
tell application "MATLAB" to activate
END
Pierre
Hi,
So I use Find in Project to search code and find various sources when
I've pulled down say.. a set of Java classes for an app. Once I find
a file I can click the file in the list of found items and it'll load
in the main window. But what I'd like is to also show that file in
the Project Drawer (since it's hidden somewhere in the hierarchy of
files).
Is this possible?
--
David Orriss Jr.
My blog: http://www.codethought.com/blog
Howdy!
How do I have to set up TextMate for using MATLAB? I have installed the MATLAB Bundle of Thomas Kjosmoen.
http://kjosmoen.org/matlab
Is it now possible to compile MATLAB code directly out of TextMate without opening the code in the MATLAB editor?
Thanks!
Hi
We all know TextMate doesn't have splitting windows. Do people who
want to have splitting windows just right-click the file to open a new
window?
I'd like to ask this question especially for hardcore TDD/BDD'er, who
develop on Rails. I know I can switch between the implementation file
and the test file with one key combination.
Anyway, I'm truly hoping that Allan is winning the ADC this year with
the upcoming version!
Takaaki
--
Takaaki Kato
http://samuraicoder.net
I just recently noticed that if I go to...File...New From Template, Ruby is
no longer present. How do I add it or other templates (such RSpec) into
this sub-menu?
Brad
I wrote a PHP Snippet that outputs some FirePHP-based debugging information.
fb(\$${1:variable}, '${2:function} \$${1:label}');
I would like to replace ${2:function} with something that
automatically puts in the current function or class::method (if
available);
I notice in the status bar at the bottom of the editor window (to the
right of the Tab Size), there is a "Symbol Popup" menu. So it seems
like the information I need is available. Is there a variable in
TextMate that I can slap into the snippet? A $TM_CURRENT_SYMBOL or
something?
Thanks for your help!
Regards,
Daniel Royer
Dear list,
after some initial discussion on the R-SIG-Mac-list I decided to send
my question to this list as well ...:
I encountered a problem in the combination of the SWeave and the LaTeX
bundle: when I start "Sweave, typeset & View", the .Rnw-file is
processed, but the log window shows "Error: PDF file not written to
disk" and the tex-file is not processed.
However, the sweaving was successful, as a valid .tex-file is in the
same folder which can be typesetted by latex without problem.
So, in general it works, I just want to avoid the extra step of
opening the .tex-file and would like to see my pdf directly opened
from SWeave-Bundle.
Some ideas already have been posted on the R-SIG-Mac-list, but they
didn't work for me:
http://article.gmane.org/gmane.comp.lang.r.mac/3953/match=sweave+pdf+file+n…
Did anyone encounter the same problem / any suggestions for solutions?
Best regards,
Felix
Hello. When TM is looking at a file that was opened as a result of a
3rd party ftp application, is there any way to get to the full url
path to the remote server?
In BBedit, I would see sftp://foo@example.com/example.com/files/some_place/test.php
I would like to be able to access that url above, in each file, in
order to make a bundle. The idea is, that if I can get to that, I can
parse it, and inspire TM to open a browser and run the current code I
am working on, at the correct url.
Currently, I have a comment line at the top of a file, which is read
and parsed, and then passed to open in a bundle, which will open in
Safari for me. It sort of works around some of the issues I have with
the refresh running browsers, as it only refreshes the one page.
I would love to be able to not have to write the comment url, and have
it be more automatic. The only path I can see to access in TM now, is
one that points back to a tmp location, which is local, and not remote.
--
Scott * If you contact me off list replace talklists@ with scott@ *
Recently I changed the keyboard shortcut for the Go To Fixture, Go To... etc
commands in the Ruby On Rails bundle.
I picked command-tilda as it's easy and not used by Text Mate.
Turns out Mac OS X uses it launch Front Row however.
At that point, those commands simply *disappeared* from the Ruby On Rails
bundle.
I've tried using the Bundles > Bundle Editor > Reload Bundles command but it
does not bring them back.
At this point, I'm considering:
# Deleting and reinstalling TextMate
# Manually recreating the missing commands, presumably by copy-pasting code
like this
(http://svn.textmate.org/trunk/Bundles/Ruby%20on%20Rails.tmbundle/Commands/G…)
into the Bundle Editor
Both seem doable but time-consuming and with no guarantee of success.
Any suggestions for a quicker fix?
Many thanks in advance,
Steven.
--
View this message in context: http://www.nabble.com/Restoring-a-Bundle-becausing-of-vanishing-commands-tp…
Sent from the textmate users mailing list archive at Nabble.com.
This is probably a stupid question, but how do I
revert/undo a change that I made to a Theme?
For example, I opened the Preferences menu, then went to
"Fonts and Colors", and messed around with shading, etc.
I clicked on "Selection", because I wanted to darken the color
of selected text. However, I did something to mess it up.
There's no "Cancel" button or "Undo" menu item, so what do
I do if I don't want to save my changes to the colors?
I suspect that the best idea would be to copy the color
theme before editing, but that seems sort of kludgy.
Thanks,
--Nate
I am having a new problem with a very simple thing that used to work:
>>> In TextMate, I have a test file test.rb
require 'rubygems'
require 'shoulda'
>>> After making sure that the textmate recognizes this as a Ruby source file, I do:
command-R
>>> I get this output:
LoadError: no such file to load — shoulda
method gem_original_require in custom_require.rb at line 27
method require in custom_require.rb at line 27
at top level in untitled.rb at line 2
copy output
Program exited with code #1 after 0.68 seconds.
>> Now, I go to the shell and do:
ruby test.rb
>> And it works like a champ. Checking environment:
$ echo $TM_RUBY
/opt/local/bin/ruby
$ which ruby
/opt/local/bin/ruby
$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.2
- RUBY VERSION: 1.8.7 (2008-08-11 patchlevel 72) [powerpc-darwin9]
- INSTALLATION DIRECTORY: /opt/local/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /opt/local/bin/ruby
- EXECUTABLE DIRECTORY: /opt/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- powerpc-darwin-9
- GEM PATHS:
- /opt/local/lib/ruby/gems/1.8
- /Users/pitosalas/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- :sources => ["http://gems.rubyforge.org/", "http://gems.github.com"]
- REMOTE SOURCES:
- http://gems.rubyforge.org/
- http://gems.github.com
>> You can see I suspect something with environment variables. I have been using Textmate this way forever without a problem. I am now logging into a new account on the same computer. I even re-installed TextMate.
I am stumped. I hope someone sees what I am missing :)
Thanks,
Pito
Hi,
I noticed a problem with non-antialiased "programming" fonts being rendered
in a strange way in my TextMate 1.5.8 (1498). Some letters will look wrong
and blend with neighbouring characters.
Example screenshot for Consolas (11pt) with highlighted problem zones, note
the distorted dot on the i and the blending e and {:
http://www.quicksnapper.com/ballaschk/image/consolas-11pt/
Example screenshot for Pragmata (11pt) with highlighted problem zones, note
the distorted "g", "w" and "s":
http://www.quicksnapper.com/ballaschk/image/pragmata-11pt/
Monaco looks great, but makes it too hard for me to differentiate between
certain characters:
http://www.quicksnapper.com/ballaschk/image/monaco-9pt
I did not test with Profont or other small-size optimized fonts, but will do
soon. Do you experience the same problems? Any hints how to correct it?
Cheers
Martin
--
View this message in context: http://www.nabble.com/Font-rendering-with-antialiasing-turned-off-tp2315196…
Sent from the textmate users mailing list archive at Nabble.com.
Every time I creates a tex file and compile it it generates me a bunch of
files (.aux etc etc) in the same directory.
Now I know that it's not a bundle's fault, doing it from the command line is
the same, but is there a way to make the pdflatex command put them somewhere
else (a tmp directory)?
--
View this message in context: http://www.nabble.com/Latex-bundle-and-too-many-files-tp23074031p23074031.h…
Sent from the textmate users mailing list archive at Nabble.com.
Thanks, Allan. Worked like a charm!
Regards,
Daniel Royer
On Thu, Apr 16, 2009 at 8:00 AM, Allan Odgaard wrote:
>> [...]
>> I notice in the status bar at the bottom of the editor window (to the
>> right of the Tab Size), there is a "Symbol Popup" menu. So it seems
>> like the information I need is available [...]
>
> It is not, but oft requested. The symbol in the status bar is not
> necessarily the ?current function?, it is just the first thing matched
> via some scope selector (optionally passed through some regexps) above
> the caret.
>
> What you can do is make a command that takes stdin as input and then
> do something like: SYMBOL=$(head -n$TM_LINE_NUMBER|grep ?function
> prototype regexp?|tail -n1). Have the command ?insert as snippet? and
> construct the snippet from the previous.
>
> I am adding an ?expose current symbol? to the to-do, since it seems a
> lot want this and don?t care that it might not be 100% correct (and
> whatever hand-roled solution they make is probably even less
> correct ;) ).
I have two Macs running TextMate 1.5.8. I have some personal bundles
that I want to keep in sync between the two machines. I tried this:
On machine A, modify a bundle and quit the Bundle Editor to save the
bundle.
On machine A, reopen the Bundle Editor and drag the bundle to my
Desktop.
On machine A, scp -r the bundle directory from my Desktop to machine
B, into my Desktop.
On machine B, double-click the bundle. TextMate says "do you want to
update?".
On machine B, I click "yes". It seems to work.
Yet the bundle on machine B doesn't have the changes that I made while
I was on machine A.
Any suggestions appreciated. Note that I have MobileMe, and would
love to cut down on the manual work that the above (unsuccessful)
approach requires.
-- Pete
Not sure if this is a bug or feature. I've found that the text
selection behavior upon double-clicking, then dragging, is way too
"greedy" of characters. Is this something that can be fixed, or
overrridden?
For instance, let's say you double click on the 'doQueryParams' in
this snippet of PHP:
doQueryParams($query, array() );
.... then drag to the right. Let's say that I want to select up to
and including the comma after "$query". Well, I can't - the selection
jumps to the end of "array".
Other editors like SubEthaEdit or TextEdit do what I would expect --
the non-alpha characters are selected individually, so I can select
the comma, the space, and then if I continue on it will select the
whole word 'array', then each parenthesis, etc.
Is it just me that's driven absolutely mad by this? It really slows
me down......
Dan
--
Dan Wood
Karelia Software — Sandvox for the Mac : http://www.karelia.com/
Follow me on Twitter: http://twitter.com/danwoodhttp://twitter.com/karelia
It is the habit of every aggressor nation to claim that it is acting
on the defensive. — Jawaharlal Nehru