⌃⇧L 'Wrap selection/word as a link' broken in TextMate - textmate

I regularly use ⌃⇧L in TextMate to wrap selection as a link. When I used it this morning, i got...
/tmp/temp_textmate.RRepHN:13: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\n'
/tmp/temp_textmate.RRepHN:15: syntax error, unexpected keyword_when, expecting keyword_end
when %r{http://www.(amazon.(?:com...
^
/tmp/temp_textmate.RRepHN:15: syntax error, unexpected ':', expecting keyword_end
/tmp/temp_textmate.RRepHN:17: syntax error, unexpected keyword_when, expecting keyword_end
when %r{\A[a-zA-Z][a-zA-Z0-9.+-]*://.*\z}:
^
/tmp/temp_textmate.RRepHN:17: syntax error, unexpected ':', expecting keyword_end
/tmp/temp_textmate.RRepHN:19: syntax error, unexpected keyword_when, expecting keyword_end
when %r{\A(www\..*|.*\.(com|uk|net|org|info))\z}:
^
/tmp/temp_textmate.RRepHN:19: syntax error, unexpected ':', expecting keyword_end
/tmp/temp_textmate.RRepHN:21: syntax error, unexpected keyword_when, expecting keyword_end
when %r{\A.*\.(com|uk|net|org|info)\z}:
^
/tmp/temp_textmate.RRepHN:21: syntax error, unexpected ':', expecting keyword_end
/tmp/temp_textmate.RRepHN:23: syntax error, unexpected keyword_when, expecting keyword_end
when %r{\A\S+\z}:
^
/tmp/temp_textmate.RRepHN:23: syntax error, unexpected ':', expecting keyword_end
/tmp/temp_textmate.RRepHN:27: warning: else without rescue is useless
/tmp/temp_textmate.RRepHN:28: syntax error, unexpected keyword_end, expecting
I can't think of anything specific I might have done to cause the issue.
I have reloaded bundles and reinstalled TextMate.
I also tried using the code at http://svn.textmate.org/trunk/Bundles/Hyperlink%20Helper.tmbundle/Commands/Wrap%20Selection%20as%20Link.tmCommand.
None of them fixed the problem.
Anyone have any ideas?!
Thanks.

There shouldn't be a colon at the when ... line. You can edit the snippet and remove it in the Bundle Editor.

Related

brew install coreutils error for 10.12.6 OSX

in OSX install error,
brew install coreutils
Error: coreutils: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/coreutils.rb:73: syntax error, unexpected << def caveats; <<~EOS
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/coreutils.rb:77: syntax error, unexpected tIDENTIFIER, expecting keyword_end
can add a "gnubin" directory to your PATH from your bashrc like:
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/coreutils.rb:77: syntax error, unexpected ':', expecting keyword_end
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/coreutils.rb:79: dynamic constant assignment
PATH="#{opt_libexec}/gnubin:$PATH"
^
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/coreutils.rb:81: dynamic constant assignment
Additionally, you can access their man pag...
^
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/coreutils.rb:81: syntax error, unexpected tIDENTIFIER, expecting keyword_do or '{' or '('
Additionally, you can access their man pages with ...
^
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/coreutils.rb:82: syntax error, unexpected tIDENTIFIER, expecting keyword_end
the "gnuman" directory to your MANPATH from your bashrc as well:
^
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/coreutils.rb:82: syntax error, unexpected ':', expecting keyword_end
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/coreutils.rb:84: dynamic constant assignment
MANPATH="#{opt_libexec}/gnuman:$MANPATH"`
What is the reason?
Please help me thanks
There is a closed issue on GitHub about this: https://github.com/Homebrew/brew/issues/3353
According to that discussion, this resolves the error:
rm -rf /usr/local/Homebrew/.git
brew update
brew config
I have not tested this myself.

What's the difference between keyword_end and end-of-input in ruby?

Sometimes, I ran into an error like this in ruby:
syntax error, unexpected keyword_end, expecting end-of-input
So, I want to know the difference between keyword_end and end-of-input
Keyword 'end' is the end statement in Ruby that comes at the end of methods, classes, etc. end-of-input is the actual end of your code file. The message you got means you have an extra 'end' statement somewhere.
keyword_end implies that you had a block of code with a missing end.
def fun(f)
puts "Oops!"
End-of-input implies that you have already closed up blocks of code with one too many end keywords.
def fun(f)
puts "Okay..."
end
end

How to connect styles to page in Laravel?

I tried to do this using:
{{ HTML::style('css/css.css'); }}
But I get error:
Parse error: syntax error, unexpected ';', expecting ',' or ')'
Maybe I should connect extension?
Remove the semicolon and it should work.

Go tool pprof list command gives 'Syntax error: "(" unexpected'

I've got a cpu profile file that I've been examining for a bottleneck in my code and using the commands like top10 works fine. However, when I want to look at the source code listing by typing
list Remove
Where Remove is the function I want to list, it gives the following output:
(pprof) list Remove
Total: 207 samples
sh: 1: Syntax error: "(" unexpected
sh: 1: Syntax error: "(" unexpected
sh: 1: Syntax error: "(" unexpected
sh: 1: Syntax error: "(" unexpected
sh: 1: Syntax error: "(" unexpected
Any ideas?

Ruby and ctioga2 issue

I am trying to run ctioga2 and I keep getting the same error:
bash-4.1$ ctioga2
/usr/bin/ctioga2:49:in `require': /usr/lib/ruby/site_ruby/1.8/ctioga2/plotmaker.rb:646: syntax error, unexpected ')' (SyntaxError)
) do |plotmaker, size, options|
^
/usr/lib/ruby/site_ruby/1.8/ctioga2/plotmaker.rb:646: syntax error, unexpected '|', expecting '='
/usr/lib/ruby/site_ruby/1.8/ctioga2/plotmaker.rb:867: syntax error, unexpected kEND, expecting $end
from /usr/bin/ctioga2:49
Do you guys know why this happens?
Not familiar with the code base exactly of tioga2. Based on the error message it was expecting an assignment (=) and ran into a | and )
This is a ruby-1.8 specific bug. It is now fixed in the git repository (commit: be1cc4b).
But stackoverflow is not the place to file bug reports for programs, you're lucky I stumbled upon this one.
For ctioga2, please use either the bug tracker at sourceforge: https://sourceforge.net/p/ctioga2/tickets/ or the one at github if you prefer: https://github.com/fourmond/ctioga2/issues/.

Resources