Wednesday, April 19, 2017

Re: Vim Improvement suggester

On Tuesday, April 18, 2017 at 10:00:53 PM UTC-7, Patrik Iselind wrote:
> Hi,
>
> I am interested in a way to be suggested what i can improve with my personal usage of Vim commands. So i thought it would be useful if Vim could record the commands i use somehow. Then once a month or something (cron job?) i could get a top 3 suggestion on how i can improve my Vim usage, both to improve speed but mostly to get rid of repetive key pressing that i might not be aware that i'm doing. It could save my joints later in life.
>
> The design and architecture could of course be different from what i describe above but some form of "suggestion box" on how i can improve my personal Vim usage.
>
> Does anyone know of some feature/functionality available that would, at least in part, take me there?
>
> Anyone else that thinks this might be a good idea?
>
> Looking forward to what the list have to say on this.
>
> // Patrik

I find that the command-line window (:h q:) does this job pretty well in and of itself. Nominally it holds only the 50 most recently used commands, but the point is that if you are constantly reusing or slightly modifying a previously used command, it tends to remain in q:. You can adjust the number of commands it holds, and if you find that you are executing a massive number of trivial substitutions that would displace the commands you might want to preserve, you can prevent them being stored in the command line window by a pair of mappings such as these:
" Current bad word forms :s prototype in q:, then type char cursor should end on
nmap <F6> k]Syiwq:i%s/^V^R"/^V^R"/gc<Esc>F
" Run current q: command line without adding it to q: command history
nmap <S-F6> 0"cd$:q<cr>:@c<cr>
imap <S-F6> <Esc>0"cd$:q<cr>:@c<cr>

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment