Coder Social home page Coder Social logo

Comments (5)

KingJulianS avatar KingJulianS commented on June 12, 2024

Hi, I have the same challenge on my Debian bullseye. FZF finds my files all the time (so sometimes I am forced to drop out of NV, and switch to fzf-vim to find my notes at filename level and use ctrl-v to open via FZF mappings). The bigger prob for me is the inconsistency if I can't find something I know must exist. If I just start NV a few times after each other and each time immediately kill it with say control c or d, then every time I get a different nr of found files in the counter. Doing it over and over (sorry, I didn't count) it eventually find the files I knew existed (sometimes). Just also weird that once you search file name, then it lists every line in the file as a separate found item instead of just showing one line per file, maybe it gets a bit of an issue cause some of my files are showing like 500 lines etc . And that's actually not big files ?

Debian 11 bullseye

ripgrep 12.1.1
-SIMD -AVX (compiled)
+SIMD +AVX (runtime)
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Oct 01 2021 01:51:08)
Included patches: 1-2434
Extra patches: 8.2.3402, 8.2.3403, 8.2.3409, 8.2.3428

from notational-fzf-vim.

KingJulianS avatar KingJulianS commented on June 12, 2024

okay, I guess the tool is now unreliable and not supported anymore. Any other recommendations for something similar easy and lightweight that can integrate with Vim?

from notational-fzf-vim.

KingJulianS avatar KingJulianS commented on June 12, 2024

I see if I restrict the search upfront, then I get my missing files.
i.e, I have a file containing the text "lynx" in my NV main dir (which is also in my NV search paths as the 1st dir )

When I just use :NV , I get this inconsistent number of files found behaviour as I described above, but I also do not find what I was looking for. However, when I use :NV lynx I get about 3 lines found and get the file/note I was looking for. Unfortunately, I don't know how to map something with a supplied user variable, so my n mapping does not work anymore and I am forced to type :NV user_supplied_variable. this also means I have to be in Vim and the CLI script that I used to start Vim with :NV from outside Vim also won't work anymore.

I am unsure what the cause is or how to try and fix this, but I will struggle along like this until I can find another tool I can use instead.

from notational-fzf-vim.

KingJulianS avatar KingJulianS commented on June 12, 2024

okay, I created a workaround function that will take user input as an initial input to :NV and also changed my CLI alias to make that work. It does help and I can see the files/notes I am looking for now. I will continue to use this with the little workaround until I can find something better.

here are the function and mapping changes I added to my .vimrc in case someone else has the same issue etc..

"Notational function to work around unsurported bug where not all
 "notes are found , see github for missing file bug.
 function MyNV()
     let my_init_search = input("search limiter string : ")
     exe 'NV' my_init_search
 endfunction
 "notational keybindings.
 nnoremap <silent> <leader>n :call MyNV()<CR><C-H>
 vnoremap <silent> <leader>n <C-C>:call MyNV()<CR>
 inoremap <silent> <leader>n <C-O>:call MyNV()<CR>

And here's the line I added to .bash_aliases to execute it anywhere from the CLI directly :

# Start Vim with notational fzf vim and use the string workaround function as per vimrc comments. 
alias nv="vim -c ':call MyNV()

Now in Vim, I can simply do <myleader>n in any mode and it will prompt for input which it will use as a search delimiter. If I just press enter it will work as normal :NV(but then the missing file bug is present).
from the CLI I just also nv and it will start Vim, ready for the above-described input.

as I am writing this, it seems there may be a memory error/limit of some sort if one has lots of notes/files and does not delimit the search.

from notational-fzf-vim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.