I really don't think that having autocompletion or not will help you learning how to use Vim. Your main problem in my opinion is to learn the basics of the editor and then learn more and more commands.
Anyway Vim has a built-in auto completion feature for the command line it is controlled with the wildmenu
and wildmode
options.
The first step is to create your vimrc
file if it doesn't exists yet and to add the following line:
set wildmenu
See the doc :h 'wildmenu'
:
When 'wildmenu' is on, command-line completion operates in an enhanced
mode. On pressing 'wildchar' (usually <Tab>) to invoke completion,
the possible matches are shown just above the command line, with the
first match highlighted (overwriting the status line, if there is
one). Keys that show the previous/next match, such as <Tab> or
CTRL-P/CTRL-N, cause the highlight to move to the appropriate match.
Then add your wildmode
configuration. Personally I used the following line but you might want to modify it to fit your needs:
set wildmode=longest,list,full
To see which options are the most relevant for you have a look at the doc :h 'wildmode'
:
Completion mode that is used for the character specified with
'wildchar'. It is a comma separated list of up to four parts. Each
part specifies what to do for each consecutive use of 'wildchar'. The
first part specifies the behavior for the first use of 'wildchar',
The second part for the second use, etc.
These are the possible values for each part:
"" Complete only the first match.
"full" Complete the next full match. After the last match,
the original string is used and then the first match
again.
"longest" Complete till longest common string. If this doesn't
result in a longer string, use the next part.
"longest:full" Like "longest", but also start 'wildmenu' if it is
enabled.
"list" When more than one match, list all matches.
"list:full" When more than one match, list all matches and
complete first match.
"list:longest" When more than one match, list all matches and
complete till longest common string.
When there is only a single match, it is fully completed in all cases.
<leader>?
. You can also define your own cheat sheet, it's explained on the readme page.:foo<Tab>
will cycle through matching commands. You can even do:<Tab>
.:echo mapleader
, it should output what is your current leader key. If it gives an error (because the variablemapleader
wasn't defined), then it probably means that your leader key is a a backslash (it's the default value). You can change its value in yourvimrc
, by writinglet mapleader="your_key"
. For example,let mapleader = "\<Space>"
. See:h mapleader
for more info.<Leader>?
means pressing,?
. If it's a space, then it means pressing a space then?
. And so on.