I’m trying out Obsidian for taking notes, and this made me laugh.

      • @hperrin@lemmy.world
        link
        fedilink
        62 years ago

        According to Stack Overflow, there is also:

        • :cq (quit without writing and return non-zero exit code)
        • ZQ (quit without writing from normal mode)
        • @itslilith@lemmy.blahaj.zone
          link
          fedilink
          3
          edit-2
          2 years ago

          I actually knew about ZQ :)

          but in what case would you ever need :cq ? I’m curious what’s the idea behind that

          Edit: I checked, neither work for obsidian verification, including :cq!

          disappointing :c

          • @GiantRobotTRex@lemmy.sdf.org
            link
            fedilink
            2
            edit-2
            2 years ago

            It’s useful when vim is being run from a different program or script.

            For example, if I run p4 change to create a new Perforce changelist it will open up my editor (which I have set to vim) so that I can enter the CL description and other fields. If I realize I don’t actually actually want to create the CL yet I can use :cq to quit with an error so that p4 knows to abort.

            I also have a script I use for diffing a list of file pairs. It runs vimdiff on the first pair of files then if I exit with :qa it will move on to the next pair of files. But if I exit with :cq it will just abort and skip all of the remaining file pairs.

    • @marduk@lemmy.sdf.org
      link
      fedilink
      54
      edit-2
      2 years ago

      I like nano because it has worked any time I needed it. I don’t dislike nano because I’m not good enough at Linux to have ever run into its limitations

    • @locuester@lemmy.zip
      link
      fedilink
      English
      302 years ago

      nano gang checking in.

      However, I’ve been forced over time to remember “:wq” to get unstuck should vim randomly appear.

    • The_Walkening [none/use name]
      link
      fedilink
      English
      82 years ago

      100-com% of the time I’m using nano to edit something in the terminal, and it’s usually something really minor. I’m using GUIs for the majority of my computing anyway, so if I need some robust text editing, I’ve got a bunch of easier-to-learn, easier-to-use options available, and that’s totally ignoring things like awk, grep, sed, etc.

      • @Troz@sh.itjust.works
        link
        fedilink
        211 months ago

        I made that switch a few months ago just so I could cut, copy and paste without having to lookup how to do it. it’s been great.

    • @affiliate@lemmy.world
      link
      fedilink
      52 years ago

      i’ve only ever used nano in the early stages of a gentoo install, when it’s too early to install vim and import my dot files 😈

    • Ensign Rick
      link
      fedilink
      English
      82 years ago

      I personally like nano but it’s what I used first. So I learned the commands. Vim I still forget Everytime.

    • @folkrav@lemmy.world
      link
      fedilink
      132
      edit-2
      2 years ago

      It’s hard to hate nano, but IMHO there also isn’t anything to like in particular either. It’s basically a TUI notepad. It’s there, it lets people edit files… and that’s pretty much all there is to it.

      • @killeronthecorner@lemmy.world
        link
        fedilink
        English
        1522 years ago

        You can use nano without having to read anything about nano. That might be the only thing that is better about it than vim, but it’s a damn important thing.

        • @nautilus@lemmy.dbzer0.com
          link
          fedilink
          692 years ago

          I have zero patience when trying to make small adjustments to files, which is what my command line text editor should be for. Nano just has everything at the bottom in case you forget (I do, frequently) so the workflow is ridiculously streamlined for me

              • Fushuan [he/him]
                link
                fedilink
                English
                5
                edit-2
                2 years ago

                Because it’s easy, dd to delete a line and p to paste it somewhere else.

                • @bpm@lemmy.ml
                  link
                  fedilink
                  22 years ago

                  yy to copy, dd to cut, p to paste. Need to move 5 lines at once? No problem, move to the first line and use d5d, and p to paste it. Vim gets a bad rap for being confusing, but it’s so fast to move text around once you get the hang of it.

      • Alien Nathan Edward
        link
        fedilink
        372 years ago

        it’s basically a TUI notepad. It’s there, it does one job and that’s all there is to it

        That’s what the people who like it like about it.

      • bioemerl
        link
        fedilink
        33
        edit-2
        2 years ago

        Vim really is an IDE, not a text editor. It’s usable as an editor but overkill.

        Nano serves a difference purpose. It’s like telling someone on a bike that a mustang is better.

        • Kogasa
          link
          fedilink
          332 years ago

          Vim is absolutely not an IDE. It has no integrations with any language. It’s just a powerful text editor. You can add language plugins and configure it to be an IDE.

            • Kogasa
              link
              fedilink
              22 years ago

              Not at all what I meant. It’s just, out of the box, a powerful text editor that can be configured and built on if desired. If you want it to be more than a text editor, you can easily make it so.

            • nickwitha_k (he/him)
              link
              fedilink
              1
              edit-2
              2 years ago

              Eh. Both are good choices. I prefer vim for my workflows - I like the terminal.

              ETA: Will have to give Emacs another go though at some point.

          • Frank Müller
            link
            fedilink
            12 years ago

            @kogasa Hehe, shit, so long done something wrong as I use #vim as an IDE. Okay, some own helpers, some plugins, the direct integration for #golang via LSP and since some time also ChatGPT and Copilot. But hey, it’s no IDE. 🤪

            • Kogasa
              link
              fedilink
              32 years ago

              Like I said, Vim can be made into an IDE by adding and configuring plugins. Basic barebones vim is designed to be a powerful, extensible text editor, not an IDE.

              • bioemerl
                link
                fedilink
                22 years ago

                You’re not a normal text editor if you have a built in scripting language.

                • Kogasa
                  link
                  fedilink
                  52 years ago

                  I’m not a text editor. But anyway, would you call a shell script that invokes python.exe $1 a Python IDE? Why would you? Vim isn’t designed to facilitate the use of vimscript, vimscript is just an extensibility feature of Vim.

          • @hperrin@lemmy.world
            link
            fedilink
            20
            edit-2
            2 years ago

            That’s what most IDEs are. VS Code doesn’t have any native integrations. Everything is provided by plugins. The default plugins that ship with VS Code can be disabled, and you’ll have just a powerful text editor.

            (To do this, go to Extensions tab, click the filter icon, select “Built-in”, and go down the list to disable all of them. Or just build a version with no built-in plugins.)

            • Kogasa
              link
              fedilink
              132 years ago

              Sure, and VSCode without any plugins is a text editor, not an IDE.

              • bioemerl
                link
                fedilink
                72 years ago

                In that case every IDE is “just a text editor” because basically every IDE is built around modularity in this same way. This is just nitpicking over what is preinstalled.

                • Fushuan [he/him]
                  link
                  fedilink
                  English
                  72 years ago

                  Eclipse, visual studio, pycharm, idea… Those are full blown IDEs. They come with all the extras. All the text editors that can become IDEs have extensions or plugins that enable what these other actual IDE do natively.

                  Nowadays using vscode to debug a running program is common, but that was something only restricted to full blown IDEs some years ago, I’d say that vscode is lightweight IDE that can be expanded, but vim is a text editor first and foremost. You can’t really debug code in vim AFAIK, the most you get is syntax highlighting, linting, automatic whitespace removal and auto formatting? Not sure about the last one.

                • Kogasa
                  link
                  fedilink
                  32 years ago

                  IDEs are designed to support a software development workload. A text editor is designed to edit text files.

            • @DrQuint@lemm.ee
              link
              fedilink
              4
              edit-2
              2 years ago

              Ah, so Code is the same as Vim if… I go out of my way to either disable things on one or install things on the other.

              Or… Or… Code is an IDE (that you can strip down) and Vim is a text editor (that you can strip up).

              We don’t stop calling a computer one just because it can still boot without most of its modules. The default presentation matters.

          • Bo7a
            link
            fedilink
            162 years ago

            No offense intended here - But why is this being upvoted?

            vim absolutely is an IDE if that is how you want to use it. Syntax highlighting, linter, language specific autocomplete, integrated sed/regex. And much, much more.

            • Kogasa
              link
              fedilink
              102 years ago

              Syntax highlighting, linting, and language specific autocomplete are features supported by plugins and scripts. Plain, simple vim is a powerful extensible text editor. The extensibility makes it easy to turn into an IDE.

                • Kogasa
                  link
                  fedilink
                  52 years ago

                  Yeah, there is a generic syntax highlighting scheme. I had forgotten because it’s not very good for some languages, I’d replaced it with a LSP-based implementation years ago.

            • @killeronthecorner@lemmy.world
              link
              fedilink
              English
              10
              edit-2
              2 years ago

              The things you’re describing are still just text editor features. An IDE generally has specific functionality for building, testing, packaging, debugging etc. for one or more programming languages/environments.

              (Which vim can do if configured, I don’t really have an opinion about that tbh)

              • @naught@sh.itjust.works
                link
                fedilink
                7
                edit-2
                2 years ago

                I don’t know that’s a fair anology. Vim does what a IDE can do without almost any setup with LazyVim and Lunar Vim and a bunch other prebaked setups. Instead of writing your vscode config in JSON or using a GUI, you can use lua. It’s more like turning car into a track car or something where you’re already a mechanic

              • bioemerl
                link
                fedilink
                92 years ago

                “You see here my car has positions for all the parts of a boat so it’s easily made into a boat and it’s already waterproof but it’s just a normal car”

        • @Slotos@feddit.nl
          link
          fedilink
          122 years ago

          Nano is for those that occasionally edit text files from a terminal.

          Vim is for those who make a living out of it.

          • Captain Aggravated
            link
            fedilink
            22 years ago

            There’s a guy on Youtube who does programming language tutorials/demonstrations. Like he starts out with C++ and in one hour you’re at object inheritance, crash courses I guess is the term for them.

            He did one video that was as much a Vim tutorial as a tutorial for this language. “Press 3k, then enter, then i, and type “std::out(“whatever C syntax is”)” and then hit escape and…”

            For teaching something like a little bit of Python or a little bit of Bash or whatever, I’d rather use Nano, because you can learn how to use it in seconds. Vim is an amazing tool but lord don’t try to cram a Vim tutorial into another already technical tutorial.

        • @timbuck2themoon@sh.itjust.works
          link
          fedilink
          English
          82 years ago

          If you edit files a lot vim is worth its weight in gold. Nano makes me want to kill myself as everything takes so much longer.

          Nano is perfectly sufficient for a very rare edit.

          • bioemerl
            link
            fedilink
            72 years ago

            Vim absolutely chews through anything you throw at it. Lots of times we need data formated or lots of SQL queries and I’m the go to guy because I understand vim macros.

            Especially if you have any form of RSI.

            I wonder if it would be possible to make a user accessable way to expose similar power to the common user.

          • 520
            link
            fedilink
            32 years ago

            More like Visual Studio Vs Notepad

          • bioemerl
            link
            fedilink
            62 years ago

            Not really, or that doesn’t feel right to my. Word and notepad basically still do the same thing except for that word lets you add style.

            Like a manual vs an automatic car, maybe?

            • @frezik@midwest.social
              link
              fedilink
              8
              edit-2
              2 years ago

              Word is a WYSIWYG editor. We don’t talk about it much these days because it’s just how things are done, but it took a long time for the industry to come up with a way to display text on screen with rich formatting and have it come out the same way in print. There was a lot of buzz around it in the late 80s and early 90s.

              Word solves a completely different problem than an IDE. Notepad is a raw, minimal tool that could be built on for either WYSIWYG or an IDE.

        • @penquin@lemm.ee
          link
          fedilink
          22 years ago

          I’m struggling to see the connection here. I guess I don’t need to fiddle with the mechanical pencil, it breaks very quickly? I don’t want to go through changing those little sticks? Graphite pencil only needs to be sharpened? So, you’re supporting using Nano? I’m a little confused

        • @nautilus@lemmy.dbzer0.com
          link
          fedilink
          62 years ago

          I’ll level with you: I’m kind of a moron.

          If my command line text editor has its own bespoke integrated command line, then science has gone too far and we need to stop lmao

      • @uzay@infosec.pub
        link
        fedilink
        92 years ago

        It just makes a lot of stuff way easier once you know how to use it. Switching out a word for another: two button-presses, duplicating a line: three presses, deleting 500 consecutive lines: five presses

        • Elise
          link
          fedilink
          62 years ago

          What if I want to undo my life’s mistakes.

            • nickwitha_k (he/him)
              link
              fedilink
              1
              edit-2
              2 years ago

              How do we work this? Do we alternate between trying to ruin people’s lives with elisp and chasing the perfect .vimrc or lua - config? Maybe grab some bytes from /dev/urandom and send them to the editor whose first letter comes up first? What about holidays?

        • @penquin@lemm.ee
          link
          fedilink
          12 years ago

          But you can do all that with nano and it is straight forward and you don’t need to memorize any key combinations. I mean, I get it and no judgement here. I just use nano because it’s easy and quick.

            • @penquin@lemm.ee
              link
              fedilink
              12 years ago

              I write my code in an actual IDE. And I use nano for only, like you said, config files and those little things. And I have never used emacs and I don’t even know how it looks like. I’m dead serious, I don’t even know what emacs is or what it does. lmao

              • nickwitha_k (he/him)
                link
                fedilink
                22 years ago

                Emacs is basically a lisp interpreter packaged with a suite of “example” utilities, like a text editor. It’s one of the two historical editors used as terminal IDEs, along with vim. Emacs tends to take a more batteries, kitchen sink, web browser, games, IRC client, etc-included approach. It can seriously be closer to an OS in functionality.

          • @r1veRRR@feddit.de
            link
            fedilink
            12 years ago

            You can also copy paste by manually copying text by hand, would call that a valid alternative to Ctrl-C/V?

      • @r1veRRR@feddit.de
        link
        fedilink
        22 years ago

        I don’t understand the need for Ctrl-C/V, when manually copying the text exists. I know it’s snarky, but that’s the level of difference we’re talking about here. Or imagine, to delete a line, someone Right Arrows 50 times, then backspaces 50 times, instead of using the shortcut.

    • @XEAL@lemm.ee
      link
      fedilink
      52 years ago

      Here!

      I hate terminal-based text editors

      Nano seems quite user/idiot friendly

  • Daniel
    link
    fedilink
    English
    232 years ago

    I think this is the most upvotes I’ve seen on a Lemmy post….

    • @A2PKXG@feddit.de
      link
      fedilink
      English
      102 years ago

      Lemmy seems to be the old nerdy internet of the 90s, prior to the enshittification

      • haruki
        link
        fedilink
        22 years ago

        That’s why I like it. No BS, no ads, no commercials, no show-offs, etc. Just some people with a bit of free time share their knowledge and stories.

        I do wish we have more vibrant non-tech communities, though.

      • Stantana
        link
        fedilink
        English
        32 years ago

        I’d say more like the early days of reddit, the hardcore enshittification started around 2012-2015 IMO. The old-school nerds are still at it on IRC, Newsgroups and so on.

    • @filcuk@lemmy.zip
      link
      fedilink
      12 years ago

      I switched recently from Trillium.
      After installing two dozens plugins, it may just replace my KB site, note apps, task manager and PRM all at once.

  • Crass Spektakel
    link
    fedilink
    English
    252 years ago

    That is just hilarious but also…

    I just remembered that Bram Moolenaar, the author of vim has recently died…

    He was a real good person. Back when he released his first vim for Amiga Computers I exchanged some emails with him and he handled even my less smart suggestions very professional.

    I just take the chance to remind everyone to spend some money for his Uganda Charity.

  • chraebsli
    link
    fedilink
    11 year ago

    Great idea for when you start in IT! Always had trouble first year in my apprenticeship when i had accidentally opened vim. Ask for first time and after 2 months not used.

    Did someone already open a pull request?

  • @homura1650@lemmy.world
    link
    fedilink
    23
    edit-2
    2 years ago

    Tricky question, but I think I have a solution:

    :!readlink /proc/$PPID/fd/* | grep “$(dirname %)/.$(basename).sw” | xargs -I{} rm “{}” ; kill -9 $PPID

  • @flop_leash_973@lemmy.world
    link
    fedilink
    522 years ago

    A lot of my personal dislike for VIM would be done away with if it just had a helpful common keys cheat sheet (basic cursor navigation, edit mode, exit with and without saving, etc) at the bottom of the editor window like Nano does.

    • @CatLikeLemming@lemmy.blahaj.zone
      link
      fedilink
      English
      11 year ago

      Really, I’d just recommend using nano then. It’s installed basically anywhere you can find vim and works perfectly fine as a text editor! To use vim effectively it has a learning curve no matter what, so it’s not necessarily meant for everyone.

    • @jayemar@lemm.ee
      link
      fedilink
      152 years ago

      I understand where you’re coming from, but as a frequent user of vim I’d much rather have the additional line of text.

    • neo (he/him)
      link
      fedilink
      English
      52 years ago

      This is the only reason I have any idea how to navigate nano.

    • @redempt@lemmy.world
      link
      fedilink
      112 years ago

      one of my favorite things about helix is how easily you can check the keybinds for certain actions - just space-? and then you can see a list of every command available (by description) and their keybinds, if they have one

    • @eeleech@lemm.ee
      link
      fedilink
      122 years ago

      Having the commands listed at the bottom by default is one thing i personally dislike about nano, because they take up space while being useless to someone knowing the commands (or at least knowing how to open the help in, which is what you can do in vim to achieve the cheat sheet). The alternative that vim uses, is to show the commands when starting the editor without opening a file.

  • @psycho_driver@lemmy.world
    link
    fedilink
    762 years ago

    I mean, it’s true.

    I’ve been using linux pretty exclusively at home for almost 25 years now. Program. Script. Work in the shell a lot, and the other day I had to use vim and it took me a while to remember the basic commands. I’m a nano guy :\

    • @flop_leash_973@lemmy.world
      link
      fedilink
      15
      edit-2
      2 years ago

      I’m with you on that. VIM is a good example of a tool that the deepness of the tool makes it aggravating to use for the 90% of simple use cases.

      Unless you use VIM enough for the shortcuts to be second nature it is faster to install Nano, make the changes, and remove Nano than it is to use VIM.

    • @DaTingGoBrrr@lemmy.ml
      link
      fedilink
      182 years ago

      I also started off using nano. Have you tried Micro? It’s like nano on steroids and with good keybindings

      • @dan@upvote.au
        link
        fedilink
        122 years ago

        At some point Nano added Ctrl+S for save. That’s all I needed. Its syntax highlighting is decent too.

        • voxel
          link
          fedilink
          12 years ago

          ctrl w/o for save/save as are pretty easy to get used to tho

      • @flubba86@lemmy.world
        link
        fedilink
        32 years ago

        +1 for micro. I install it on every server I administer, and alias it to nano. If you’re a nano user and haven’t tried micro, I highly recommend it. It’s like nano, but built this century, it feels fast and modern.

    • @BestBouclettes@jlai.lu
      link
      fedilink
      132 years ago

      If you feel like it definitely give it another go. Vim (or neovim) is just insanely good once you’ve developed the muscle memory for the keybinds.
      It takes a bit of time and practice but it’s actually fairly user friendly once you understand how it works. (c for change, y for yank, p for paste, e for end, b for beginning etc.)

      • Ignotum
        link
        fedilink
        42 years ago

        I was a nano person for the longest time, was planning to try out vim but never did, until i saw a coworker using it and he explained a little about the vim “language” actually worked and how much you could do with it

        With some encouragement from him and a week or two of reduced productivity i was able to do everything just as fast in vim as in nano, and it only got better from there, now i find any other editor slow and tiresome in comparison

      • @pimeys@lemmy.nauk.io
        link
        fedilink
        22 years ago

        If you want something that is quite a nice editor too but doesn’t require hundreds of lines of configuration, try helix. It also has nice help menus so it’s fast to learn. I’ve used vim since the 90’s and Emacs for many years, but nowadays I kinda just like hx how it just works with zero configuration for any programming language I need to work with.

    • @gornius@lemmy.world
      link
      fedilink
      202 years ago

      Honestly, if you work in a shell a lot, learning vim is a great investment. You’re gonna fly through files editing them faster than with any IDE.