vim-scripts / vimgrepbuffer Goto Github PK
View Code? Open in Web Editor NEWRun vimgrep on buffers
Home Page: http://www.vim.org/scripts/script.php?script_id=3233
Run vimgrep on buffers
Home Page: http://www.vim.org/scripts/script.php?script_id=3233
This is a mirror of http://www.vim.org/scripts/script.php?script_id=3233 This plugin provides easy application of the 'vimgrep' command on buffers (as opposed to the filesystem, which is its normal mode of operation). It provides two commands: one to search just the current buffer, and the other to search all listed buffers. The QuickFix buffer will be populated with the search results, if any, and opened for viewing. The search pattern will also be assigned to the search register, so that matches will be highlighted if 'hlsearch' is on (':set hlsearch'). Two commands are provided, ':G' and ':GG'. The first limits the search to the current buffer, while the second searches all listed buffers. If you do not like the cryptic/genericness of these 'short' commands, put: let g:vimgrepbuffer_long_command = 1 in your "~/.vimrc", and ':VimgrepBuffer' and ':VimgrepBuffers' will be set as the commands instead. The pattern specification is *exactly* like that for 'vimgrep'. This means that if the pattern starts with a non-identifier character or contains any literal whitespace characters, for correct behavior you will have to enclose the pattern in delimiter characters (e.g. "/", "@", "#"): :G /\s*print "\d/ :GG /\s*def\s\+\w\+(/ :G /\(def\s\+\|class\s\+\)/ :GG /\cisland/ :G /the quick brown \w\+/ :GG /except \+\w\+Error/ If your pattern starts with an identifier-character you can omit the enclosing delimiters: :G def\s\+\w\+(.*\*\*kwargs) :GG except\s\+\w\+Error In this latter case, the pattern will be considered to be whitespace-delimited, and so if your pattern contains any literal whitespace you may get incorrect results. This behavior is exactly like that of 'vimgrep'. You might also be interested in looking at "grep.vim" (http://www.vim.org/scripts/script.php?script_id=311) as an alternative for "grep-on-buffer" operations, especially if you want to use external grep programs. "grep.vim" provides a much broader range of functionality and commands, and is typically faster. However, the grep dialect you will have to use is that of the external grep programs, rather than that of Vim. The main reason I wrote "VimgrepBuffer" (and why you might be interested in using it) is to be able to use Vim's grep dialect to express the search patterns.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.