Skip to content

Commit 66e56a1

Browse files
author
scls19fr
authored
Merge pull request #1 from scls19fr/move
Move from JuliaLang/julia/contrib to JuliaEditorSupport/NotepadPlusPlus
2 parents c4a0aa7 + 0633452 commit 66e56a1

File tree

3 files changed

+275
-1
lines changed

3 files changed

+275
-1
lines changed

Julia_Notepad++.xml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<NotepadPlus>
2+
<UserLang name="julia" ext="jl" udlVersion="2.1">
3+
<Settings>
4+
<Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
5+
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
6+
</Settings>
7+
<KeywordLists>
8+
<Keywords name="Comments">00# 01 02((EOL)) 03 04</Keywords>
9+
<Keywords name="Numbers, prefix1"></Keywords>
10+
<Keywords name="Numbers, prefix2"></Keywords>
11+
<Keywords name="Numbers, extras1"></Keywords>
12+
<Keywords name="Numbers, extras2"></Keywords>
13+
<Keywords name="Numbers, suffix1"></Keywords>
14+
<Keywords name="Numbers, suffix2"></Keywords>
15+
<Keywords name="Numbers, range"></Keywords>
16+
<Keywords name="Operators1">&apos; - ! &quot; $ % &amp; * , . / : ; ? @ \ ^ ` | ~ + &lt; = &gt; &lt;: :: .+ .- .* ./ .\ .^ &amp;&amp; || // [ ] ( ) { }</Keywords>
17+
<Keywords name="Operators2"></Keywords>
18+
<Keywords name="Folders in code1, open"></Keywords>
19+
<Keywords name="Folders in code1, middle"></Keywords>
20+
<Keywords name="Folders in code1, close"></Keywords>
21+
<Keywords name="Folders in code2, open"></Keywords>
22+
<Keywords name="Folders in code2, middle"></Keywords>
23+
<Keywords name="Folders in code2, close"></Keywords>
24+
<Keywords name="Folders in comment, open"></Keywords>
25+
<Keywords name="Folders in comment, middle"></Keywords>
26+
<Keywords name="Folders in comment, close"></Keywords>
27+
<Keywords name="Keywords1">true false C_NULL Inf NaN Inf32 NaN32 nothing</Keywords>
28+
<Keywords name="Keywords2">AbstractArray AbstractMatrix AbstractRange AbstractRemoteRef AbstractSparseMatrix AbstractString AbstractVector Any ArgumentError Array Associative BigFloat BigInt BitArray BitMatrix BitVector Bool BunchKaufman Cchar Cdouble Cfloat Char CharString CholeskyDense CholeskyPivotedDense Cint Cintmax_t Clong Clonglong Colon Complex Complex128 Complex64 ComplexPair Cptrdiff_t Cshort Csize_t Cuchar Cuint Cuintmax_t Culong Culonglong Cushort DArray Dict Dims DisconnectException EOFError EachLine EnvDict ErrorException Exception Expr Factorization Filter Float Float32 Float64 Function GSVDDense IO IOBuffer IOStream ImaginaryUnit InsertionSort Int Int128 Int16 Int32 Int64 Int8 BitSet Integer KeyError LDLTTridiagonal LUDense LUTridiagonal LoadError LocalProcess Matrix MergeSort MethodError NTuple Number ObjectIdDict ObjectIdDict OrdinalRange ParseError PipeBuffer ProcessGroup Ptr QRDense QRPivotedDense QuickSort RangeIndex Rational Real Regex RegexMatch RegexMatchIterator RepString RevString Reverse SVDDense Set Signed SparseMatrixCSC SpawnNullStream Stat StridedArray StridedMatrix StridedVecOrMat StridedVector String SubArray SubDArray SubOrDArray SubString SymTridiagonal Symbol SystemError Task TCPSocket TimSort Tridiagonal Tuple Type TypeError UInt UInt128 UInt16 UInt32 UInt64 UInt8 UVError Union UnitRange Unsigned VecOrMat Vector VersionNumber Void WeakKeyDict WeakRef Zip</Keywords>
29+
<Keywords name="Keywords3">abstract begin baremodule primitive break catch ccall const continue do else elseif end export finally for function global if struct import importall let local macro module quote return try mutable typealias using while</Keywords>
30+
<Keywords name="Keywords4">close enumerate error info open print println read write warn</Keywords>
31+
<Keywords name="Keywords5">print println</Keywords>
32+
<Keywords name="Keywords6"></Keywords>
33+
<Keywords name="Keywords7"></Keywords>
34+
<Keywords name="Keywords8"></Keywords>
35+
<Keywords name="Delimiters">00&quot; 01 02&quot; 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords>
36+
</KeywordLists>
37+
<Styles>
38+
<WordsStyle name="DEFAULT" fgColor="93A1A1" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
39+
<WordsStyle name="COMMENTS" fgColor="2AA17A" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
40+
<WordsStyle name="LINE COMMENTS" fgColor="2AA17A" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
41+
<WordsStyle name="NUMBERS" fgColor="B58900" bgColor="FFFFFF" fontName="Lucida Console" fontStyle="0" nesting="0" />
42+
<WordsStyle name="KEYWORDS1" fgColor="268BD2" bgColor="FFFFFF" fontName="Lucida Console" fontStyle="1" nesting="0" />
43+
<WordsStyle name="KEYWORDS2" fgColor="CB4B16" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
44+
<WordsStyle name="KEYWORDS3" fgColor="6C71C4" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
45+
<WordsStyle name="KEYWORDS4" fgColor="D33682" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
46+
<WordsStyle name="KEYWORDS5" fgColor="6C71C4" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
47+
<WordsStyle name="KEYWORDS6" fgColor="839496" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
48+
<WordsStyle name="KEYWORDS7" fgColor="839496" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
49+
<WordsStyle name="KEYWORDS8" fgColor="839496" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
50+
<WordsStyle name="OPERATORS" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
51+
<WordsStyle name="FOLDER IN CODE1" fgColor="839496" bgColor="FFFFFF" fontName="Lucida Console" fontStyle="0" nesting="0" />
52+
<WordsStyle name="FOLDER IN CODE2" fgColor="839496" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
53+
<WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
54+
<WordsStyle name="DELIMITERS1" fgColor="2AA198" bgColor="FFFFFF" fontName="Lucida Console" fontStyle="0" nesting="0" />
55+
<WordsStyle name="DELIMITERS2" fgColor="800080" bgColor="FFFFFF" fontName="Lucida Console" fontStyle="0" nesting="0" />
56+
<WordsStyle name="DELIMITERS3" fgColor="839496" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
57+
<WordsStyle name="DELIMITERS4" fgColor="839496" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
58+
<WordsStyle name="DELIMITERS5" fgColor="839496" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
59+
<WordsStyle name="DELIMITERS6" fgColor="839496" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
60+
<WordsStyle name="DELIMITERS7" fgColor="839496" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
61+
<WordsStyle name="DELIMITERS8" fgColor="839496" bgColor="002B36" fontName="" fontStyle="0" nesting="0" />
62+
</Styles>
63+
</UserLang>
64+
</NotepadPlus>

Notepad++_2_Julia.ahk

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
;=====================================
2+
; npp_julia.ahk
3+
; Connect Julia and notepad++
4+
; AutoHotkey: 1.x
5+
; Language: English
6+
; Platform: Windows7
7+
; Author: ViralBShah - 2013
8+
; Modified by: cameyo - 2015
9+
; License: MIT license
10+
;=====================================
11+
; Hotkeys:
12+
; Win-F12 -> Start Julia
13+
; Left_Shift-Enter -> Evaluate current line
14+
; Right_Shift-Enter -> Evaluate selected block
15+
16+
;=====================================
17+
; Basic hotkeys symbol
18+
;=====================================
19+
; # Win key
20+
; ! Alt key
21+
; ^ Control key
22+
; + Shift key
23+
24+
;=====================================
25+
; General statements
26+
;=====================================
27+
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
28+
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
29+
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
30+
#SingleInstance force ; Allow reload script
31+
#WinActivateForce ; activate window with forceful method
32+
33+
;=====================================
34+
; Global variables
35+
;=====================================
36+
#EscapeChar \
37+
global hasRunJulia = 0
38+
global JuliaPID = 0
39+
global NppPID = 0
40+
41+
;---------------------------
42+
OpenJulia()
43+
{
44+
if %hasRunJulia% = 0
45+
{
46+
Run julia.exe,,,JuliaPID
47+
hasRunJulia = 1
48+
ReturnToNpp()
49+
return
50+
}
51+
Process, Exist, %JuliaPID%
52+
if %ErrorLevel% = 0
53+
{
54+
Run julia.exe,,,JuliaPID
55+
hasRunJulia = 1
56+
ReturnToNpp()
57+
return
58+
}
59+
}
60+
;---------------------------
61+
ReOpenJulia()
62+
{
63+
WinClose, ahk_pid %JuliaPID%
64+
OpenJulia()
65+
}
66+
;---------------------------
67+
SendToJulia()
68+
{
69+
OpenJulia()
70+
WinWait, ahk_pid %JuliaPID%
71+
WinActivate, ahk_pid %JuliaPID%
72+
WinWaitActive, ahk_pid %JuliaPID%
73+
74+
; Past via menu (must disable SendMode Input)
75+
;Send {Alt Down}{Space}{Alt up}ep{Enter}
76+
77+
; Past with send clipboard
78+
StringReplace clipboard2, clipboard, \r\n, \n, All
79+
SendInput {Raw}%clipboard2%\n
80+
}
81+
;---------------------------
82+
ReturnToNpp()
83+
{
84+
WinActivate, ahk_pid %NppPID%
85+
}
86+
;---------------------------
87+
PassLine()
88+
{
89+
WinGetCLASS, currentClass, A
90+
If currentClass = Notepad++
91+
{
92+
WinGet, NppPID, PID, A
93+
SendInput {Home}{Shift Down}{End}{Shift Up}{Ctrl Down}c{Ctrl Up}{End}
94+
SendToJulia()
95+
ReturnToNpp()
96+
}
97+
}
98+
;---------------------------
99+
PassBlock()
100+
{
101+
WinGetCLASS, currentClass, A
102+
If currentClass = Notepad++
103+
{
104+
WinGet, NppPID, PID, A
105+
SendInput {Ctrl Down}c{Ctrl Up}
106+
SendToJulia()
107+
ReturnToNpp()
108+
}
109+
}
110+
;---------------------------
111+
; Eval current line (Left Shift - Enter)
112+
LShift & Enter:: PassLine()
113+
;---------------------------
114+
; Eval selected block (Right Shift - Enter)
115+
RShift & Enter:: PassBlock()
116+
;---------------------------
117+
; Run Julia (Win-F12)
118+
#$F12:: ReOpenJulia()
119+
120+
;================================================
121+
; REPL enhancements
122+
; Work only on console window
123+
#IfWinActive ahk_class ConsoleWindowClass
124+
125+
;=============================
126+
; Scroll command window back and forward
127+
; Ctrl+PageUp / PageDown
128+
;=============================
129+
^PgUp:: SendInput {WheelUp}
130+
131+
^PgDn:: SendInput {WheelDown}
132+
133+
;=============================
134+
; Paste in REPL
135+
; Ctrl-V
136+
; Better version
137+
;=============================
138+
^V::
139+
StringReplace clipboard2, clipboard, \r\n, \n, All
140+
SendInput {Raw}%clipboard2%
141+
return
142+
143+
;=============================
144+
; Paste in REPL
145+
; Ctrl-V
146+
; Old version (must disable SendMode Input)
147+
;=============================
148+
;^V::
149+
; English menu (Edit->Paste)
150+
;Send !{Space}ep
151+
;return
152+
153+
#IfWinActive
154+
;================================================
155+
156+
;=============================
157+
; Greek Letters (lowercase)
158+
; Control-Win-<char>
159+
; char 'j' is free...
160+
;=============================
161+
^#a:: SendInput {U+03B1} ; alpha
162+
^#b:: SendInput {U+03B2} ; beta
163+
^#g:: SendInput {U+03B3} ; gamma
164+
^#d:: SendInput {U+03B4} ; delta
165+
^#y:: SendInput {U+03B5} ; epsilon (y)
166+
^#z:: SendInput {U+03B6} ; zeta
167+
^#e:: SendInput {U+03B7} ; eta
168+
^#h:: SendInput {U+03B8} ; theta (h)
169+
^#i:: SendInput {U+03B9} ; iota
170+
^#k:: SendInput {U+03BA} ; kappa
171+
^#l:: SendInput {U+03BB} ; lambda
172+
^#m:: SendInput {U+03BC} ; mu
173+
^#n:: SendInput {U+03BD} ; nu
174+
^#x:: SendInput {U+03BE} ; xi
175+
^#o:: SendInput {U+03BF} ; omicron
176+
^#p:: SendInput {U+03C0} ; pi
177+
^#r:: SendInput {U+03C1} ; rho
178+
^#s:: SendInput {U+03C3} ; sigma
179+
^#t:: SendInput {U+03C4} ; tau
180+
^#u:: SendInput {U+03C5} ; upsilon
181+
^#f:: SendInput {U+03C6} ; phi (f)
182+
^#c:: SendInput {U+03C7} ; chi
183+
^#v:: SendInput {U+03C8} ; psi (v)
184+
^#w:: SendInput {U+03C9} ; omega (w)

README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,27 @@
1-
# Notepad-
1+
# Notepad++
2+
3+
[Julia language](https://julialang.org/) support for [Notepad++](https://notepad-plus-plus.org/)
4+
5+
- Syntax highlighting
6+
- Auto Hotkey
7+
8+
## Installation
9+
### Manual installation
10+
ToDo
11+
12+
### Content
13+
| Name | Description |
14+
| ------------------------------ | ----------------------------------------------------------- |
15+
|[ Julia_Notepad++.xml ](https://github.com/JuliaLang/julia/blob/master/contrib/Julia_Notepad++.xml) | Notepad++ config file |
16+
|[ Notepad++_2_Julia.ahk ](https://github.com/JuliaLang/julia/blob/master/contrib/Notepad++_2_Julia.ahk) | Auto Hotkey for Notepad++ config file |
17+
18+
## Contributing
19+
We love contributors but please first read the general guide about [contributing to Julia language project](https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md).
20+
21+
If **necessary**, [open an issue](https://github.com/JuliaEditorSupport/NotepadPlusPlus/issues).
22+
23+
### Contributor list
24+
- Everyone who contribute to files to Notepad++ plugins for Julia development [JuliaLang/julia/contrib](https://github.com/JuliaLang/julia/tree/5b95805fc73abe672a85ef04249cf34378ec9f74/contrib):
25+
- [Julia_Notepad++.xml](https://github.com/JuliaLang/julia/blob/f8a44d52f80a120f7595995f8d6d8c31b84cf7dd/contrib/Julia_Notepad%2B%2B.xml)
26+
- [Notepad++_2_Julia.ahk](https://github.com/JuliaLang/julia/blob/4e4663e13e837eb6bc617125c830ac956e1d96ed/contrib/Notepad%2B%2B_2_Julia.ahk)
27+
- [See contributors](https://github.com/JuliaEditorSupport/NotepadPlusPlus/graphs/contributors)

0 commit comments

Comments
 (0)