Closed purpleP closed 4 years ago
@purpleP: I agree on that point, mappings should be optional. Do you use it? I thought no one uses it except me and my fellows.
@seletskiy Yes, I do use it. You once showed gif with your python snippets. I've found your dotfiles and decided to use some of the code from your snippets in my snippets.
After some time I've found that snippets are pretty personal, so It just doesn't have much sense to make a library of snippets. Instead you should create snippets that suites your needs. For example my pinky hurts after hours of coding on normal keyboard, so I've purchased ergodox, but I haven't stopped there. I've made a snippet which changes spaces to underscores in function names and parameters names, so instead of typing all this snake cased names I'm just typing space with my thumb.
Anyway, is there any way to disable mapping?
silent iunmap <c-l>
I've tried that and it worked until reboot. But now it says that there is no such mapping found, BUT(???) when I'm pressing ctrl-l instead of doing what I'm expecting it to do it does weird stuff with your autocomplete.
@purpleP: try to add mapping in the autocommand au VimEnter,BufEnter * iunmap <C-L>
.
@purpleP: Your example is great, actually. And that kind of snippets may be good for all. E.g. I do have snippet, which expand :=
, because it's slow to type.
@seletskiy thanks it works!
au VimEnter,BufEnter * iunmap <C-l>
au VimEnter,BufEnter * imap <C-l> <Plug>delimitMateS-Tab
In case anyone needs it.
My snippets are on github, we can think about creating a snippet library together (maybe creating pull request for honza/vim-snippets).
For example we can create a way for user to specify which snippets for the library he wants. It wouldn't be very easy, but I think it's doable.
@purpleP: I dislike honza snippets, they are useless. Too long triggers and very low automation level.
Please, see https://github.com/reconquest/snippets, it's my snippets (they are messy, but I'm working on beautifying them out). PR's are welcome.
You've mapped ctrl-l to some of your functions. That probably works for you, but since it's public repo and it's used in another plugins it would be nice to have an option to disable it. Or never enable it in the first place. Many people thinks that user should create it's own mappings.