itun
itun

Reputation: 3521

make vim remember my most important command

In vim there are lot of hotkeys, and it is need a lot of time to remember all of them. But there some commands which I don't use often and to use and remember another key sequence is not a need. On the other hand, to remember a hole command and write it even with completion is a good approach. Does somebody know a plugin or a script which explain how to make a list with important commands? It would be good if I can open this list, edit it and select commands.

Upvotes: 2

Views: 189

Answers (2)

romainl
romainl

Reputation: 196751

Some people, me included, use wikis or lightweight blog engines to file away new tricks in a searchable manner as they are encountered. Others may use cross-plateform note taking programs. Others, like voithos, may use pencil and paper. Others don't care that much because they know those advanced tricks will be only a quick google away the next time they need it. Others know that everything and the rest is in :help, including that nifty trick they just saw in a screencast.

But what you really need is probably to edit and grow your .vimrc. Once you figure out a better way to do something add it there and give it a mapping. This file will grow along with your knowledge until you are confident enough to scrap most of it.

Upvotes: 1

sehe
sehe

Reputation: 393457

You might want to know about command-line history: q:, it lets you walk through the list and re-execute with Enter.

Further more, you describe a text file. Vim is /good/ with textfiles :)

Here is an idea to create a mapping that let's you execute a random line from a textfile as a command: (testing)

:nnoremap <C-CR> :exec getline(".")<CR>

(linked to Ctrl-Enter for example)

Upvotes: 2

Related Questions