Pressing "Home" in Vim on an Indented Line
Posted
by Reid
on Stack Overflow
See other posts from Stack Overflow
or by Reid
Published on 2010-01-10T02:14:10Z
Indexed on
2010/06/17
3:03 UTC
Read the original article
Hit count: 291
I have a bad habit of using the 'home' key to go back to the beginning of a line. As I recently started using vim (and loving it!) I noticed that when I press the home key on a lined that is indented, it returns me to the very beginning of the line. In Notepad++ (the editor I used to use) it would return me to the beginning of the code on that line, right after the indent.
Is there some way to replicate this behavior in vim? Usually, when I'm pressing home it's in the Insert mode for me to (usually) stick a variable there.
I have set smartindent
in my vimrc, with set noautoindent
as a "tips" page told me to make sure to disable autoindent (although it didn't seem to be enabled in the first place - perhaps that option is extraneous.)
Thanks in advance.
© Stack Overflow or respective owner