Live data from Hacker News

Just Use Sublime Text

delvarworld.github.com

251–260 of 296 posts

Re: Just Use Sublime Text

#251

Earlier quoted context omitted.

How have you customized Vim to make it suitable for writing text that doesn't have a line break every 50 characters or so?

Primarily by having these in my .vimrc: autocmd FileType text set textwidth=75 autocmd FileType text set formatoptions+=a autocmd FileType text set formatoptions+=w explanation: - formatoptions+=a: auto-format as you insert text, which means it will (basically) automatically insert a newline once you've typed 'textwidth' number of characters on your line. it will insert a newline while you are typing. - formatoptions…

Thank you, that's useful to know if I ever try vim.

Re: Just Use Sublime Text

#252
post #231
post #219

Earlier quoted context omitted.

Honestly, I can't remember finding a recent text editor that couldn't do it, TextAdept being the latest one. Sublime Text definitely has major selling points (in the sense of having advantages compared to other editors) but this is hardly one of them.

Can you tell of any IDE editor that has this? (Eclipse: nope, Netbeans: nope, all the Jetbrains IDEs family: nope, Visual studio: nope / actually there's one handicaped plugin to sort of do it in VS)

I've never used any IDE other than Emacs, so I can't comment on that.

Re: Just Use Sublime Text

#253
post #243

Earlier quoted context omitted.

In fact, it's the opposite. Using keyboard commands for movement is more distracting (and measurably slower) than using the mouse. It is precisely that the mouse is less distracting that tricks the mind into thinking the keyboard is faster. See AskTog: http://www.asktog.com/TOI/toi06KeyboardVMouse1.html http://www.asktog.com/TOI/toi22KeyboardVMouse2.html http://www.asktog.com/SunWorldColumns/S02KeyboardVMouse3.htm...…

We can each run that experiment 100 times in a few minutes. I did, keyboard movements were faster. https://yourlogicalfallacyis.com/appeal-to-authority EDIT: not sure why the downvotes—should I have said "faster FOR ME"? Anyways, hi haters.

It's not an appeal to authority: that would be if I were appealing to the authority for the authority's sake; but I am appealing to scientific research presented by the authority. I'm fairly certain you'd agree that appealing to scientific evidence is valid, as you've tried to present it to me as part of your argument. I think the downvotes are because you running some kind of "experiment" on your own is different from a human interface researcher's actual research.

Re: Just Use Sublime Text

#254
post #19

"The Editor You Need To Read (At Least) Two Books On To Use Well" Read :help. I haven't read any books on Vim so I'm not sure if there are any good ones, but you most definitely do not "need" to read one. "The point of a mouse is to make arbitrary on screen jumps efficient, and it’s very good at doing that. Don’t you ever think you can beat a mouse. Only in very few edge cases will it even matter." That's kind of rid…

As somebody who recently switched from Vim to SublimeText, I agree and disagree with much in the article, but the point about the mouse is interesting. For years I believed that eschewing the mouse was speeding me up. But I recently had the pleasure of working with a fine gentleman, and a SublimeText user, who is an absolute fiend with the mouse. He has considerably more development experience than I, so it is not an…

The "problem" with the mouse is Fitt's Law. It is easy to use the mouse to hit large targets but, as the size of the target decreases, the duration and complexity of the task augments.

Since we, as programmers, deal with very small targets, using the mouse is not the most efficient way to go.

Some editors allow us to move very quickly to the next opening bracket on the line (Vim's f{ for example) while most editors can't help beyond a certain point (usually the OS's word-by-word jumps). If the only means you have to reach that opening bracket is a dozen presses on the right arrow or the mouse… well, the mouse may have its chances. When you can do f{ the mouse is simply useless.

Also, the motion of the mouse is non-linear: you have typically a fast startup followed by a progressive slowdown until you reach your target. That slowdown happens because the fast startup was done in the general direction of the target and must be adjusted a few times to hit the target accurately.

Another thing to factor is how often you use the mouse in your workflow.

When I do mouse-y tasks (Photoshop, browsing…), the mouse is my primary way too interact with my programs. My left hand is available for hitting modifiers or changing tools while my right hand is almost always on the mouse. In that context, I never loose the pointer and the mouse. Changing from task A to task B with the mouse is easy and costless.

When I do keyboard-y tasks, the keyboard is my primary means of interaction. I can spend a lot of time typing stuff, moving around… without touching the mouse. When I want to use the mouse I usually don't really know exactly where it is — that's a first problem — then, when I grab it, I don't know where the cursor is — second problem — which makes the initial targeting slow and error prone. Once the first steps are dealt with, the limitations in Fitt's law apply.

That's why the mouse is frowned upon among people who use primarily the keyboard.

Re: Just Use Sublime Text

#255

If you intend to be a professional programmer for 10 years, 20 years, maybe 40 years, why is it a big deal to spend 2 years becoming adept at an editor? Vim and Emacs are both likely to be lifelong tools that will easily repay the difficult early days.

If you are going to become adept in an editor, Sublime text has a lot of depth and power and seems like a good one to learn.

Fair point.

Re: Just Use Sublime Text

#256
post #63

Earlier quoted context omitted.

Even if the mouse were quicker on average for long jumps, the moving of the hand from mouse to keyboard feels like more of a combo breaker, more distracting. Speed is very important, but equally important is for the editing experience to have a low attention footprint to leave more space for the train of thought behind the changes being made.

In fact, it's the opposite. Using keyboard commands for movement is more distracting (and measurably slower) than using the mouse. It is precisely that the mouse is less distracting that tricks the mind into thinking the keyboard is faster. See AskTog: http://www.asktog.com/TOI/toi06KeyboardVMouse1.html http://www.asktog.com/TOI/toi22KeyboardVMouse2.html http://www.asktog.com/SunWorldColumns/S02KeyboardVMouse3.htm...…

You're not reading some of the most cogent arguments here: most vim/Emacs/etc power users couldn't even tell you what keyboard command to use precisely because they don't think about it. It's reflex, muscle memory, completely out of mind so that it doesn't get in the way of getting code from your mind to the machine. Maybe it's that way for some mousers as well, but given that code is text, it's kind of doubtful. There's also the fact that if you have to break your concentration to context switch to the mouse, you will lose your flow.

Try coding in an editor, any editor, for 8, 9, 12 hours a day and see if you don't start forgetting the keyboard shortcuts because they become reflexive. Vi and Emacs are just hyperdesigned to enhance this effect.

EDIT: And I don't care that you link to Bruce Tognazzini, a GUI designer, when millennia of musicians have known that they don't think about what combinations of fingers they press to get an F#, they just play a glissando with an F# in the middle.

Re: Just Use Sublime Text

#257
post #243

Earlier quoted context omitted.

We can each run that experiment 100 times in a few minutes. I did, keyboard movements were faster. https://yourlogicalfallacyis.com/appeal-to-authority EDIT: not sure why the downvotes—should I have said "faster FOR ME"? Anyways, hi haters.

It's not an appeal to authority: that would be if I were appealing to the authority for the authority's sake; but I am appealing to scientific research presented by the authority. I'm fairly certain you'd agree that appealing to scientific evidence is valid, as you've tried to present it to me as part of your argument. I think the downvotes are because you running some kind of "experiment" on your own is different fr…

Fair point, however the choice of editor/editing mode is a personal one. Are my personal results of my personal experiment not the only ones that matter to my personal choice?

Re: Just Use Sublime Text

#258

Earlier quoted context omitted.

In fact, it's the opposite. Using keyboard commands for movement is more distracting (and measurably slower) than using the mouse. It is precisely that the mouse is less distracting that tricks the mind into thinking the keyboard is faster. See AskTog: http://www.asktog.com/TOI/toi06KeyboardVMouse1.html http://www.asktog.com/TOI/toi22KeyboardVMouse2.html http://www.asktog.com/SunWorldColumns/S02KeyboardVMouse3.htm...…

You're not reading some of the most cogent arguments here: most vim/Emacs/etc power users couldn't even tell you what keyboard command to use precisely because they don't think about it . It's reflex, muscle memory, completely out of mind so that it doesn't get in the way of getting code from your mind to the machine . Maybe it's that way for some mousers as well, but given that code is text, it's kind of doubtful. T…

The thinking is subconscious: you don't know you're doing it and you "forget" how long it takes, which is why you perceive the keyboard as faster. If you bother to read the research I've linked to, it covers all of your objections. I know it's difficult to let go of subjective impressions, but the stopwatch is always right compared to our own internal sense of time.

Re: Just Use Sublime Text

#259
post #77

Earlier quoted context omitted.

As someone who uses a keyboard 98% of the time, but who uses a GUI editor and the mouse when it makes sense, I'd say the mouse is useful for several things, and what it IS useful for WILL be faster than what someone can do with a keyboard. The clear win is using a powerful GUI-based editor that has tons of keyboard commands. Bonus points for being on Windows or Linux (i.e., not Mac OS) so you can navigate/BROWSE the…

> there are things I find imperfect about it (the scripting language is usable, for instance, but has it's own syntax and quirks). In terms of scriptable editors, the Zeus editor is scriptable in Lua, Python, TCL or JavaScript, but it is native to Windows: http://www.zeusedit.com/ Jussi Jumppanen Author: Zeus IDE

Tried Zeus probably 4 years ago. I really have tried a lot of options, but I haven't been back to Zeus after the first try. I can't remember any specifics of what turned me away from it, though the thing that SlickEdit does better than almost everyone else is tagging. I use boost::shared_ptr (and now the C++11 version) a LOT, and so completion is useless in anything that doesn't know how to complete a template class. ctags and its ilk, last time I checked, were worthless in this regard, and I have a vague sense that Zeus relied on those for tagging? Yes, looking at the web site, you're using ctags. Will "shared_ptr foo; foo->" autocomplete for members of Foo?

SlickEdit also Just Works with tagging. You put the files into a project, and everything is instantly cross-referenced. "Where is Foo::init() used? No, I don't want Blah::init(), just Foo::init()." SlickEdit, at least SOME of the time, can get that right, and with no configuration of external tools.

Aside from that, I think one of the greatest drawbacks of Slickedit is that it isn't open source, so when things go wrong I can't just fix it. Slickedit IS cross-platform, at least, with native Linux and Mac OS versions, and that ALSO is important to me.

Lua is the Right Answer for scripting, IMO. The rest of the options are actually a liability for me, since it means that if I'm editing someone else's script, I might have to deal with Python, TCL, or JavaScript.

I'm rambling now. I feel like I have an "Editor Manifesto" in my head that wants to get out, but I don't have time right now to do it justice. I'll take another look at Zeus when I get a chance, just as I'll take another look at Sublime and the rest. It's been years since I've looked, so I'll take another glance at it.

Re: Just Use Sublime Text

#260
post #195

Earlier quoted context omitted.

Jedit has had multiple cursors built in for years. like '08 at least.

And multiple selections. I didn't find any use case for them.

They're GREAT for refactoring. Select something. CTRL-D a few times to keep selecting other instances of the same thing. It's not global find and replace.

Or, when you have a nice set of lined up/indented declarations, it's trivial to just right-click+SHIFT and drag a cursor before every line and start typing.

Post reply on HN