Giter Site home page Giter Site logo

far.vim's People

Contributors

aaasuoliweng avatar alexfertel avatar bartpeeters avatar benshu avatar brooth avatar carlitux avatar ckolkey avatar crispyconductor avatar hyliang96 avatar konnork avatar kuhakupixel avatar michaeljoelphillips avatar mike820324 avatar paulondc avatar sglavoie avatar stsewd avatar thisisrandy avatar yoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

far.vim's Issues

Exclude directories

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.

E154: Duplicate tag "--auto-delete-bufs" (in help file)

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

Highlight performance

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:

  • Software: nvim 0.2.2
  • System: ubuntu 16.04
  • Hardware: i7-6700 / 12GB RAM
  • Source code used for the video: https://github.com/meboHQ/mebo
  • Far searching syntax: Far Input Foo src/**/*.js

Let me know if you need any extra information.

wildignore support

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/**

How to handle hidden "FAR X" buffers?

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.

Add `ripgrep` support?

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.

`Far getFolds fold_get **` blocks vim

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 ?

Escaping spaces doesn't seem to work

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.

ImportError: No module named 'neovim' when I use ag as far's source

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.

Change Filetype For ftplugin

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!

Farundo fails to undo

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.

Add a header in the listing window with popular mappings

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.

Neovim / Far prevents other plugins to load

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

Fatal issue on neovim/os X (Unknown function: reltimefloat)

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,   }

Broked highlight with Far and agnvim source

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?

Path autocomplete

It would be nice if the path autocomplete works (or am I missing something?)

Far freezes neoVim

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 :

  • neovim 2.1
  • far.vim with 'commit': 3376dc5

(It used to work fine)

(otherwise Far is really great)

ag argument typo

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. :)

when Fardo => error endif

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

"No matching buffer" when running Fardo

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.

unable to handle parenthesis ?

if I do something like this :

Far someFunction\(someParam\) TEST .*

Far will correctly list all occurence but then when I run :Fardo nothing happens :

image

looks like there was errors on every lines but I don't have details

Works fine if I use it without parenthesis

"no notification handler registered" error occurs if opens just one file and source is not specified

Steps to reproduce:

  • Change source in your config: let g:far#source = 'agnvim'
  • Go to a folder and open a file with nvim:
$ cd $HOME
$ nvim test
  • Search for something:
    :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

error caught in async handler

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

Invalid Pattern: bad escape

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!

Make filemask parameter optional

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.

An option to use glob syntax for rg

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.

Dot/Hidden Files

Is there a way that far looks for dot/hidden files in a directory? i.e. mask: ./dots/.*.sh 🤔

Enhacement request: Opening file in original window

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

Undocumented file-mask difference between vimgrep and ag (i.e. glob vs regex)

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.

Case sensitivity

As far as I can tell there is no way to have the pattern matching be case sensitive, which is pretty useful I think.

Unknown function: far#tools#isdebug error

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

Folds in far.vim

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.

Undefined variable: signs

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

ripgrip stopped working.

How should be used with glob? getting error source error: unrecognized file type: **/*.html\n

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.