# Sublime Text questions?



## Tod (Jan 3, 2018)

I'm trying to switch from Nils original KSE to Sublime Text. I've tried to find the answers to my questions using
help, but I'm not getting anywhere.

To start with, I'm haveing a hard time getting "Find" (Ctrl+F) to work, I click Alt+W for "whole word" but it
still searches for just the first character. This is what happens much of the time, although it has worked on
occasion. Is there a secret to this?

One of the things I'd like to do right now, is make the scroll bar on the right wider. I looked but because of the
problem with Ctrl+F, I finally gave up. So is there a way to make the scroll bar wider?

It would also be nice to have the callbacks, macros, and functions on the left more like in the old KSE, but I
suppose that's not possible?

Other then that I think I can manage for now. What I've been doing is putting my scripts together in the old
KSE, saving, and reloading into Sublime Text to compile. That's when I've got code that KSE won't compile. 

I'm sure this is the 1st of many questions and any help would be appreciated. 

PS: Oh, there is one more thing, is there a setting for making the compiler so that it compresses all the lines,
right now it's leaving spaces between the "on ui_control"?


----------



## EvilDragon (Jan 3, 2018)

Tod said:


> It would also be nice to have the callbacks, macros, and functions on the left more like in the old KSE, but I
> suppose that's not possible?



Nope. Use Ctrl+R instead. Benefit: it has fuzzy search, so the list can be filtered very fast.


Ctrl+F works just fine over here...


----------



## Tod (Jan 3, 2018)

Thanks again Mario, when I'm searching the various "Preferences" like Settings, Ctrl+R doesn't seem to do 
anything, maybe I'm using it wrong?

So there's no answers for my other questions?


----------



## EvilDragon (Jan 3, 2018)

The command is called "Goto symbol". It should be Ctrl+R by default...


Changing scrollbar width is theme editing level, I'm not into that so I guess do some googling.


----------



## Tod (Jan 4, 2018)

So is there no way to compact the compiled code? KSE did that very nicely.


----------



## EvilDragon (Jan 4, 2018)

Sure there is.


----------



## Tod (Jan 4, 2018)

Wow, heh heh, I though it would be under "Settings" not "Tools". There's lot of stuff there I've been wondering about.

Thanks Mario, now if I could figure out how to make the scroll bar wider.


----------



## Tod (Jan 4, 2018)

Okay, I don't have the extra KSP stuff that you have, is there an easy way to get that? If not I think I'll just stick with the way I'm doing things in KSE.


----------



## EvilDragon (Jan 4, 2018)

Oh yeah. That menu only shows if your scripts have .ksp extension. So, mass rename your scripts


----------



## Tod (Jan 4, 2018)

Thanks Mario, but I do have all my scripts saved with a ksp extension.


----------



## Levitanus (Jan 4, 2018)

is it possible you are using old version from the Nills's website, but not from the package control?
In view->syntax KSP have to be selected, syntax have to be highlighted correct, autocomplete have to suggest You what to paste from the built-in ksp functions and variables)


----------



## Lindon (Jan 5, 2018)

Meanwhile - related question:

I'm using KScript Dark colour scheme, is there a simple way to change some of the colours? I have PRV installed but I cant seem to find a way to use it to reset the colours of the syntax - the colours I can find dont seem to match those its using so I'm a little cautious ...


--- hang on --- All OK I got it covered...


----------



## EvilDragon (Jan 5, 2018)

Yeah, you would just tweak the KScript Dark.tmTheme file.


----------



## Tod (Jan 5, 2018)

> In view->syntax KSP have to be selected, syntax have to be highlighted correct, autocomplete have to suggest You what to paste from the built-in ksp functions and variables)



Thanks Levitanus, that was it, there are two KSP in View>Syntax that are exactly alike so I checked the one that was unchecked.



Levitanus said:


> is it possible you are using old version from the Nills's website, but not from the package control?



Yes, this is also true, at one time I did download from there, but something happened and I ended up un-installing it.
To DL that now, should I do that from FrozenPlain's thread, "Additions to the SublimeKSP compiler"? What do you folks
recommend?


----------



## Levitanus (Jan 5, 2018)

Lindon said:


> KScript Dark colour scheme


Don't pretend to be right, but it seems to me, thet defaul monokai highlighting better than KScript Dark


----------



## EvilDragon (Jan 5, 2018)

I never liked the default monokai for SublimeKSP, so that's why I did the tweaks to KSP dark (which are part of actual release). Works perfect for me, at least 

Default Monokai doesn't color called function names the way KSP Dark does.


----------



## EvilDragon (Jan 5, 2018)

Comparison:











Monokai is pretty damn bland by comparison.


----------



## Levitanus (Jan 5, 2018)

strange, my monokai looks:




but it isn't KS dark) I found missed points in python, so went to the "default" one, then tried it for KSP and it was better for me)
More than, i've reintstalled sublime just couple weeks ago, so it is quite pure now...


----------



## EvilDragon (Jan 5, 2018)

Ah riiiight, my screenshot uses Soda Monokai. Sorry. Just the background color is different.


----------



## Tod (Jan 5, 2018)

Levitanus said:


> i've reintstalled sublime just couple weeks ago, so it is quite pure now...



Can you explain where you got it for reinstalling it?


----------



## Levitanus (Jan 5, 2018)

Tod said:


> Can you explain where you got it for reinstalling it?


sublime KSP plugin works very close to the actual compiller. I think, it don't stop python interpreter at all. So, I've made some hacks to it and was very upset of fact, that every compilation of test *.ksp after changing the preprocessor plugin file needs to reopening the app. So i hoped, it's just problem of too dirty app, but not of architecture)


----------



## Tod (Jan 5, 2018)

Okay thanks Levitanus, I guess I'll check out FrozenPlain's thread again.


----------



## Tod (Jan 5, 2018)

Okay after spending a half day trying to install the latest SublimeKSP, it's no go. I followed the exact directions but when I get to "Install Pakage" SublimeKSP does not show up like it shows in the video, in fact there is nothing there that indicates Kontakt at all.

So if I stick with the one I DLed from Nils, is there anything I'm actually missing?


----------



## Levitanus (Jan 5, 2018)

Tod said:


> is there anything I'm actually missing?


it won't compile the new built-ins functions and variables, since kontakt 5.0, i think.
also there won;t be very useful preprocessor plugins and define macros, which make life so wonderful)


----------



## Tod (Jan 5, 2018)

So what do you think I should do, completely uninstall SublimeText and start from 
scratch. The directions are really lacking except for the video, but I don't know what
to do since I don't see anything in the "Install Pakage" pertaining to Kontakt.

Thanks again Levitanus.


----------



## Levitanus (Jan 5, 2018)

first of all, i reccomend to completely remove undated version of plugin.
at second, check if package control is installed, check if SublimeKSP is installed (there is command, installed packages if you press this)




if installed - remove it within command remove package.
Then check sublime text folder in your os ("AppData\Roaming\Sublime Text 3" for windows)
check in folders "Installed Packages" and "Packages".

then install it again within package control command install package -> SublimeKSP


----------



## EvilDragon (Jan 5, 2018)

Or, just download it from here and put it in Sublime's Data/Packages folder


----------



## Tod (Jan 5, 2018)

> check if SublimeKSP is installed (there is command, installed packages if you press this)



That's where ran into my problem. Here's a pict of what I got and what the video shows (encircled). I
don't have "Kontakt Script Porcessor" anywhere in that list.









This is what's in AppData "Installed Packages".





You can see, "Package Control.sublime-package" was modified today, although I'm not sure
what that means.

I did copy/paste the text from Package Control into the "Show Console" slot at the bottom,
I assume that's where it was supposed to go, maybe that's what it is.


----------



## Tod (Jan 5, 2018)

EvilDragon said:


> Or, just download it from here and put it in Sublime's Data/Packages folder



Okay, what I got was "SublimeKSP-master", is that what it should be?


----------



## EvilDragon (Jan 5, 2018)

Yes, that's it. Just unpack it to Sublime Text/Data/Packages.


----------



## Tod (Jan 7, 2018)

Sorry Mario, I couldn't find anything in SublimeText3 that had these subfolders "Text/Data/Packages". Today, I started all over, and first un-installed SublimeTest3. So now I'm wondering how to proceed. Following the directions in FrozenPlain's thread, they offer no way to get started. *Am I to assume I need to re-install Nils SublimeText3 install? *There's absolutely nothing stating as such. 

Lord I feel like a nini, but following the directions to a "T", got me no where.


----------



## Pier (Jan 7, 2018)

Tod said:


> To start with, I'm haveing a hard time getting "Find" (Ctrl+F) to work



What's the problem? That should simply open the search pane at the bottom where you can write your query.



Tod said:


> So is there a way to make the scroll bar wider?



You could try to find a different theme although why do you use the scroll bar to move around? You can simply use the mini map at the top right of the editing zone.



Tod said:


> It would also be nice to have the callbacks, macros, and functions on the left more like in the old KSE, but I
> suppose that's not possible?


 ST is one of the more configurable text editors although the learning curve is steep. If instead of using keyboard shortcuts you really want a menu with commands you can create your own packages with whatever functionality you wish and even have those commands appear in the system menu at the top or in the command palette (control+shift+p).



Tod said:


> I'm searching the various "Preferences" like Settings, Ctrl+R doesn't seem to do
> anything, maybe I'm using it wrong?



Preferences is done in a configuration file. You can open it up from the system menu.

This is for macOS but it should be similar in Windows.


----------



## Tod (Jan 7, 2018)

Pier Bover said:


> What's the problem? That should simply open the search pane at the bottom where you can write your query.



The problem I had is that even though I had "Whole Word" selected, it would search for the first character, not the whole word. Maybe that's what it does if the whole word doesn't exist.



> You could try to find a different theme although why do you use the scroll bar to move around? You can simply use the mini map at the top right of the editing zone.



Yeah, that might be true, but I have to get used to it.



> ST is one of the more configurable text editors although the learning curve is steep. If instead of using keyboard shortcuts you really want a menu with commands you can create your own packages with whatever functionality you wish and even have those commands appear in the system menu at the top or in the command palette (control+shift+p).



Yeah, at this point I just need to get acquainted with the way it is. I have looked at the shortcut keys and will have not problem with that, I just need the time to do that. I'm also into customizing, and I see how it's done in SublimeText, but I will need some time once I ge it installed.



> This is for macOS but it should be similar in Windows.



Yes I did open Preferences and had a look, but I just need some time with an up-to-date ST editor.

However, now that I've un-installed SublimeText3, do I need to reinstall it from Nils install? The directions are not at all clear about this.

Thanks Pier Bover, your post is encouraging and helpful.


----------



## Pier (Jan 7, 2018)

Tod said:


> The problem I had is that even though I had "Whole Word" selected, it would search for the first character, not the whole word. Maybe that's what it does if the whole word doesn't exist.



Hmm I just tried it in ST3 on macOS and when "whole word" is selected it does what's expected. If there are no matches nothing is highlighted.

I have to admit that I've been using ST for 6 years almost daily but never used this "whole word" feature. Maybe I'm missing something.



> However, now that I've un-installed SublimeText3, do I need to reinstall it from Nils install? The directions are not at all clear about this.



Sorry can't help you here, I don't use Windows other than for the ocasional gaming session.



> Thanks Pier Bover, your post is encouraging and helpful.



My pleasure!

You could also try Atom. It's a lot more friendly although I don't know if you will be able to compile with it.

https://atom.io/


----------



## beely (Jan 7, 2018)

Pier Bover said:


> You could also try Atom. It's a lot more friendly although I don't know if you will be able to compile with it.



You could always do something similar to what I do - I use Sublime Text for the KSP compiler stuff, but *not* for the actual text editing. So I'm editing text with my regular Mac-based text editor of choice, with the main source file also open in Sublime, and hitting command-K invokes Sublime's KSP compiler as usual.

I don't get all the auto-completion stuff (unless I implemented that in my regular text editor, but I find I don't need to really) and this gives me the best of both worlds - the comfort and features of my text editor, with the KSP compilation stuff in ST...


----------



## EvilDragon (Jan 7, 2018)

Tod said:


> However, now that I've un-installed SublimeText3, do I need to reinstall it from Nils install?



No, install from the github repo I linked you. Nils' website is absolutely not up to date.

From Sublime, go to Preferences->Browse Packages. Drop SublimeKSP archive you'll download from github there and unpack it.


----------



## Tod (Jan 7, 2018)

Thanks Pier Bover and beely, I actually get along fine with Nils older KSE. I've been using that since Nils put out his first editor, 2005 or 6, shortly after Kontakt 2 came out. I've been using the latest version of KSE and then using Nils version of SublimeText3 to compile my scripts when I had the new commands and syntax that Kontakt 5.5+ has.



EvilDragon said:


> No, install from the github repo I linked you. Nils' website is absolutely not up to date.
> 
> From Sublime, go to Preferences->Browse Packages. Drop SublimeKSP archive you'll download from github there and unpack it.



So is there a SublineText3 installer there somewhere? I DLed the "SublimeKSP-master" zip file but I don't see any installer for Subline Text3. Right now I don't have any SublimeText3 of any kind installed, so I can't go to "Preferences->Browse Packages"?

Thanks for your help Mario.


----------



## EvilDragon (Jan 7, 2018)

Come on, Tod, Google...

https://www.sublimetext.com/3


I think it's safe to say that Nils won't be updating KSE any longer, and it seems that the same thing is happening to SublimeKSP. The community forked the compiler, added features to it, so it will very likely stay like that. From now on, get the latest SublimeKSP from github, Nils' site wasn't updated in a long long while.


----------



## Tod (Jan 7, 2018)

EvilDragon said:


> Come on, Tod, Google...
> 
> https://www.sublimetext.com/3



Aah, now I think we're getting somewhere.  

Oops spoke too soon, I installed the latest, but it's asking for a "License key". I suppose there is a little secret License key available some where?


----------



## EvilDragon (Jan 8, 2018)

Yes, if you buy Sublime Text 3 - it is not free, it's $70.  You can use it without the license key, but you'll get a popup to buy a license from time to time (similar to how Reaper does it - except with Sublime you'll get a popup after a certain number of keystrokes, as opposed to just when you're opening the program).


----------



## Tod (Jan 8, 2018)

Okay, thanks again Mario, I had the wrong impression. I can't get into it at all, so I'll have to think abut this.


----------

