I'd like to find and replace a variable inside of a document. How can
I do this? [VAR] Represents the variable:
Find: title="[VAR]"
Replace With: title="dummytext"
Text in Document I want it to affect:
title="Webmaill"
title="Control Panel"
title="Customer Service"
title="Web Hosting"
How can I do this in TextMate?
Also TextMate has no way to upload/browse SFTP/SSH/ or FTP? The price
is way to steep for an application that can't connect and upload the
edited files directly.
Please let me know your thoughts,
Best Regards,
Court Kizer
>> ------------------------
>> ONCE
>> (twice)
>> Three times a lady.
>> Not as much as the Gambler.
>> (This sucks)
>> How would you know?
>> ------------------------
>>
>> How do I match the 2nd line but not the 5th?
>> How do I match the 6th, but not he 3rd?
>
> What is different in each case? The presence of ONCE exactly in the
> line before?
>
> Indeed, I'm uncertain what the logic behind the matches is supposed
> to be. Is the second line matched because of the sequence of cardinal
> numbers, a parenthetical following a line of all capital letters, a
> parenthetical with only one word, a parenthetical with no capitalized
> letters, a parenthetical followed by a statement... and so on.
Yeah, sorry.
Matching the 2nd line (but not the 5th): I want to match any line
that begins and ends with a parenthetical ... ^\(.*\)$ ... but only
when the line is directly preceded by a line of all capitol letters,
Matching the 6th (but not the 3rd): Actually, I got this one
backwards. I want to match the 3rd but not the 6th. So... Any line
that is directly preceded by the match I described above.
----
I'll check out the IRC channel.
> [1] http://www.geocities.jp/kosako3/oniguruma/
I'll check it out.
Hi,
I already know that it is not possible by default to have a different
tab and indention size.
I'm new to TxMt so I want to ask if this is possible to achieve via
scripts / bundles ?
One example to show my need. I'm working in a Python projekt, where
the interpreter handles one tab as 8 chars. We use an indention of 4
chars.
My workaround at the moment: set Tabs to 8 convert all tabs to spaces
the set tabs to 4 soft spaces.
If somebody has hints, I'll work on it for myself.
Thx Jonatan
Hi,
It would be helpful if the language bundle editor had a pop-up hierarchical
menu of the standard name
Something like:
keyword
meta
string
support
variable -> other.
storage parameter.
string
So when writing a language syntax, and looking for names, you can just have
the insertion point in the right location, click on the pop up to see what
is appropriate, then either it inserts when you release the menu, or there
is an insert button beside it.
tim
____________________
---
"Of what use is a philosopher who doesn't hurt anybody's feelings?"
--Diogenes of Sinope, Herakleitos and Diogenes pt. 2, Fragment 10 (tr. by
Guy Davenport, 1976)
I don't know where else to turn for help with regex, so I turn to
you. Consider the following:
------------------------
ONCE
(twice)
Three times a lady.
Not as much as the Gambler.
(This sucks)
How would you know?
------------------------
How do I match the 2nd line but not the 5th?
How do I match the 6th, but not he 3rd?
Is this possible?
P.S. Do you guys have any really good references for regex (aside
from the manuel), where I can hunt down problems like this?
I just wrote a blog entry on a convenience command for Ruby on
Rails... but I'm not sure to whom I should address this. I'd like to
see it added to the default Rails bundle that ships with future
TextMate versions if others find it useful. How should I go about
submitting this for review?
Thanks,
Duane Johnson
P.S. Blog entry is at http://blog.inquirylabs.com/
Hi guys,
I get errors when I try to run some Ruby scripts in TM.
NB: I don't have those errors when I run these scripts in Bash (even
from inside TM) or in IRB
I have "TM_RUBY /usr/local/bin/ruby" in my shell variables.
e.g.
When using erb (example taken from Programing Ruby):
---------
#!/usr/local/bin/ruby
require 'erb'
input = %{\
<% high.downto(low) do |n| # set high, low externally %>
<%= n %> green bottles, hanging on the wall
<%= n %> green bottles, hanging on the wall
And if one green bottle should accidentally fall
There'd be <%= n-1 %> green bottles, hanging on the wall
<% end %>
}
high,low = 10, 6
erb = ERB.new(input)
erb.run
-----------
I get:
RubyMate r2496 running Ruby v1.8.4.
>>> ~/bin/test.rb
/Library/Application Support/TextMate/Bundles/Ruby.tmbundle/Support/
tmruby.rb:180: bad value for range (ArgumentError)
from /Library/Application Support/TextMate/Bundles/Ruby.tmbundle/
Support/tmruby.rb:120
===========================================
When using 'sqlite3':
-----------
#! /usr/local/bin/ruby
require 'sqlite3'
db = SQLite3::Database.new( "/Users/fatal/bin/test.db" )
p db.execute( <<-SQL
SELECT * FROM posts;
SQL
)
db.close
-----------
I get:
RubyMate r2496 running Ruby v1.8.4.
>>> ~/bin/jots/test2.rb
(eval):5: [BUG] Segmentation fault ruby 1.8.4 (2005-12-24) [powerpc-
darwin8.4.0]
Program exited with return code.
NB: This script works, but I get the error, sometimes scripts using
sqlite3 doesn't work at all, sometimes I only get "Program exited
with return code."
I have other errors of this kind, but examples are more complicated
to share or I didn't take note of them.
Am I missing something?
Thanks for any tips.
-
Fred
>> When searching in the "go to symbol" pop-up, I find that because
>> the search alphabetizes the results, it's very much the opposite
>> of useful.
>
> It shouldn’t alphabetize them, but instead rank them based on how
> good a candidate the match is for the search/filter string.
>
> For example if we have George Costanza and Charlie Sheen in the
> list, and enter CS, it will show both names (as both contain C and
> S), but it should show Charlie Sheen first, since CS is a “better”
> match for that, than it is for George Costanza.
Okay, that makes sense.
A ranked-order search result makes a lot of sense when the order of
symbols is unimportant and/or there are not enough identical results
to confuse the list. But when there are a lot (say, over 20) of
identical results, the placement in the document becomes very
important, in fact it becomes just as important as the match itself.
A simple way to achieve this is with a search result that also
outputs line-numbers... I know that would do the trick for me. Now
for a crappy mock-up! This is not the prefect example, but you get
the idea.
First I tried an update and got:
svn: Failed to add directory '/Library/Application
Support/TextMate/Bundles/SQL.tmbundle/support': object of the same
name already exists
I deleted the checked out directory and did a fresh checkout and got
the same error!
I notice that the last 2 commits are:
intermediate step to rename support
recover capitalized Support directory
Any ideas what this might be? Possibly some naming clash as a result
of an attempt to rename Support to support.
Stephen
Hi,
I just wanted to post a nice snippet I just made...er, actually I just
ripped it from the fun (function) snippet. It goes like this:
prototype.${1:method_name} = function(${2:first_argument}) {
${0:// body...}
};
I have it set up to expand on proto<tab>. Actually, after thinking
about it, maybe this would be better:
${1:class_name}.prototype.${2:method_name} = function(${3:first_argument}) {
${0:// body...}
};
Either way, I think this is really useful because like all good snippets
it keeps you from typing a bunch of stuff that is always the same, and
it keeps you from forgetting the trailing semicolon (which the fun
snippet and auto-close brace omit).
Any chance on getting something like this included with Textmate out of
the box? Forgive me if this has already been discussed; a quick search
on the list and wiki didn't turn up anything on this subject.
Also, the fun snippet that's included uses "# body..." instead of "//
body...". Is this intentional, or was the hash just forgotten when
porting the snippet from another language?
Mike