Sublime Forum

PackageDev for User Defined colour scheme

#1

I’ve really been struggling to find a text editor that can do more than Pluma for linux MATE. Various Text Editors claim that they can, but the learning curve is so steep that it’s just easier to go back to what I know (Don’t get me started on IDE’s !).
With this in mind I am currently doing the Elements of Computer Systems course (Nand2Tetris) and as part of that you need to write a program in a made up OO language called Jack (which is a bit like Pascal crossed with C++11 to my mind) but very simple.
So with that also in mind also I wanted a text editor that i could use that i could customise a colour scheme specifically for Jack. I.e. have the keywords one color, numbers another, maybe strings a different colour, like for all the other languages (C++, java, haskel etc etc).

Currently using Pluma i have to save the file as .jack.cpp. I get the C++ color scheme, which is better than nothing and then when I want to compile I save my file to .jack (This is my current work around).

So to my difficulty, having followed the advice on this web page

http://ilkinulas.github.io/programming/2016/02/05/sublime-text-syntax-highlighting.html

i think i’ve installed Package Control, but PackageDev doesn’t come up. And I’ve generally been going around in circles. Package Control sublime settings, repositories and channels appear to be empty. Can anyone get me to installing PackageDev pls ?

Or is there easier way to get a custom color scheme for a new/rare/made up language?

Thanks in advance.

0 Likes

Spaces around maths and logic operators
#2

There seems to already exist a package for Jack syntax highlighting. If you have Package Control installed, use the command palette (Ctrl + Shift + P) or Preferences > Package Control from the menu and choose “Package Control: Install Package”. Then search for the package name:


img2

PackageDev is helpfull for the development of new packages, so I think you don’t really need it here, unless the mentioned Jack package doesn’t meet your requirements and you want to create your own syntax definition instead.

0 Likes

#3

Thanks so much for your help. I’ve been a bit naughty because (as in my OP) my question covers several issues.

Unfortunately I can’t get Package control to work either. I don’t get any option to Install Packages. I had a look online and again have done what’s been suggested here:

https://github.com/wbond/package_control/issues/874 // But that’s not it

and tried this

  1. Click the Preferences > Browse Packages… menu
  2. Browse up a folder and then into the Installed Packages/ folder
  3. Download Package Control.sublime-package and copy it into the Installed Packages/ directory
  4. Restart Sublime Text

which were the instructions from: https://packagecontrol.io/installation

Unfortunately I can’t take a screen shot, because as soon as I implement the screen shot the package control window disappears.
If I do ctrl+shtf+P I get a similar window to your screen shot, but as i type
i - n - s - t - a - l - l (the hyphens are for emphasis, I’m just typing install) various options become less and less until install is in the search box and there are No options. I guess there’s a problem with Package Control ?

That’s brill news about Jack, thank you and if you can help with this one too that’d be fantastic.

All the best, Lozminda

0 Likes

#4

have you restarted sublime ?
what version of sublime text are you using, and on what OS ?

0 Likes

#5

Firstly, because I’m a noob, I may not be able to reply. I had a lot of trouble replying to the last post, I guess it’s to stop bots, so if I don’t reply it’s because of that.
In answer to your questions:
OS linux mint MATE 17.1
Sublime version 3. I’m assuming the latest as i did an update and then an install
Cheers, Lozminda

0 Likes

#6

Ps re restart, yes several times (well my computer has been on and off)

(I as yet haven’t even had the opportunity to use Sublime yet, but was reading that there was a short cut F5 to reset. That also doesn’t work.)

0 Likes

#7

If there is a Package Control.sublime-package file in the Installed Packages folder (either because you put it there manually or you chose the command to install Package Control from the menu) but items that start with Package Control: don’t appear in the command palette, then the first things that come to mind are:

  1. Package Control and/or 0_package_control_loader are in the list of ignored_packages in your user preferences, so Sublime is not seeing the file. That’s something that’s pointed out in the link you shared above, so presumably you’ve already checked that.

  2. There is some other error that’s stopping the package from loading. To see that you need to use View > Show Console and check to see if there are any errors there; an error loading the package would cause its commands to not appear, which makes it also not appear in the command palette.

0 Likes

#8

startup, version: 3103 linux x32 channel: stable
executable: /opt/sublime_text/sublime_text
working dir: /home/elitebook
packages path: /home/elitebook/.config/sublime-text-3/Packages
state path: /home/elitebook/.config/sublime-text-3/Local
zip path: /opt/sublime_text/Packages
zip path: /home/elitebook/.config/sublime-text-3/Installed Packages
ignored_packages: [“Vintage”]
pre session restore time: 0.062345
startup time: 0.165885
first paint time: 0.179038
reloading plugin Default.block
reloading plugin Default.comment
reloading plugin Default.convert_syntax
reloading plugin Default.copy_path
reloading plugin Default.delete_word
reloading plugin Default.detect_indentation
reloading plugin Default.duplicate_line
reloading plugin Default.echo
reloading plugin Default.exec
reloading plugin Default.fold
reloading plugin Default.font
reloading plugin Default.goto_line
reloading plugin Default.history_list
reloading plugin Default.indentation
reloading plugin Default.kill_ring
reloading plugin Default.mark
reloading plugin Default.new_templates
reloading plugin Default.open_context_url
reloading plugin Default.open_file_settings
reloading plugin Default.open_in_browser
reloading plugin Default.pane
reloading plugin Default.paragraph
reloading plugin Default.paste_from_history
reloading plugin Default.profile
reloading plugin Default.profile_syntax_definition
reloading plugin Default.quick_panel
reloading plugin Default.run_syntax_tests
reloading plugin Default.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_name
reloading plugin Default.side_bar
reloading plugin Default.sort
reloading plugin Default.swap_line
reloading plugin Default.switch_file
reloading plugin Default.symbol
reloading plugin Default.transform
reloading plugin Default.transpose
reloading plugin Default.trim_trailing_white_space
reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
reloading plugin Python.syntax_test_python
reloading plugin Package Control.1_reloader
reloading plugin Package Control.2_bootstrap
Traceback (most recent call last):
File “/opt/sublime_text/sublime_plugin.py”, line 78, in reload_plugin
m = importlib.import_module(modulename)
File “./importlib/init.py”, line 90, in import_module
File “”, line 1584, in _gcd_import
File “”, line 1565, in _find_and_load
File “”, line 1532, in _find_and_load_unlocked
File “/opt/sublime_text/sublime_plugin.py”, line 696, in load_module
exec(compile(source, source_path, ‘exec’), mod.dict)
File “2_bootstrap in /home/elitebook/.config/sublime-text-3/Installed Packages/Package Control.sublime-package”, line 26, in
File “”, line 1565, in _find_and_load
File “”, line 1532, in _find_and_load_unlocked
File “/opt/sublime_text/sublime_plugin.py”, line 696, in load_module
exec(compile(source, source_path, ‘exec’), mod.dict)
File “package_control.bootstrap in /home/elitebook/.config/sublime-text-3/Installed Packages/Package Control.sublime-package”, line 23, in
File “”, line 1565, in _find_and_load
File “”, line 1532, in _find_and_load_unlocked
File “/opt/sublime_text/sublime_plugin.py”, line 696, in load_module
exec(compile(source, source_path, ‘exec’), mod.dict)
File “package_control.loader in /home/elitebook/.config/sublime-text-3/Installed Packages/Package Control.sublime-package”, line 57, in
File “./posixpath.py”, line 83, in join
TypeError: unsupported operand type(s) for +=: ‘NoneType’ and ‘str’
reloading plugin Package Control.Package Control
Traceback (most recent call last):
File “/opt/sublime_text/sublime_plugin.py”, line 78, in reload_plugin
m = importlib.import_module(modulename)
File “./importlib/init.py”, line 90, in import_module
File “”, line 1584, in _gcd_import
File “”, line 1565, in _find_and_load
File “”, line 1532, in _find_and_load_unlocked
File “/opt/sublime_text/sublime_plugin.py”, line 696, in load_module
exec(compile(source, source_path, ‘exec’), mod.dict)
File “Package Control in /home/elitebook/.config/sublime-text-3/Installed Packages/Package Control.sublime-package”, line 14, in
File “./posixpath.py”, line 83, in join
TypeError: unsupported operand type(s) for +=: ‘NoneType’ and ‘str’
plugins loaded

That is the output from Show Console.
Any thoughts ?
Replying would now appear to be easy, unfortunately I have to go to bed, early start tomorrow. So thank you so far, I will be paying attention, but on a daily basis say for an hour at the end of the day (I don’t work in computing, but am studying).
I’ll be back on line in 21 hrs ish I hope.
Kind Regards, and have a good day/evening/night !

0 Likes

#9

Ps Tried option one, there are no ignored_packages other than vintage…

0 Likes

#10

Your version of Sublime is quite old; the console output shows that your’e on build 3103 which is circa 2016; the most recent build is build 3211. You might want to try upgrading to the most recent version of Sublime and see if that helps.

0 Likes

#11

I wonder as I’m not using the latest version of linux Mint, whether I will be able to ‘install’ the latest version of Sublime, I’m guessing when I implement update/install it gives me the latest version pertinent to my system:
For example I can’t install the latest version of clang, so am stuck at C++11, am sure there’s a work around, but last time i looked it seemed more complicated than I was prepared to take on. I wonder if I’ve got a similar problem with sublime. I seem to remember that i downloaded my version from the sublime web site, so it’s ‘decided’ that version is what i should have.
Any thoughts on how I might get a later build ? Thank you so far !

0 Likes

#12

did you follow the Linux instructions in the sublime website ?

0 Likes

ST3 install issues (again) (sorry!) Package Control
#13

In addition to what @AmjadHD said, if you’re unsure if a newer version will work for you, then I would recommend downloading the tarball version from the download page, then extract and run that to see if it will work or not. If the most recent builds won’t work, then there may still be a more recent build than the one you’re using that may solve the problem. If I had to guess, if something is going to block it from working it’s going to be something related to an older version of GTK3.

One last thing to note is that you’re running a 32 bit version of Sublime, so if you can run newer builds the git integrations will not work for you because they’re only enabled in a 64 bit version.

0 Likes

#14

When you eventually get things up to speed, please don’t follow this advice as it is thoroughly outdated. Sublime Text now has a new syntax definition format that is described at https://www.sublimetext.com/docs/3/syntax.html and much easier to write as well as being more powerful. PackageDev is still very helpful, however.

0 Likes

#15

Thanks to all who have replied. Unfortunately being self employed is getting in the way of the more important text editor sorting and therefore I hope to tackle all this at the weekend. I’ll get back to ya’ll then.
To AmjadHD, yes i did follow the linux instructions, however the link you’ve posted looks ‘better quality’, I can’t remember the source I used off the top of my head.
Anyroad, thank you, hasta le weekend !
:star_struck::cowboy_hat_face:

1 Like

#16

I used the link AmjadHD supplied 5 days ago, and I’m at exactly the same place as I was a week ago. I uninstalled Sublime, reset, then re-installed using that link. When I went to Package control there’s no install packages. After the update (the penultimate instruction in the link) I got the following GPG errors:
W: GPG error: http://apt.llvm.org llvm-toolchain-xenial-3.9 InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 15CF4D18AF4F7421
W: GPG error: http://apt.llvm.org llvm-toolchain-xenial-5.0 InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 15CF4D18AF4F7421
W: GPG error: http://llvm.org llvm-toolchain-trusty-3.8 InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 15CF4D18AF4F7421
W: GPG error: http://llvm.org llvm-toolchain-trusty-4.0 InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 15CF4D18AF4F7421
Would that have any effect ? Sublime otherwise installed. But I guess it’s a bit useless if I can’t install any packages.

There now follows a bit of a moan, please feel free to skip to the end!

I don’t like Geany because you can’t get rid of the pre-defined snippets which is a right pain (supposedly you can, but I couldn’t). Bizzarely Pluma is still the best option ATM. Surely there’s something better out there. Surely it shouldn’t be this time consuming? makes string handling in C seem easy !
^^^ Moan over ^^^
Again thanks for any help, and if we can’t get sublime to work any suggestions for a text editor that I can customize fully as per my OP.
Much obliged, sorry for the moan.

0 Likes

#17

Those GPG errors looks like they’re from adding the LLVM apt repository without adding the required GPG key. SublimeText doesn’t depend on LLVM so I wouldn’t expect it’s installation to cause any of those errors.

0 Likes

#18

I downloaded the 32 bit tarball from here:

https://www.sublimetext.com/3

and it worked. Only thing was I forgot to remove the old version of sublime-text and there was a bit of hoo ha consequently. Once I’d done that Package Control worked and I got my color scheme for Jack, woo hoo. :+1::call_me_hand:

(More moaning, I’m a Brit so therefore an expert (at moaning) pls skip
The color scheme for Jack is really not to my taste, I don’t like blue, yes I know I’m a weirdo)

I’ll be doing some color scheme editing so will be following FichteFoll’s advice no doubt.
Only small thing is that the desktop shortcut with the tarball doesn’t work, so I’ve had to create a link, which graphically isn’t as nice. Maybe I’ve done something wrong there.
Thanks to everyone for their advice, we got there in the end, though I now still have to edit the colour palette into something a bit less blue !!
Cheers y’all !

0 Likes

#19

A final PS

Firstly, I got a bit over complicated, I completely forgot that I could just use a different colour scheme, so the Blue is sorted. So all good there, a case of overflusterisation perhaps.
However I wasn’t able to ‘get my hands on’/install PackageDev, I tried pasting in the URL etc etc. Going round the internet trying all sorts, I can’t get PackageControl to install PackageDev/ Add the repository etc, but this is now not really required as finally I’ve got something that looks good and I can now get back to trying out Sublime and actually doing Project 9 of Nand2Tetris, hooray !
If anyone has any thoughts on installing PackageDev, great but it’s in no way urgent, I think it’s ‘now case closed’
Thanks again to all who helped, Lozminda

0 Likes