Which is Better Flash.nvim OR Leap.nvim?

Поділитися
Вставка
  • Опубліковано 13 гру 2024

КОМЕНТАРІ • 71

  • @ascourter
    @ascourter  6 місяців тому +19

    Do you use flash.nvim?

    • @sp3ctum
      @sp3ctum 6 місяців тому

      I really tried to like it, but a long time ago I got used to, I think, easymotion. I wasn't able to shake the habit and now I use hop.nvim.
      I guess I'm too set in my ways 😄

    • @ZiRo815
      @ZiRo815 6 місяців тому +1

      flash works how I want it to. I don’t want to type a specific number of letters. I just want to look at where I want to go, press a letter and then the red letter and boom I’m there. Leap’s need for 2 letter minimum jars me, especially around symbols.

    • @ghostsssssss4884
      @ghostsssssss4884 6 місяців тому +2

      Been using it for a while and it keeps improving my workflow(no more 13j etc). I would love to get used to the remote operations but somehow the mental overhead is too big and i spend more time thinking bout the commands than it would take me to do it regularly. Do you experience similar issues with plugins you would like to use more but dont?

    • @ascourter
      @ascourter  6 місяців тому +2

      @@ghostsssssss4884 I definitely experience this with different plugins. If you don't use the plugin at all then could be an indicator of having too many but sometimes your workflow just changes over time.

    • @ekkyarmandi
      @ekkyarmandi 6 місяців тому +1

      I've been using flash for a couple of months now. flash.nvim resolved my search workflows, but your video covers a feature I do not know exists, it's really helpful!

  • @crusader_
    @crusader_ 6 місяців тому +2

    Just when I was scratching my head in confusion whether to choose leap or flash. Thank you!

    • @ascourter
      @ascourter  6 місяців тому

      Glad I could help!

  • @Hoopsters35
    @Hoopsters35 6 місяців тому +4

    At 3:00 you mention that flash giving one keybind to jump in any window is key to you. If anyone is wondering how to do that in leap, you can use require('leap').leap({target_windows = {winid1, winid2}}) to target as many windows as you'd like. Combine this with require('leap.util').get_enterable_windows() which gives all visible windows except the current one, and vim.api.nvim_get_current_win() and you can jump to anything on the screen with one keybind

    • @ascourter
      @ascourter  6 місяців тому

      Thanks for sharing this!

    • @liamwoodleigh
      @liamwoodleigh 6 місяців тому

      Thanks for this! Could you please give an example of it as lazy config? 👀

  • @lpanebr
    @lpanebr 6 місяців тому +3

    I use to like those but then I felt they messed with my vanilla way of doing things with additional overhead. I'm currently loving the precognition plugin that actually helps you use vanilla mappings by adding jump hints in virtual text.

  • @nathanbellows2380
    @nathanbellows2380 Місяць тому

    The mapping for search actually works while IN search mode, so in regular / and ? workflow you can quickly toggle

    • @ascourter
      @ascourter  Місяць тому

      Oh nice. Thanks for sharing

  • @fixpoint
    @fixpoint 4 місяці тому

    You mention that you would leave leap for flash just for the bi-directional ability to jump places, it leaps offers that as well. Like you, I want a single keybind to jump in any direction. You can also make that jump to any window as well if you’d like.

  • @paolocabaleiro
    @paolocabaleiro 6 місяців тому +1

    I remember back when I suggested you should use Flash, glad to see this video now :D
    You have been missed on Twitch land, hope to see you there one day.

    • @ascourter
      @ascourter  6 місяців тому

      Thanks for suggesting it! I finally got around to trying it out. Hopefully I can get back into Twitch again, maybe once I can get my kids to bed earlier 😂

  • @rwz
    @rwz 6 місяців тому

    i was using leap, but the 2 char behavior was throwing me too often, now with flash it is very intuitive.
    thanks!

  • @atxorsatti
    @atxorsatti 6 місяців тому +1

    Honestly I love this extension, and that exactly why I stopped using it.
    I used it almost exclusively, for every movement, and it came to a point that I didn't know some native vim movement s. I had to stop using it in order to learn them.

    • @ascourter
      @ascourter  6 місяців тому +1

      Oh that's really interesting. I could definitely see being too reliant on it. Thanks for sharing!

  • @NormalNvim
    @NormalNvim 6 місяців тому

    Hop is pretty amazing too! Love the aesthetic.

    • @ascourter
      @ascourter  6 місяців тому

      Sweet. I'm excited to give it a try next!

  • @AhmadMughal1
    @AhmadMughal1 22 дні тому

    I started using flash a lot when i started with nvim but with time i just started jumping with relative line number and using f to find.
    i know mentally that if i just use flash it would be simpler but it just doesn't fall under the muscle memory for me as words could be different everytime same with the labels shown.

  • @mvargasmoran
    @mvargasmoran 6 місяців тому

    I've tried and yeeted all of this plugins, including Emacs Ace Jump Mode, way back in 2010~2012.
    I far prefer to use the / or incremental search.

    • @ascourter
      @ascourter  6 місяців тому

      Haha the idea of yeeting a plugin is hilarious. Maybe this is where we will all end up eventually.

    • @mvargasmoran
      @mvargasmoran 6 місяців тому

      @@ascourter it think it's stages in life, getting all the plugins, then ditching all the plugins.
      it happens.

  • @pooyanisalmani2844
    @pooyanisalmani2844 3 місяці тому

    hey thanks for this! i switch to flash after watching your video

    • @ascourter
      @ascourter  3 місяці тому

      Nice! I've been using flash for awhile now and its definitely one of my most used plugins.

  • @blbezcc
    @blbezcc 6 місяців тому +1

    Don't you miss the s and S keybinds you have overwritten with it? I do, and I'm searching for better one letter keybind to use instead.

    • @ascourter
      @ascourter  6 місяців тому +1

      I have found other motions to replace s and S for me (e.g. cc). How are you using s and S?

    • @blbezcc
      @blbezcc 6 місяців тому

      @@ascourter wow, I didn't know about cc. Thanks. That solves the S problem and for s, I just found out that equivalent is "cl" (c and lowercase L).

  • @Lambdaphile
    @Lambdaphile 6 місяців тому

    This is the best Vim channel

    • @ascourter
      @ascourter  6 місяців тому

      Thank you! That's very kind

  • @Petrovich2049
    @Petrovich2049 6 місяців тому +1

    I think both of these plugins offer an illusion of efficiency. Yes you may save few keystrokes, but you need to think more about how and where do you want to move? Should you use vim motions or the plugin?
    And while you are using the plugin, you aren't perfecting vim motions.
    How hard is it to write say 12j + whatever horizontal jump? Or search for something then just press n free times to skip to the one you want?

    • @ascourter
      @ascourter  6 місяців тому

      I think this is a really fair question. Some folks want to get better at default vim bindings and others want to customize and use different plugins. I do think there is some potential efficiency gains with using either of these plugins but you need to learn and develop the muscle memory for that efficiency.
      One of the best features of Neovim is that everyone can choose what they prefer and customize the editor. This decision is also not set in stone, I have seen a couple comments of people who said they relied on these plugins too much and went back to using built in vim motions.
      Whichever you choose, have fun and continue learning!

    • @samuraijosh1595
      @samuraijosh1595 4 місяці тому +1

      no flash is objectively better when you want to clickly move to a specific word in the current window view especially when there are multiple of those words. this is a very specific use case, yes, but it does happen to me a lot. moving x amount of lines and dragging the cursor to that spot can feel tedious after using flash

    • @Qrzychu92
      @Qrzychu92 Місяць тому

      I am not in Neovim yet (LSP for C# sucks balls :P), but in IdeaVim I use EasyMotion a lot. Usually I just jk + f/t or b/w, but if I want to move more than few lines at once, I just look at the word I want to jump to, leader leader w, I don't have to move my eyes anywhere - the label is there. Just type out the label, boom, done.
      Also, I thought I would use the relative lines a lot, but EasyMotion also has line mode, where every line has a label - I find that more natural than 12k

  • @joebu7538
    @joebu7538 4 місяці тому

    In flash, if there are too many matches how do I jump to the next or previous set?

    • @ascourter
      @ascourter  4 місяці тому

      @@joebu7538 what function or command are you using to jump? My initial thought is you keep typing characters to narrow it down but let me know if you have a specific example.

    • @joebu7538
      @joebu7538 4 місяці тому

      ​@@ascourter If I require("flash").jump() + "e", I can see an overflow of matches to "e" highlighted compared to jump labels--covering only ~26 of them. I want to move the jump labels to the next/previous set of 26 like in leap with and . Is there something like that in flash?

    • @joebu7538
      @joebu7538 4 місяці тому

      In Leap they have:
      If there are more matches than available labels, you can switch between groups, using and .

  • @muizzyranking
    @muizzyranking 6 місяців тому +3

    I don't like enhances f/t motion from flash, thats why i use leap + flit.

    • @ascourter
      @ascourter  6 місяців тому +1

      Yeah, I'd say you could disable it but it looks like there is an open issue currently. github.com/folke/flash.nvim/issues/329

  • @shubhampawar7921
    @shubhampawar7921 6 місяців тому

    Can i disable flash.nvim for f & t, i dont think its useful

    • @ascourter
      @ascourter  6 місяців тому +1

      You should be able to disable it but it looks like there is an open issue currently. Check out this page: github.com/folke/flash.nvim/issues/329

    • @samuraijosh1595
      @samuraijosh1595 4 місяці тому

      what is f and t?

  • @cody_codes_youtube
    @cody_codes_youtube 6 місяців тому +4

    IM NOT FIRST BECAUSE YOU PUBLISHED AT 7:45AM YOU MANIAC

    • @ascourter
      @ascourter  6 місяців тому +1

      Half the day is already over! 😂

    • @adrianscarlett
      @adrianscarlett 6 місяців тому

      You should move to a different timezone...

  • @jieli-mw7ox
    @jieli-mw7ox 6 місяців тому

    nice

  • @seppotaalasmaa3404
    @seppotaalasmaa3404 6 місяців тому

    Why can't we just use markers?

    • @ascourter
      @ascourter  6 місяців тому

      Haha I think you could if that's what you'd like. You'd have to set a mark somewhere before you were able to jump there is a problem for me. Let me know if you use marks to jump around and how you use them.

  • @Gskvj
    @Gskvj 6 місяців тому

    I'm not quite sure how this might necessarily be better than Harpoon

    • @ascourter
      @ascourter  6 місяців тому +4

      I believe you jump between buffers with harpoon, this is to jump to locations within the same buffer.

    • @ZiRo815
      @ZiRo815 6 місяців тому +11

      I sincerely hope this was just someone trolling.

  • @MrEternalFool
    @MrEternalFool 6 місяців тому

    None actually, all cause a context change. You screen changes, you then have to type a random character or maybe two.
    Instead just longpress j, k to go the correct line number and b,w or f to get to where you want. Decrease key repeat time to make this faster.
    This doesn't cause a brain context change and you can focus on your code instead of random flashing characters.

    • @ascourter
      @ascourter  6 місяців тому +5

      This is what's great about Neovim, you can use what makes sense to you as a user.

    • @hechuan5075
      @hechuan5075 6 місяців тому +2

      having to repeatedly hitting b or B, j or k even relative line jumping was too slow and exactly why i switched to Flaah, lol

    • @no_name4796
      @no_name4796 6 місяців тому

      Yeah. Also / works pretty fine most of the times.
      And if it doesn't, i just manually navigate.
      But yeah, i hate having to think about what i do (except when i do macros, which in fact i do only if i want to have some fun, or have big changes to make and a good macro is worth it)

    • @no_name4796
      @no_name4796 6 місяців тому

      Also: i tend to use the defaults as much as possible.
      This for 3 reasons:
      - i am lazy
      - defaults are mantained by neovim devs, so they will always work (unlike plugin stuff which may break, get deprecated or who knows what)
      - using defaults means that if i fuck up and need to run neovim without plugins, or on a different computer, then my muscle memory will still be valid

  • @garctin
    @garctin 6 місяців тому +3

    I tried flash.nvim when it was added to LazyVim. But coming from leap.nvim I always felt lost. It was unintuitive to me. So I'm back on leap.nvim.

  • @谢智斌-q9l
    @谢智斌-q9l 6 місяців тому

    You don't mention leap.nvim most useful feature: instantly jump to next match without type a char, that's the bonus of 2 char search

    • @ascourter
      @ascourter  6 місяців тому +1

      Ah I did forget this. I trigger this case so little that I forget about it.

  • @RuanSilva-kk1gq
    @RuanSilva-kk1gq 6 місяців тому +2

    I prefere hop.nvim

    • @ascourter
      @ascourter  6 місяців тому +1

      Nice. This one is next up! What do you like best?

  • @rodelias9378
    @rodelias9378 6 місяців тому

    Great video. I think it's time for me to move from leap.nvim to flash.nvim

    • @ascourter
      @ascourter  6 місяців тому +1

      Definitely worth a try. There have been several people who say hop.nvim is even better so that's on my list to check out next!