Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
Change past references to "pattern" into "glob". The command no longer
accepts regex patterns. Instead it takes a file glob, which is faster to
type and potentially more intuitive.
|
|
Globs make it easier to match file and directory names. For example,
instead of writing:
:TabsGrep utol.*grep
we can write:
:TabsGrep utol*grep
Discovered `glob2regpat()` in the help while searching for a way to take
a glob in my command and it ended up being the perfect thing, yay.
Needed to slice the regex returned by the function to discard the first
and last characters, as it automatically adds `^$` delimiters around the
generated regex pattern. This doesn't make sense for our use case
because we want to be able to start writing from anywhere in the middle
of the path, and not have to add `*`s to the beginning and end.
|
|
|
|
Include a very short description and a Gif screencast.
|
|
|
|
|
|
Now that the plugin works and I'm done with the main development, move
everything from `plugin/` to `autoload/`.
|
|
Makes the "Tab page X" lines appear in the same colour as they usually
do when using the `:tabs` command.
|
|
I previously extracted this check to `s:IsTabPageLine()` in order to use
it in `s:FilterTabPageElements()`. Eliminate it from `s:MatchString()`
now and reuse the function.
|
|
This was never really useful, just a holdover from very early
development (copied from LsGrep and modified a bit).
|
|
|
|
|
|
Remove development comments. And a debug `echo`. Add more descriptive
comments for the different steps.
|
|
This function now works the way I want it to, removing the "Tab page X"
headers with no files under them from the `:tabs` list.
We do this by building a list of indexes of those "Tab page X" elements
and then removing them from the original list. The removal happens in
reverse so we don't mess up the indexes by removing from left to right.
|
|
Add a function that will filter out "Tab page 10" elements that don't
have any files under them.
Incomplete for now but I'm committing what I have here because it looks
like I'm going to have to change things around just a bit.
At the moment, the function will take the list of matched `:tabs` lines,
make a list of the indexes of the "Tab page X" elements, and finally
remove the empty "Tab page X" elements from that list, leaving only the
indexes of those with files under them.
Instead what I think I need is a list of the "Tab page X" indexes that
don't have files so I can remove these from the list.
|
|
I had had trouble with the line continuation in this function, but it
turns out what I had written the first time was fine. It's just that I
was sourcing my plugin incorrectly and that's the reason why I was
getting errors.
Before I was doing:
$ vim --cmd 'so ~/Documents/Development/vim-tabs-grep/plugin/tabs_grep.vim' -p bin/imagebin.ca.sh bin/fucking-orange.sh functions/frequency w3m-tabs.exp
Using the `-c` flag instead completely fixed the problem:
$ vim -c 'so ~/Documents/Development/vim-tabs-grep/plugin/tabs_grep.vim' -p bin/imagebin.ca.sh bin/fucking-orange.sh functions/frequency w3m-tabs.exp
Revert back to the original code in this function.
|
|
`s:MatchString()` needs to have the search string as its first argument,
because that's how it will get passed in when referenced above as:
call filter(tabs, function('s:MatchString', [a:search]))
Also had some trouble getting the line continuation to work on the
`return`, so had a few experiments messing with that trying to get it to
work.
|
|
Otherwise it splits on spaces, and I end up with word elements in my
list instead of line elements.
|
|
Repurposed some code from my LsGrep plugin. We grab output from `:tabs`
and run it through a filter to get only the matching file names.
We also want to include the "Tab page 1" lines, so these need to be
filtered specially.
|