Live data from Hacker News

Some things beginners might not know about Sublime Text

blog.alainmeier.com

81–90 of 116 posts

Re: Some things beginners might not know about Sublime Text

#81

Is it possible to do multi-line editing like Sublime Text but in Vim? I use both, and this was the feature that got me out of Terminal, but besides this I can't think of anything else offhand for what ST2 can do that Vim can't do.

Yes, Ctrl-v to enter visual-block mode, then move up or down to cover all lines where you want to make changes, then I{string}Esc to append a string at the cursor location on all lines. See: http://vimdoc.sourceforge.net/htmldoc/visual.html#blockwise-...

Doesn't block mode only work for blocks within contiguous lines of code? (basically it will let you select a rectangular section of code)

ST2 allows multiple cursors in arbitrary locations - I'm not aware of another editor that supports that.

Re: Some things beginners might not know about Sublime Text

#82
ctrl + t swaps text, for example foo(bar) if you place the cursor before the parenthesis and press ctrl + t it will become bar(foo).

ctrl + m when in a bracket sets the cursor to it's matching bracket.

ctrl + up or ctrl + down scrolls the document up or down.

ctrl + g goes to a line.

Re: Some things beginners might not know about Sublime Text

#83
post #59
post #58

Earlier quoted context omitted.

Obviously you didn't actually try what you suggested, if you had you'd have found there are plugins for JSON and XML and probably a few other formats, but was hoping ST2 would have what textmate and eclipse has had for a long time, code formatting, java, XML, xsl, JavaScript, c etc. I know you're new here, but a little reminder about etiquette, even if you haven't gotten laid in a while, the community here is based o…

Sorry? My response was tailored for your comment -- you didn't mention plugins and you weren't (and still aren't) clear on the features you're missing. I.e., from your comment I inferred that you are new to all this, and so I treated you as a newcomer. I guess that hurt you feelings? If so, I didn't mean to :)

Nope, didn't hurt my feelings at all, I was trying to help you learn the ropes.

My comment was really pretty clear, and easy to follow, ST doesn't have a code formatter, you know, like textmate and eclipse do. It's a feature that lets you take poorly aligned code that is difficult to read, and fix up the alignment a la K&R et al. Hope that's clear enough for you :)

If you want to find out if someone is a newcomer, you can click on their profile and see pretty easily.

Re: Some things beginners might not know about Sublime Text

#84
post #83
post #59

Earlier quoted context omitted.

Sorry? My response was tailored for your comment -- you didn't mention plugins and you weren't (and still aren't) clear on the features you're missing. I.e., from your comment I inferred that you are new to all this, and so I treated you as a newcomer. I guess that hurt you feelings? If so, I didn't mean to :)

Nope, didn't hurt my feelings at all, I was trying to help you learn the ropes. My comment was really pretty clear, and easy to follow, ST doesn't have a code formatter, you know, like textmate and eclipse do. It's a feature that lets you take poorly aligned code that is difficult to read, and fix up the alignment a la K&R et al. Hope that's clear enough for you :) If you want to find out if someone is a newcomer, yo…

>It's a feature that lets you take poorly aligned code that is difficult to read, and fix up the alignment a la K&R et al. Hope that's clear enough for you :)

I linked you to plugins that do that. Also, you can find other such plugins through the site I linked for you. I wasn't inferring that you were a newcomer to Hacker News, I was inferring that you were new to this kind of technology in general (sort of freshmen level). And because my profile is two months old, doesn't mean I haven't been on Hacker News much longer. I'm glad I didn't hurt your feelings :)

Re: Some things beginners might not know about Sublime Text

#85

Earlier quoted context omitted.

Yes, Ctrl-v to enter visual-block mode, then move up or down to cover all lines where you want to make changes, then I{string}Esc to append a string at the cursor location on all lines. See: http://vimdoc.sourceforge.net/htmldoc/visual.html#blockwise-...

Doesn't block mode only work for blocks within contiguous lines of code? (basically it will let you select a rectangular section of code) ST2 allows multiple cursors in arbitrary locations - I'm not aware of another editor that supports that.

There is a vim plugin that provides arbitrary multiple line edit.

https://github.com/alfredodeza/plexer.vim

Re: Some things beginners might not know about Sublime Text

#86
switched to sublime from np++ 3 months's ago, happy bunny! but i miss the np++ file explorer that allowed me to perform cut/paste/rename file & folder actions and even access the top level OS explorer menu within the editor so i had ,svn,archive,properties and send to

[edit] typo

Re: Some things beginners might not know about Sublime Text

#87
post #38

I've been using {g}vi{m} for 20 years now, but just bought ST2. I like how this whole discussion revolves around finding keystrokes in ST2 that yield the convenience of doing things I took for granted in vim. Maybe I should just yield to the wisdom of the crowd, go back to VIM, forget about having a file explorer on the left side (NERDtree's wonkiness drove me to ST2), and learn to use Ctrl-P. It's what people keep s…

    :Vex

Re: Some things beginners might not know about Sublime Text

#88
post #83
post #59

Earlier quoted context omitted.

Sorry? My response was tailored for your comment -- you didn't mention plugins and you weren't (and still aren't) clear on the features you're missing. I.e., from your comment I inferred that you are new to all this, and so I treated you as a newcomer. I guess that hurt you feelings? If so, I didn't mean to :)

Nope, didn't hurt my feelings at all, I was trying to help you learn the ropes. My comment was really pretty clear, and easy to follow, ST doesn't have a code formatter, you know, like textmate and eclipse do. It's a feature that lets you take poorly aligned code that is difficult to read, and fix up the alignment a la K&R et al. Hope that's clear enough for you :) If you want to find out if someone is a newcomer, yo…

> I know you're new here

> If you want to find out if someone is a newcomer, you can click on their profile and see pretty easily.

> the community here is based on people being helpful rather than trying to be superior

Siodine's account is older than yours. You're rageing on him for trying to help you out by suggesting you find plugins before dismissing ST2. You're making an ass of yourself man. Stop acting like an elitist prick.

Re: Some things beginners might not know about Sublime Text

#90
post #38

I've been using {g}vi{m} for 20 years now, but just bought ST2. I like how this whole discussion revolves around finding keystrokes in ST2 that yield the convenience of doing things I took for granted in vim. Maybe I should just yield to the wisdom of the crowd, go back to VIM, forget about having a file explorer on the left side (NERDtree's wonkiness drove me to ST2), and learn to use Ctrl-P. It's what people keep s…

There's a vim mode in st2. I'm not near my computer at the moment but IIRC it's in the preferences (classic mode I think it's called?).

edit: back at my computer now. to put st2 into vim mode, just comment this line out in the default preferences:

   "ignored_packages": ["Vintage"]
Post reply on HN