I am attempting to remap my 0 key to q to quickly return to the beginning of the current line in my .vimrc file.
I have: map q 0
Expected Behavior: Upon pressing q in normal mode the cursor should move to the zeroth column position on the current line.
Current Behavior: Upon pressing q in normal mode the cursor moves the the 1st column on the current line.
Not sure what the reason is for this behavior. Thanks in advance :)
Versions: VIM - Vi IMproved: 8.1, Iterm2: Build 3.3.7, MacOS: 10.13.4
There was a trailing space on the command in my .vimrc file. Thanks for your help everyone. I hadn't realized a trailing space would be picked up like that. Good to know for future reference.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.