aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-04-07Create `s:FilterTabPageElements()`Teddy Wing
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.
2018-04-07s:MatchString(): Fix line continuation problemTeddy Wing
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.
2018-04-07tabs_grep.vim: Trouble with line continuations; reorder argumentsTeddy Wing
`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.
2018-04-07tabs_grep.vim: Split `:tabs` output on `\n`Teddy Wing
Otherwise it splits on spaces, and I end up with word elements in my list instead of line elements.
2018-04-07Initial ideas for TabsGrepTeddy Wing
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.