Git Product home page Git Product logo

tmux-open's People

Contributors

bruno- avatar docwhat avatar freed-wu avatar infokiller avatar jonasw234 avatar jonlorusso avatar knakayama avatar martinblascop avatar metakirby5 avatar piotrnap 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

tmux-open's Issues

Doesnt work

I click double with mouse to select file, then o or ctrl+O. Nothing happens not in server not in Kubuntu 20.04.2.
When i try with ctrl+b then o then in Kubuntu with o is still selected, but in server clicking ctrl+b unselects.
Maybe this works only when installed some other plugin? Then installation steps of this should be with instruction to install other plugins. I don want other if not needed.

List of plugins

set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-open'

Other examples:

set -g @plugin 'github_username/plugin_name'

set -g @plugin '[email protected]:user/plugin'

set -g @plugin '[email protected]:user/plugin'

Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)

run '~/.tmux/plugins/tpm/tpm'

set -g @continuum-restore 'on'

Not working for specific URLs

Hi, thanks for this nice plugin I've been using for years.

I noticed there are some URLs that tmux-open will cut and when opened in the browser they just lead to website's home page. For example, URL https://www.youtube.com/watch?time_continue=3&v=I9NCiAVc0-0 will just cause tmux-open to go to youtube homescreen for me. If I copy the URL with prefix<c-u><c-y> (instead of opening with prefix<c-u><c-o>) and paste it in the browser, the URL follows fine.

Bug when opening a file with spaces with <Ctrl-o>

Thanks to David Melech for reporting this issue.

Here are the steps to reproduce the issue:

  • in tmux copy mode, highlight a file with a space in it. For example: '~/some file'
  • try to open it in vim with prefix + Ctrl-o
  • the bug will manifest now: the plugin executes the following command vim -- ~/somefile (notice the space in ~/some file is gone

[bug] url containing '#' will fail

set -g @plugin tmux-plugins/tmux-open
set -g @open x

select a url containing #, (e.g.., https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate), press x, tmux will open https://pytorch.org/docs/stable/optim.htmldesktopow-to-adjust-learning-rate, not containing #h (my host name is desktop). Bug comes from https://github.com/tmux-plugins/tmux-open/blob/master/open.tmux#L39, should escape # to ##:

$ man tmux
...
     ‘#S’; ‘##’ is replaced by a single ‘#’, ‘#,’ by a ‘,’ and ‘#}’ by a ‘}’.
...

If tmux run-shell -b 'xdg-open https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate', the bug will occur. The correct way is tmux run-shell -b 'xdg-open https://pytorch.org/docs/stable/optim.html##how-to-adjust-learning-rate'

Thanks.

lowercase "o" key conflicts with vi copy-mode

Hello,

Lowercase "o" jumps to either end of the visual selection when using copy-mode with vi bindings in tmux. This plugin overrides that shortcut and makes the original functionality inacessible.

Please change this plugin to use capital "O" as the shortcut to open the visual selection instead.

Thanks for your consideration. ✌️

Debug help

Is there anyway to debug this plugin? It isn't doing anything but I also don't get any messages, etc.

New feature open the selected text with google

Hey, this plugin is almost exactly what I wanted to de a few months ago. Back than I was eager to build a plugin that would allow me to highlight some text in copy mode and then google it. This would be especially useful to debug error messages.

I was thinking that maybe tmux-open could have a O binding in order to do exactly that. What do you think? If you like the idea, maybe you could give me some directions to help me build this feature? Tks.

Error: > /dev/null' returned 4

I have installed tmux-open via tmux plug in manager. With the correct syntax in ~/.tmux.conf and installed with "I".

When using it, i have this error 'cd /home/phil/srv; xdg-open "examples.deskto" > /dev/null' returned 4

xdg-open works by itself.

Nothing happens when I press 'o' or 'C-o'

I installed this plugin using tpm. I'm on Ubuntu 14.04 and I have xdg-open in my $PATH.
When I select a URL or filename in select mode and press o or C-o, nothing happens.

I was using the vi keybindings but even when I changed it to emacs, nothing happened.

Create release tag

Would you mind pushing a release tag for the latest master commit? Distributions tend to prefer "released" versions, and mirroring tools like Artifactory/Nexus can generally only mirror releases.

Long URLs ruin all my fun

If a URL is so long that it wraps around to the next line, trying to open it causes xargs to break it into two or more open commands. This could be fixed by passing -0 to xargs (break on null byte instead of new line), but I'm not sure whether or not the break-on-newline behaviour is considered a feature for this plugin.

tmux-open can't "work" if the current terminal is "busy"

Here's the scenario where the plugin isn't working.

  • start a rails server
  • highlight a url in that pane (doesn't matter which url)
  • press o to open the url in the browser

Url won't be opened because the rails server "took" the terminal.

Not able to open file / directory when highlighting through search

Hi!
I'm trying to invoke the plugin from search highlight but apparently it only works if I manually highlight the file or directory.

Steps to reproduce:

  1. Run ls
  2. Switch to visual mode (prefix + [)
  3. Search for folder or directory using vim key bindings (/ + pattern)
  4. Press o to open a file or directory

Nothing happens. If I manually highlight the same file or directly on visual mode, it opens it correctly.

Am I doing something wrong?

Can't set other editor than vim

Hey, thanks for this cool plugin!
I'd really like to have files opening with emacs though!
As written in the doc, I've tried to set $EDITOR in my .zshrc, and reload my terminal env (even restarting tmux)
Tried both with "emacs" an "/usr/bin/emacs" but vim keeps opening when I hit C-o.

Tpm fails with exit code 1

I dug into this and it turns out, that configuring the editor command is the issue:

set -g @open-editor 'C-x'

It fully works as expected but tmux-open tries to add this as a search binding as well (like this example set -g @open-S 'https://www.duckduckgo.com/')
So the exit code of 1 is because tmux-open tries to bind the key editor to the url C-x.

This is the code where the error is produced.

for engine_var in $stored_engine_vars; do

Probably the best solution would be to filter for editor as this has a special meaning and should not be added as a shortcut.

Tilde unexpanded in paths

Steps to reproduce:

$ ls ~/.tmux.conf
/home/smattr/.tmux.conf
$

Now go into copy mode, highlight ~/.tmux.conf and hit Ctrl+o.

Expected behaviour: My Tmux configuration is opened in Vim.

Actual behaviour: Vim opens a new file "~/.tmux.conf"


The cause is pretty clear (quotes around {} in the xargs expansion), but removing the quotes is clearly not correct. Digging a bit deeper, I learned that tilde expansion is much more complicated than I was aware (e.g. http://stackoverflow.com/a/29310477). Do you have any ideas how to solve this cleanly? Apologies if I have misdiagnosed the problem.

README search keybinding description is inaccurate

The README states one of the keybindings is as follows:

Shift-s - search the highlighted selection directly inside a search engine (defaults to google).

However, this did not work for me, and I had to manually add set -g @open-S 'https://www.google.com/search?q=' to my configuration to get the keybinding. Either the default keybinding should be fixed, or the README updated to reflect the fact that the keybinding is in fact not default.

New release, please?

#21, #24, and #28 provide support for Tmux 2.4. However, these are not yet in a new release. This is problematic when it comes to TMUX Plugin Manager, as it uses the latest release when determining what to install or upgrade to; since the latest release is 2.0.0, cut 3 years ago, the way keys are bound to copy-mode is incorrect, making tmux-open unusable.

You can get around it by manually doing the following:

$ cd .tmux/plugins/tmux-open
$ git checkout master

and re-loading your tmux configuration. However, a better solution long term would be a new release of tmux-open.

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.