Git Product home page Git Product logo

vim-asterisk's Introduction

vim-asterisk: * -Improved

Introduction

asterisk.vim provides improved * motions.

1. stay star motions (z prefixed mappings)

z star motions doesn't move your cursor.

2. visual star motions

Search selected text.

3. Use smartcase unlike default one

Default behavior, which sees ignorecase and not smartcase, is not intuitive.

4. Keep cursor position across matches

It is handy for refactoring to keep cursor position while iterating over matches.

Add following line in your vimrc to enable this feature. let g:asterisk#keeppos = 1 Default: 0

Installation

Neobundle / Vundle / vim-plug

NeoBundle 'haya14busa/vim-asterisk'
Plugin 'haya14busa/vim-asterisk'
Plug 'haya14busa/vim-asterisk'

pathogen

git clone https://github.com/haya14busa/vim-asterisk ~/.vim/bundle/vim-asterisk

Usage

map *   <Plug>(asterisk-*)
map #   <Plug>(asterisk-#)
map g*  <Plug>(asterisk-g*)
map g#  <Plug>(asterisk-g#)
map z*  <Plug>(asterisk-z*)
map gz* <Plug>(asterisk-gz*)
map z#  <Plug>(asterisk-z#)
map gz# <Plug>(asterisk-gz#)

If you want to set "z" (stay) behavior as default

map *  <Plug>(asterisk-z*)
map #  <Plug>(asterisk-z#)
map g* <Plug>(asterisk-gz*)
map g# <Plug>(asterisk-gz#)

To enable keepCursor feature:

let g:asterisk#keeppos = 1

Special thanks

|vim-asterisk| uses the code from vim-visualstar for visual star feature.

Author

haya14busa (https://github.com/haya14busa)

vim-asterisk's People

Contributors

haya14busa avatar pelodelfuego avatar presuku avatar lumakernel avatar tamago324 avatar thinca avatar

Watchers

James Cloos avatar  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.