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

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ต.ค. 2024

ความคิดเห็น • 45

  • @victornaut
    @victornaut 3 ปีที่แล้ว +20

    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 3 ปีที่แล้ว +2

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

  • @pcache
    @pcache 3 ปีที่แล้ว +4

    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 ปีที่แล้ว +1

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

  • @PestisNonSapien_GMO_exHuman
    @PestisNonSapien_GMO_exHuman 3 ปีที่แล้ว +4

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

  • @theena
    @theena 2 ปีที่แล้ว +2

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

  • @ajay--yadav
    @ajay--yadav 3 ปีที่แล้ว +3

    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 ปีที่แล้ว +2

      I wil soon awaken from my slumber.

  • @CodingNuggets
    @CodingNuggets 3 ปีที่แล้ว +1

    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.

  • @sarnobat2000
    @sarnobat2000 9 หลายเดือนก่อน

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

    • @sarnobat2000
      @sarnobat2000 9 หลายเดือนก่อน

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

    • @GavinFreeborn
      @GavinFreeborn  9 หลายเดือนก่อน +1

      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.

  • @davidgustavsson4000
    @davidgustavsson4000 3 ปีที่แล้ว +4

    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 ปีที่แล้ว +3

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

  • @hamwenhong
    @hamwenhong 3 ปีที่แล้ว +2

    Quite informative, thanks for sharing!!

    • @victornaut
      @victornaut 3 ปีที่แล้ว

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

  • @BryanJenks
    @BryanJenks 3 ปีที่แล้ว +3

    heh. COC. nice new intro!

  • @FirstLast-kv1iq
    @FirstLast-kv1iq 3 ปีที่แล้ว +2

    This was a fantastic video!

  • @benjaminbras7475
    @benjaminbras7475 3 ปีที่แล้ว +2

    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 ปีที่แล้ว +1

      just using the plugin vim-surround

  • @serenhampshire5988
    @serenhampshire5988 3 ปีที่แล้ว +3

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

  • @drac8854
    @drac8854 3 ปีที่แล้ว +1

    I'll probably need to watch this twice or thrice

  • @oj0024
    @oj0024 3 ปีที่แล้ว +2

    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.

  • @nghiaphantrong1024
    @nghiaphantrong1024 3 ปีที่แล้ว +1

    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.

  • @Linux.Learner
    @Linux.Learner 4 หลายเดือนก่อน

    THANK YOU SIRE!

  • @BicospaceTech
    @BicospaceTech ปีที่แล้ว

    dude you are a GOD

  • @numairdubas2688
    @numairdubas2688 3 ปีที่แล้ว +1

    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 2 ปีที่แล้ว

      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 2 ปีที่แล้ว

    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  2 ปีที่แล้ว +1

      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
    @Awwe12675 2 ปีที่แล้ว

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

  • @sivaKumar-hd4xe
    @sivaKumar-hd4xe 3 ปีที่แล้ว +3

    im using nvim-lspconfig and completion.nvim.

  • @joshuamarcano350
    @joshuamarcano350 2 ปีที่แล้ว +1

    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
    @tuerda 3 ปีที่แล้ว +1

    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 ปีที่แล้ว +2

      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 ปีที่แล้ว +1

      @@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.

  • @notvoidz
    @notvoidz 3 ปีที่แล้ว

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

    • @GavinFreeborn
      @GavinFreeborn  3 ปีที่แล้ว

      Arch Linux and st. I'm pretty basic haha

  • @serenhampshire5988
    @serenhampshire5988 3 ปีที่แล้ว +1

    Hey! 🤗

  • @ingmarfalk3306
    @ingmarfalk3306 2 ปีที่แล้ว

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