Setting up Sublime Text 2
blog.alexmaccaw.com
blog.alexmaccaw.com
Here's another post that calls Sublime's default theme "pretty ugly" and "god-awful": http://floatleft.com/notebook/making-sublime-text-2-beautifu...
I use a modified Cobalt that has much more green in it. Honestly I love that Sublime allows you to fulfill that urge to express yourself while you're expressing yourself (yo dawg etc.).
The initial code theme is pretty ugly thank god for themes like tomorrow, soda and similar.
I find the blog post with a title "setting up sublime" that doesnt cover the package manager for plugins pretty laughable. Its kind of the best part..
Installing package control is basically the first thing this post covers.
Don't absolutely love it, but after a month or so it's definitely helped me find the app easier.
I never thought it looked like a disk drive. I guess it looks like an external desktop hard drive a bit though.
Maybe some people really hate dark themes?
Sublime is nice, and easy to extend, but it only extends so far, while Emacs is infinitely extensible.
You can practically live in Emacs[1]; some things I wanted to do in Emacs were hard to pull off, but I'm yet to find something it can't do. And it does so for years.
Fashionable editors come and go, but Emacs forever stands; and if there is one thing I don't think I'll be able to ever do again, is learn another set of editor shortcuts. Those I used were drilled there ~10 years ago, and I don't think they'll ever come out.
Also, author seems to take great deal about changing the editor theme and icon. Why should you ever care about that, outside a screenshot contest?
Editor should look good by rendering a nice font at a size you find comfortable, highlighted in colors you find easy on the eyes. If you look at the chrome, well, you're not spending enough effort editing.
[1] I'm not the one to start wars. vi might be just as good, but I'm not going to learn it this side of the river Styx.
Of course you aren't, as long as it is one of the two editors you approve of.
I'm just not going to use it, and keep wondering why one diverts so much efforts to editors that aren't the One True Editor.
I have ido and find-file-in-project installed but neither of them seem to include directories in the fuzzy search. So if I search 'custcore' it won't match 'customer/core.clj'. If I instead search 'core' it is too broad of a term. I really need very little out of an editor, but this is one of those things.
It fills in the common project search and fuzzy filename search features(amount other things) and otherwise stays out of the way.
I do not have extensive experience with Emacs. However, I've often heard it described as an infinitely extensible system, or as you put it "you can practically live in Emacs."
I find that a bit odd, because it's like building an OS inside an OS. I already have an infinitely extensible system, namely my actual OS (*nix). I want a tool that nicely fits within that system, not supplants it. And then I want that tool to be the best possible tool at what it is (in this case, a code editor). If I need other operations/actions, then I will use other tools.
You find Emacs "a bit odd" because it's necessary to put in about a week of diligent study in, that's the barrier to entry, STUDY.
Other editors are just editors, that may or may not have extensions, Emacs is a textual environment.
If you look at it from the perspective of games, It's kind of the difference between Pac Man and Minecraft.
(defun full-screen ()
"Indicate to the window manager that this frame should be full screen"
(interactive)
(x-send-client-message nil 0 nil "_NET_WM_STATE" 32 '(2 "_NET_WM_STATE_FULLSCREEN" 0))) (describe-key (kbd "<f11>"))
<f11> is undefinedIt is unbound on linux as well (emacs24)
I tried ST2 to see what all the fuss was about. I still use it occasionally (mainly for its layout view on the right hand side), but Notepad++ is my main editor as ST2 has a particular problem that you can't toggle the reloading of a changed file.
I use Vim for huge files.
In any case, when I am programming I spend more time thinking than typing and unless I am doing heavy re-factoring of code, more powerful text editors are just a non issue for me.
The NP++ behaviour is ideal and a feature I use a lot. Unless something has changed very recently in ST2, there is no way to duplicate this behaviour. I believe there are some circumstances where ST2 will prompt you. IIRC if the file name has changed, but this is only part of the problem for me.
My favorite example is to use Zen Coding in both.
To do this, put the following in your Key Bindings - User file:
[
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" }
]AdvancedNewFile -- easy file/directory creation
Alignment -- shortcut for instant alignment
Emmet -- essential for HTML/CSS
GitGutter -- see diff marks in gutter
Origami -- additional shortcuts for split panes
VintageEx -- emulation of Vim's Ex-mode
The Vim emulation isn't one-to-one, but it's pretty good with Vintage mode enabled and the VintageEx plugin installed.
On the occasion where whitespace does pollute the diff, GitHub has a convenient feature where you can append '?w=1' to any diff URL and whitespace changes will be omitted.
What are the arguments for having whitespace removal as a coding standard?
Having the editor just trim those automatically is just delegating the trailing whitespace care to a piece of software with a simple rule: no whitespace allowed.
If the entire team working on a project agrees to this rule, everything's peachy, and it's really easy to convert an existing repo to it - whenever you touch a file, if there are whitespace changes, commit them to a separate commit.
At the end of the day, it's just standard, so doing invasive changes to a project that doesn't follow that standard (as in the pull reqs you descibed) is wrong, but that doesn't mean the rule itself is bad.
As for ST2, it allows easy per-project settings so you can easily enable it globally and disable on a specific project if needed (or vice versa).
git diff --ignore-space-at-eolIdeally whitespace would be trimmed from lines that have otherwise changed, thus ensuring a gradual (though probably never completing) repair of the code.
Half the time the pointless whitespace is introduced by an editor that auto-indents for you.
There's no reason to use shitty tools here.
It can:
git merge -X ignore-space-at-eolIncidentally, in Sublime Text -- as well as Emacs and most Mac OS X applications, as this is a system-wide keyboard binding -- you could just hit ^K after the equals sign for "delete everything from here to the end of the line."
1. you have to check if you're in insert mode or not. Or you think you are, you're not, write vf5, press esc, press u to undo, retype vf5. Or you don't know and you press esc before it, so it's actually esc+v5j, and esc is not the easiest reachable key
2. you have to know you want to go down 5 lines. In reality, you know you want to go "a bit" down, so in a real world situation you either count (slow), make a subtraction with line numbers (slow) try to guess a number of lines, check what you've reached, keep retyping. This is all but "cognitive free". What is cognitive free (although requires more keystroke) is just press shift+down+down+down+down+down, for me.
1. you have to check if you're in insert mode or not.
You should always be in normal mode unless you're actively inserting, so this shouldn't be something you really have to think about.
2. you have to know you want to go down 5 lines....
Since your example assumes that line numbers are visible, you could just type vnG, where n is the line number you're trying to put the cursor before. No subtraction needed. Depending of the shape of the text, there are probably other intuitive approaches as well.
Does the "tao" of vi take time to internalize? Sure. But once you've done that, you can be blazing fast.
You're still mentally translating a what into a how. You almost certainly don't want to highlight 5 lines down for its own sake, you probably want to highlight, say, the body of a function. Vim provides a command to just do that directly.
Vim and Emacs are both such strange editors- I'd be quite happy if some other open source editor replaced them both as the default editor (that made better decisions in terms of plugins and abstruse key sequences).
The best bit about Emacs is the configuration, and I could give or take the awkward keybindings. Maybe if LightTable supported configuration with ClojureScript and offered a comprehensive API for it there'd be a more modern equivalent.
I've learned a lot and I'm actually at a point where I feel the need to move on to Vim (due to the limitations of ST2's mimicry of Vim)
Disclaimer: Yes, this post is a sarcastic parody of the parent. Mostly...
I can understand their use being much more of a necessity in previous years, but I think their time of unparalleled performance and productivity are over. Having used Vim for a few years (having studied it for many hours) and then switching to Sublime Text - I don't see any productivity decrease.
That being said, if you are happy using Emacs - by all means continue to do so!
Let's list out some of my favorite features of Sublime Text (please keep in mind I switched FROM vim to Sublime):
1.) VIntage mode that allows for 99% of day-to-day vim stuff 2.) A plugin system that uses Python and offers a full-featured API (vimscript anyone? pfft) 3.) Full mouse/windows support (i.e. it's not ghetto mouse support thrown over a terminal window from the '70s) 4.) Textmate-style themes that even allows tweaking to the UI 5.) Native Linux, MacOS, and Windows versions
The only negative is that it isn't open-source, which I hate, but the licensing is very reasonable (it's per person, not machine, so you can install it on as many devices as you use)
I'd really like to see you give a real-world example of how it's slow compared to vim/emacs, because maybe I'm missing something. I've been using Sublime Text for over a year and have only had to break out vim a couple of times for some crazy vim-style search/replacing or to quickly open some super-large text files (I think better large-file handling is in the works for sublime though...).
Oh, and one of Sublime Text's best feature? It doesn't come with the elitist attitude that a lot of vim and emacs users seem to get... :)
This doesn't strike me as wildly unreasonable.
Actually, things are stored in a few directories. It took a while to figure out where Sublime stores everything so I could write a dotfiles script for it.
Having to set things up through Package Manager is a pain. Not sure why that's the first step whenever I read an article on Sublime. A simple package file script that git clones/pulls plugins is more maintainable.
h1
| We build
span.colored-text scalable
| web sites & engineer
span.colored-text powerful
| platforms
If you delete trailing spaces, you'll have no spaces between any word at the end of the line and the word in the next section.Point being: trailing spaces can be significant.
https://github.com/DisposaBoy/GoSublime/issues/212
Probably an issue for other languages as well.
1) move the /User folder under "Sublime Text 2/Packages" over to Dropbox/ST2/User
2) in Win goto CMD and from the %APPDATA%\Sublime Text 2\Packages folder enter: mklink /D "User" "path to\My Dropbox\ST2\User"
3) 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.
I find the default icon better looking than the one the author is using, so I guess this is just a matter of taste. Same goes with the color scheme.
Is everyone else developing everything on their local machines?