GithubHelp home page GithubHelp logo

qindapao / far.vim Goto Github PK

View Code? Open in Web Editor NEW

This project forked from brooth/far.vim

0.0 0.0 0.0 389 KB

Find And Replace Vim plugin

License: MIT License

Python 19.93% HTML 0.43% Vim Script 79.63%

far.vim's Introduction

far.vim - Find And Replace Vim plugin

Disclaimer

This plugin is completly community driven. The author has betrayed the pure vim expirience and fell down a slippery slope of using VSCode with a vim plugin. Please do not raise issues without an PR, they will be ignored anyway.

Intro

Far.vim makes it easier to find and replace text through multiple files. It's inspired by fancy IDEs, like IntelliJ and Eclipse, that provide cozy tools for such tasks.

Installation

Plug 'brooth/far.vim'

Usage

Searching with Command

:Far foo bar **/*.py
:Fardo

far.vim

:Far {pattern} {replace-with} {file-mask} [params]

Find the text to replace.

:F {pattern} {file-mask} [params]

Find only.

Searching Interatively

:Farr foo bar **/*.py

ScreenShot 2020-02-02 01 59 19 2020-02-02 02_03_50

:Farr [params]

Interative Far. Shows searching modes in the status bar (regex, case sensitive, word boundary, replace). Modes can be toggled by the key mapping it prompted. Allows to enter {pattern}, {replace-with} and {file-mask} one after the other.

:Farf [params]

Interative F. The interaction is similar to Farr.

Commands in the searching result window

:Fardo [params]

Runs the replacement task. The shortcut for it is s (substitute).

:Farundo [params]

Undo the recurrent replacement. The shortcut for it is u (undo). It is available when set let g:far#enable_undo=1.

:Refar [params]

Change Far/F/Farr/Farf params.

Need help?

:help far.vim

Extras

Multiline Replacement

multiline

Neovim-Async, Ack, Ag, Ripgrep support

nvim

Command-Line Completion

complete

Consistency Check

consistency

..and many more! Check out :help far.vim.

Troubleshooting

Recommented Setting

You can add he following settings to your vim configuration:

set lazyredraw            " improve scrolling performance when navigating through large results
set regexpengine=1        " use old regexp engine
set ignorecase smartcase  " ignore case only when the pattern contains no capital letters

" shortcut for far.vim find
nnoremap <silent> <Find-Shortcut>  :Farf<cr>
vnoremap <silent> <Find-Shortcut>  :Farf<cr>

" shortcut for far.vim replace
nnoremap <silent> <Replace-Shortcut>  :Farr<cr>
vnoremap <silent> <Replace-Shortcut>  :Farr<cr>

License

MIT

far.vim's People

Contributors

aaasuoliweng 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 yoo avatar

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.