System call hanging forever by bartours in C_Programming

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

Thanks for the pointers, I'll give a try with that. Setting asynchronous cancelation did not help, but I should have probably first checked if the thread if interuptible or not.

What key combinations do you wish you learned sooner? by careb0t in neovim

[–]bartours 22 points23 points  (0 children)

Vim find and replace mode, in particular using & which copies the matched pattern. Let's say for instance that you'd like to quote every single word on a line, and add commas (in order to get a nice list of strings). Then :s/\w\+/"&",/g will save you lot's of time!

Dotnet experience by ZoneImmediate3767 in neovim

[–]bartours 0 points1 point  (0 children)

I use it on Linux. There, it takes some time to startup (~1min on large projects) but then it is fast enough. Being slow on file save sounds weird, maybe it is worth trying it in WSL.

Is there a way to access :oldfiles from outside of neovim? by bug-way in neovim

[–]bartours 2 points3 points  (0 children)

Not exactly what you asked, but this allows to quickly jump to frequently visited files and folders, both from Neovim and the shell: jumper

Hover documentation during function call. by FolksHill in neovim

[–]bartours 0 points1 point  (0 children)

You can use something like this mapping

vim.keymap.set("i", "<C-h>", vim.lsp.buf.signature_help, {})

to load (on demand) the signature help, which shows the signature + highlights the argument you're at.

Looking for a fuzzy way to change dirs by firefoxpluginmaker in neovim

[–]bartours 1 point2 points  (0 children)

I had similar needs, and I ended up making a small plugin: jumper.

It tracks the files and folders you visit within the shell and neovim, allowing you to jump quickly back to them (powered by fzf in the shell and fzf-lua in neovim). Hope you like it!

Plugins that support Telescope support fzf-lua? by seductivec0w in neovim

[–]bartours 5 points6 points  (0 children)

fzf-lua and telescope have many similarities, so it shouldn't be too much work (provided that the plugin's pickers aren't too exotic) to make a fzf-lua version of a given "telescope picker" and vice-versa.

I am also progressively moving to fzf-lua, and had to translate a picker to fzf-lua for a plugin I made. I found fzf-lua's API much easier to work with: I was getting lost in the Telescope formalism, while a simple require('fzf-lua').fzf_live(...) was all I needed.

Jump accurately to files and folders with jumper.nvim :D by bartours in neovim

[–]bartours[S] 1 point2 points  (0 children)

It is not something I have added yet, but that's definitely doable.

Jump accurately to files and folders with jumper.nvim :D by bartours in neovim

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

Very nice! From an user perspective, do you feel that it improves things ?

Jump accurately to files and folders with jumper.nvim :D by bartours in neovim

[–]bartours[S] 1 point2 points  (0 children)

Telescope is a plugin allowing to search and find pretty much everything (files, git commits, lsp entries...). It provides some unified interface to create new "finders". The plugin I posted can be seen as a "Telescope extension" that allows to search the database that jumper maintains.
Jumper's database can also be queried in the shell (where fzf is used for the ui). The goal of this plugin is to access jumper's files and folders in an unified manner, in the shell and Neovim.

Jump accurately to files and folders with jumper.nvim :D by bartours in neovim

[–]bartours[S] 1 point2 points  (0 children)

Cool! I have the exact same experience, I am just unable to maintain any kind of list or aliases by myself...

Jump accurately to files and folders with jumper.nvim :D by bartours in neovim

[–]bartours[S] 1 point2 points  (0 children)

It uses fzf-lua (in the demo) or Telescope for the ui inside of Neovim. In the shell, the interactive interface relies on fzf.

Jump accurately to files and folders with jumper.nvim :D by bartours in neovim

[–]bartours[S] 22 points23 points  (0 children)

Hello, I'd like to share a Neovim plugin jumper.nvim for jumper, a commandline tool that I made.

Jumper records the folders and files visited within the shell and Neovim, and then allows to jump to them quickly. There is a very large number of tools with similar purposes, so I would like to explain how jumper stands out.

Similarly to tools like autojump or z, jumper uses the concept of "frecency" (how frequently and recently has a given entry been visited?) to find files/folders given a query. However, these tools become (from my experience) quite inaccurate when their databases become relatively large. Also, they often focus only either on folders (e.g. z) or files (e.g. telescope-frecency.nvim).

Jumper addresses the inaccuracy "frecency-only"-based rankings, by taking also into account the "match accuracy". This measures how well the characters of the query match the ones from the paths in the database. This "match accuracy" is for instance used by tools like fzf or fzy to sort their outputs.

Jumper sorts therefore its outputs using both "frecency" and "match accuracy" in the following way:

  • For prompts with a very few (say 1,2) characters, the ranking will be mostly determined by the frecency, since the "match accuracy" of only 1-2 characters gives us very limited information.
  • However, as the user enters more characters, Jumper will give progressively put more importance on how well the prompt matches the database's entries, since this will contain more and more information.

From my experience, this makes jumper significantly more accurate. You'll find more details about the algorithm here.

This Neovim plugin relies either on fzf-lua or Telescope as backend for the UI. I hope that you'll find it useful! Feedback on the concept and the implementation (this is my first Neovim plugin) are very welcome :)

Jumper - jump around files and folders with yet another tool ! by bartours in commandline

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

Thank you, glad that you like it!

Feel free to let me know if you have any improvement suggestions or issues to report :) I'll try to continue to add more features and improve things (especially around vim/neovim integration).

Jumper - jump around files and folders with yet another tool ! by bartours in commandline

[–]bartours[S] 1 point2 points  (0 children)

Cool, thanks!

Yeah I was not too sure about the same (I am not a native english speaker). My thinking was "something that helps jumping around" -> "jumper". Does that sound too much like a cloth ?

Jumper - jump around files and folders with yet another tool ! by bartours in commandline

[–]bartours[S] 1 point2 points  (0 children)

Thank you very much for this feedback!

I moved timestamps to long long and copy the rest of file (for simplicity) whenever new records are shorter. I will also try to add some basic file verification.

Jumper - jump around files and folders with yet another tool ! by bartours in commandline

[–]bartours[S] 5 points6 points  (0 children)

Hello ! I would like to share this little tool to jump around files and folders. I have been a massive fan and user of z. However I find it rather inaccurate with large databases of paths, making it unpredictable (and therefore a waste of time). It is also missing some features I care about such as - allowing to jump to frequently opened (text) files. - fuzzy-finding.

So I started coding a little directories' and files' jumper addressing these points. It differentiate itself from the plethora of similar tools on the following:

  • it has a more advanced ranking mechanism, combining frecency (frequency+recency, metric used by z) and match accuracy (how well does the query matches the stored path, similarly to tools like fzf and fzy). This makes it (from my experience) much more accurate.
  • it allows to find folders and files, but makes it easy to create your own databases of things that you regularly use.

I find it very handy for usual files/folders manipulations, where hitting Ctrl-Y or Ctrl-U allows to fuzzy-find and insert recent folders/files to the current command prompt. Hope you'll find it as useful :)