schmonz.com is a Fediverse instance that uses the ActivityPub protocol. In other words, users at this host can communicate with people that use software like Mastodon, Pleroma, Friendica, etc. all around the world.

This server runs the snac software and there is no automatic sign-up process.

Search results for tag #vim

[?]SpaceLifeForm »
@SpaceLifeForm@infosec.exchange

@marick @JeffGrigg @cammerman

I learned enough of vi (not Vim) in an hour or so from a coworker to get started after learning about Escape.

Then I read more documentation.

There are many powerful features in Vim, but you can easily forget about them if you do not use it every day.

    [?]Ricardo Martín :bsdhead: »
    @ricardo@mastodon.bsd.cafe

    One of the advantages of using vim is that you can finish typing most of your rants with :q!
    ... and loop as many times needed /s

      [?]Sébastien Roccaserra 🐿️ »
      @sroccaserra@mastodon.social

      Totally random thought: would I be able to do the Gilded Rose kata using only the ed text editor in a reasonable time?

      Goals:
      1) have fun,
      2) look like a fool,
      3) learn enough ed to later be able to script complex text changes across files,
      4) also level up in sed and vim

      Reason: ed(1) is the standard Unix text editor.

        [?]Manchuck »
        @manchuck@phpc.social

        I was driving myself nuts wondering why my was not installing plugins or setting up my keymaps. until I realized I forgot to setup the symlink to my .dotfiles

          [?]xinqu »
          @xinqu@mastodon.bsd.cafe

          Recently started learning , although it's completely useless to me. Sometimes it helps to understand why things developed like they did when you go back in time, when remote communication started. And I love having a fallbacks.

          It's like learning in order to understand concepts of .

            [?]chesheer »
            @chesheer@mastodon.bsd.cafe

            The more I think about it, the more it seems to me that in this day and age with all the modern threats having a text editor that is capable to not only connect to the Internet, but also install some code packages from repositories (and probably do dependency resolving) is a recipe to catastrophe. Sooner or later.
            It's probably one thing when you use a curated list of half a dozen addons that you can even personally peruse (or even contribute to). It's a whole other thing when you use some huge "distro" with probably hundreds of packages that also receive constant updates you cannot possibly control.
            It's mostly about , of course, but is fully capable of it too. I won't even mention the likes of .
            We had a fair share of supply chain attacks in the recent years (npm, pip, even xz in some way). No reason to think no one's gonna use this channel of attack.
            Maybe it's just my fibs. But there is some uneasy feeling about the fact that you edit, perhaps, extremely private, personal or sensitive texts while your editor runs some background code doing who knows what. It's one thing to trust people who wrote vim or Emacs and a whole other thing to trust a hundred other unknown parties at the same time.

              [?]Tim Chase »
              @gumnos@mastodon.bsd.cafe

              Dumb trick:

              Have a bunch of files open in multiple windows and want to jump to the first (or last) line in all of them?

              :windo 1

              or

              :windo $

              and done.

              If you use tabs instead of windows, you could use :tabdo instead.

              or you can jump to the next instance of /pattern/ in all open windows/tabs with

              :windo /pattern
              :tabdo /pattern

              or the first/last (assuming you have 'wrapscan' set) with

              :windo $/firstpattern
              :windo 1?lastpattern

                [?]Steven Rosenberg »
                @passthejoe@ruby.social

                While I realize that other text editors exist, I can't see myself leaving

                  [?]JdeBP »
                  @JdeBP@mastodonapp.uk

                  I've been looking at the source code of 's new tool after @bsletten mentioned it.

                  This comment saddens me:

                  github.com/microsoft/edit/blob

                  It's untrue in two ways.

                  First, , and its predecessors, very much *did* work this way, and have done since the 1980s.

                  It's how works. Anything using ncurses works this way, and even most full-screen programs that just use termcap/terminfo directly do things this way.

                  It was an important thing to do back in the days of 9600 BPS terminals. If one didn't, one's full-screen program was painfully unusable. *Of course* programs did things this way.

                  Second, reading further down the code shows that the comment is exactly backwards. It is in fact Microsoft's new EDIT that writes the unnecessary stuff; lots of it, especially if your terminal window is a wide one.

                  Getting it to do limited updates (of less than entire screen lines at a time) is a to-do item:

                  github.com/microsoft/edit/blob

                    [?]Agnieszka R. Turczyńska »
                    @agturcz@circumstances.run

                    I need help again with scripting.

                    For some particular files (you can probably guess it from the minimal example to reproduce the problem) I want to set swap directory (the vim directory setting) to a particular location.

                    So, I have a function:

                    function SetLocalSwapForRemoteFilesystems()
                    call mkdir("/tmp/swapfiles","p","0o700")
                    setlocal directory=/tmp/swapfiles//
                    echo "Swapdir: " . &directory
                    endfunction

                    which I call from autocommand:

                    autocmd BufRead * call SetLocalSwapForRemoteFilesystems()

                    The function is being called, as for any existing file being opened, I see the message:
                    Swapdir: /tmp/swapfiles//

                    but the swapfile is still created in the . directory, which is based on the original (default) version of swapfile setting.

                    I thought, that perhaps the swapfile location is being established before BufRead event, so I've tried to replace the autocommand with:

                    autocmd BufReadPre * call SetLocalSwapForRemoteFilesystems()

                    But right now my function is not even being called.

                    Any idea where is the problem and how to solve it?

                      [?]nixCraft 🐧 »
                      @nixCraft@mastodon.social

                      This is a two-panel meme talking about "Programmers before" and "Programmers now" for lulz.

On the left, side we have "Programmers before," a muscular  dog wearing sunglasses and a long black coat stands confidently like matrix character and below that image text is a bulleted list aw follows:

* Take the red pill
* Escape the Matrix
* Rewrite the Matrix code
* Fix a bug
* Enter the Matrix again with the blue pill

On the right, text reads "Programmers now," a smaller dog sits with a questioning expression. Below this image is the text that reads: "How do I exit Vim?"

                      Alt...This is a two-panel meme talking about "Programmers before" and "Programmers now" for lulz. On the left, side we have "Programmers before," a muscular dog wearing sunglasses and a long black coat stands confidently like matrix character and below that image text is a bulleted list aw follows: * Take the red pill * Escape the Matrix * Rewrite the Matrix code * Fix a bug * Enter the Matrix again with the blue pill On the right, text reads "Programmers now," a smaller dog sits with a questioning expression. Below this image is the text that reads: "How do I exit Vim?"

                        [?]nixCraft 🐧 »
                        @nixCraft@mastodon.social

                        Do you know why most sysadmins & experienced DevOps folks like to use ? It's because learning all of Vim's (A-Z) commands actually grants the user temporary telepathic abilities. You see it all the time. All hardcore Vim users, like those sysadmins, often seem to anticipate your needs before you even type them. They can practically fix server /cloud issues by editing text config files or deploy Ansible playbook before they even happen! Vim gives them superpower. I have spoken

                          [?]r1w1s1 »
                          @r1w1s1@snac.bsd.cafe

                          I’ve been exploring a more minimalist approach in my tools lately, and part of that includes trying to use nvi more often instead of Vim. To make the transition easier (for myself and anyone else interested), I put together a simple nvi quick reference:

                          https://4c6e.xyz/nvi.html

                          It’s not meant to be exhaustive, just a practical guide to help get things done with a lighter touch.