inoremap is for insert mode matching. What you are looking for is nnoremap . For example, you can try the following:
nnoremap 0 $ nnoremap 9 0 inoremap <CA> <Home> inoremap <CE> <End>
However, I personally would not have remade 9, as you may need it someday (for example 9gg or 9j ). Instead, I would go for Q , K , U or S , since they are hardly used.
In fact, I would probably recommend leaving it as it is. $ is actually pretty intuitive when you learn about regular expressions. It's a bit complicated, but overall you won't need it because you have a lot of commands, such as D , that map to d$ . And it will also be easier when you have to work with vanilla vim.
source share