juliaeditorsupport / julia-sublime Goto Github PK
View Code? Open in Web Editor NEWJulia syntax highlighting for Sublime Text
License: Other
Julia syntax highlighting for Sublime Text
License: Other
This is a somewhat bizarre case I found while viewing this in sublime. Seems to be that a double quote (") can end a triple quote (""") segment, but only if string interpolation is used within the string.
The $
at the end of a regex with triple quotes breaks the syntax highlighting.
r"\n a \" b $"x # Works.
r"""\n a \" b $"""x # Broken.
print("""Hello World""") # Messed up.
The $
makes the syntax highlighter think """x
is a variable so the multiline string doesn't end.
The develop branch now contains a rewrite from Julia.tmLanguage
to Julia.sublime-synax
. It fixes and improves a lot of things.
syntax_test_julia.jl
(Run tests by running the build
command.)Julia.tmLanguage
will be kept for backward compatibility. The sublime-syntax
format was introduced in sublime text build 3084 more than a year ago.Check it out by cloning the repo into .../sublime_path/Packages/
and checkout develop
.
Comments, thoughts and reactions to this?
I'm using Sublime Text 3 build 3126 on macOS Sierra. When I execute \mu
+[tab]
I get ๐
. I haven't noticed any other problems with completion and it works in the REPL.
Like #26, but for new syntax:
Hi,
and thanks for your efforts to improve the julia/sublime cooperation.
I've noticed that the newest version (v2016.08.14...) causes some problems on my Win7 machine.
For instance, the lines
println("sqrt(4) = 2")
a0 = 1
show everything from 2 and onward in red (string, I think).
Btw. the Julia package seems to update itself. Why is that?
Best, Paul S
I have noticed the following problem.
Please, could you have a look at it?
b = transpose(a)
This line does not cause any harm.
b = a'
But this line switches off syntax highlighting for the code that follows.
Syntax highlighting only comes back after a second transpose sign occurs.
Indentation is broken after one-line for..end and if..end blocks. "Reindent Lines" results in this:
function func(n)
a = 0
for i in 0:n a = a + i; end
return a
end
Last two lines are over-indented. Same for if...end.
Sublime Text 3.0, Julia-sublime 2017.08.25.20.37.31
Would it be possible to have Unicode completion in the search window? (i.e. the window that appears after CMD+F)
Hi, thanks for the package! There seems to be a bug in the version I installed today (via Sublime Packages) with matrix inversion syntax. The matrix inversion apostrophe gets parsed as a string apostrophe. (See, e.g. julia/examples/colorimetry.jl.)
rgbxyzsc = [(rgbxyz[1,:] ./ rgbw[1])';
(rgbxyz[2,:] ./ rgbw[2])';
(rgbxyz[3,:] ./ rgbw[3])']
All subsequent code in the file has string-like syntax highlighting.
Main.foo()
Base.length()
Core.eval()
I guess they should be support.module
according to the office docs and there may be missing important modules.
I have trouble with indentation of code using struct
, mutable struct
and do
.
Sublimetext does not indent the line following one of those keywords. The first two seem to be undefined in indentation but do
is defined but does not trigger indentation.
e.g.
function test end
let
global test
x = 323.23
y = 23.2323
function test(x)
x
end
Currently all macros are set in plain color for me. It would be nice if it had a prettier color default
In Julia:
julia> :function
:function
But the syntax highlighting treats this as the beginning of a function declaration.
variable.function
only and the arguments should be meta.function-call.arguments variable.parameter
support.function
only and parameters should be meta.function-call.arguments variable.parameter
.** Updated screenshot for julia**
Seems a little aggressive to overpower user's desire to use 2 space width
I have justed add a conversion functionality in UnicodeCompletion which basically converts between \alpha
and ฮฑ
, which is quite useful in LaTeX documents. However, while I am writing a julia script file, I usual have
mu = 0
sigma = 1
z = sqrt(mu/sigma)
It would be interesting to convert this to
ฮผ = 0
ฯ = 1
z = โ(ฮผ/ฯ)
So the questions are
In the scope of #21 we currently
Fixing this requires some elaborate trickery with lookahead regexes, which are needed to distinguish a function call from an assignment-form function declaration. The issue is the round parenthesis inside the type annotation.
If one types TAB begin
ENTER 3
ENTER end
, one gets:
begin
3
end
but if one types TAB 1 + begin
ENTER 3
ENTER end
, one gets:
1 + begin
3
end
This occurs commonly when writing e.g., macros which take block arguments.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.