Hacker News new | past | comments | ask | show | jobs | submit login

Intellij makes java much easier to bear for me. The one thing I miss is a single key combination to select a line and then select subsequent lines when pressed again (like cmd-L in Sublime). The intellij alternatives seem awkward to me.



Syntax aware selection (Ctrl-W) doesn't work for you? I know it's not exactly what you ask for, but I think it's great. It successively selects a bigger and bigger block of code. According to Productivity Guide, it's the feature I use the most in IntelliJ (by a wide margin).


Yeah, I use that and I agree that it's useful. I just want a simpler way to select successive lines.


what's wrong with [Home] [Shift] [Down] [Down] [Down]? (2+n) keystrokes for (n) lines selected is hard to beat

And the skill is transferable to MS Word/Sublime/Google Docs/Notepad/Eclipse/VS/any-other-text-input-everywhere-ever!


a) Not all keyboards have Home/End keys (macbooks for example).

b) Even then, I find it more error prone to reach over for the Home key, hit shift, etc...

c) 2+n is still 1 more than 1+n ([Ctrl] [l] [l] [l]). ;)

It's admittedly a minor thing; I just got really comfortable with Ctrl-l in Sublime. I should probably just get over it.


> a) Not all keyboards have Home/End keys (macbooks for example).

Macbooks all support fn + arrows to do page up/down, home and end.

  fn + left = home
  fn + end = end
  fn + up = page up
  fn + down = page down
It seems annoying at first to not have a dedicated key, but after a week my muscle memory started working and I've never noticed it again.


There is an editor action to select a line (Select line at caret) in the keymap that doesn't have a default shortcut, but you can define it and use it instead of the first Home+Shift+down. Then you can extend the selection with Shift+down.


Hmm... I've actually tried this but Shift+down unselects the initial selection. However, selecting a single line is still often pretty useful. I'll mess around some more with the keymappings to see if I can work something out.


You just seriously rocked my world. I had NO idea that feature existed.


Keep in mind adding Shift to the keyboard combination reverses the selection.

Edit: Reverses, in it selects smaller portions of text, again, based on syntax.


Anyone else find themselves trying to use Ctrl-w in other contexts? Always disappointing when it doesn't work!




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: