• Stars
    star
    182
  • Rank 211,154 (Top 5 %)
  • Language
    Vim Script
  • Created over 14 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Start a * or # search from a visual block

Visual Star Search

File Search

This plugin allows you to select some text using Vim's visual mode, then hit * and # to search for it elsewhere in the file. For example, hit V, select a strange sequence of characters like "$! $!", and hit star. You'll find all other runs of "$! $!" in the file.

By default, when you hit star while making a visual selection, vim extends the selection to the next word that matches the word under the cursor.

Recursive Search

If you hit <leader>* (\* unless you changed the mapleader), vim recursively vimgreps for the word under the cursor or the visual selection.

If you have already mapped <leader>* then visual star search won't override it. This is useful to set up your own search bindings. For example, to get visual-star-search to use Ag instead of vimgrep, add these two lines to your .vimrc.

Install

Use a plugin manager such as vim-plug.

Or install using the command line:

mkdir -p ~/.vim/pack/vendor/start
git clone https://github.com/bronson/vim-visual-star-search ~/.vim/pack/vendor/start/visual-star-search

History

It was originally derived from a post on Scrooloose's Blog.

Alternatives

  • visualstar
  • vsearch -- Godlygeek's file probably came from the same source and is looking great.
  • nelstrom's fork made some excellent changes. As of Oct 2014, they've been incorporated into this script.

More Repositories

1

vim-trailing-whitespace

Highlights trailing whitespace in red and provides :FixWhitespace to fix it.
Vim Script
452
star
2

vim-update-bundles

Use Pathogen and Git to manage your Vim plugins.
Ruby
91
star
3

error_page_assets

Let the asset pipeline generate your static error pages.
Ruby
28
star
4

pdfdir

Utilities to operate on lots of PDF files
Shell
24
star
5

dotfiles

To use: git clone --bare [email protected]:bronson/dotfiles.git ~/.dotfiles.git ; alias .f="git --work-tree='$HOME' --git-dir='$HOME'/.dotfiles.git" ; WARNING .f reset --hard HEAD
Shell
21
star
6

geolocal

Geocode an IP address with a single if statement. No network access, no context switches, no waiting.
Ruby
19
star
7

makefile-death

A better way to use Makefiles
C++
10
star
8

vimsy

This project has been replaced by git-update-bundles. Almost all functionality is in this vimrc:
Vim Script
9
star
9

vim-mode-next

An integration area for vim-mode pull requests
CoffeeScript
8
star
10

rzh

Receive ZModem Here -- sits behind your shell and pulls down file transfers
C
8
star
11

backgrounded

small shell script to maintain background tasks
Shell
6
star
12

--hobostarter

The easiest way to start a Hobo project
JavaScript
5
star
13

vim-toggle-wrap

Hit \w to toggle through Vim's wrapping modes (no wrap, char wrap, word wrap)
Vim Script
5
star
14

vim-runtest

Runs Ruby specs from within Vim, supports the quickfix window to navigate failures
Vim Script
5
star
15

io

A simple event-based I/O library
C
5
star
16

valid

Validate JSON objects against a schema written in JSON
JavaScript
4
star
17

table_differ

Ruby gem to snapshot database tables and compute the differences between snapshots
Ruby
4
star
18

ctest

Another unit test framework for ANSI C
C
4
star
19

vim-ruby-block-conv

Convert Ruby blocks between {} and begin/end
Vim Script
4
star
20

zzz-railsstarter

The easiest way to start a Rails project
Ruby
3
star
21

manifest-package-loader

A Webpack loader to insert data from package.json into a your manifest.json
JavaScript
3
star
22

lxc-bootstrap

An experiment in making lxc guests easier to create
Shell
3
star
23

Term-ShellUI

Perl module to support a command line environment with completion and history
Perl
3
star
24

git-subtree

Started this before I knew apenwarr's existed, then never finished it. Use apenwarr's instead.
Shell
3
star
25

ovzutils

Random junk that might help when using OpenVZ
2
star
26

tmtest

Putting the fun in functional testing for shell executables
C
2
star
27

quickcalld

A mirror in case the original repo disappears
C
2
star
28

teensy-metal

Some experiments using raw AVR to drive the Teensy
C
2
star
29

multiscroll

A plugin of the utmost cunning, perspicuity and invention. It scrolls a div within a div you see.
JavaScript
2
star
30

vim-closebuffer

Close a buffer without closing its window
Vim Script
2
star
31

sshkeys

Some tiny scripts to keep the authorized_keys file in sync across a set of servers.
Shell
1
star
32

invoicing

Tired of using Excel to generate timesheets? This is worse.
Ruby
1
star
33

bashes

contains a few versions of bash binaries for travis-ci
Shell
1
star
34

whose-bug

A bad interaction between a bunch of gems
Ruby
1
star
35

rich-models

Rails plugin: declare your fields right in your models and let the computer compute the migrations.
Ruby
1
star
36

job_pool

Ruby gem to fork jobs to run in the background. Feed them data, read their results, kill them, set timeouts.
Ruby
1
star