Giter Site home page Giter Site logo

vim-easy-replace's Introduction

vim-easy-replace

License

vim plugin for quick and easy replacement

Demo

demo

Features

  • Intuitive replacements.
  • Real-time highlighting of replacement targets.
  • Easily replace the word under the cursor.
  • Leave the replacement history in the command line history.
  • The function to replace only the selected area in visual mode.

Installation

Manual (with vim's built-in packages function)

First, create a directory to put this plugin. (check your packpath.)

$ mkdir -p ~/.vim/pack/kqito/start/
$ cd ~/.vim/pack/kqito/start/

Next, download this plugin.

$ git clone https://github.com/kqito/vim-easy-replace

Now you can use easy-replace.

With plugin manager

You can install it as follows.

  • Vundle

    • Plugin 'kqito/vim-easy-replace'
  • Dein

    • call dein#add('kqito/vim-easy-replace')
  • Vim-plug

    • Plug 'kqito/vim-easy-replace'

Usage

General

By default, you can start using easy-replace with the map <Leader>ra

demo

Also, you can use <Leader>rc to replace the word under the cursor.

For a specific range

You can start easy-replace with <Leader>ra (default) while selecting a range from the visual mode, then start using easy-replace for the range.

demo

Customize options

You can customize some options.

variable name default value description
g:easy_replace_enable 1 Enable easy-replace. (If set 0, easy-replace will not work.)
g:easy_replace_launch_key <Leader>ra Key to launch easy_replace
g:easy_replace_launch_in_visual_key <Leader>ra Key to launch in visual mode easy_replace
g:easy_replace_launch_cword_key <Leader>rc Key to replace the word under the cursor with "easy_replace".
g:easy_replace_launch_cword_in_visual_key <Leader>rc Key to replace the word under the cursor in visual mode with "easy_replace".
g:easy_replace_highlight_ctermbg 'green' Color for highlighting the replacement target.
g:easy_replace_highlight_guibg 'green' Color for highlighting the replacement target.
g:easy_replace_add_history 1 Leave the replace command in the command line history after the replacement.

License

MIT © kqito

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.