brooth / far.vim Goto Github PK
View Code? Open in Web Editor NEWFind And Replace Vim plugin
License: MIT License
Find And Replace Vim plugin
License: MIT License
Getting E700: Unknown function: s:ack_expand_curfile
when setting the source to acknvim
The whole error is:
Error detected while processing function Find[18]..far#find[36]..<SNR>75_assemble_context:
line 28:
E700: Unknown function: s:ack_expand_curfile
E117: Unknown function: 0
I can see this is the function defined at https://github.com/brooth/far.vim/blob/master/autoload/far.vim#L92
but cannot find where it is declared.
Thanks,
A
So I use folds a lot in vim and I think it's great that several collapsing/expanding commands works similar to folds e.g. za
and zm
/ zr
for respectively toggling the collapsed state of fold under cursor and collapsing/expanding all folds.
However one category of binds that seems to be missing is fold movement such as zj
and zk
(a.i. moving between files that have matches in the far window) does not seem to work.
It would be nice If I could use fold movement keys to quickly jump between the matching files in order to collapse/expand those that are of interest in a given search/replace session.
Hello,
This might just be my own ignorance but I've tried everything under the sun to search and replace with a sentence. I've tried
:F func\ main ./**
And it doesn't return a single hit although there are certainly some there.
Steps to reproduce:
let g:far#source = 'agnvim'
$ cd $HOME
$ nvim test
:F test .
Expected behavior:
The commands above opens Far Search with "test" results
Actual behavior:
The commands above throws the error: "no notification handler registered for "/home/xxx/.vim/plugged/far.vim/rplugin/python3/far:function:_far_nvim_rpc_async_invoke""
Workaround:
:F test . --source=ag
Search with :Far test( it( %
This will throw error
source error: invalid pattern: missing ), unterminated subpattern at position 4
How to escape (
? I try \(
, \\(
without luck
Hello!
I like to create a filetype plugin to define special mappings for the far buffer like executing Fardo
.
Unfortunately is the filetype far_vim
and the ftplugin convention does not allow an underscore, cause that is used to separate ftplugins.
It would be awesome if the filetype could be renamed to simple 'far' for example.
Thanks for reading!
fzf.vim is using that for their search.
For an unknown reason vim (and neovim) doesn't allow to use single quotes in . While the investigation use Farp instead.
I am using Far in nvim with agnvim as the source.
When I run Fardo
I get the following error:
line 41: if !empty(cmds)
line 42: let buf_repls = 0
line 43: let cmds = reverse(cmds)
line 44:
line 45: exec 'buffer! '.file_ctx.fname
line 45: buffer! user-service/conf/application.conf
Error detected while processing function FarDo[2]..far#replace:
line 45:
E94: No matching buffer for user-service/conf/application.conf
function FarDo[2]..far#replace returning #-1
continuing in function FarDo
function FarDo returning #-1
It looks like Fardo does succesffully replace for a single file, but I have to run Fardo for every file, and get this error (or something like it) every time.
I don't use Far very often but when I need it's the perfect tool. The problem is I have a goldfish memory and so I need to look at the help everytime I use it (even with the mnemonics 'x'/'i' (Include/eXclude)). I wonder if it would be possible to have a reminder before the matches for instance:
Use the 't' mapping to toggle replacement
. It could be optional for people who don't like losing screenspace.
I keep getting this error when I do 'Fardo': E121: Undefined variable: signs
The stuff that actually happens is it replaces the first file but then it does not go to the next replacement. Any fix?
As per logs the error arises when it starts to replace a particular line then it quits by saying no far bufs
[14:24:53] ============= FAR DO ================
[14:24:53] far#replace([])
[14:24:53] replines:0
[14:24:53] replacing buffer <file_name>
[14:24:53] bufdo: 22s/\%24c<Find Text>/<Replace Text>/e#|write
[14:24:55] no far bufs, stopping resize timer #5
for example, somthing like:
:F Checkis('array') **/*.js
Hello,
I've got an error with :
neovim : 2.2
source : agnvim
far : update
commande : :F facture_asso .
or :F facture_asso .php
Error :
error caught in async handler ...
neovim.api.nvim.NvimError: b'Vim(call):E722: Il manque une virgule dans le Dictionnaire ...
log : far.vim.log
Thanks
Great plugin thanks!
I have a suggestion though, would it be possible to add a configuration setting so when using far-jump on a non-opened buffer, it would be opened in the original window (the one active when the Far command was called). The idea is to be able to open one of the matching source files and keep the Far buffer showing in the Far window.
Thanks
Hi, after running UpdateRemotePlugins
i got a strange problem. All plugins loaded after far will fail with no notification handler registered
.
But after moving this to the bottom of the ~/.local/share/nvim/rplugin.vim file it works as expected.
call remote#host#RegisterPlugin('python3', '/home/uscpe/dotfiles/vim/.vim/bundle/far.vim/rplugin/python3/far', [
\ {'sync': v:false, 'name': '_far_nvim_rpc_async_invoke', 'opts': {}, 'type': 'function'},
\ ])
Here is a screenshot of the errors when placing far at the top of the rplugin.vim file https://goo.gl/m4cjr9
First off, this plugin is easily one of my favorites. Thanks for all the work you've put into it, @brooth. It is essential to my daily workflow.
I noticed today that this pattern is starting to return an error:
:Far App\\Controller\\FooController App\\Controller\\BarController \.php --source=ag
source error: invalid pattern: bad escape \C at position 3
It looks like the behavior changed in d3d3abc, as I can checkout 5f8016e and it works as I expect. I haven't dug into it any further than that, but let me know how I can help further. I looked through the updated help files for far
, and as best as I can tell I'm still escaping correctly.
Thanks again!
It would be nice if the path autocomplete works (or am I missing something?)
ripgrep
is slowly becoming one of my favorite *nix tools, but this plugin doesn't quite support it yet! Would it be possible to add this? I'd be more than happy to do it with some mentoring. :)
It looks like this comment has a good lead on a configuration that would work with rg
.
Hello I'm struggling making far.vim
to work on my neovim.
I'm running Os X El Capitan V10.11.6 and neovim such as :
➜ ... ✗ nvim --version
NVIM 0.1.4
Build type: RelWithDebInfo
Compilation: /usr/local/Library/ENV/4.3/clang -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DDISABLE_LOG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -DHAVE_CONFIG_H -I/tmp/neovim-20170211-82830-cmtkwh/neovim-0.1.4/build/config -I/tmp/neovim-20170211-82830-cmtkwh/neovim-0.1.4/src -I/tmp/neovim-20170211-82830-cmtkwh/neovim-0.1.4/deps-build/usr/include -I/tmp/neovim-20170211-82830-cmtkwh/neovim-0.1.4/deps-build/usr/include -I/tmp/neovim-20170211-82830-cmtkwh/neovim-0.1.4/deps-build/usr/include/luajit-2.0 -I/tmp/neovim-20170211-82830-cmtkwh/neovim-0.1.4/deps-build/usr/include -I/tmp/neovim-20170211-82830-cmtkwh/neovim-0.1.4/deps-build/usr/include -I/tmp/neovim-20170211-82830-cmtkwh/neovim-0.1.4/deps-build/usr/include -I/tmp/neovim-20170211-82830-cmtkwh/neovim-0.1.4/deps-build/usr/include -I/usr/local/opt/gettext/include -I/usr/include -I/usr/include -I/tmp/neovim-20170211-82830-cmtkwh/neovim-0.1.4/build/src/nvim/auto -I/tmp/neovim-20170211-82830-cmtkwh/neovim-0.1.4/build/include
I installed far.vim
using vim-lug
the following line in my init.vim
:
Plug 'brooth/far.vim'
To reproduce : type any far.vim
command (let say F test .
) and get the following error in Neovim :
Error detected while processing function Find[18]..far#find:
line 28:
E706: Variable type mismatch for: meta
Error detected while processing function Find[18]..far#find[36]..<SNR>58_assemble_context:
line 30:
E117: Unknown function: reltimefloat
E15: Invalid expression: { 'fn_args': get(fsource, 'args', {}), 'cmdargs': a:cmdargs, 'far_ctx': a:far_params, 'start_ts': reltimefloat(reltime()), 'source': fsource, 'c
allback': a:callback, 'callback_params': a:cbparams, 'win_params': a:win_params, }
The result is empty on any search
:F const **/*js
but works
:F const %
When I'm using agnvim as my source, the following error message shows up.
source error:ag: unrecognized option '--case-sensetive'
It should be --case-sensitive. :)
I would like to set wildignore in init.vim or .vimrc and does not have it in the search results.
For example:
" ignore npm packages
set wildignore+=**/node_modules/**
Error while installing plugin with dein.vim:
Vim(helptags):E154: Duplicate tag "--auto-delete-bufs" in file /Users/rafi/.cache/vim/dein/.cache/init.vim/.dein/doc/far.txt
[dein] function <SNR>158_timer_handler[1]..<SNR>158_install_async[9]..<SNR>158_done[7]..dein#install#_recache_runtimepath[20]..<SNR>158_helptags, line 12
I'm running neovim and ag is installed. When g:far#source
is set to agnvim
the search always returns 0 returns.
Any ideas?
Hi,
with neovim 0.2.1
when I try :
Far h2 h1 **/*.html
then
Fardo
I'm an error :
Line 66
e171 endif missing
Thanks for this plugin
with Far beta2 on neovim 0.1.7 on a directory with +30K files
Any Far command likeFar SEARCH REPLACE src/**
freezes neovim.
It works fine on other directories
Also tried with :
(It used to work fine)
(otherwise Far is really great)
See my config.
When I write let g:far#source = 'ag'
in .vimrc and run Far command in vim, it complains:
Error detected while processing function Far[17]..far#find[36]..<SNR>128_assemble_context[40]..far#executors#py3#execute[8]..far#rpc#invoke:
line 9:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "<string>", line 2, in far_rpc_invoker
File "/home/acgtyrant/dotfiles/Vim/.vim/bundle/far.vim/rplugin/python3/far/__init__.py", line 8, in <module>
import neovim
ImportError: No module named 'neovim'
E858: Eval did not return a valid python object
Press ENTER or type command to continue
I do not know why does it want to import neovim while I use ag.
I've tried running this command to replace in all subsequent files but it takes quite some time and blocks vim :
Far getFolds fold_get **
Is it possible to make it non-blocking please ?
Is there any way to use regex on filename?
ex)
:F far (app|test)/**/*.(?!log)
Hi, I'm running command :Far foofoofoo barbarbar .*\.py
and nvim spits out following error message:
no notification handler registered for "/Users/andCo/.vim/plugged/far.vim/rplugin/python3/far:function:_far_nvim_rpc_async_invoke"
Encountered NvimError loading plugin at /Users/andCo/.vim/plugged/far.vim/rplugin/python3/far: b'Vim:E117: Unknown function: far#tools#isdebug'
Traceback (most recent call last):
File "/Users/andCo/Library/Python/3.5/lib/python/site-packages/neovim/plugin/host.py", line 133, in _load
self._discover_classes(module, handlers, path)
File "/Users/andCo/Library/Python/3.5/lib/python/site-packages/neovim/plugin/host.py", line 163, in _discover_classes
plugin = cls(self._configure_nvim_for(cls))
File "/Users/andCo/.vim/plugged/far.vim/rplugin/python3/far/__init__.py", line 21, in __init__
if nvim.eval('far#tools#isdebug()'):
File "/Users/andCo/Library/Python/3.5/lib/python/site-packages/neovim/api/nvim.py", line 224, in eval
return self.request('vim_eval', string, **kwargs)
File "/Users/andCo/Library/Python/3.5/lib/python/site-packages/neovim/api/nvim.py", line 129, in request
res = self._session.request(name, *args, **kwargs)
neovim.api.nvim.NvimError: b'Vim:E117: Unknown function: far#tools#isdebug'
I use nvim 0.1.7
, under Python 2.7.10
, with latest far.vim
revision (e6b298dfd326ff6870c02f4baa4244749d06d0a1
).
That's plugin setup in my init.vim
at the current moment:
Plug 'brooth/far.vim' " Find And Replace
" NB: ag always searches recursively, file mask have to be of a PCRE type
let g:far#file_mask_favorites = ['%', '.*\.py', '.*\.js', '.*']
let g:far#preview_window_height = 30
let g:far#window_width = 120
let g:far#source='agnvim'
let g:far#debug = 1
That's my far.vim.log
attached:
far.vim.log.zip
I believe crash happens here: https://github.com/brooth/far.vim/blob/master/rplugin/python3/far/__init__.py#L21 .
By the way, thanks for the plugin. It's quite awesome))
With best regards,
Yan
when I run the command :
:far CONFIG[p_ MA_CONFIG{p_ .html
I've an error
far.vim.log.txt
When using Far with Ag and Neovim asyncronously, it seems Neovim API returns the result with scape caracteres for special caracteres, broking the highlight feature on Far.
For example:
Imagine we heave a buffer with the following content:
use Some\Foo\Bar;
When we use the command
:Far Bar Replated %
The Far buffer shows the following line:
use Some\\Foo\\Bar; -> use Some\\FooReplacedar;
instead of
use Some\Foo\Bar; -> use Some\Foo\Replaced;
broking the highlight feature at Bar
word.
(It does not happen when using ag
syncronous source)
When run Fardo, the replacement runs Ok, The issue is only on Far buffer with agnvim
source.
My question is: it an issue or a missing configuration of mine?
far.vim.log. I think an asciinema best demonstrates the issue.
As I understand it, :Farundo
is meant to be run in a FAR buffer after doing a :Fardo
replacement. I've had few cases where :Farundo
has worked but I've had far more situations where it fails to do anything. Let me know if any of this is unclear.
Hello,
with :
I've an error : failed to execute source. unknown error
Thanks for everything
Hi,
When the option g:far#highlight_match
is enabled (default) the performance degrades drastically during the scrolling of the results to a point that becomes unusable. By disabling that option the scrolling becomes instantaneous.
I've recorded a video about it:
https://www.youtube.com/watch?v=dmKQLMMbu3I
Following below info about the video:
nvim 0.2.2
ubuntu 16.04
i7-6700 / 12GB RAM
https://github.com/meboHQ/mebo
Far Input Foo src/**/*.js
Let me know if you need any extra information.
As far as I can tell there is no way to have the pattern matching be case sensitive, which is pretty useful I think.
Is there a way that far
looks for dot/hidden files in a directory? i.e. mask: ./dots/.*.sh
🤔
Is it possible to exclude unwanted directories? E.g. I'm using php
and vendor
is usually not the dir you want to include in the search.
For every project-wide search, you always have to provide a filemask.
For example, to search for query
in all files, it's :F query .
Can the default value for the filemask be .
, even only for :F
and not the find-and-replace methods?
It would be easier to key in :F query
like most other project-wide search vim plugins.
Would it be possible to add an option that makes the rg command use --glob
instead of -t
for the file-mask? I prefer the flexibility of the glob syntax, and I have got used to it from using the vimgrep mode. I am happy to submit a patch if you'd like.
How should be used with glob? getting error source error: unrecognized file type: **/*.html\n
As far as I can tell, where vimgrep uses the glob syntax for the file-mask, ag uses regex patterns. So where I was using **/*.html
, now I have to use .*/*.html
. And depending on which regex parser the user is used to, they may think they need .*\/.*\.html
, which is not as convenient.
So while I prefer the glob syntax, I don't think Ag supports it. This may one more reason to support ripgrep as mentioned in #43.
Either way, I think this difference should be documented.
Regardless, thank you for this excellent plugin.
I tried :F <cword> .
but it gives me zero matches. When I type the word it works as expected.
When I jump to a file pressing Enter
on a match, :buffers
shows me that there is still a "FAR X" (X=number of searches since neovim started). These should be deleted automatically when the buffer gets hidden, imo, because after 10 searches I have 10 buffers lurking around.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.