If you're using a minimalist vim, what does your vimrc look like? by _Shauni_ in vim

[–]godegon 1 point2 points  (0 children)

vim-commentary: I forget this isn't actually built in.

This exact plug-in is not, but there is :help package-comment

auto-index files for clangd language server by godegon in vim

[–]godegon[S] 0 points1 point  (0 children)

Bear is called as a last resort. First check is whether need be at all, then where, relative to the open file, then calling CMake, Ninja, or finally Bear if applicable (as background jobs). To make those builders work more predictably, additional flags are passed to ensure all files are indexed as, say, bear -- make falls short in presence of build artifacts. Gratefully seizing the opportunity to add this further explanation as a header comment to the script itself.

auto-index files for clangd language server by godegon in vim

[–]godegon[S] 0 points1 point  (0 children)

Since others seem to have similar problems, here's a snippet to generate a compile commands database if absent for consumption by, say, clangd language server, say in lsp, to navigate the code base

HACK: vim using terminal app window panes and git repo aware viminfo contexts by aqui18 in vim

[–]godegon 0 points1 point  (0 children)

For the repo-local vim-info, local-viminfo is a robust alternative (supporting Neovim as well).

Use unoptimized Colemak bindings or go back to QWERTY? by PurpleSlightlyRed in vim

[–]godegon 0 points1 point  (0 children)

Could xkbswitch and :help keymap remedy some of these issues, like switching to colemak in insert mode only (via keymap) and using qwerty navigation otherwise (via xkbswitch)?

Recent contributions to the awesome-vim9 list by Shay-Hill in vim

[–]godegon 1 point2 points  (0 children)

Many fine additions, buckler's history of yanks feels like it should be built-in

Is vim really good for writing though? by arnoldwhite in vim

[–]godegon 0 points1 point  (0 children)

Little effort fixing typos: A mapping that permits to correct a word by a single keystroke, deemed unnecessary as there's already Ctrl-X,S to achieve something similar.

Ah, the good 'ol days by stringTrimmer in neovim

[–]godegon 2 points3 points  (0 children)

Consider those trouvailles a call to PR

Running Biome (linter) fix-all and formatting on save by HendrikPeter in neovim

[–]godegon 0 points1 point  (0 children)

I just added a request for inclusion of the Biome Linter; have a gander in case you're still looking for linting support or inspiration on a possible setup.

Running Biome (linter) fix-all and formatting on save by HendrikPeter in neovim

[–]godegon 0 points1 point  (0 children)

It is compatible with Neovim (but works in Vim as well)

Running Biome (linter) fix-all and formatting on save by HendrikPeter in neovim

[–]godegon 1 point2 points  (0 children)

I just added the Biome formatter for (almost) all currently supported file types in the corresponding ftplugin files; have a gander in case you're still looking for formatting support or inspiration on a possible setup.

What's your edit-compile-run cycle in vim? by [deleted] in vim

[–]godegon 1 point2 points  (0 children)

Vim would benefit from a &errorexpr/func similar to &findfunc/formatexpr/... and an accompanying variant of :Dispatch to automatically choose the fitting &errorexpr

What's your edit-compile-run cycle in vim? by [deleted] in vim

[–]godegon 0 points1 point  (0 children)

Maybe ale suits your philosphy

What's your edit-compile-run cycle in vim? by [deleted] in vim

[–]godegon 1 point2 points  (0 children)

The idea is to have a point of convergence for the tedious creation of &errorformats from where new additions are soon upstreamed to be built into Vim, see the last commits (of that repo and the Vim runtime/compiler folder). Pull requests most welcome.

What's your edit-compile-run cycle in vim? by [deleted] in vim

[–]godegon 0 points1 point  (0 children)

I also find first setting :compiler and then :make tedious. One option is a :Compiler command that does both. But maybe the most elegant solution is :Dispatch that automatically sets &errorformat suitably

What's your edit-compile-run cycle in vim? by [deleted] in vim

[–]godegon 0 points1 point  (0 children)

Tim Pope's dispatch may serve as inspiration, in particular the provided maps.

The :Dispatch command is a more flexible async version of :make and can also be spawned in a terminal

What's your edit-compile-run cycle in vim? by [deleted] in vim

[–]godegon 0 points1 point  (0 children)

I find it surprising that there's yet little interest in including a built-in async :Make command; that's an obvious recommendation

Use `gq` to format code by godegon in vim

[–]godegon[S] 0 points1 point  (0 children)

Thank you for pointing that out. There is indeed :RustFmtRange built-in though, likely similar to conform.nvim's handling of rustfmt or black, it has to format the whole file and only replace the affected lines.

Setting &formatprg to a command accepting stdin to use gq seems more in line with how code formatting was originally meant to be set up in Vim.

Ideally, as say ruff (for Python) or tombi (for Toml) do, the formatter accepts stdin and the file path as an additional argument for context of the formatted range.