This isn't just about "unavailability". Let the Watchman error messages show through in the exception text; it may be helpful, such as: > CommandT::Scanner::FileScanner::WatchmanFileScanner::WatchmanError: > unable to resolve root [PATH]: none of the files listed in global > config root_restrict_files are present
Put the `MatchWindow` autocmds in a group, and make the group names consistent across the project. Note that we don't need to worry about the `MatchWindow` autocmds leaking in normal use, because the window hangs around in the background and gets re-used.
One substantive fix in here: - add missing (unbalanced) paren in `commandt#CommandTPath` method And some other consistency/polish tweaks: - add some comments indicating what the added methods are for - use `&&` instead of `and` - remove redundant explicit `if`/`return true`/`else`/`return false` construct - allow `#path` and `#active_finder` methods to return `nil`; one of these requires a change to the caller to preserve desired behavior, but the other one can be left as-is (interpolating `nil` in a string is a no-op) - use parens around method parameter lists
Originally submitted at: #149 * gh/mathstuf/git-submodule-scan: doc: Update for the new g:CommandTGitScanSubmodules option Make @scan_submodules code work Expect g:CommandTGitScanSubmodules to be a boolean git: add option for scanning submodules
- whitespace fix - minor rewording, adding a link back to the `g:CommandTFileScanner` option - updated HISTORY and AUTHORS sections
Originally submitted in relation to: #151 For some reason, had a merge conflict, so in applying it, I took the opportunity to alphabetize the alternatives within the regex. Signed-off-by: Greg Hurrell <firstname.lastname@example.org>
* blueyed/highlight-fix: doc: Add info to HISTORY section for Daniel's patch DRY up repeated `#gsub` calls in `#get_cursor_highlight` Only use `highlight!` when needed Teach get_cursor_highlight to return an array Clean-up comments in MatchWindow#get_cursor_highlight Fix handling output of ":hi Cursor" with link + definition Originally submitted at: #150 With some follow-up from me.
As mentioned in ab15fa2, we previously used `:highlight` for everything, but the need to use `:highlight!` for some specific cases led us to use `:highlight!` for everything. This commit makes things a little more nuanced by marking the specific cases that need the bang, and using it only in those cases.
As of cfd65e2 `#get_cursor_highlight` may actually return more than one `:highlight` command in order to support restoring highlights that involve patterns like: :highlight! link Cursor VisualNOS Rather than returning a string with another command tacked on, let's just always return an array. The one possible gotcha here is that this kind of rule must be set up using `:highlight!` and not `:highlight`, or Vim will complain with: E414: group has settings, highlight link ignored So, this commit changes the `#show_cursor` to always use `:highlight!` instead of `:highlight`. It's possible this might have unintended side-effects, so I'm going to follow up with a tweak that makes it a little more nuanced.
This gets set up through my solarized theme: hi! link Cursor VisualNOS `:hi Cursor` looks as follows then: Cursor xxx ctermfg=8 ctermbg=12 guifg=bg guibg=fg links to VisualNOS Without this patch there's the following error when closing the match window: > Error detected while processing function CommandTCancel: > line 1: > E416: missing equal sign: links to VisualNOS This uses a hack to apply two `highlight` commands, and should maybe get improved to return and handle a list of highlight definitions.
Forgot to do this earlier.
Originally submitted as: #145 Original message: > If you are an RVM or rbenv user, CommandT has to be built and run with > the same version of Ruby that Vim is linked against. Otherwise > CommandT won't work. So you either have to set that version of Ruby as > default or you need to re-build Vim with a version of Ruby you prefer. I tweaked the wording a little (for example, "built and run" doesn't really make sense, as you build Command-T but run Vim) and weakened the recommendation to from setting a global default Ruby version to setting a temporary local override (the whole point of Ruby version managers is that you _don't_ have to make global settings like that just to get one specific piece of software to work). Signed-off-by: Greg Hurrell <email@example.com>