• FriendBesto@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    9 days ago

    On my laptop, I update my bashrc on Excel, in Wine, then export it as a PDF, OCR to .md, Pandoc it to an .Org, and then finally, write it down on paper and re-type it on my phone’s Termux’s Emacs instance, then TRAMP it to my PC, in the other room.

    I use biebian, btw.

  • GustavoM@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    18 days ago

    Nano is my “daily drive”, but I’d use vim as well – takes a couple seconds to search for “how to type in linux vim” and “how to save a file in linux vim” anyways. :^)

      • theshatterstone54@feddit.uk
        link
        fedilink
        arrow-up
        0
        ·
        17 days ago

        Not even Basic Command-Count-motion like c3w aka change 3 words after cursor, or d3b delete 3 words before the cursor?

        To that, you add the D aka delete command C for change Y for yank (copy)

        So yy to yank line, or dd to delete line.

        Also p for paste

        Also, i sends you before the cursor, a sends you after. Capital I is insert at beginning of line, Capital A is insert at end of line (append).

        I terms of motions and moving around, you need: hjkl, C-d and C-u (half page jumps down and up), and within the line: 0 or ^ for beginning of line, $ for end (taken from regex), w for moving by word forwards, b for moving by word backwards. That’s pretty much all you need imo. There is also t and f. Where t goes forwards (think 'till aka until). Like dtc delete until the c character. F is the same but goes backwards in the line rather than forwards. Remember you can use these with xommands, so d$ deletes until the end of the line. Or “dt.” deletes till the “.” so… yeahI know there’s more, but that’s all you need for Normal and Insert mode imo.

        For Visual mode, you only need to know how the Visual modes work. Visual (v), Visual Line (Shift-v) and Visual Block (Ctrl-V).

        Also, for visual mode, it might be helpful to learn how to use V-Block to comment out multiple lines at once. Can’t be bothered to go into it.

        But I’d argue that’s all there is to learn about vim keys in terms of getting work done.

        • Rekhyt@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          edit-2
          17 days ago

          Not gonna lie, once you’re getting past single button combos, I’m mentally checking out. Ctrl+K and Ctrl+U in nano are good enough for me, and if I need to do something more complex like actual coding, I’ll use an editor with a full GUI as well.

          • theshatterstone54@feddit.uk
            link
            fedilink
            arrow-up
            0
            ·
            17 days ago

            Fair enough. I basically gave you a large chunk of vim so it will feel super overwhelming. The trick is to do one command or combo at a time. For example, I started with dd. Then I added yanking. Then I added visual mode. Then I added “o” (which I think I forgot to mention: o creates a newline under the current one and puts you in insert mode. Capital O does the same but above the current line). The real trick is going little by little. And to be honest, there are some commands I still rarely use or forget to mention. I’ve never used f instead of t. And in terms of forgetting to mention, there’s the x command which deletes the single character under the cursor rn.

            Also, I’m sure someone will find this list helpful, so on top of this, I’ll also add this video (and hope that Piped bot will appear): https://www.youtube.com/watch?v=RSlrxE21l_k

            It contains some things I haven’t mentioned.

            As for learning all this, I’m repeating myself for the third time. Do it little by little. And when a command is already a thing you do almost without thinking about it, you’re ready to add more.

            I’m mentally checking out

            Why? dw is delete word, c5b change 5 words backwards, and those are the most complicated commands you’ll ever get to use, unless you start adding cuatom keybinds.

            But I digress. If you don’t want to learn it, it’s fine.

  • bluewing@lemm.ee
    cake
    link
    fedilink
    arrow-up
    0
    ·
    18 days ago

    Emacs users laughing at VIM users.

    Emacs - A pretty good OS you can use as a text editor.

  • jaybone@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    18 days ago

    You noobs. I just use combinations of cat piped to sed to edit my files, which are mainly lisp code.

      • voracitude@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        edit-2
        18 days ago

        I regularly fix my bashrc file with Notepad. I run it in Wine because I cbf to RealVNC from my Windows CE media server.

        (n.b: None of this is real, I wrote it to upset people, I’m sorry)

        • riodoro1@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          edit-2
          18 days ago

          Well let me upset you.

          Ive been helping my coworker on a call and he was sharing his screen. I told him to edit a file (add a line) on a linux box we develop and he copied the file to his windows host with winscp, edited it in notepad and copied it back. I fantasize about killing him ever since.

          • Dave.@aussie.zone
            link
            fedilink
            arrow-up
            0
            ·
            17 days ago

            They need to learn how to use their tools better. Winscp does all that transparently for you if you press F4 on a file on a remote system. Or maybe they did and you just didn’t see it…

            It’s quite a handy function when you’re diving through endless layers of directories on a remote box looking for one config file amongst many.

  • RedWeasel@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    18 days ago

    Worst is when installing a new distro(usually in a vm ) and it defaults to nano and for some weird reason no vi of any sort is installed. I hated nano. Last time I intentionally used something like nano was the 90s with pine I think.

  • ramble81@lemm.ee
    link
    fedilink
    arrow-up
    0
    ·
    18 days ago

    I’ve come to the conclusion, people who use vim just continue to do so out of a stubborn sense of pride for finally learning the key combinations.

    • TheV2@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      17 days ago

      There is no sense of pride. Every text/code editor has key combinations that many users will learn eventually. Vim has easier key bindings.

    • Semi-Hemi-Lemmygod@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      17 days ago

      It’s not pride, it’s just that I know how to use it really well and that makes it easy for me to use.

      But it’s really only for viewing files on another system over SSH. For local work I use Sublime Text

    • PlexSheep@infosec.pub
      link
      fedilink
      arrow-up
      0
      ·
      17 days ago

      What do you mean? The vim users know their key combinations pretty well, that’s kind of the point of vim.

    • techwizrd@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      17 days ago

      I am faster, more comfortable, and more productive in Vim. I use the same keybindings in all my editors and IDEs. It’s okay for people to have different preferences.

    • pixelscript@lemm.ee
      link
      fedilink
      English
      arrow-up
      0
      ·
      17 days ago

      I mean, yeah, kind of. In the same way pilots fly planes out of a stubborn sense of pride for knowing what all the flight deck controls do.

    • catshit_dogfart@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      17 days ago

      I just use vi

      Is that stupid? It’s all I ever bothered to learn, hasn’t failed me yet. Now I’m not some big time linux guru but I’m a sysadmin and regularly find myself elbow deep in a CLI for stuff.

      • Treachery4524@lemmy.ml
        link
        fedilink
        arrow-up
        0
        ·
        17 days ago

        Can you use a mouse in nano? I always just use the arrow keys, or page up/down and home/end

        I mostly use vim but I barely use the jkl; to navigate the document.

        • TheHarpyEagle@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          17 days ago

          Ah sorry, I meant using Vim in a GUI program. I wanted something with the flexibility of a mouse (quick navigation, context menu actions, etc.) without using a mouse. Using just the arrow keys, shift highlighting, etc. is just too slow when writing lots of text, and it doesn’t follow the natural position of typing.

    • JustAnotherKay@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      17 days ago

      In my case it’s not a sense of pride. I can’t use anything other than Vim because I keep accidentally putting random incantations into my word documents.

      “There once was a dduuuZQ:q!”

        • JustAnotherKay@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          17 days ago

          Ya know, I might throw that on to my browser but I doubt I’d actually use it much. I only really use my browser for research; notes, music, and most of my work is done in the terminal. Being able to swap tabs faster by not having to cycle could be useful, but other than that I find the mouse to be a pretty rapid way of navigating unfamiliar pages

          • lemmesay@discuss.tchncs.de
            link
            fedilink
            arrow-up
            0
            ·
            17 days ago

            in my case, my hand hurts if I use mouse(or a mobile phone) for some time. using j/k for scrolling and clicking links via f help me a lot.

        • PlexSheep@infosec.pub
          link
          fedilink
          arrow-up
          0
          ·
          17 days ago

          That extension is actually pretty cool. There is also tridactyl and a browser that was made with vim in mind, but a browser and a text editor are too different for many things to translate.

    • hakunawazo@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      17 days ago

      It’s just convenient that it’s pre-installed on many servers.
      So I can use it now everywhere with my stubborn sense of pride for finally learning the key combinations.

  • unknowing8343@discuss.tchncs.de
    link
    fedilink
    arrow-up
    0
    ·
    18 days ago

    In every post of this kind I am amazed at so many people using nano instead of micro which is SO MUCH BETTER while being the same thing at the same time.

  • AnUnusualRelic@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    18 days ago

    The first time I found myself in nano was when testing a distro fifteenor twenty years ago. I had to edit some files and it was the only available editor. The damn thing was a horror to use. I still have no idea who it caters to. I haven’t had to use it since though.

    • SomeLemmyUser@discuss.tchncs.de
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      18 days ago

      Dunno what you used, but nano is literally a text editor that may be simple simple but it just works. Shortcuts are shown to the user, buttons work like you expect them to (arrow keys, ESC, shift, etc)

      With vim you open it and if you haven’t read 5pages of doc you won’t even be able to close it again. I see that its useful for power users, but for casuals who just want to edit a config once in a while nano is absolutely the way to go imho

      • AnUnusualRelic@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        edit-2
        17 days ago

        It’s not that simplle or user friendly when none of the usual shortcuts work. C-a did something completely unexpected.

        • SomeLemmyUser@discuss.tchncs.de
          link
          fedilink
          arrow-up
          0
          ·
          edit-2
          17 days ago

          Well its shown to you at the bottom of the screen what it does…

          And if you want Ctrl v,c,s etc. To work like in word etc you can always use nano --modernbindings

          • AnUnusualRelic@lemmy.world
            link
            fedilink
            arrow-up
            0
            ·
            17 days ago

            They’re in Linux now, it should show the shortcuts they’ll encounter everywhere. Not leftovers from another system.