Welcome to Vim :)
3kA there are two "getting started with Vim" lessons in this, a path which @filbranden pointed you down, but to make this more explicit...
#1 is "motions" and #2 is changing from 'normal mode' to 'insert mode'.
:help k brings you to the "3. Up-down motions" section of the help manual, in which it states
k = "up" and
j = down, while explaining in more detail how these can be used (for example when you have
:set wrap enabled and long lines are "wrapped" on the screen you can use
gk to move up/down through the wrapped line). Motions can be prefaced with a "count", like
A) "Section 2. Left-right motions" of the help manual talks about
h (left) and
l (right). The meaning of these keys relates to their position on the keyboard
l does "left" "down" "up" "right".
B) Addition to left/right, up/down motions, there are word motions see
:help word-motions for "Section 4. Word motions" that allow you to do
2e to move right to the end of the second word, for example, and you can then expand on that
d2e to delete to the end of the second word or
c2e to delete until the end of the second word and then switch to insert mode.
C) There are motions for text objects. I've never even used these :/
D) Gaining fluency in these motions is part of the delight of Vim.
- Changing to Insert Mode can be done in a variety of ways.
:help A brings you to the
A section of a chapter on that: "8. Insert mode commands". Other options, as described in the help pages are
O. (I used Vim for several painful years only knowing about
From the command line, not from inside Vim, you can type the
vimtutor command for an introduction to these and other concepts. Autocommands like
au Filetype tex... which you typically put in your
.vimrc, are a more advanced part of what makes Vim awesome :)
This does not yet explain the "how to make mapping keys" part of your question.
For that you can see
:help map-commands which brings you to an overwhelming list of options for the different possible types of mappings. Mappings pertain to the mode that you're in, so you can having mappings for "normal mode" that are different from your mappings for "insert mode".
For example my
.vimrc file has:
nmap <leader>sp :set spell<CR>
nmap <leader>nsp :set nospell<CR>
Which allow me to use toggle spellcheck on by
sp and off by
<leader> is a useful thing vim provides for creating special mappings like this, similar to how "Ctrl" key works in many programs, and I've re-mapped leader to be the "space" key, see
As you can see from
:help map-commands (or
:help map and you might also see people abbreviating
:help to just
:h) there are numerous options in addition to
nmap. Hopefully this helps!