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

0 and $ go to the beginning/end of line without entering insert mode

You might find ^ more useful than 0 for indented code as it takes you to the beginning of the text on the line (like the regexp).




If your aim is to indent/de-indent text, try the > and < commands (in normal mode).

I also find that selecting large blocks of text then using the = command to autoindent everything is exceedingly useful.


do you know how to highlight a block then double-indent? I can't make that work. With a block highlighted, I only know how to indent one ts at a time (then re-hightlight, etc.).


You can use the universal "repeat last action" command: just hit . You can hit . as many times as you like and it will keep indenting.


d'oh! I never even thought of that...it works great! Thank you.


Great tip! I will be using this one.




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

Search: