Hi,
I've just installed textmate (version 2.0-alpha.9515) on a mac running OS X Version 10.8.5.
Whenever I execute a command written in Ruby in textmate (for example, Duplicate Line, or Typeset & View in the Latex bundle), I obtain an error. The error message is
Failure running “Duplicate Line / Selection”. Duplicate Line / Selection:9:in `join': can't convert nil into String (TypeError)
from Duplicate Line / Selection:9
in the first case and
Failure running “Typeset & View (PDF)”. Typeset & View (PDF):4: undefined method `+' for nil:NilClass (NoMethodError)
in the second case. This occurs both with keyboard shortcuts and when selecting the command from a menu. Snippets and other shortcuts work.
I don't use Ruby (I use textmate mainly for Latex), so I'm a bit of a loss here. Any help would be appreciated. I searched for posts on similar problems but didn't find any.
Best,
Markus
Tim Bates wrote:
> https://github.com/jessegrosjean/quickcursor
>
> Textmate should just include this, as it rocks for using TextMate as external editor for, for instance, an mail.app :-)
> I use it 10 times a day, I?d estimate.
Thanks--I currently use QuickCursor in TM1. That said, the old Edit-in-Textmate remembered formatting properties like quote indentation, which made it easier to parse email messages, color-code the syntax, and so forth. The old Edit-in-Textmate also saved changes every time you hit Command-S; QuickCursor's changes don't render in Mail until you close the window, and sometimes those changes are lost (say, when multitasking from one window to another).
Still, I appreciate the recommendation, because I'm assuming from your message that QuickCursor works with TM2. As mentioned previously, the other functionality keeping me in TM1 is the ability to edit in Web Preview. Does anyone do that in TM2?
jon
Not entirely sure how to reply to the mailing list via email, hopefully
this will work...
Subject: [TxMt] Re: Disabling entire bundles doesnt persist
From: "Allan Odgaard" <mailinglist(a)textmate.org>
> When you disable the item and save, TextMate should create the following
file:
> ~/Library/Application Support/Avian/Bundles/AppleScript.tmbundle/info.
plist
> Does that file appear on your disk?
Hm, I just noticed what was actually happening is instead of updating
AppleScript bundle, it was silently creating a new AppleScript
2.tmbundle, AppleScript
3.tmbundle etc.
> Additionally it updates the index, which is located at:
> ~/Library/Caches/com.macromates.TextMate/BundlesIndex.binary
> You can check the date of that file. You can also try to quit TextMate,
remove the index, and then relaunch, that will make TM generate a new index.
Thanks, this fixed my problem.
I deleted the index and when TM relaunched, the unwanted bundles are hidden
and disabled in Bundle editor.
I guess it somehow got out of sync
I open the bundle editor, select a bundle (such as AppleScript), and then
untick 'Enable this item'
I then hit CMD-S to save, and at this point AppleScript disappears from the
Bundle menu (which is what Id like to happen)
However, on quitting TM and relaunching, the AppleScript bundle is enabled
once again.
Using build build 2.0-alpha.9515
Is this a known issue, and is there a workaround?
Thanks
Let's say I'm working in a .R file on this block of code:
mtcars_sub <- subset(mtcars, cyl == 6)
mtcars_lm <- lm(mpg ~ disp, mtcars)
summary(mtcars_lm)
I highlight the block of code and send it to the R console. Following this,
I then edit the code block (predictor added to model), so it becomes:
mtcars_sub <- subset(mtcars, cyl == 6)
mtcars_lm <- lm(mpg ~ disp + wt, mtcars)
summary(mtcars_lm)
Can I send the edited code block to the R console, using a keyboard
shortcut, without having to go back and highlight it? This feature is
implemented in RStudio and is something I miss after having switched to
TextMate.
Thanks
Ross
Thanks Rob that was it.
I changed disableIndentCorrections from ‘1’ to ‘emptyLines’ in the Python bundle and it has reverted to the old behaviour.
{ disableIndentCorrections = 'emptyLines';
indentOnPaste = 'simple';
}
Pretty sure I have was using default settings before.
—
Iain
> On alpha.9517 the auto indentation seems to have changed that if you
> leave a blank line after a function TextMate will keep indenting
> subsequent lines.
>
> def boo():
> """docstring for boo"""
> pass
>
> print <— this line is automatically indented unless you use ⌘[
>
> I had a look in the Python bundle and the language grammar is
> unchanged. Am I missing a setting somewhere to revert to the old
> behaviour?
From the release notes…
> It is now possible to set the `disableIndentCorrections` to
> `emptyLines`. This will disable the indent corrections only when
> typing on empty lines, which has been made default for HTML.
I’m sure it has something to do with that, though it doesn’t sound
like anything should change (outside of HTML) if you were still using
default settings. Then again, if you were using default settings, the
behavior you’ve noticed would not be new. (I disabled it a long time
ago.)
I’m using “emptyLines” now just to see if there’s a benefit.
Before, I was using “:true”. I haven’t figured out the difference
yet.
--
Rob McBroom
http://www.skurfer.com/
On alpha.9517 the auto indentation seems to have changed that if you leave a blank line after a function TextMate will keep indenting subsequent lines.
def boo():
"""docstring for boo"""
pass
print <— this line is automatically indented unless you use ⌘[
I had a look in the Python bundle and the language grammar is unchanged. Am I missing a setting somewhere to revert to the old behaviour?
—
Iain
Let's say I have R open and i¹m editing a .R filewith TextMate. In my .R
file I have a line of code like this:
lm(mpg ~ drat, mtcars)
Is it possible to set up a keyboard shortcut, which when pressed whilst an R
object was selected, would send that object to the R console inside a
function.
For example:
I select 'mpg', press COMMAND + OPTION + L, and this object would be run in
the R console as: length(mpg)
I select mtcars', press COMMAND + OPTION + S, and this object would be run
in the R console as: summary(mtcars)
I select 'lm(mpg ~ drat, mtcars)', press COMMAND + OPTION + P, and this
object would be run in the R console as: plot(lm(mpg ~ drat, mtcars))
Thanks
Ross