Vim

VimLinks,
@VimLinks@hachyderm.io avatar

When doing an interactive rebase in git, it can be very convenient to see the contents of the individual commits: https://github.com/hotwatermorning/auto-git-diff

video/mp4

vpavlyshyn,
@vpavlyshyn@fosstodon.org avatar

I don’t think will replace they have different models and vim is religion . Also luck a lot of out of box ide features like import fix or linter auto fixes and suggestions etc. but I like editor . I am happy to learn how to add missed features !

whynothugo,
@whynothugo@fosstodon.org avatar

@vpavlyshyn As a Vim user, I tried Helix several times, but the way selection and action are two distinct steps just seems a lot less flexible. Even with fluency, actions would always be slower.

However, the way it comes with batteries included is pretty neat, and if you don't have a working Vim setup, Helix allows you to start coding immediately with much less hassle.

vpavlyshyn,
@vpavlyshyn@fosstodon.org avatar

@whynothugo I have same impression I am more user

fabi1cazenave, French
@fabi1cazenave@mastodon.social avatar

Ce samedi 25 mai je proposerai deux interventions sur #Vim (et #Neovim, #Kakoune, #Helix…) aux @jdll :

• de 10h à 11h, une conférence « ergonomie vimiste » pour découvrir ou approfondir l’ergonomie des éditeurs modaux (tous niveaux) ;
• de 16h à 18h, un atelier « tupperVim » pour partager des connaissances sur nos éditeurs préférés (niveaux débrouillés / confirmés / experts).

Ça se passe à l’ENS Lyon, viendez nombreuses et nombreux !
https://pretalx.jdll.org/jdll2024/talk/NM7E3T/

fabi1cazenave,
@fabi1cazenave@mastodon.social avatar

@jdll Le dimanche 26 mai à 13h, dans le cadre des , je vous propose un atelier consacré à l’ergonomie des claviers où l’on mettra en œuvre deux types d’outils :

, pour créer ou modifier sa disposition de clavier préférée ;
et , pour émuler des fonctionnalités de claviers programmables sur son clavier de laptop.

Parce que oui, on peut avoir une ergo qui déglingue sans changer de clavier ni de disposition. Qu’on se le dise !
https://pretalx.jdll.org/jdll2024/talk/EWE3LW/

fabi1cazenave,
@fabi1cazenave@mastodon.social avatar

@jdll Tout le weekend des , on tiendra avec la communauté des un stand dédié aux claviers ergonomiques. Il y aura plein de claviers à essayer : Ferris, Atreus, Model01, Planck, Preonic, Iris…

Ça va être l’occasion de fêter la publication de la version finale d’ 1.0, présentée en grandes pompes par @NuclearSquid le dimanche à 14h. The place to be ! :-)
https://pretalx.jdll.org/jdll2024/talk/QT7JBD/

vjousse, French
@vjousse@mamot.fr avatar

Aussi improbable que cela puisse paraître, j'ai mis à jour mon livre sur 12 ans après 😅 https://vimebook.com/fr
Le contenu reste sensiblement le même, j'ai juste refait tous les screenshots, vérifié tous les liens, utilisé vim-plug au lieu de pathogen, fzf au lieu de ctrlp, vim-fern au lieu de TheNerdTree. Bref, c'est pareil, mais en mieux. Reste la version anglaise à mettre à jour, puis passer à l'écriture du prochain sur !
Merci pour tous les retours que j'ai eu ici ❤️

scy,
@scy@chaos.social avatar

There are days when I'd like to throw Vim at the wall.

:set stl=%f%{&modified?'\ •':''}

will have a status line like

README.md •

with the bullet point (•) if the file is modified.

:set stl=%{fnamemodify(expand('%%:p'),':~:.')}%{&modified?'\ •':''}

will eat the space before the bullet point for some reason.

All I did is replace %f with the %{…} expression.

This happens both in 9.0.1378 and 0.7.2, and also if I replace • with any other character.

Ideas, anyone?

scy,
@scy@chaos.social avatar

@deoxys314 I don't think this matters, even setting

:set stl=%{''}%{&modified?'\ M':''}

will result in the status line being just

M

without a leading space, but the second expression is clearly returning one.

scy,
@scy@chaos.social avatar

Okay, I did not move on, I've opened https://github.com/neovim/neovim/issues/28918 in Neovim, maybe they're willing to break compatibility here to make it more consistent.

shalien, French
@shalien@projetretro.io avatar

If you think using / is a required skill for being a we can't be friend.

shalien,
@shalien@projetretro.io avatar

@kirby serious question, could you point me to any POSIX compliant systems that don't make it possible to use a modern keyboard and text editor ?

shalien,
@shalien@projetretro.io avatar

@kirby So being curious is aggression now ?

And here I was trying to improve myself.

annika, (edited )
@annika@xoxo.zone avatar

I'm playing around with and a clean config. Not sure if this is a LazyVim question, or a question, or an question, but what are the keyboard shortcuts for these autocomplete dropdowns? Is this "omni" completion?

<c-n> for next item, <c-p> for previous, enter to accept the suggestion? Is there anything else? I'm not sure where to find these in the help

Edit: Thanks @dpom, I think all the bindings I care about are indeed within nvim-cmp https://www.lazyvim.org/plugins/coding#nvim-cmp

dpom,
@dpom@fosstodon.org avatar

@annika Typically <c-y> will accept . Many of the autocompletions are probably provided by nvim-cmp, rather than native. I don't personally use Lazyvim so I'm not sure how it's divided up.

annika,
@annika@xoxo.zone avatar

@dpom I think the autocompletions themselves are coming from Intelephense via the LSP, but I do see a lot of nvim-cmp bindings in :imap. Thank you for the pointer, I'll see how much more I can tease out based on this

scy,
@scy@chaos.social avatar

(and ) will trigger au FileType netrw autocommands, as well as commands in after/ftplugin/netrw.vim when

• selecting a directory in a buffer
• selecting a file in a Netrw buffer (i.e. when leaving Netrw)

but not when first entering Netrw, e.g. by calling :Explore

Even though :set ft? will display 'netrw' no problem.

What the fuck?! I'm at a loss here, any hints greatly appreciated. :BoostOK:

Reproduce by doing

• nvim --clean
• :au FileType netrw echo 'netrw'
• :e .

normalmode,
@normalmode@mastodon.social avatar

@scy Sidenote: you could also use :echom, which saves everything it writes into :messages.

scy,
@scy@chaos.social avatar

@normalmode I've tried that and didn't see them show up either, but I can't entirely rule out that I did something wrong.

scy,
@scy@chaos.social avatar

With the minus key being the default (and oil.nvim) shortcut for "change into parent directory", TJ DeVries suggested to globally (i.e. in normal edit buffers) map minus to "open Netrw (or oil) in the current window", and I think that's really clever.

Like, <CR> moves down into a directory or file, and - moves up into the parent directory – either of the directory you're currently browsing, or the file you're currently editing. Like a global "zoom out" key.

scy,
@scy@chaos.social avatar

In addition of using the minus key to open for the current file's parent directory, I've now added some logic to Netrw buffers in my config that will try to position the cursor on the file that you've just edited, for additional continuity.

It's not perfect, but it's a start.

https://codeberg.org/scy/dotfiles/src/commit/f154f9604f3f8d66bd6bfa2854613e34b0c1f5ce/.vim/after/ftplugin/netrw.vim#L19-L37

aburka,
@aburka@hachyderm.io avatar

and chose opposite conventions for the meaning of "vertical" and "horizontal" splits and it will be the death of me

awoodsnet,
@awoodsnet@phpc.social avatar

@aburka The solution is to pick one, and stick with it. I chose to only split with tmux. The different panes let me see the forest. When i need to see the trees, I’ll zoom the window so that it’s full screen.

The only time i split with vim nowadays, is if I need to copy from one part of a file to another part of the file.

if you need to use both equally, I’d suggest you update your leader / prefix bindings to make splits predictable.

thet,
@thet@graz.social avatar

tip of the day: to replace text wrapping around some other, you can use regex groups and backreferences like this:

:%s/some(.*)text/other\1string/gc

For example:

Screencast of a regex replacement in vim with groups and backreferences.

tshirtman,
@tshirtman@mas.to avatar

@thet i do have hls set, but it only does the first part of that, not the replacement preview, that’s apparently a neovim feature (inccommand), and it’s quite enticing, there are apparently some old plugins in the same directions for vim for it, i’ll probably give them a shot, but i might also try (again) to move to neovim in the near future. My config is large and depends on many plugins, so it feels like it’ll be a whole project 😅 .

tshirtman, (edited )
@tshirtman@mas.to avatar

@thet I can confirm that the traces.vim plugin https://github.com/markonm/traces.vim/ works great :)

al3x,
@al3x@hachyderm.io avatar

Productivity increases with the level of customization you are making in the tools you are using most often.

The downside is that the more used to these customizations you get, the more lost you'll feel when
using a system that is not configured as yours.

Simple example: create a new binding in or . This is not only very common but
also very encouraged. After getting used to that, connect to a remote server.

withoutclass,
@withoutclass@mastodon.sdf.org avatar

@al3x No problem, I'll use TRAMP :)

nemo,
@nemo@mas.to avatar
VimLinks,
@VimLinks@hachyderm.io avatar

Vim has a lot of modes, probably more than you thought. Here's a diagram you could explore to maybe learn a new keymap or command: https://gist.github.com/kennypete/1fae2e48f5b0577f9b7b10712cec3212

sqrtminusone,
@sqrtminusone@emacs.ch avatar

Google Books Ngram Viewer is a lot of fun, but... Who the heck was using in 1800? And what's that uptick in around 1880?

At least no one cared about in the 19th century.

Edit: now I know more about old English.

sqrtminusone,
@sqrtminusone@emacs.ch avatar

@karthink Ah, interesting.

The only instance of non-editor "vim" I've seen was in a piece by Dennett arguing against the existence of qualia. The argument was something like: 'Imagine the property of a dollar that gives it meaning. Let's call it "vim".'

I was sure he made it up.

ctietze,
@ctietze@mastodon.social avatar

@sqrtminusone @karthink 🤯 I never bothered to check!

With that, this passage makes so much more immediate sense

  • All
  • Subscribed
  • Moderated
  • Favorites
  • vim
  • anitta
  • DreamBathrooms
  • ngwrru68w68
  • Durango
  • osvaldo12
  • magazineikmin
  • mdbf
  • Youngstown
  • slotface
  • rosin
  • everett
  • kavyap
  • cubers
  • thenastyranch
  • JUstTest
  • khanakhh
  • cisconetworking
  • modclub
  • GTA5RPClips
  • InstantRegret
  • tacticalgear
  • provamag3
  • ethstaker
  • tester
  • Leos
  • megavids
  • normalnudes
  • lostlight
  • All magazines