Sublime Forum

Simple Questions, Simple Answers

#1

So, on a few forums I have been apart of there is a topic called ‘Simple Questions, Simple Answers’. Basically, it’s a thread to ask a quick question that generally wouldn’t merit an entire thread.

Since I’ve been messing with Sublime it would seem this forum would greatly benefit from one. I often have small quick questions I’d like to ask but feel it would be spammy / overkill to make a thread to ask them. So I’ve decided to start one. In short, I picture it as being as if the Getting Started guide had a thread. (On a side note, I know the getting started guide has a thread, I just feel as though that thread is more for the purpose of how to improve that guide and not what this thread aims to do.)

I wasn’t really sure where to stick this thread, General Discussion or Technical Support. It doesn’t seem as though many questions get asked here, but Technical Support seems to be better suited for bug reporting, so I decided to stick it here. If it’s felt that it’s better placed elsewhere feel free to move it and also if it’s felt that there is no need for such a thread, likewise feel free to delete it.

Any who, I hope this ends up being helpful.

I had a question to start this thread off, but as I was typing this I have forgotten it! :s

0 Likes

#2

Since there aren’t any simple questions yet, I’ll give a simple feature: Has anyone ever used the ‘Preserve case’ button in the replace panel? It can be handy, but I don’t think the replace panel sees much use in any case, that’s certainly the case with me.

0 Likes

#3

Ah nice. I haven’t even needed to replace anything yet but just tested that out. Could come in quite handy.

I also remembered my question! Is there an easy way to turn on vertical rulers? In Notepad++ it would mark all tabs with a light dotted vertical ruler so you could easily tell what section of the code you were in when you have a lot of nested sections. Like so.

I assume it’s with:

# Columns in which to display vertical rulers, space separated rulers

Though it’s not doing anything for me right now and I’m not sure what parameters it accepts.

0 Likes

#4

Set it to, say, 80, to have a ruler drawn in the 80th column, i.e., in the console, type view.options().set(‘rulers’, ‘80’). It’s handy if you’re trying to keep to an n character limit.

It’s not like the indentation indicators in the screenshot you linked to, though I expect that’s just rendering tab characters so that they look like vertical rulers: you can turn on visible whitespace in sublime, but it’s not drawn the same way.

0 Likes

#5

I’m going to have to disagree with you Jon. I frequently use this panel. It’s really invaluable when I’m trying to do cryptographic work and need to do lots of case sensitive and specific replacements.

0 Likes

#6

[quote=“samkerr”]

I’m going to have to disagree with you Jon. I frequently use this panel. It’s really invaluable when I’m trying to do cryptographic work and need to do lots of case sensitive and specific replacements.[/quote]

Yes I think it should stay I’ve used but not very often, I usually just do (?i) in the regex, What I would like is shortcuts to select/unselect the options in the find/replace panel…

for example to toggle regex matching something like alt+r, then toggle search in selection, alt+s, etc… I hate to use the mouse and select them when I’m typing the pattern to find/replace… e-text had this.
Not a biggie but useful/productive :smile:

0 Likes

#7

i too have used the preserve case option. as EJ12N, not too often, but when i did, it was a time saver.

0 Likes

#8

Is there any quick and easy way to change the functionality of opening new files? I’d rather have them open furthest to the right rather than to the right of the currently active file. Nothing major, just a small annoyance.

0 Likes

#9

+1

0 Likes

#10

I’ll add an option for this in the next beta

0 Likes

#11

[quote=“EJ12N”]
for example to toggle regex matching something like alt+r, then toggle search in selection, alt+s, etc… I hate to use the mouse and select them when I’m typing the pattern to find/replace… e-text had this.[/quote]

+1. I do a lot of find/replace and want keyboard shortcuts to toggle the find/replace options. It helps my productivity a lot.

0 Likes

#12

Key bindings for the find / replace panels are in the 20091017 beta - also, open-furthest-to-the-right is available via editing Preferences/General Preferences

0 Likes

#13

how do i bind to the keypad asterisk? i want to bind: ctrl+shift+* also tried ctrl+shift+keypad_asterisk didn’t help

0 Likes

#14

Maybe keypad_multiply? Not sure.

0 Likes

#15

BINGO!

0 Likes

#16

I have a file with about 90k characters and sublime really slows down with loading the file as well as copying and pasting large chunks of code. Just kinda of curious what part of the program slows it down so much and if that is something that could be fixed in the future?

0 Likes

#17

you can try two options that was raised in the past: first is to temporarily turn off syntax highlighting (change file syntax to ‘plain text’), the other option is to turn off minimap (alt+m). this is not to underestimate this issue, which i think deserves better attention and a more robust solution from sublime side.

0 Likes

#18

Changing the syntax highlighting to plain text should be the answer.

The issue here is that Sublime Text always keeps the syntax highlighting information about the buffer fully up to date, which results in a bunch of wasted work doing calculations for text that won’t be displayed. It’s on the todo list to change this to a lazy evaluation model.

0 Likes

#19

What encoding does Sublime save a new file as? Does it just use the fallback encoding setting?

Also is there anyway to tell what an opened file’s encoding is?

0 Likes

#20

If you hover over the tab for the file in question, the status bar should show the full path and encoding. In another thread I did wonder whether encoding might be made visible in the status bar all the time, but that’s just personal preference.

0 Likes