If you use a dark color scheme, you should install a theme that has a similarly dark background for the sidebar.
The "Soda Dark" theme goes well with the default color scheme. (The ui theme is separate from the syntax highlighting color scheme, you don't have to use the text colors seen on the github examples)
Not a plugin, but if you haven't realised it yet, know that the multiple cursors each come with their own separate clipboard. Learning how to combine this with the move and select by word and the parenthesis-movement commands is what will make the vim users eventually respect you.
Oh and you can hack your language syntax definition files to make more things apart from function definitions turn up in the function browser. This is especially useful for ruby DSLs, sinatra etc.
I'm a big fan of the Nil theme (https://github.com/nilium/st2-nil-theme). I really love the modified indicator on the tabs. Just be sure to follow the instructions when installing, because you have to turn on a sublime setting. Also, be sure to restart when switching themes, sometimes not everything works right unless you do. This goes for every theme though.
Seconded; GoSublime gives you a nice REPL for Go's build and test commands, package completion and linting. It is the second Sublime Package I install, after Package Control and before my own Antiki.
Why I love ST2: multi-platform, fuzzy search, plugins, multiple cursors, JSON config files.
My setup:
- Package Control plugin: the very first thing you should setup after installing ST2 (it should really be a part of ST2)
- Next step sync config files over Dropbox to get exactly the same editing environment from Win, Mac, and Linux
- move the /User folder under "Sublime Text 2/Packages" over to Dropbox/ST2/User
- in Win goto CMD and from the %APPDATA%\Sublime Text 2\Packages folder enter: mklink /D "User" "path to\My Dropbox\ST2\User"
- in Mac OSX/Linux goto the Packages folder (you can find the location under >Preferences>Browse Preferences) and enter: ln -s pathto/Dropbox/Sublime\ Text\ 2/User ./User
- the fantastic thing with this setup is that in any new machines, Package Control will automatically take care of installing any missing plugins
- Keybindings: tons of customizations to suit what I am used to and work across all OS's
- Theme: Soda Dark
- Colors: Made of Code
- My favorite plugins:
Alignment,
Bracket Highlighter,
Emmett,
FileDiffs,
SublimeCodeIntel,
SublimeLinter,
Tag
ST2 is the best investment I have made in software apart from open source.
This is interesting. I guess it's so that if you cat a file, it doesn't clobber your cursor? I've always noticed that git will say "No new line at end of file", but I've never really known if that's a bad or good thing, or why it matters.
I still have a habit, even in vim, of putting a newline at the end of the file (such that now I end up with two newlines). Old habits die hard, I guess.
Not to go all Stallmanesque here, but doesn't it bother you to use a proprietary text editor when there are so many excellent free/open-source ones around?
Not at all. Speaking for myself here, but while I much prefer open source to proprietary software, I find Sublime Text 2 blows any other editor I've used out of the water and I'm not going to not use it just because it's proprietary (same reason I use OS X, Photoshop (versus GIMP), etc).
This question really only makes sense to me from a Stallmanesque standpoint though (unless you don't have much money for some reason, in which case the financial considerations come into play.)
Surely unless you have some ideological reason to pick a FOSS editor, you'll simply use the best one available.
> Not to go all Stallmanesque here, but doesn't it bother you to use a proprietary text editor when there are so many excellent free/open-source ones around?
Use the best tool for the job. Screw extreme philosophies.
I switched to vim a year ago, and I fucking love it. The one thing I miss from ST2 is column editing/multiple cursors. Column editing fulfills the same kind of need as basic usage of vim macros, I think (i.e., applying some kind of sequence of edits to multiple rows), but it's visual and you get instant feedback (across all rows), which makes it easier and something you can sort of feel out iteratively.
For example, supposed I have a row like (making up these names as I go, and suppose the list is longer):
and I want to insert after the first underscore the word class, so I'd get Controller_Class_Section and so on (this is a contrived example, but one has to do these kinds of things sometimes.)
In vim, I think I'd record a macro, but I'd probably forget some parts (like moving to the next line at the end) and have to undo and whatnot (could use a regex too, but that's a bit harder--I'm practicing recently to be able to do it more effortlessly.)
In ST2, what you do first is create a cursor at the beginning of each row (option + down arrow on OS X.) Then you move ahead one word (Opt + Right arrow on OS X.) Now the cursor is right before the underscore, even though the underscore is in a different position on each row. You can see that it's in the right place on each row, so it's hard to make a mistake, and if you need to do something more complicated, that remains true. Then, you just type _Class, and it types live on each row, once again making it so you get instant feedback, and it's hard to make a mistake.
That to me is the biggest actual advantage of ST2 over VIM, but there are other reason to not switch, like vim's steeper learning curve (when most of us are already busy, and learning other stuff at the same time), and the fact that some people prefer the mouse, which behaves strangely in vim.
I use Sublime Text 2 for its GUI powers: proportional-width fonts (I use Verdana), the code minimap, and the pretty file-browser sidebar with easy-to-click disclosure triangles.
I also like that it’s easier to remember most Sublime Text 2 commands – the Command Palette (⇧⌘P) lets you fuzzy search all commands. So you can search for “syntru” and find the option “Set Syntax: Ruby” instead of having to remember Vim’s “:setf ruby”.
Finally, I use Expand Selection to Word (⌘D) to quickly select multiple instances of a variable whose name I want to change – it’s slightly more convenient than it would be in Vim.
On the other hand, I miss Vim’s editing model. It’s a lot more cumbersome to edit line-wise or move the cursor with Sublime Text’s keyboard shortcuts. And Sublime Text’s “Vintage” Vim emulation mode is a poor substitute. As another commenter said, Vintage is in the uncanny valley. Every now and then you run into a Vim command that just doesn’t work and it breaks your flow. For example, Escape is overloaded as both “go from Insert mode to Normal mode” and “collapse multiple carets into one”, and I never remember which it will do when I have a multiple selection in Insert mode.
I've been in the process of switching from Vim to ST2 for a couple months (custom plugins in both, not in a hurry) and the main reason for doing it is because Python and the extension API are MUCH better than the Vim equivalents. If you don't do custom plugins, it really doesn't matter.
Part of the reason for the delay is the lack of equivalent Vim workflows in Vintage. This has been improving a lot thanks to the people working on Vintage and at this point the only holes in my set are c-i/c-o and surround.vim shortcuts. I had to re-train myself to go from Esc to ctrl-[ since Esc conflicts heavily in ST2 but I've been meaning to do that for years in Vim anyway so I consider that a benefit.
You might also want to try (my plugin) BrowserRefresh: Save the file you are working on and refresh your browser (or many browsers) with one keystroke.
Sublime Text 2 plugin writing is surprisingly easy via python. I recently wrote a plugin (SublimeJump https://github.com/tednaleid/SublimeJump) to let you jump to any visible character with a couple of keystrokes. It's similar to AceJump (emacs) or EasyMotion (vim) if you're familiar with those.
You can also check Tuts+ free tutorial about ST2. It contains a list of interesting plugins (most of them mentionned in this article) alongside others I find quite useful.
I would avoid Prefixr like the plague as it's broken to the point of being destructive, and not maintained. Installed it today before I saw this post, stopped using it immediately.
He earned a 6 month holiday considering the workrate he put in on those early builds, and the amount of cash he must have made in the intervening time.
It's not like the thing is riddled with outstanding issues.
I'd love to see that, too! Jon's been putting out updates way too fast [0] to be able to keep that up forever, though. The API[1] is good enough that generations of plugins could be considered future versions. I'm glad it's successful enough that he can afford a vacation.
I really like the general way of working with SublimeText, but there's one major reason I simply cannot use it for the job: it is terribly slow with large files. One of the things we have to do often is open a >10mb logfile on a cifs share and quickly search through it. It takes ST2 over 10seconds to open the file. The same for each refresh of the file. Even wordpad on Windows loads the file faster, so there seems to be something quite off at the core side of things.
I have the same issues regarding load speed on large files. I am a long time UltraEdit user and it is the fastest editor on Windows for working with large files that I have found. Unfortunately UltraEdit has a pretty awful UX compared to modern software. It is still very much a Windows 9x app which kind of sucks. Also it has some annoying as hell Unicode issues which is why I ended up switching to Sublime Text for 99% of my work and just keep UltraEdit around for those one a month moments.
This also bothers me. It gets even worse when using a linter plugin. Sometimes when I open a complex file (for example a huge minified JS library), the whole editor will just crash because of the linter plugin. :/
It's spelled "Emmet" (docs.emmet.io) and it's more widely known as "Zen Coding". (I asked the author about the name change and forgot why now - some sort of trademark dispute).
Yeah, it seems like Emmet removed one of my favorite features with Zencoding. I could hop into a string of HTML attributes and hit "." or "#" and it would create a new attribute of class="|" or id="|" respectively, and place the cursor in between the quotes.
Does it have decent SFTP out of the box or as a free plugin? I'd like one of those persistent SFTP browsers, not the default one which does not follow the principle of least astonishment - it uses a custom interface where I have to select the SFTP server every time I want to open another file and there is no multiple selection. It looks like an original UI design invented by a programmer with no UI design experience, reinventing the wheel.
I found SublimeCodeIntel to be unreliable, so I use SublimeCTags[1]. I've also bound mouse3 to navigate to a function definition in my User .sublime-mousemap file:
I've never gotten that plugin to work well with my PHP code. Code complete is awful. I've switched over to PhpStorm for PHP code because it has static analysis and refactoring.
I tried using ST2, but it lacks one basic feature that is essential to me. It will automatically update a loaded file with any changes made externally. This is fine, except when you don't want it to do this and then discover there is no way to toggle this behaviour.
It should just be a simple configuration option but until it is added then this is a deal breaker.
BUT it seems that this doesn't always work. I just tested with a newly created file and for some reason there was no warning, it just reloaded the file.
[+] [-] JonnieCache|13 years ago|reply
The "Soda Dark" theme goes well with the default color scheme. (The ui theme is separate from the syntax highlighting color scheme, you don't have to use the text colors seen on the github examples)
https://github.com/buymeasoda/soda-theme/
In terms of plugins, apart from the ones mentioned here, Quick File Creator is indispensable: https://github.com/noklesta/SublimeQuickFileCreator
Not a plugin, but if you haven't realised it yet, know that the multiple cursors each come with their own separate clipboard. Learning how to combine this with the move and select by word and the parenthesis-movement commands is what will make the vim users eventually respect you.
Oh and you can hack your language syntax definition files to make more things apart from function definitions turn up in the function browser. This is especially useful for ruby DSLs, sinatra etc.
[+] [-] wesbos|13 years ago|reply
http://wesbos.com/cobalt2-theme-sublime-text-2/
[+] [-] jscheel|13 years ago|reply
[+] [-] pearkes|13 years ago|reply
[1] https://github.com/DisposaBoy/GoSublime
[+] [-] swdunlop|13 years ago|reply
[+] [-] lunixbochs|13 years ago|reply
[+] [-] chesh|13 years ago|reply
My setup:
- Package Control plugin: the very first thing you should setup after installing ST2 (it should really be a part of ST2)
- Next step sync config files over Dropbox to get exactly the same editing environment from Win, Mac, and Linux
- Keybindings: tons of customizations to suit what I am used to and work across all OS's- Theme: Soda Dark
- Colors: Made of Code
- My favorite plugins: Alignment, Bracket Highlighter, Emmett, FileDiffs, SublimeCodeIntel, SublimeLinter, Tag
ST2 is the best investment I have made in software apart from open source.
[+] [-] unwiredben|13 years ago|reply
[+] [-] benatkin|13 years ago|reply
[+] [-] Silhouette|13 years ago|reply
Could you clarify this? I work with text files on both Windows and Linux all the time, and
View -> Line Endings -> {Platform}
seems to convert between EOL conventions on the different platforms as I would expect.
[+] [-] notJim|13 years ago|reply
[+] [-] groovy2shoes|13 years ago|reply
[+] [-] unknown|13 years ago|reply
[deleted]
[+] [-] slurry|13 years ago|reply
[+] [-] dkulchenko|13 years ago|reply
[+] [-] notJim|13 years ago|reply
Surely unless you have some ideological reason to pick a FOSS editor, you'll simply use the best one available.
[+] [-] laureny|13 years ago|reply
Use the best tool for the job. Screw extreme philosophies.
[+] [-] kaolinite|13 years ago|reply
[+] [-] frewsxcv|13 years ago|reply
[+] [-] notJim|13 years ago|reply
For example, supposed I have a row like (making up these names as I go, and suppose the list is longer):
and I want to insert after the first underscore the word class, so I'd get Controller_Class_Section and so on (this is a contrived example, but one has to do these kinds of things sometimes.)In vim, I think I'd record a macro, but I'd probably forget some parts (like moving to the next line at the end) and have to undo and whatnot (could use a regex too, but that's a bit harder--I'm practicing recently to be able to do it more effortlessly.)
In ST2, what you do first is create a cursor at the beginning of each row (option + down arrow on OS X.) Then you move ahead one word (Opt + Right arrow on OS X.) Now the cursor is right before the underscore, even though the underscore is in a different position on each row. You can see that it's in the right place on each row, so it's hard to make a mistake, and if you need to do something more complicated, that remains true. Then, you just type _Class, and it types live on each row, once again making it so you get instant feedback, and it's hard to make a mistake.
That to me is the biggest actual advantage of ST2 over VIM, but there are other reason to not switch, like vim's steeper learning curve (when most of us are already busy, and learning other stuff at the same time), and the fact that some people prefer the mouse, which behaves strangely in vim.
[+] [-] roryokane|13 years ago|reply
I also like that it’s easier to remember most Sublime Text 2 commands – the Command Palette (⇧⌘P) lets you fuzzy search all commands. So you can search for “syntru” and find the option “Set Syntax: Ruby” instead of having to remember Vim’s “:setf ruby”.
Finally, I use Expand Selection to Word (⌘D) to quickly select multiple instances of a variable whose name I want to change – it’s slightly more convenient than it would be in Vim.
On the other hand, I miss Vim’s editing model. It’s a lot more cumbersome to edit line-wise or move the cursor with Sublime Text’s keyboard shortcuts. And Sublime Text’s “Vintage” Vim emulation mode is a poor substitute. As another commenter said, Vintage is in the uncanny valley. Every now and then you run into a Vim command that just doesn’t work and it breaks your flow. For example, Escape is overloaded as both “go from Insert mode to Normal mode” and “collapse multiple carets into one”, and I never remember which it will do when I have a multiple selection in Insert mode.
[+] [-] grayrest|13 years ago|reply
Part of the reason for the delay is the lack of equivalent Vim workflows in Vintage. This has been improving a lot thanks to the people working on Vintage and at this point the only holes in my set are c-i/c-o and surround.vim shortcuts. I had to re-train myself to go from Esc to ctrl-[ since Esc conflicts heavily in ST2 but I've been meaning to do that for years in Vim anyway so I consider that a benefit.
[+] [-] grimgrin|13 years ago|reply
http://www.sublimetext.com/docs/2/vintage.html
[+] [-] nshankar|13 years ago|reply
[+] [-] flexterra|13 years ago|reply
http://gcollazo.github.com/BrowserRefresh-Sublime/
#ShamelessPlug
[+] [-] tednaleid|13 years ago|reply
[+] [-] mode80|13 years ago|reply
[+] [-] Kaivo|13 years ago|reply
https://tutsplus.com/course/improve-workflow-in-sublime-text...
[+] [-] taitems|13 years ago|reply
https://github.com/wbond/sublime_prefixr/issues/4
[+] [-] stared|13 years ago|reply
Additionally, as a scientist, I use a lot (and like a lot) https://github.com/SublimeText/LaTeXTools.
[+] [-] swah|13 years ago|reply
[+] [-] JonnieCache|13 years ago|reply
It's not like the thing is riddled with outstanding issues.
[+] [-] Benferhat|13 years ago|reply
[0] https://www.sublimetext.com/dev
[1] http://www.sublimetext.com/docs/2/api_reference.html
[+] [-] stinos|13 years ago|reply
[+] [-] ditoa|13 years ago|reply
[+] [-] mobweb|13 years ago|reply
[+] [-] javajosh|13 years ago|reply
[+] [-] nobleach|13 years ago|reply
[+] [-] dubcanada|13 years ago|reply
Emmet is kind of version 2 of zencoding. But for as far as you should concern yourself they are two different plugins.
[+] [-] phatbyte|13 years ago|reply
[+] [-] visarga|13 years ago|reply
[+] [-] testrecord|13 years ago|reply
[+] [-] mambodog|13 years ago|reply
[1] https://github.com/SublimeText/CTags
[+] [-] dreeves|13 years ago|reply
Does anyone know if that's possible in Sublime Text?
Link to the xterm font: http://yootles.com/outbox/FixedMedium6x13.dfont
PS: It also needs the line spacing set to .8 which I've found a way to do in TextMate and Terminal.app.
[+] [-] dkulchenko|13 years ago|reply
See http://www.reddshift.com/2011/10/turn-off-anti-alias-for-sub... for how to turn off anti-aliasing, and https://gist.github.com/1149379#file-sublime-text-2-settings... for line spacing.
[+] [-] maebert|13 years ago|reply
[+] [-] Osiris|13 years ago|reply
[+] [-] phatbyte|13 years ago|reply
[+] [-] SeanDav|13 years ago|reply
It should just be a simple configuration option but until it is added then this is a deal breaker.
[+] [-] mobweb|13 years ago|reply
BUT it seems that this doesn't always work. I just tested with a newly created file and for some reason there was no warning, it just reloaded the file.