Vim's Built In Completion Awesome, And You Can Make It Better!

Ғылым және технология

This tutorial is focused on showing how I use vim's built in completion with mucomplete to replace popular tools like COC.nvim and youcompleteme
mucomplete can be found here:
github.com/lifepillar/vim-muc...
Let me know what you think and if there is anything specific you would like to learn about.
lbry: open.lbry.com/@GavinFreeborn:...
Github: www.github.com/gavinok
vimrc: github.com/Gavinok/dotvim
Discord: / discord
⏱️TIMESTAMPS⏱️
00:00:00 - Intro
00:03:14 - Default Completion
00:04:46 - Line Completion
00:04:51 - Spell Completion
00:05:14 - File Completion
00:05:37 - Where To Find More Completions
00:06:29 - Vimscript Completion
00:07:39 - Omnicomplete In Javascript
00:08:23 - Omnicomplete Demo
00:09:12 - Where To Find More Omnifuncs
00:09:47 - Make Your Own Completion
00:15:39 - Using Mucomplete To Improve Completion
00:18:42 - Mucomplete Demo
00:19:29 - More On Mucomplete
00:19:53 - Adding Language Server Integration
00:20:24 - Outro

Пікірлер: 45

  • @victornaut
    @victornaut3 жыл бұрын

    I've been using Vim for a good 3 years on Windows now and this is the only thing that actually works for me. None of that deoplete, YouCompleteMe, WeCompleteEachOther stuff requiring 12 versions of Python, Lua and when you get everything you find out you needed NTS PHP 7.3 to make the legacy language server work but it actually doesn't, because the extension needed to make it work only works on Linux. I don't know if you created this, but jeez I hope to donate soon!

  • @GavinFreeborn

    @GavinFreeborn

    3 жыл бұрын

    If you are referring to creating mucomplete no I didn't. It's just one of those great projects that deserves more love.

  • @JustSomeAussie1

    @JustSomeAussie1

    2 жыл бұрын

    I use vim on windows (under WSL) and coc works perfectly fine. Took like 10 minutes to set up

  • @pcache
    @pcache3 жыл бұрын

    I've been sitting on my suckless arch setup for almost a year now, but every now and then there comes a time where you discover a whole new realm of possibilities and customizations to be made. I found your channel just today because of groff tutorials, but oh boy, you have some eye-opening content here and I can already tell I'll be going down the joyful spiral of reconfiguring my workflow once again. For that I thank you very much, and you've earned an honorable spot on my RSS subscription list. Cheers!

  • @GavinFreeborn

    @GavinFreeborn

    3 жыл бұрын

    Thanks for the kind words. Happy you like the content there is plenty more where that came from.

  • @PestisNonSapien_GMO_exHuman
    @PestisNonSapien_GMO_exHuman3 жыл бұрын

    One of the best vim videos I've seen in awhile. Subscribed.

  • @theena
    @theena2 жыл бұрын

    Haven't finished watching, but I want to say thank you already.

  • @ajay--yadav
    @ajay--yadav3 жыл бұрын

    This video was so cool and informative that I was forced to subscribe your channel. The channel has also some pretty awesome stuffs about vim, groff, shell etc. I hope you will upload more such videos in the future. Thanks a lot in the end.

  • @GavinFreeborn

    @GavinFreeborn

    3 жыл бұрын

    I wil soon awaken from my slumber.

  • @FirstLast-kv1iq
    @FirstLast-kv1iq3 жыл бұрын

    This was a fantastic video!

  • @hamwenhong
    @hamwenhong3 жыл бұрын

    Quite informative, thanks for sharing!!

  • @victornaut

    @victornaut

    3 жыл бұрын

    using a reddit pfp in youtube... this is brilliant bro imma try that!

  • @sarnobat2000
    @sarnobat20005 ай бұрын

    Wow this video is so well organized and thought out. I'm learning a lot and am only half way through it.

  • @sarnobat2000

    @sarnobat2000

    5 ай бұрын

    And you look so young so I'm feeling a bit inadequate for how long I've used vim

  • @GavinFreeborn

    @GavinFreeborn

    5 ай бұрын

    Thanks, this video has always had a special place in my heart. It's probably the most vimscript (a guilty pleasure of mine) in one video and still gained a decent amount of attention in spite of the poor video quality. As far as looking young I just look younger than I really am.

  • @CodingNuggets
    @CodingNuggets3 жыл бұрын

    Good video. VIM is so essential. I prefer to use keybindings in VS Code now, but I still use it everyday when editing files on servers. See your soon!

  • @GavinFreeborn

    @GavinFreeborn

    3 жыл бұрын

    Totally get it the completion I get with vim is one can make you feel like a superhero.

  • @serenhampshire5988
    @serenhampshire59883 жыл бұрын

    I’d be interested in seeing a cookie decorating tutorial if possible.

  • @drac8854
    @drac88543 жыл бұрын

    I'll probably need to watch this twice or thrice

  • @davidgustavsson4000
    @davidgustavsson40003 жыл бұрын

    I think your sense for what *noremap does is wrong. It's not about whether we can overwrite the expression in the LHS, but whether the stuff in the RHS can be interpreted as mappings. map x y map z xy " Pressing z now does yy noremap z xy " Pressing z now does xy, ignoring the x mapping

  • @GavinFreeborn

    @GavinFreeborn

    3 жыл бұрын

    Nice good to know. I've definitely had the wrong idea

  • @Linux.Learner
    @Linux.Learner8 күн бұрын

    THANK YOU SIRE!

  • @oj0024
    @oj00243 жыл бұрын

    I think that my preferred completion method would be some sort of global ctags. I had a setup running a while back, but I didn't like it, I don't really need autocomplete for c anyways.

  • @benjaminbras7475
    @benjaminbras74753 жыл бұрын

    How did you wrap the word in quotes. I can't really figure it out from the screenkey. or did you make a special binding for it?

  • @GavinFreeborn

    @GavinFreeborn

    3 жыл бұрын

    just using the plugin vim-surround

  • @BicospaceTech
    @BicospaceTech Жыл бұрын

    dude you are a GOD

  • @BryanJenks
    @BryanJenks3 жыл бұрын

    heh. COC. nice new intro!

  • @GavinFreeborn

    @GavinFreeborn

    3 жыл бұрын

    Lol. Thanks man

  • @nghiaphantrong1024
    @nghiaphantrong10243 жыл бұрын

    Can you explain more what vim-lsp actually does ? I'm using ALE with Typescript project, and when I open a ts file, it will try to find tsserver, auto start tsserver server and use that LSP. If I use vim-lsp, it will stand between ALE and tsserver ..? seems vim-lsp is also a lsp-client as ALE, is there any way to combine two of them. Hope to see your reply. Nice work, guy!

  • @GavinFreeborn

    @GavinFreeborn

    3 жыл бұрын

    I would recommend going with just one of the 2. If I was to pick I would use vim-lsp since it does a better job at handling language server integration (IMO) than ALE and you can replace most of ALE's functionality with github.com/mattn/efm-langserver.

  • @numairdubas2688
    @numairdubas26883 жыл бұрын

    I'm having a little trouble using omnicompletion on c files. I have tried both set omnifunc=ccomplete#Complete and also set omnifunc=syntaxcomplete#Complete. It seems to work on js files like in the video, but I haven't had any luck with c or cpp. Any help would be appreciated!

  • @JMIK1991

    @JMIK1991

    Жыл бұрын

    I know it's old comment but I has some trouble with it too... I wanted a simple way to do it aswell, may not seem so simple but works for me. I tried to do tags in vim but didn't want to have my project tags file in separate direction... Generate ctags file with "ctags-universal --c++-kinds=+pf --extras=+q -R ./include/ ./src/" Then see if you have "set tags=./tags;/" on vimrc and you should have i_CTRL+N auto completion for namespaces, structs, enums and classes etc. ( i_ in front is just to tell it's insert mode key mapping) To go through tags list you use i_CTRL-X CTRL-] to get full list in Vim and then CTRL-N or CTRL-P I generate ctags under .vim/ folder in project tree, but snipped it off from these scripts... About "set tags=./.vim/tags;/"... it starts from current location, and leaves directories and check between each if it finds .vim folder and tags in them, until it ends up in root /. I presume it works quite well in projects with large directories.

  • @azizkavas6993
    @azizkavas6993 Жыл бұрын

    Is there any completion framework similar to that in Emacs? Or is there any video which explains emacs completion system in such a way?

  • @GavinFreeborn

    @GavinFreeborn

    Жыл бұрын

    Kinda, but it's a little different. Completion-at-point (built in) is similar to omnicomplete but it takes a list of functions to apply similar to how mucomplete worked. When it comes to individual functions for each action there is a emacs package called cape (3rd party) which is basically a collection of extra completion functions you may want. The default interface is pretty different but you can use either the company package or Corfu (both 3rd party)

  • @Awwe12675
    @Awwe126752 жыл бұрын

    I need to understand how can I programmer gui with vim ?

  • @notvoidz
    @notvoidz3 жыл бұрын

    which os do u use and which terminal are u using ?

  • @GavinFreeborn

    @GavinFreeborn

    3 жыл бұрын

    Arch Linux and st. I'm pretty basic haha

  • @sivaKumar-hd4xe
    @sivaKumar-hd4xe3 жыл бұрын

    im using nvim-lspconfig and completion.nvim.

  • @joshuamarcano350
    @joshuamarcano3502 жыл бұрын

    Cool video. For me it's just too much work for the reward. I'd rather use coc as I'm new to neovim and still want to get code written right away without investing so much time in settings. Maybe one day I can see the benefit in this but as of now it seems extreme for my case. I love vim and I hate the setup process lol. I guess I'm still in a state culture shock. This was great information nonetheless and perhaps my perspective will change soon.

  • @tuerda
    @tuerda3 жыл бұрын

    In answer to your question, I use the built in manual completion. I find autocompletion intolerable, because it spits all sorts of visual noise on my screen and often covers up important parts of the text.

  • @GavinFreeborn

    @GavinFreeborn

    3 жыл бұрын

    Totally get where you are coming from. Sometimes I just want as much context as possible. Having a pop-up window I didn't ask for just disctupts my workflow.

  • @tuerda

    @tuerda

    3 жыл бұрын

    @@GavinFreeborn It was a pretty nice video though; completion is one of the dark corners of vim I had never looked into very deeply. This made it seem a lot less dark.

  • @serenhampshire5988
    @serenhampshire59883 жыл бұрын

    Hey! 🤗

  • @ingmarfalk3306
    @ingmarfalk33062 жыл бұрын

    If that is not worth a sub I dont know what is

Келесі