Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escape search pattern #17

Merged
merged 4 commits into from Mar 19, 2014
Merged

Escape search pattern #17

merged 4 commits into from Mar 19, 2014

Conversation

ferreum
Copy link
Contributor

@ferreum ferreum commented Mar 19, 2014

To try this, use let g:tmux_complete_match = '\S', which matches all WORDS instead of words.
You can then complete things like http://.

@wellle
Copy link
Owner

wellle commented Mar 19, 2014

Great idea!

This got me thinking. Here's an idea:

  1. Always use '\S' so a:base will be a WORD.
  2. Call tmuxwords.sh with a:base to get WORD completions.
  3. Select the last word in a:base and call tmuxwords.sh again.

Consider completing at the end of this line:

string url = "http://go
  1. would select "http://go
  2. would call tmuxwords.sh "http://go
  3. would call tmuxwords.sh go

This would remove the need for the g:tmux_complete_match option.


Thinking a bit more about it, wouldn't it be useful to drop leading non-word characters in WORDS? So instead of completing "http://go we would complete http://go.

This would have to be done both in tmux-complete.vim (step 2 above) and in tmuxwords.sh (probably in the sed step)

wellle added a commit that referenced this pull request Mar 19, 2014
@wellle wellle merged commit 8c08215 into wellle:master Mar 19, 2014
@ferreum ferreum deleted the escpattern branch March 19, 2014 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants