Comments (5)
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.
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.
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.
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)
- Sort results by recent file access HOT 2
- fzf colors and preview HOT 5
- Sanitize/adjust file name on create_note_key HOT 3
- Some files in search path not appearing? HOT 11
- Support "window" position HOT 1
- Struggling to understand how it chooses which line to open the file in
- [suggestion] An option to set a alternative separator when saving new notes HOT 1
- Error on MacVim when choosing the highlight HOT 1
- E492 :NV not an editor command HOT 2
- README.md should explain that `g:nv_main_directory` must also appear in `g:nv_search_paths`
- Force fzf-vim to pass nohidden option to --preview-window to override shell defaults
- Question : pls explain note handler HOT 1
- help confirm mapping HOT 2
- "Command failed" error
- Is there a way to make a single key open or create a note depending on if results are found?
- Proposal to become mantainer of the project HOT 3
- windwos环境上gvim中使用出现Command failed" error
- Notational fzf not finding all results during TMUX session when starting from CLI using an alias HOT 2
- I really liked this tool, but I see lack of maint ? Any alternatives ? I would have supported it if I knew Python or vimscript. HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from notational-fzf-vim.