vjousse, French After the French version, I've updated the English version of my book about #vim too.
You can find it here: https://vimebook.com/enThe github code is here https://github.com/vjousse/vim-for-humans-book/ and the tagged release here https://github.com/vjousse/vim-for-humans-book/releases/tag/v2.0
Don't hesitate if you have any feedback!And of course, share the love ❤️
mattwilcox, (edited ) Ok, #nVim / #vim and Telescope... I find it bizarre how it auto-ignores anything listed in a .gitignore file.
I still want to find and edit things like .env files, they just shouldn't be in Version Control.
And editing Telescope to explicitly allow certain file names even if they're listed in .gitignore seems to be impossible. Which leaves you choosing to show all hidden files, which I absolutely don't want because node_modules etc I never want.
Is there a neater way I've missed?
nithinbekal, As of this month, it's been 10 years since I switched to vim. Some reflections on what has changed in how I use vim over the decade:
VimLinks, 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
vpavlyshyn,
whynothugo, @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, @whynothugo I have same impression I am more #spacemacs user
fabi1cazenave, French 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, French @jdll Le dimanche 26 mai à 13h, dans le cadre des #JdLL, je vous propose un atelier consacré à l’ergonomie des claviers où l’on mettra en œuvre deux types d’outils :
• #kalamine, pour créer ou modifier sa disposition de clavier préférée ;
• #kanata et #arsenik, 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, French @jdll Tout le weekend des #JdLL, on tiendra avec la communauté des #Ergonautes 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’#ErgoL 1.0, présentée en grandes pompes par @NuclearSquid le dimanche à 14h. The place to be ! :-) #QwertyLafayette #Bepo
https://pretalx.jdll.org/jdll2024/talk/QT7JBD/
vjousse, French Aussi improbable que cela puisse paraître, j'ai mis à jour mon livre sur #vim 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 #neovim !
Merci pour tous les retours que j'ai eu ici ❤️
scy, 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 #Vim 9.0.1378 and #Neovim 0.7.2, and also if I replace • with any other character.
Ideas, anyone?
scy, @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, 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, French @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, French @kirby So being curious is aggression now ?
And here I was trying to improve myself.
annika, (edited ) I'm playing around with #LazyVim and a clean config. Not sure if this is a LazyVim question, or a #Vim question, or an #nvim 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, @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, @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, #Vim (and #Neovim) will trigger
au FileType netrw
autocommands, as well as commands in after/ftplugin/netrw.vim when• selecting a directory in a #Netrw 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, @scy Sidenote: you could also use :echom, which saves everything it writes into :messages.
scy, @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, With the minus key being the default #Netrw (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,
aburka,
awoodsnet, @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, #vim 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, @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 ) @thet I can confirm that the traces.vim plugin https://github.com/markonm/traces.vim/ works great :)
al3x, 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 #Vim or #Emacs. This is not only very common but
also very encouraged. After getting used to that, connect to a remote server.
withoutclass, @al3x No problem, I'll use TRAMP :)
nemo, How I take notes as a Math major using #Vim + #LaTeX
https://www.youtube.com/watch?v=DOtM1mrWjUo
#edutainment #academics #linux
🤣
VimLinks, 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, @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, @sqrtminusone @karthink 🤯 I never bothered to check!
With that, this passage makes so much more immediate sense
scy, ughhh, #Netrw is such a mess.
But it comes with every installation of #Vim and #Neovim, so as someone who enjoys minimalism and likes to keep the number of additional plugins to a minimum, I feel like I should learn to use it and integrate it into my workflow.
But I've just used :Rexplore on a dirty file with 'nohidden' and it simply replaced my file's contents with the directory listing 😬
Also, don't make the mistake of looking at its source, or visiting the maintainer's "website" …
gnadenelfmeter, @scy I have simply deactivated unneeded plugins in my options. #neovim
-- Disable bloated stuff
local disabled_built_ins = {
"2html_plugin",
"getscript",
"getscriptPlugin",
"gzip",
"matchit",
"netrw",
"netrwPlugin",
"rplugin",
"spellfile_plugin",
"tar",
"tarPlugin",
"tohtml",
"tutor",
"vimballPlugin",
"zip",
"zipPlugin",
}for , plugin in pairs(disabled_built_ins) do
vim.g["loaded" .. plugin] = 1
end
gnadenelfmeter, @scy One of my essential plugins is actually https://github.com/stevearc/oil.nvim
scy, Instead of simply failing, my #Vim will now ask to create parent directories, if they don't exist, before saving a file.
amatan, @scy @normalmode Neovim has ++p. Vim should have that too (but I don’t recall it does)…
scy, @amatan @normalmode ++p only exists in more recent versions of Neovim, and it's still something manual that I have to add to the :w command.
scy, My #Vim is now a tiling window manager.
https://codeberg.org/scy/dotfiles/commit/e9b79bcc1932c4d64b7c0d3224f873adae87186a
slothrop, @scy Torn between “neat” and “this has to be a sacrilege in some religion I’m not familiar with” 😂
scy, To be honest, I don't care that much for the splits to be equal in size. But I am using a tiling window manager, and whenever I'm opening a new terminal on the screen Vim is on, it will result in what was a 50:50 window split in Vim now being one window that's almost the same size as before and the other one being 1 row high, and that's unacceptable.
My favorite solution would be Vim tracking window sizes in percentages of the terminal, and trying to keep these constant, but this works too.
RL_Dane,
normalmode, @RL_Dane Kind of. You can do this:
:syntax match WordsWithNumbers /\w*\d\w*/ containedin=ALL contains=@NoSpell
...but that will also prevent other highlighting from starting inside those words, which may or may not be an issue for you.
If it is an issue, you might be able to get around it by tacking on an extra contains=ALL, but it really depends on the rest of your syntax highlighting as to whether that will improve things or make it worse!
RL_Dane,
RL_Dane,
seve_py, Curious about how many Vim/Neovim plugins you’re rocking? 🤔 Jump into your terminal, navigate to your Vim or Neovim configuration directory, and run this command: ls -alp | wc -l. I currently have 41 plugins, but I’m aiming to slim down to 30-35. How about you? Share your plugin count below! #Vim #Neovim #Plugins”
dabe, @seve_py @tartley When I redid my config of about 6 months from scratch, I ended up with way fewer plugins than before. There truly were a good amount that I just installed for fun or that I quickly got used to not having (sometimes leading me to use more idiomatic practices). It’s a good thing to try every now and then, free time permitting. But there’s also no harm in having a bunch of plugins you like!
tartley,
vinib,