Giter VIP home page Giter VIP logo

tmux-copycat's People

Contributors

bruno- avatar f440 avatar gpanders avatar gregorias avatar grota avatar inkarkat avatar kevinji avatar metcalfc avatar mic92 avatar qstrahl avatar raymond-w-ko avatar s3rvac avatar soli avatar thalesmello avatar toupeira avatar vellvisher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tmux-copycat's Issues

binding for copying sha1?

I'm not a clever man… but I'd really like to use this to grab the sha1 of commits in git… I have been trying the regex I found on stack overflow, but I think it may be in a different syntax than what copycat uses.

\b[0-9a-f]{5,40}\b

Do you have any tips?

Feature request: Cyclic search

I think it would be consistent and convenient if you could make n and N to cycle through searches rather than get stuck on top or bottom.

Highlighting doesn't work

When searching using copycat either by saved searches or "normal" search (prefix + /) there isn't any highlighting. The cursor is placed on the end of the line of the match, but the match isn't highlighted. Therefore you have to select manually before it to work....

I've tried this on an almost empty .tmux.conf and tried to set my PROMPT in zsh to 'XX ' to avoid problems with that. None of this has worked.

The .tmux.conf I have tried with is:

bind-key R source-file ~/.tmux.conf ; display-message "source-file do"

set -g @tpm_plugins "
tmux-plugins/tpm
tmux-plugins/tmux-yank
tmux-plugins/tmux-copycat
"

run-shell ~/.tmux/plugins/tpm/tpm

I'm running tmux 1.9a on Ubuntu 12.04 with zsh 4.3.17.

Defining new stored searches in tmux.conf doesn't work

I tried copying these new stored search examples from the README to my tmux.conf:

# 'prefix + ctrl-t' searches for "search me" string
set -g @copycat_search_C-t "search me"

# 'prefix + alt-t' searches for defined regex
set -g @copycat_search_M-t "regex search[[:alnum:]]\*"

I tried putting these before / after the run-shell ~/.../copycat.tmux line, but in either case pressing the key combinations didn't do anything.
Predefined stored searches such as prefix + C-d work without problems.
I worked around this by editing copycat.tmux locally.

Bug when highlighting a match in zsh shell prompt

If a user has sophisticated zsh shell prompt with unicode characters, match selection could be buggy.

Example: zsh shell prompt contains unicode chars and current directory path. File search (prefix + C-f) highlights the directory path invalidly.
Presumably, this is because of unicode characters.

Bug: results highlighted on the wrong line

This is due to use of 0 (vim copy mode) to go to the beginning of the line, prior to selecting the match.

In some cases 0 makes the cursor go to the beginning of the previous line which causes an error.

Getting only a flash of copy mode, then garbage output

Hi Bruno,
Love the idea of this plugin, and am trying to get it to work. However, when I hit ^A^D (or any other trigger) in tmux, I get a quick flash of copy mode and then junk output at my cursor, in the form of /\d{1,3}lh/.

I'm using tmux 1.9a on OS X. My day-to-day shell is zsh 5.0.5 from homebrew; I've also installed bash 4.3 from homebrew to ensure it's available for copycat. I've commented out most of my tmux.conf, leaving me with just the following:

unbind C-b
set-option -g prefix C-a
bind-key a send-prefix

# Swap between current and previous windows with C-a C-a, like screen.
unbind l
bind-key C-a last-window

run-shell ~/.tmux/plugins/tmux-copycat/copycat.tmux

Any pointers would be greatly appreciated!

Discussion: ideas for stored searches

As described in the defining new stored searches doc, this plugin enables you to define your own, custom searches.

Let's tap into the community ideas and see what others came up with or are missing.

Use this thread to:

  • share what "custom" searches you use (and in which situations)
  • request for something you'd like to search but can't (or don't know how)

Interesting searches will be added to Useful searches section.

custom keybindings break tmux-copycat

I saw the video for tmux-copycat and was extremely excited to use it, but my custom keybindings conflict with the defaults enough that tmux-copycat is unusable and returns nonsense results.

I took a look at the source and I saw several key combinations for commands are hardcoded in.

Is it possible to completely abstract these tmux-send-keys calls with the actual tmux command you're trying to run, so arbitrary configuration changes won't break the script? This would certainly help with adoption.

For reference, my tmux.conf is below:

# change prefix to Ctrl-a (like in gnu screen)
unbind C-b
set-option -g prefix C-s
bind-key C-a send-prefix

# allow terminal scrolling
set-option -g terminal-overrides 'xterm*:smcup@:rmcup@'

# copy mode - turning off for a little bit
# unbind [
# bind Escape copy-mode
unbind Escape
bind [ copy-mode

# use vi mode
set-window-option -g mode-keys vi
set-option -g status-keys vi
set-window-option -g utf8 on

# splitting
unbind %
bind | split-window -h
unbind '"'
bind - split-window -v

# colon :
bind : command-prompt

# status line
set-option -g status-utf8 on
set-option -g status-justify left
set-option -g status-bg default
set-option -g status-fg green
set-window-option -g window-status-current-fg colour135
set-window-option -g window-status-current-attr underscore
set-option -g status-right '#H #[fg=colour]%I:%M #[fg=colour14]%d.%m.%Y'

# let's keep it quiet, ok?
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-content off
set-option -g visual-silence off
set-window-option -g monitor-activity off
set-window-option -g monitor-content ''
set-option -g bell-action none

# some key-binding changes
bind x kill-pane
bind X next-layout
bind Z previous-layout
unbind Left
bind h select-pane -L
unbind Down
bind j select-pane -D
unbind Up
bind k select-pane -U
unbind Right
bind l select-pane -R
unbind C-Left
bind C-h resize-pane -L
unbind C-Down
bind C-j resize-pane -D
unbind C-Up
bind C-k resize-pane -U
unbind C-Right
bind C-l resize-pane -R
unbind M-Left
bind C-H resize-pane -L 30
unbind M-Down
bind C-J resize-pane -D 30
unbind M-Up
bind C-K resize-pane -U 30
unbind M-Right
bind C-L resize-pane -R 30

bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5

# don't rename window
set-window-option -g automatic-rename off

# TPM

# List of plugins
# Supports `github_username/repo` or full git URLs
set -g @tpm_plugins "              \
  tmux-plugins/tpm                       \
  tmux-plugins/tmux-copycat         \
"
# Other examples:
# github_username/plugin_name    \
# [email protected]/user/plugin     \
# [email protected]/user/plugin  \

# initializes TMUX plugin manager
run-shell ~/.tmux/plugins/tpm/tpm

Add a stored search that will match files in $PWD and work conveniently with `ls`

File search prefix + C-f is not ideal and it can't match file names that don't contain forward slash /.
That means when a user uses ls, most files won't be matched.

Consider adding a stored search that will focus on matching ls output well.

Example use case:

  • user lists $PWD files with ls -al
  • user invokes this new search with prefix + C-l (think more about the specific key, maybe it won't be C-l)
  • now, the user can press n and N and move over file-names in the above ls output

Ctrl+J Being overridden

In my tmux.conf I have the following to move around panes. Somewhere in this plugin this binding is being reset to default "accept-line". Ctrl+J works until I do something like Ctrl+a, Ctrl+f

bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|/)g?(view|vim?)(diff)?$' && tmux send-keys C-j) || tmux select-pane -D"

I did a search on this repo for ctrl_j but didn't find anything. Hopefully you can point me in the right direction.

Thanks for making an awesome plugin!

Wrong result highlihting for url saved search

In this line:

n/ignore-request [4] https://www.relishapp.com/vcr/vcr/v/2-8-0/docs/record-modes/once [5] https://www.relish

there are 2 url results (both starting with https://www...).
While the first match is highlighted properly, second match highlights only this: //www.relish. The starting https is missing from the highlight.

prefix - C-f won't match paths starting with ../

I have found that copycat cannot match path starting with ../ for instance git status

...
Untracked files:
  (use "git add <file>..." to include in what will be committed)

        ../../docs/chapter_one/introduction.rst

I tried to fix it at line 25 of copycat.tmux but couldn't find a good regex for that.

Clobbers tmux bind of Ctrl+J

When I activate the copycat command with Ctrl+A, /, subsequently the tmux bind made by me using bind -n C-J stops working. It appears that the plugin sets the bind to

bind-key -n       C-j run-shell "tmux send-keys 'C-j'; /root/.tmux/plugins/tmux-copycat/scripts/copycat_mode_quit.sh; true"

I wonder if there is a way for copycat to store the existing binding before overwriting it so that it can restore the original bind when done with copycat mode?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.