Git Product home page Git Product logo

vimux's People

Contributors

alerque avatar alexozer avatar benmills avatar ersatzryan avatar flipsi avatar hpurmann avatar jaspertandy avatar jdavis avatar joshingly avatar justone avatar larrylv avatar leostera avatar lyuts avatar m42e avatar mvanderkamp avatar mxie avatar notahat avatar oscardelben avatar pgr0ss avatar ppalucki avatar prognostikos avatar robturtle avatar sotte avatar teoric avatar thalesmello avatar thegreatape avatar tonyc avatar tonyskn avatar tyewang avatar yunake 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  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

vimux's Issues

Can't paste more than around 30-lines into tmux buffer

I can't seem to paste in around 30-40 lines of code into my vimux repl. Anything less works fine.
It could easily be a tmux setting but I can't seem to find anything relevant.

I'm using vimux as a tslime replacement and followed the mappings in the docs.

tmux: 1.6 (via homebrew)
vim: 7.3.646 (sourcecode compiled)

Wishlist: If there was a command to pass the entire file/buffer to the vimux buffer

Brilliant plugin!
Thanks
Greg

Rename vimux commads to start with 'Vimux' instead of the current verb

I think it would be nice if all vimux commands would start with "Vimux". This way it's easy to explore all vimux commands just by entering "Vimux".

command VimuxRunLastCommand :call RunLastVimTmuxCommand()
command VimuxCloseRunner :call CloseVimTmuxRunner()
command VimuxClosePanes :call CloseVimTmuxPanes()
command VimuxCloseWindows :call CloseVimTmuxWindows()
command VimuxInspectRunner :call InspectVimTmuxRunner()
command VimuxInterruptRunner :call InterruptVimTmuxRunner()
command VimuxPromptCommand :call PromptVimTmuxCommand()

If you agree I could write it. We could keep aliases to the old commands and output a deprecation warning so ppl. can change their config. What do you think?

Add a VimuxPaneSetup configuration setting

Hey, thanks for a great plugin.

I think it'd be nice to have a way to specify a bunch of stuff to be run when a pane is first created by Vimux. For me the use case here is that I have a large prompt (3 lines), and I use an envvar to designate to my shell that I want to instead use a more micro prompt. I want that prompt to be used by Vimux (and currently activate that within my Vimux commands), but it'd be nicer I think to be able to just specify stuff once globally rather than needing to put that in each of my commands.

(I know VimuxResetSequence exists, but that doesn't really seem appropriate to do this kind of thing).

List index out of range in _VimuxNearestPaneIndex()

After i set tmux pane-base-index to 1, match(panes[i], "(active)") == -1 will case list index out of range.

change

for i in panes
    if match(panes[i], "(active)") == -1
      return split(panes[i], ":")[0]
    endif
endfor

to

for pane in panes
    if match(pane, "(active)") == -1
      return split(pane, ":")[0]
    endif
endfor

and there is no problem.

Thanks for your plugin

Re-use the vimux pane over sessions

Hi,

First of all, pretty awesome plugin, good integration with a proper shell is something I've always been jealous of Emacs users and this is at least some steps in that direction.

What I'm missing though is the ability to do this:

  1. Start vim
  2. Send some commands via vimux and obtain a new vimux pane
  3. Close vim, leave the vimux pane open
  4. Do some stuff, start vim again
  5. Run more commands via vimux, but instead of vimux creating a new pane, it re-uses the old one.

This would allow to have a kind of "dedicated" tmux pane which acts as REPL. This could be a configurable option such as VimuxUniquePane.

The only problem is that it's kind of hard to access pane's in tmux, but there are two hackish approaches:

  1. Set the pane title to something like VimuxPane and add a check to look if one exists next time vimux is used. Note that the pane title is not set or maintained by tmux, it's the title set by the OSC title setting sequence, so potentially it can be changed by something running in the shell, which is not nice.
  2. Store the vimux pane ID (not index) (which is unique over the whole session according to tmux's docs) somewhere and reuse that.

I think the second approach is much less hackish, but then the pane ID needs to be stored somewhere.
EDIT: I guess viminfo could be used for that? :help viminfo

If you would agree with such a feature I could contribute a patch for this.

VimuxClosePanes closes incorrect pane

In case Vim executes VimClosePanes when I'm in a different window than Vim itself is, a pane in the current window is closed instead of a pane in the window Vim is in.

Clear history in vimux pane?

I'm trying to do this (what you wrote in your docs):

" Run the current file with rspec
map <Leader>rb :call RunVimTmuxCommand("clear; rspec " . bufname("%"))<CR>

However, clear seems to only scroll the buffer up so the history is hidden, not deleted. Minitest (which I'm using instead of rspec) sometimes gives me really fat stack traces, so instead of scrolling up line-by-line to read the error, I'll enter copy mode in the pane then search with / for ERROR, which takes me right to the error output. It works great, except that it also matches previous errors in the scrollbuffer history as well, which is not good for my workflow (get confused about the errors more easily).

What I'd love to do is to use tmux clear-history after clear, but sending that to the tmux pane via vimux doesn't seem to work. I've tried

call RunVimTmuxCommand("clear; tmux clear-history; ruby -Itest /spec/some_spec.rb")

... and I see that the command makes it to the pane and gets executed, but it doesn't clear the buffer history. Manually switching to the vimux pane and running the command myself works as expected.

Is vimux sending the command differently or something? I would love to get this working! Thanks.

Preserve current (vim) RVM

when I start vim, for instance, my rvm is at 1.9.3@some_project. When I open a new pane for vimux, it would be nice if it preserved that, so the first command doesn't fail

Add ability to send to specific window

Instead of sending the command to a specific pane, is it possible to send to a specific tmux window? I've read through the docs and didn't see anything.

Add Command History

A nice command history would be nice as well. I already mapped "my common commands" to some shortcuts. But in general a command history would eliminate this workaround.

I'd like to help out here. Just let me know how.

tmux sessions with spaces

Earlier today my pair decided to rename our session Ben sucks to see how long it would take me to notice. Later that day when I tried to use vimux it was not able to correctly target the runner pane because the session name had a space in it.

Error when run any commands

Hello. I have error when I try run RunVimTmuxCommand("ls"):

trace:

Error detected while processing function RunVimTmuxCommand:                                                                            
NoMethodError: undefined method `flush' for #<Object:0x9d136d0> 
  • vim 7.3
    • +ruby
  • OS Ubuntu 11.10.
  • Ruby 1.9.2p290

Thanks.
Maksim.

RunVimTmuxCommand not an editor command, but RunLastVimTmuxCommand is okay

If I do :Run I only see RunLastVimTmuxCommand. Manually typing in RunVimTmuxCommand gives "RunVimTmuxCommand not an editor command".

I'm using Vundle to install from your git repo.

By the way the 'Plugins' section of the README sounds like they are plugins for vimux, but they are alternatives? I currently use vim-turbux.

Latest version of Vim (7.3.865) crashes with "Segmentation fault: 11".

I did a brew upgrade vim for the heck of it and got the standard vim SEGV error. Switching back one version prior (7.3.801) allows vim to start up again. I'm not sure what else to provide since I'm not aware of any stacktrace, but anything I could do to help please let me know.

My solution for now is rolling back to the last good version of vim (had no good reason for updating and I can't live without Vimux :) )

To reproduce:

~/.vim/bundle (master *)$ brew switch vim 7.3.801
Cleaning /usr/local/Cellar/vim/7.3.502
Cleaning /usr/local/Cellar/vim/7.3.632
Cleaning /usr/local/Cellar/vim/7.3.672
Cleaning /usr/local/Cellar/vim/7.3.709
Cleaning /usr/local/Cellar/vim/7.3.712
Cleaning /usr/local/Cellar/vim/7.3.762
Cleaning /usr/local/Cellar/vim/7.3.801
Cleaning /usr/local/Cellar/vim/7.3.865
14 links created for /usr/local/Cellar/vim/7.3.801
~/.vim/bundle (master *)$ vim
[ vim starts up fine, I exit ]
~/.vim/bundle (master *)$ brew switch vim 7.3.865
Cleaning /usr/local/Cellar/vim/7.3.502
Cleaning /usr/local/Cellar/vim/7.3.632
Cleaning /usr/local/Cellar/vim/7.3.672
Cleaning /usr/local/Cellar/vim/7.3.709
Cleaning /usr/local/Cellar/vim/7.3.712
Cleaning /usr/local/Cellar/vim/7.3.762
Cleaning /usr/local/Cellar/vim/7.3.801
Cleaning /usr/local/Cellar/vim/7.3.865
14 links created for /usr/local/Cellar/vim/7.3.865
~/.vim/bundle (master *)$ vim
Vim: Caught deadly signal SEGV
Vim: Finished.
Segmentation fault: 11

Vimux with multiple tmux sessions

Steps:

  1. Run two attached tmux sessions
  2. From session two run vim with vimux
  3. Use :PromptVimTmuxCommand and run ls

Expected:
Pane to open and run ls command

Actual:
Pane opens and no command is ran

Does it work in a graphical vim

This plugin does not work properly under a graphical vim (Test on mvim)

The problems is that it does create the tmux pan... but that pan is not visible since its created in the shell and not mvim (mvim is running in a separate guy).

Is there a workaround to this?

Cheers and thank you for this great plugin :)

Problems with vim 7.2 on Ubuntu Lucid

I get this when using the ",," key and enter a command. I configured it such:
nmap ,, :VimuxPromptCommand <CR>

Funnily though: It indeed runs the given command, but uses an existing pane instead of creating a new one.

Error detected while processing function VimuxPromptCommand..VimuxRunCommand line 11: E121: Undefined variable: g:_VimTmuxRunnerPane E15: Invalid expression: g:_VimTmuxRunnerPane E121: Undefined variable: g:VimuxResetSequence E15: Invalid expression: g:VimuxResetSequence Press ENTER or type command to continue

Extra newline in my repl

First off, this project rules, and I'm excited about the prospect of improving my very crappy, low-tech Clojure workflow.

When I send things to my buffer via the tslime replacement instructions in the readme (vmap <LocalLeader>vs "vy :call RunVimTmuxCommand(@v)<CR>), things work great except it sends an extra newline. Removing the word "Enter" from vimux.vim makes that unnecessary, but of course means an extra Enter press is necessary for firing up the REPL.

Any tips?

I'm wondering if there's a way to expose these two different use cases so I could use different shortcuts? Or if it's more likely I'm just doing something wrong :)

Unable to create pane for Vimux

CentOS 6.4
Vim 7.4
Tmux 1.6
Installed with Vundle

VIm seems to recognize that vimux was installed. However when I run any of the commands the editor basically freezes and no split pane is ever created. What could be a possible cause?

Invalid arguments for function VimuxRunCommand

I updated my plugins this morning, and pulled in #50 (only). Now when I run :VimuxPromptCommand (for me bound to nnoremap <leader>vp :VimuxPromptCommand<cr>, I get the following:

Error detected while processing function VimuxPromptCommand:                                                                                                                                                                                                                        
line    3:                                                                                                                                                                                                                                                                          
E15: Invalid expression:                                                                                                                                                                                                                                                            
E15: Invalid expression:                                                                                                                                                                                                                                                            
line    6:                                                                                                                                                                                                                                                                          
E121: Undefined variable: l:command                                                                                                                                                                                                                                                 
E116: Invalid arguments for function VimuxRunCommand                                                                                                                                                                                                                                
Press ENTER or type command to continue

Vim 7.3.646 w/ Ruby (through homebrew, if it makes a difference)
tmux 1.7

clear line when new vimux command is run?

So if I pop down to the vimux window and mess with it, or if I accidentally focus it and toss some gunk in the window, the next vimux command will fail because it sends the command after the gunk.

I'm wondering if vimux should send a ^U to the window to clear the current command line before sending its command. Maybe even a ^E^U so it doesn't matter if the cursor is in the middle of the line.

This would obviously not work for non-emacs-style shells, so I guess it would have to be configurable.

Does it seem like a worthwhile feature though? If so will take a shot at a pull request.

Pin vimux to a pane

It would be nice if vimux remembered the pane it used last time and used it again.

Here's my use case:

I am running tests in vimux over and over (vim on top, tests on bottom of tmux split). Every once in awhile, I start a test run and then switch tmux windows to look at something else. If I switch too quickly, vimux now runs the tests in the current window I'm looking at, rather than the pane it was using for tests before.

omit character after $ when use \vs

I set my .vimrc as said in the doc:
vmap <LocalLeader>vs "vy :call VimuxRunCommand(@v . "\n", 0)<CR>
But after I selected a line such as echo $a, I used \vs. The result in the tmux window was echo. The $a was omitted.
I need help to fix it. Thanks!

Can't Get Vimux To Work

I'm unable to get Vimux to work. I'm currently using Pathogen. I've installed both ways:

  • git clone repo into ~/.vim/bundles/
  • Downloading the tarball and moving it into ~/.vim/bundles/

Either way I get the following error:

E117: Unknown function: RunVimTmuxCommand

Vimux installed with bundler on linode/debian loaded but not working.

I have this working fine on OSX and using an identical method says that VimuxPromptCommand isn't recognised. Also :call VimuxPromptCommand("ls") is returning an "unknown function" error.

I've checked :scriptnames and the plugin is getting loaded, and :help vimux is showing documentation, but I can't access anything!

I feel like I'm taking crazy pills, I don't even know how to begin to debug this - do you have any ideas?

Vimux creates pane but no command run

Hi Ben,

Having trouble getting vimux to work for me.

I start vim within a new tmux session and type ":call VimuxRunCommand("ls")", the vim window flashes, a new window is created below the vim window with my bash prompt, but no command is run. Focus is on the bash prompt.

If I try to run the command again from the vim window I get the following error message at the bottom of my vim window:

window not found: 0:0:"ls")
window not found: 0:0:
window not found: 0:0:
usage: select-pane [-DLRU] [-t target-pane]

Thanks

Can not get started

Hi,
I've installed vimux as a pathogen bundle but keep running into the error below. I am confused about the mix of ruby and vim script. Is there some particular ruby libraries that i need for this to work?

tmux: unknown option -- F Error detected while processing function RunVimTmuxCommand:
usage: list-panes [-t target-window]
Error detected while processing function PromptVimTmuxCommand..RunVimTmuxCommand:
line 2:
NoMethodError: undefined method `strip' for nil:NilClass

Do not execute cd command when using g:VimuxUseNearestPane = 1

I think it doesn't make sense to use execute the cd command (https://github.com/benmills/vimux/blob/master/plugin/vimux.vim#L273) when you have the option let g:VimuxUseNearestPane = 1.

I don't think this ever helped when using the nearest pane which usually is prepared already when you want to use it.

I have a quite common use case where this is bothering. I have prepared pry or some other console where I just want to send over some commands. Then the first time it sends over the cd command also.

Doesn't work

Untarred and placed in bundle directory for pathogen to pick it up. :PromptVimTmuxCommand errored. Copied the individual file to plugin directory and it still doesn't work.

Tmux 1.8 on OS X Mountain Lion.

Vimux and Janus

Added Vimux into the .janus folder like all of the other "3rd party" to Janus plugins along with the bindings and nothing. The submodule is getting updated when Janus is updated but doesn't seem to be actually pulled in when vim runs. Looks like a brilliant solution though!

The master doesn't work with 1.6

Ubuntu 12.04
tmux 1.6 - from official sources
vmux master branch

Expected pane created, but getting endless prompt in vim

Upgrading tmux to 1.8 solved issue

Causes Segfault

If I have the plugin installed, I'm segfaulting on a brand new Fedora 17 install

[kurt@jiko ~]$ vim --version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Aug 28 2012 13:51:38)
Included patches: 1-415, 417-638
[kurt@jiko ~]$ vim
Vim: Caught deadly signal SEGV
Vim: Finished.
Segmentation fault (core dumped)

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.