• mcv@lemmy.zip
    link
    fedilink
    arrow-up
    23
    ·
    10 hours ago

    I often see Copilot get stuck in a nonresponsive shell after it used cat > file. It’s hilarious to watch the first time, but I’m a bit tired of it by now. Why doesn’t it just edit files like it normally does?

    • pinball_wizard@lemmy.zip
      link
      fedilink
      arrow-up
      6
      ·
      5 hours ago

      Why doesn’t it just edit files like it normally does?

      Haha. Yes.

      But it does everything the most probable way, according to all the stack overflow it has swallowed.

      Sometimes that way makes sense. Sometimes not.

      • raman_klogius@ani.social
        link
        fedilink
        English
        arrow-up
        0
        ·
        3 hours ago

        Because efficiency is never the point. All gimmicks of “artificial intelligence” throughout history is how automatons do things the way humans do it, with human interface. The mechanical turk, the robot maids of the 70s, etc.

        • pinball_wizard@lemmy.zip
          link
          fedilink
          arrow-up
          2
          ·
          edit-2
          2 hours ago

          The mechanical turk, the robot maids of the 70s, etc.

          Yes.

          But I’m a little sad that I still can’t buy a robot maid or butler.

          I figured they would exist by now, for about the price of a vacuum.

          I’m not demanding that they actually be any good. We could just program them to quote “The Jetsons” and do some simple vacuum pathing, or deliver a tray full of drinks.

  • Cevilia (they/she/…)@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    103
    ·
    14 hours ago

    Every computer has a built-in “exit vim” button, conveniently located on the chassis, usually next to the power cord. Flick it to 0, then back to 1, and you’ll find vim has been successfully exited. :)

  • Feyter@programming.devM
    link
    fedilink
    arrow-up
    186
    ·
    17 hours ago

    No one can exit vim. It’s simply not possible.

    There are even legends that the devil himself was onced tricked into opening vim and is stuck there since.

  • Mulligrubs@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    edit-2
    9 hours ago

    I was a programmer for the Commodore PET, let me see what I can do.

    10 Exit VIM

    20 end

    did it work?

    • Buddahriffic@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      7 hours ago

      Yes, thank you very much, this actually solved not only my “can’t exit vim” problem but also my “humans keep getting in the way of my world domination” problem, though for that one I had to repeat the command 3549 times and output exactly what I was trying to do on the user’s console and every PA system I could access.

  • reksas@sopuli.xyz
    link
    fedilink
    arrow-up
    32
    ·
    edit-2
    10 hours ago

    i cant understand all the vim hyping. its probably very neat and can do whatever, but what good is that if it takes awful amount of bother to learn everything by heart since interface has been designed to be as unfriendly as possible. it doesnt have to be fit for office worker, but at least some ease of use is needed.

    • zarkanian@sh.itjust.works
      link
      fedilink
      arrow-up
      1
      ·
      3 hours ago

      Okay, I’m going to use vim, and you get to use vim’s predecessor, ed. I’m sure you won’t mind, since vim is soooooo user-unfriendly! Right?

    • SleeplessCityLights@programming.dev
      link
      fedilink
      arrow-up
      4
      ·
      7 hours ago

      Learn Vim motions and use a plugin for another IDE. You are losing so much time and mental energy using a mouse for coding. You can also use something like NVChad with NVim and have a Vim that looks more like modern ides.

    • Noctambulist@lemmy.world
      link
      fedilink
      arrow-up
      19
      ·
      11 hours ago

      Vim is actually highly ergonomic; you can do everything with a minimum of keystrokes without moving a hand away to a mouse or touchpad or oven the arrow keys. If that’s worth the time investment to learn it, is a highly subjective question. But I’d say it’s a lot easier than many people think.

      • Buddahriffic@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        7 hours ago

        Though, if you prefer, you can also move your hand to the mouse. With the scroll wheel and good hand-eye coordination, you can get pretty close to the speed of a true vim exper–haha jk, they finished converting the entire source file from python to rust using a specially crafted regex by the time your hand reached the mouse and implemented a matrix view by the time you scrolled to the line you wanted.

        And when you say that falling green symbols aren’t that impressive, they look at you in confusion for a moment before realizing what you meant and handing you a VR plug to show you what “matrix view” really means.

    • schnurrito@discuss.tchncs.de
      link
      fedilink
      arrow-up
      28
      ·
      12 hours ago

      since interface has been designed to be as unfriendly as possible

      No, it hasn’t.

      It (well, vi, which vim is a clone of) has been designed to be a possible interface on a keyboard that doesn’t have arrow keys or other modifier keys than shift. There aren’t that many ways to program a visual text editor when those are your constraints.

      That it’s more productive once you know it is a side-effect.

      • Dyskolos@lemmy.zip
        link
        fedilink
        arrow-up
        7
        ·
        11 hours ago

        It (well, vi, which vim is a clone of) has been designed to be a possible interface on a keyboard that doesn’t have arrow keys or other modifier keys than shift.

        That sounds great and all, but in the last 40yrs I have not owned (or seen…) A keyboard like that. For whom the heck was this useful? 😁

        Not mocking, I do use vim or nano, but also never got why it had to be so incredibly unintuitive.

        • pankuleczkapl@lemmy.dbzer0.com
          link
          fedilink
          arrow-up
          10
          ·
          9 hours ago

          You don’t have to move your hands while touch typing. This is the single biggest reason why vim is still used today, regardless of whether you have arrow keys or not. In fact vim does support arrow keys and using the mouse as well! It’s just much easier to edit files without needing to move your hands and/or use a touchpad/mouse.

        • withabeard@sh.itjust.works
          link
          fedilink
          arrow-up
          6
          ·
          9 hours ago

          Even then, not having to move your hands means not spending time… Moving your hands.

          This is useful for people who want to spend time learning to be enforcement at what they do. In the same way that holding a Nintendo controller “weird” is useful for Tetris speed runners.

          If you are as efficient as you need to be using a shower interface, then great. Other people need (or more likely want) to be more efficient than that.

          Maybe I’m a luddite, but I still don’t understand why people want to spend their time arguing with Claude code and fixing it’s bugs. Rather than just learning to write productive coffee themselves. But, people do. That’s their choice, and I let them to it.

          If prefer to spend my time learning him and code, than Claude and idiosyncrasies, and then whatever to comes next, and next again.

        • schnurrito@discuss.tchncs.de
          link
          fedilink
          arrow-up
          6
          ·
          11 hours ago

          At the time vi was originally developed, such keyboards did exist (on terminals). That’s the reason it works the way it does.

    • stochastictrebuchet@sh.itjust.works
      link
      fedilink
      arrow-up
      45
      ·
      13 hours ago

      The interface is modal editing, which, yes, takes some getting used to. The payoff is that you get a kind of programming language for text editing. Rather than memorizing ctrl+shift+alt-style keybinds, you decompose stuff into chainable actions.

      Have you ever played a video game, be it with kbd+mouse or gamepad, and realize you’re doing a bunch of stuff without actually consciously thinking about what buttons you’re pressing? That’s what working in editors like Vim or (my fav) Helix feels like.

    • lime!@feddit.nu
      link
      fedilink
      arrow-up
      17
      ·
      14 hours ago

      fluency. languages are hard to learn but when you know them you communicate better. same as touch-typing, or mobas.

    • Lucy :3@feddit.org
      link
      fedilink
      arrow-up
      6
      ·
      11 hours ago

      Friendly is useful in an application you use once a week. Anything you want to work with daily, like a text editor, needs to be efficient.

    • grepehu@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      10
      ·
      13 hours ago

      It’s not “designed to be as unfriendly as possible”, it’s designed to be exactly what you configure it to be, that’s why I love it. Every keymap, every screen position, every worflow, the way it searches through lines and files names, everything was configured by me, so whenever I do something in my editor it always make absolute sense for me, because it was literally made for me.

      If you get me to someone else’s neovim config I would probably be absolutely lost because it’s a very unique experience for each person, some people like to bloat it out with plugins others like to keep it bare minimum and so on.

      One biggest lie abput vim is the productivity, it doesn’t make you that much faster in comparison to any other editor if you take the time to learn the keymaps from them, the real strong point of neovim is having an editor that is absolutely tailor made for you in a way you cannot achieve in OOB editors.

      • ripcord@lemmy.world
        link
        fedilink
        arrow-up
        8
        ·
        13 hours ago

        Yeah, but as a 30-year vi/vim user, using it nearly every day - it IS pretty user-unfriendly

      • reksas@sopuli.xyz
        link
        fedilink
        arrow-up
        3
        ·
        edit-2
        13 hours ago

        yes, i can get behind the configurability, lets you make the program into your own personal tool nicely. my problem is that you have to do it in such difficult and unintuitive way. though it has been very long time since i last took a look at vim, so maybe things have improved and its easier to configure now, i doubt it though.

        So it would be nice if getting into it was easier even if you havent used it as your main editor for last 50 years. not being able to even exit vim without looking up guide for it demonstrates this quite nicely.

        • grepehu@lemmy.dbzer0.com
          link
          fedilink
          arrow-up
          3
          ·
          13 hours ago

          Nowadays there many neovim distros that come setup with everything and you can learn as you go, but definitely not user-friendly still and the distros kind kill the point for me personally.

          I totally understand prefering users friendly tools, but I think that fornevery software there is always some degree of granularity that makes it user unfriendly.

          You asked about what the hype about vim was, I tell you: it’s the granularity of the configuration it’s 100% not it’s user friendliness.

    • bamboo@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      5
      ·
      13 hours ago

      In terms of command line editors, vim is extremely powerful and relatively easy to get started with, once you know how to get into insert mode and then save/quit. nano/pico are easier to learn but less powerful, and emacs is probably more powerful than vim, and more daunting to learn. Also, vim is installed on almost all systems, so there’s not really any extra work to get started using it.

    • jeff 👨‍💻@programming.dev
      link
      fedilink
      English
      arrow-up
      4
      ·
      13 hours ago

      I learned (neo)vim this last year. It really wasn’t that bad. You need to learn like maybe a dozen hotkeys to get going, but after that you can do :h <topic> for everything else. And it’s not even like you lose full functionality of your mouse, at least neovim supports a lot of mouse movements

    • thethunderwolf@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      2
      ·
      14 hours ago

      My preferred text editors are Neovim and Kate

      Kate has some convenient features, mainly the easy GUI. Neovim is the CLI text editor that I find works best for me.

    • [object Object]@lemmy.ca
      link
      fedilink
      arrow-up
      64
      ·
      16 hours ago

      If it’s a read only file it won’t work, but it might be in insert mode and can’t escape.

      It should have tried :q!

    • eli@lemmy.world
      link
      fedilink
      arrow-up
      8
      ·
      14 hours ago

      Could be in recording mode, which usually needs a couple ESC or a Q then you can :wq

      • Miaou@jlai.lu
        link
        fedilink
        arrow-up
        1
        ·
        4 hours ago

        You mean EX mode? IIRC recording mode doesn’t prevent exiting vim

        • eli@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          3 hours ago

          Ah just looked up EX mode. Didn’t know capital Q entered a different mode, I just wrote “Q” to emphasize the key in general not capital Q specifically lol.

          Personally I love vim, it’s just powerful enough for me for my bash scripts. Anything more complicated then I’m using a proper IDE or something more simple I’m using Kate or whatever graphical editor for my DE.

        • eli@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          3 hours ago

          Nah, just looked it up. Recording mode is activated by pressing “q” and allows you to record your inputs for a macro. So if you forget to do “:” and just press “q” you’ll enter Recording mode and have to press “q” again to exit Recording and then you can do “:q” or whatever you needed.

          But if you don’t know what you pressed and don’t know how to exit Recording mode then you’ll be stuck. I’ve seen coworkers get stuck in this from time to time.

          We’re a RHEL shop so our vim version may be different, but Recording mode doesn’t let us exit vim directly, we have to exit Recording mode and then exit vim. Again, might just be our setup.