Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/haya14busa/vim-asterisk
:snowflake: *-Improved
https://github.com/haya14busa/vim-asterisk
motion vim
Last synced: 3 days ago
JSON representation
:snowflake: *-Improved
- Host: GitHub
- URL: https://github.com/haya14busa/vim-asterisk
- Owner: haya14busa
- License: mit
- Created: 2014-11-27T16:27:27.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2021-03-31T18:27:50.000Z (almost 4 years ago)
- Last Synced: 2025-01-13T19:13:48.889Z (10 days ago)
- Topics: motion, vim
- Language: Vim script
- Homepage: http://www.vim.org/scripts/script.php?script_id=5059
- Size: 85 KB
- Stars: 391
- Watchers: 12
- Forks: 18
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
vim-asterisk: * -Improved
========================
[![](https://travis-ci.org/haya14busa/vim-asterisk.svg?branch=master)](https://travis-ci.org/haya14busa/vim-asterisk)
[![](https://ci.appveyor.com/api/projects/status/uurxg9ips6h2cyd3/branch/master?svg=true)](https://ci.appveyor.com/project/haya14busa/vim-asterisk/branch/master)
[![](https://drone.io/github.com/haya14busa/vim-asterisk/status.png)](https://drone.io/github.com/haya14busa/vim-asterisk/latest)
[![](https://img.shields.io/github/release/haya14busa/vim-asterisk.svg)](https://github.com/haya14busa/vim-asterisk/releases)
[![](http://img.shields.io/github/issues/haya14busa/vim-asterisk.svg)](https://github.com/haya14busa/vim-asterisk/issues)
[![](http://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![](http://img.shields.io/badge/doc-%3Ah%20asterisk.txt-red.svg)](doc/asterisk.txt)Introduction
------------asterisk.vim provides improved * motions.
### 1. stay star motions (z prefixed mappings)
z star motions doesn't move your cursor.![](https://raw.githubusercontent.com/haya14busa/i/master/vim-asterisk/asterisk_z_star.gif)
### 2. visual star motions
Search selected text.![](https://raw.githubusercontent.com/haya14busa/i/master/vim-asterisk/asterisk_visual_star.gif)
### 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
![](https://raw.githubusercontent.com/haya14busa/i/master/vim-asterisk/asterisk_keeppos.gif)
Installation
------------[Neobundle](https://github.com/Shougo/neobundle.vim) / [Vundle](https://github.com/gmarik/Vundle.vim) / [vim-plug](https://github.com/junegunn/vim-plug)
```vim
NeoBundle 'haya14busa/vim-asterisk'
Plugin 'haya14busa/vim-asterisk'
Plug 'haya14busa/vim-asterisk'
```[pathogen](https://github.com/tpope/vim-pathogen)
```
git clone https://github.com/haya14busa/vim-asterisk ~/.vim/bundle/vim-asterisk
```Usage
-----```vim
map * (asterisk-*)
map # (asterisk-#)
map g* (asterisk-g*)
map g# (asterisk-g#)
map z* (asterisk-z*)
map gz* (asterisk-gz*)
map z# (asterisk-z#)
map gz# (asterisk-gz#)
```If you want to set "z" (stay) behavior as default
```vim
map * (asterisk-z*)
map # (asterisk-z#)
map g* (asterisk-gz*)
map g# (asterisk-gz#)
```To enable keepCursor feature:
```vim
let g:asterisk#keeppos = 1
```Special thanks
--------------
|vim-asterisk| uses the code from vim-visualstar for visual star feature.- Author: thinca (https://github.com/thinca)
- Plugin: https://github.com/thinca/vim-visualstarAuthor
------
haya14busa (https://github.com/haya14busa)