When I reply to a message in neomutt, it opens the reply text in vim, as I intended. However, the initial cursor position is at the top of the headers, "From:", "To:", "Subject:" etc, and I have to manually move to the first line of reply text. How do I configure neomutt/vim so that the cursor starts at the first line of reply text?
Setting starting cursor position in vim when replying in neomutt
395 views Asked by Juan At
2
There are 2 answers
0
On
In using this line from above:
autocmd FileType mail execute "normal /^\n<CR>o"
For some reason, the end part "<CR>o" wasn't putting me into insert mode, so this worked for me:
autocmd FileType mail execute "normal /^$<CR>o" | startinsert
This gets me to the end of the headers in a new message or a reply. Note, my signature is source from a file and already includes a blank line above the signature.
I added this to my
.muttrc
. The drawback is that the cursor is not at the correct position if you want to edit your text again from Compose view.EDIT: As @phd mentioned in the comments this can also be implemented in vim.
I crafted two different snippets the first one way faster.