m5l.eu 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.

Site description
Yet another single-user instance
Admin account
@marek@m5l.eu

Search results for tag #neovim

[?]Hyde ๐Ÿ“ท ๐Ÿ–‹ :debian: ยป
@hyde@lazybear.social

Day 3: delete

While we have the common dd, x or d{motion} like dap to delete a paragraph or daw to delete a word, there are less known ones.

When you do a 'd' like 'dap' to delete a paragraph, Vim copies it in the _yank_ register, overwriting what you have copied before.

To avoid that, use the "black hole register":

"_d{motion}

"_dd will delete the line without storing it.

1/3

    [?]Hyde ๐Ÿ“ท ๐Ÿ–‹ :debian: ยป
    @hyde@lazybear.social

    Some other tips:

    :g/foo/d " delete lines containing foo
    :v/foo/d " delete lines NOT containing foo
    :g/^$/d " delete all empty lines
    da( " delete a pair of parentheses and content
    di" " delete inside quotes
    da{ " delete a block with braces
    d2ap " delete two paragraphs
    dtX " delete until character `X`
    dfX " delete through character `X`
    dT/ dF " same but backward

    2/3

      [?]Hyde ๐Ÿ“ท ๐Ÿ–‹ :debian: ยป
      @hyde@lazybear.social

      :1,.d " delete from top to current line
      :%d " delete the entire file
      :/foo/,/bar/d " delete from the first match of foo to first match of bar

      d3w " delete three words
      dG " delete to end of file
      dgg " delete to beginning of file

      There are so many great ways to edit your files with

      3/3

        [?]Hyde ๐Ÿ“ท ๐Ÿ–‹ :debian: ยป
        @hyde@lazybear.social

        Please boosts ๐Ÿ™

        We want more people ๐Ÿ™Œ๐Ÿผ

          AodeRelay boosted

          [?]Hyde ๐Ÿ“ท ๐Ÿ–‹ :debian: ยป
          @hyde@lazybear.social

          Day 4: Numbers

          Everybody knows Ctrl-a to increment a number, and Ctrl-x to decrement a number. Just put the cursor on the line of a number and hit, the keys! Ma - gic !

          Another thing that you may want to try:

          - open a file
          - type:

          0
          0
          0
          0
          0
          0

          - then Ctrl-v or V to select the lines "visually"
          - hit the keys: g Ctrl-a
          - Enjoy the result:

          0
          1
          2
          3
          4
          5

          It works also if you do with two or more zeros (00, 000, etc)

          1/2

            3 ★ 1 ↺
            Thomas Adam boosted

            [?]Marek S. ล. ยป
            @marek@m5l.eu

            Hi, I've been using for the past few years on a Corne . Works fantastic, I tried a few things but reverted every change I tried.

            I am using it primarily with modal editors. Now , used to be . Works really well with both. Even though the layout is completely different, in modal editors I just reach for the right letter. The only exception are hjkl for movement, but I have arrow keys mapped on homerow in the same way. Not only I don't have trouble with my muscle memory in vim/hx but I also brought it to all other applications :D

            https://colemakmods.github.io/mod-dh/keyboards.html#matrix-keyboards

            https://github.com/foostan/crkbd/blob/main/docs/corne-cherry/v3/buildguide_en.md

              🗳
              AodeRelay boosted

              [?]God Emperor of Mastodon ยป
              @mms@mastodon.bsd.cafe

              the subshell of holly wars!

              (I know that I am ignoring other Vis and the standard editor)

              vi:8
              vim:18
              neovim:50

              Closed