linuxusers.in 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.

Admin email
dharmiik@proton.me
Admin account
@dharmik@linuxusers.in

Search results for tag #vim

[?]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?

    [?]Wolf »
    @YesJustWolf@hachyderm.io

    @b0rk I am absolutely not telling you what to do. I'm giving you a datapoint. I am a / expert. I have used Vim for ... hmm, maybe it's decades. Not sure. I use Vim key-bindings everywhere that I can. I have given talks and made YouTube videos about Vim.

    I’m always trying new things. For instance, . One thing I thought I'd try is the . For a lot of people, and you may well be one, Vim/NeoVim is the right choice. If it is, I won't try to convert you. But my experience so far with Helix has been so positive, that even after decades of Vim being my favorite, it has been replaced by Helix.

    I still use Vim wherever that's the right choice, for instance remote machines I don't control. But editing actual code in Helix using that language's LSP and with tree-sitter is absolutely delightful. Even the fact that Helix isn't a “finished” editor doesn't dissuade me.

    At work, is our main language, and we all have PyCharm. I use the Vim bindings via . I prefer Helix even to that.

    So there's your datapoint. Maybe someone you know well and trust has an opinion that sheds more light on the two editors.

      [?]young man yells at the cloud »
      @bamboombibbitybop@mastodon.social

      I feel sorry for people who believe VSCode / Visual Studio / JetBrains are the best ways to edit code. Those tools are so bloated and wasteful and busy, but more to my point, they're so dry and "professional" for lack of a better word. They aren't fun in any sense of the word.

      and especially on the other hand have ecosystems full of playful, fun functionality. Using them, to me, is like playing a game. I have fun editing text. I find joy in it.

      Maybe I'm just autistic.

        [?]Hacker News 50 » 🤖
        @hn50@social.lansky.name

        [?]unixbhaskar »
        @unixbhaskar@fosstodon.org

        Ummmm... fascinating read... a bit about the roots of the popular software... history inlined... enthusiast, check it out.

        pikuma.com/blog/origins-of-vim

          [?]Hacker News 50 » 🤖
          @hn50@social.lansky.name

          Understanding the Origins and the Evolution of Vi and Vim

          Link: pikuma.com/blog/origins-of-vim
          Discussion: news.ycombinator.com/item?id=4

            [?]Digital Mark λ ☕️ 🕹 🙄 »
            @mdhughes@appdot.net

            Editor market share via Stackoverflow:
            survey.stackoverflow.co/2024/
            VS Code 73.6%

            Vim 21.6%
            Neovim 12.5%

            Nano 9.2% (dorks!)
            Emacs 4.2%
            Spacemacs 0.4%

            ed, the standard text editor, is not reported, but we all know it should be #1.

              [?]Digital Mark λ ☕️ 🕹 🙄 »
              @mdhughes@appdot.net

              shitty senior "bro" at laptop:
I'll just go back to manual.
#open vim
Ah my happy place.

              Alt...shitty senior "bro" at laptop: I'll just go back to manual. #open vim Ah my happy place.

                [?]Digital Mark λ ☕️ 🕹 🙄 »
                @mdhughes@appdot.net

                TIL in Vim:
                .vimrc:
                runtime ftplugin/man.vim

                Now you can:
                :Man zsh

                And it opens a split window for it, usual navigation.

                  [?]Hacker News 50 » 🤖
                  @hn50@social.lansky.name

                  Show HN: Zxc – Rust TLS proxy with tmux and Vim as UI, BurpSuite alternative

                  Link: github.com/hail-hydrant/zxc
                  Discussion: news.ycombinator.com/item?id=4

                    [?]unixbhaskar »
                    @unixbhaskar@fosstodon.org

                    [?]radhitya.org »
                    @al1r4d@pegelinux.top

                    ... [SENSITIVE CONTENT]

                    My setup has changed. Now, i only use and only.

                    The rest is following what i need: gcc, golang.

                    set nocompatible
                    set autoindent
                    set smartindent
                    set tabstop=4
                    set shiftwidth=4
                    set textwidth=79
                    set colorcolumn=80
                    syntax off

                      [?]Hacker News 50 » 🤖
                      @hn50@social.lansky.name

                      Show HN: Searchable Vim Cheat Sheet with Favorites (Open-Source)

                      Link: nvim-cheatsheet.vercel.app/
                      Discussion: news.ycombinator.com/item?id=4

                        [?]Jak2k 🇪🇺 »
                        @jak2k@mastodontech.de

                        Learning emacs on a Lenovo IBM Thinkpad R60...

                          [?]Digital Mark λ ☕️ 🕹 🙄 »
                          @mdhughes@appdot.net

                          Child labelled Vi: Why are we hiding from the police, daddy?
Daddy hidden around the corner: Because we use vi son, they use emacs.
<Cop car patrolling>

                          Alt...Child labelled Vi: Why are we hiding from the police, daddy? Daddy hidden around the corner: Because we use vi son, they use emacs. <Cop car patrolling>

                            [?]Digital Mark λ ☕️ 🕹 🙄 »
                            @mdhughes@appdot.net

                            [?]Digital Mark λ ☕️ 🕹 🙄 »
                            @mdhughes@appdot.net

                            Normally I do all filtering in external scripts, even things like comments or snippets, mostly Python or awk, but repeated regexp in place makes more sense as vim9script.

                              [?]Digital Mark λ ☕️ 🕹 🙄 »
                              @mdhughes@appdot.net

                              You: I need emacs to process this file!
                              Me: We have emacs ^[dba vim at home.

                              vim9script
                              # Changes all leading '\t' to ' '
                              def g:Detab()
                              while 1
                              try
                              execute ":%s/\\v^( *)\t/\\1 /g"
                              catch /Pattern not found/
                              break
                              endtry
                              endwhile
                              echo "Detabbed!"
                              enddef
                              nnoremap <F6> :call Detab()<CR>

                              (put this in your .vimrc, reload, or in a file and :so FILE )

                                [?]unixbhaskar »
                                @unixbhaskar@fosstodon.org

                                Well, if you know very well, in case you missed it ...then

                                youtu.be/KAydUXf9jFA

                                  [?]Hacker News 50 » 🤖
                                  @hn50@social.lansky.name

                                  Augment.vim: AI Chat and completion in Vim and Neovim

                                  Link: github.com/augmentcode/augment
                                  Discussion: news.ycombinator.com/item?id=4

                                    [?]Hacker News 50 » 🤖
                                    @hn50@social.lansky.name

                                    [?]Justine Smithies »
                                    @justine@snac.smithies.me.uk

                                    Having way too much fun re configuring my old setup and I haven't even got to the LSP and linting side of things yet. That'll get setup a little later probably using ALE and COC but I'm not 100% just yet ? I might even push my config to my git repo to share or allow others to show me the error of my ways.

                                      [?]Justine Smithies »
                                      @justine@snac.smithies.me.uk

                                      Slowly converting it specifically for and storing my config at ~/.vim/vimrc using vim-plug for plugin support.

                                        [?]Justine Smithies »
                                        @justine@snac.smithies.me.uk

                                        Haha found an old init.vim of mine that'll do for starting over with and I'm sure I'll change things up a tad as I go along.

                                        https://codeberg.org/JustineSmithies/qtile-x-dotfiles/src/branch/master/.config/nvim/init.vim

                                          [?]Justine Smithies »
                                          @justine@snac.smithies.me.uk

                                          I'm considering moving back to from . Why ? I don't know, it just feels more my era and I'm not really feeling Lua to be honest. Has any other BSD user travelled this path too ? 🤔

                                            [?]Hugo 雨果 »
                                            @whynothugo@fosstodon.org

                                            Folks who are using (and NOT neovim): what do you use for LSP and completions?

                                              [?]Hacker News 50 » 🤖
                                              @hn50@social.lansky.name

                                              Show HN: VimLM – A Local, Offline Coding Assistant for Vim

                                              Link: github.com/JosefAlbers/VimLM
                                              Discussion: news.ycombinator.com/item?id=4

                                                radhitya.org boosted

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

                                                In the age of GenAI and privacy abuse, open-source software and everyone who is contributing to building, maintaining, and supporting FLOSS are real heroes. Today, I thank all of them on this day.

                                                I appreciate keeping software free so everyone can afford and use it. I love , , and very much.

                                                Thank you.

                                                PS: Please share your gratitude with the tag.

                                                  [?]Hacker News 50 » 🤖
                                                  @hn50@social.lansky.name

                                                  [?]Justine Smithies »
                                                  @justine@snac.smithies.me.uk

                                                  I knew that this cheatsheet coaster would come in handy for my ksh vi mode and antics.

                                                  FYI This was purchased from the link below

                                                  https://www.etsy.com/uk/shop/WestArtFactory

                                                  A photo of a PCB style coaster for cups with a Vim cheatsheet printed on it.

                                                  Alt...A photo of a PCB style coaster for cups with a Vim cheatsheet printed on it.

                                                  A photo of a PCB style coaster for cups with a Vim cheatsheet printed on it.

                                                  Alt...A photo of a PCB style coaster for cups with a Vim cheatsheet printed on it.

                                                    [?]Justine Smithies »
                                                    @justine@snac.smithies.me.uk

                                                    As if my brain isn't going off in enough tangents already, now I'm really considering switching my oksh interactive shell from to mode. Should I be going down this rabbit hole ? FYI I am a , user but to do this I'm my terminal. I must be mad. 😜

                                                      [?]vintage screwlisp account »
                                                      @screwtape@mastodon.sdf.org

                                                      @dougmerritt
                                                      I completely lost the scheme article I was planning to talk about after tagging all the schemers x_x I found and wrote another /#emacs personal at least x_x

                                                        [?]Ramin Honary »
                                                        @ramin_hal9001@fe.disroot.org

                                                        in eshell, issuing vi drops you into this interesting fantasy mode. It’s quite funny to use !! within vi within emacs. Consider using it instead of #vim or #doom.

                                                        @screwtape I never thought to try that! So I checked it out, Eshell actually has a vi aliased to the command eshell-exec-visual, which goes through the trouble of creating a Term-mode buffer running a terminal process of whatever command you specify (e.g. “vi”) and titling it the name of the process (e.g. “*vi*“) for you. You can do the same thing with less, or top, probably also fish shell, though I haven’t tried it.

                                                        You know what would be really funny? If you modified the find-file command to open every file in a Vi process via eshell-exec-visual!

                                                        But ultimately, it is like running the man command in Emacs, which runs Less in a similar way. I usually prefer my applications to be written in Emacs Lisp (like viper or woman), and not run a compiled C program in a separate process controlling Emacs with ANSI terminal control codes.

                                                        #tech #software #emacs

                                                          [?]vintage screwlisp account »
                                                          @screwtape@mastodon.sdf.org

                                                          Instead of working on my parser I wrote a silly useage post.

                                                          medium.com/@screwlisp/executin

                                                          The gist is that in eshell, issuing vi drops you into this interesting fantasy mode. It's quite funny to use !! within vi within emacs. Consider using it instead of or .

                                                          Unreadably dark blue comment vi in emacs. A simple lisp program that reads and sorts a list, then quits. The invocation being done in vi, visible at the bottom, is
!!printf "(1 3 2)" | sbcl --noinform --load sort-numbers.lisp
the output from a previous attempt is visible in the comment.

                                                          Alt...Unreadably dark blue comment vi in emacs. A simple lisp program that reads and sorts a list, then quits. The invocation being done in vi, visible at the bottom, is !!printf "(1 3 2)" | sbcl --noinform --load sort-numbers.lisp the output from a previous attempt is visible in the comment.

                                                            Back to top - More...