Sublime Forum

On the edge of purchasing

#1

I really like Sublime Text 2, or maybe the idea of it. I was persuaded to use the program, but it’s difficult to get what I want done. I’m not afraid to admit I currently use Dreamweaver (DW), but ONLY for the code editing. Literally, I use it nothing but for a text editor. Any other feature of that software is garbage to me (at least I don’t use it). HOWEVER, there are a few things that are hard in transitioning to ST2. I already have DW, and don’t mind spending $40, but I always end up going back to DW because of a few simple things.

I am using the Windows 64bit version. I would like to:

  1. Know how to have REAL TIME syntax checking. In DW, basic PHP syntax (and other languages, including JS) worked flawlessly as I typed. Things like missing a bracket, or just simple string concatenation. if I type echo ‘hello world’$myvar; it would immediately tell me (once I stopped typing) that there was a syntax error. I might add that I’ve tried various syntax plugins, and I have not gotten any to work.

  2. When I am using Sublime, when I open a bracket or parenthesis ( it automatically closes it for me (well, it provides the closing bracket/parenthesis, and leaves the cursor between the brackets/parenthesis)… The problem is, if I am typing $var = $_POST’var’]; it leaves me in the awkward position of having to use the arrow to move over and then place the semi-colon. Is there a way to prevent this, or maybe get it to close off the statement for me with ; ? Maybe something I am missing?

These are just two items. I am not sure the response I will get, but I am interested in these two items.

0 Likes

#2

github.com/SublimeLinter/SublimeLinter

[quote=“kegster”]
2. When I am using Sublime, when I open a bracket or parenthesis ( it automatically closes it for me (well, it provides the closing bracket/parenthesis, and leaves the cursor between the brackets/parenthesis)… The problem is, if I am typing $var = $_POST’var’]; it leaves me in the awkward position of having to use the arrow to move over and then place the semi-colon. Is there a way to prevent this, or maybe get it to close off the statement for me with ; ? Maybe something I am missing?[/quote]

You could do a snippet to add a semicolon everytime you close a bracket, but, what if this isn’t the last statement of your line? You can also disable the auto-closing behaviour by adding this to your settings:

"auto_match_enabled": false
0 Likes

#3

By PHP, I mean ANY language… can’t get it to work.

0 Likes

#4

For most things there are plugins to fill the gaps. Do you print much from DW? Believe it or not, you cannot print easily without a workaround…not sure why.
Beautiful editor for the most part though.

0 Likes

#5

Really? Well do you know of a plugin that lets me type a file name without a file extension when trying to OPEN a file?

Also, are you saying DW can’t print well? Never tried haha.

0 Likes

#6

Press Ctrl+P to open the “Goto anything” console and type the filename. It will use fuzzy autocomplete with files in your current project folder (use open -> folder for that).

0 Likes

#7

watch the perfect workflow videos linked on the support page here…

http://www.sublimetext.com/support

bottom link

0 Likes

#8

I think he’s saying that ST2 doesn’t print without workarounds/plugins, so if you print a lot from DW you should make sure you’re OK with the ST2’s lack of built-in print support.

0 Likes

#9

I think you are missing the bit where you simply type the closing square bracket. Just type it like you normally would and it automatically puts your cursor where it would have been.

Though, admittedly there is something psychologically backwards about this situation and I find myself trying to press the right-arrow far more often than I need to in this situation (which slows down productivity ever so slightly).

0 Likes

#10

I find the behaviour of ST-brackets much better than other editors. When I type the closing bracket (to move beyond it) ST *always *just over-writes it; in other editors it will sometimes over-write, but often introduce another closing-bracket: this is more error-prone.

Admittedly, I sometimes have to type a bracket twice in order to introduce a new one, but at least this behaviour is consistent.

0 Likes

#11

I also particularly enjoy ST’s ability to “wrap” a selection if you type a character that it makes sense on (a bracket or paren or quote).

Try it, select a word and then type a double-quote, it will wrap the word in the quotes. Super slick.

Also I think this is a digression.

To bring it back on topic, I sure did pay for ST3 once I got my rMBP and couldn’t be happier. I never use anything else to edit files.

0 Likes

#12

I find the “end” key to be handy in situations where you want a semicolon at the line-end. End->;->return gets me there. If that fits your workflow, you could easily create a macro to do all three and bind it to a key of your choice (alt+enter etc.).

The thing with Sublime, as with any good text editor, is that you invest some time moulding it to your needs with plugins, prefs, macros and keybindings.

:smile:

0 Likes