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

Can't Get Vimux To Work #24

Closed
drewrockshard opened this issue Jun 4, 2012 · 19 comments
Closed

Can't Get Vimux To Work #24

drewrockshard opened this issue Jun 4, 2012 · 19 comments

Comments

@drewrockshard
Copy link

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

@benmills
Copy link
Collaborator

benmills commented Jun 4, 2012

I also use pathogen and I believe you have to install plugins under ~/.vim/bundle not bundles. The pathogen README also seems to reference bundle.

Besides that can you give me the output of ls ~/.vim/bundles/vimux just so we can confirm that there isn't an extra folder that the plugin code isn't inside of? Also how are you calling RunVimTmuxCommand? You need to use run it like this: :call RunVimTmuxCommand("ls").

Let me know if either of those things work for you or if you're still having problems.

@drewrockshard
Copy link
Author

@benmills:

Sorry for my gramatial error, so yes, they are actually in ~/.vim/bundle:

ddecker@tangerine:~$ ls -l ~/.vim/
total 8
drwxrwxr-x 2 ddecker ddecker 4096 Jun  4 00:04 autoload
drwxrwxr-x 4 ddecker ddecker 4096 Jun  4 02:06 bundle

Here's my directory structures:

ddecker@tangerine:~$ ls -l ~/.vim/bundle/
total 8
drwxr-xr-x 7 ddecker ddecker 4096 Jun  4 00:26 vim-powerline
drwxr-xr-x 5 ddecker ddecker 4096 Jun  4 11:21 vimux
ddecker@tangerine:~$ ls -l ~/.vim/bundle/vimux/
total 12
drwxrwxr-x 2 ddecker ddecker 4096 Jun  4 11:21 doc
drwxrwxr-x 2 ddecker ddecker 4096 Jun  4 11:21 plugin
-rw-rw-r-- 1 ddecker ddecker 2029 Jun  4 11:21 README.mkd

By the way, I call the function like so:

:call RunVimTmuxCommand("ls")

@benmills
Copy link
Collaborator

benmills commented Jun 4, 2012

That's strange. Could you give me the version of ruby you're using and what flags it's compiled with. Also the version of ruby you're using.

@drewrockshard
Copy link
Author

@benmills

Thanks for the response. Here's the info you requested:

ddecker@tangerine:~$ ruby -v && ruby -r rbconfig -e 'puts Config::CONFIG["configure_args"]';
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
 '--build=x86_64-linux-gnu' '--prefix=/usr' '--includedir=/usr/include' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sysconfdir=/etc
' '--localstatedir=/var' '--libexecdir=/usr/lib/ruby1.8' '--srcdir=.' '--disable-maintainer-mode' '--disable-dependency-tracking' '--disable-sil
ent-rules' '--program-suffix=1.8' '--enable-pthread' '--enable-shared' '--enable-ipv6' '--disable-rpath' '--disable-install-doc' '--with-sitedir
=/usr/local/lib/site_ruby' '--with-default-kcode=none' '--with-dbm-type=gdbm_compat' '--with-tklib=tk8.4' '--with-tcllib=tcl8.4' '--with-tcl-inc
lude=/usr/include/tcl8.4' '--with-bundled-sha1' '--with-bundled-md5' '--with-bundled-rmd160' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-fno-strict-
aliasing -g -g -O2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'
ddecker@tangerine:~$ 

@drewrockshard
Copy link
Author

Ben:

Were you able to take a look at this today?

@benmills
Copy link
Collaborator

benmills commented Jun 7, 2012

@drewrockshard sorry I haven't been able to look at this yet, I'm currently traveling.

Your ruby version seems correct. It seems strange that vim is not even loading the plugin. One other path to debug this issue is move ~/.vim/bundle/vimux/plugin/vimux.vim into ~/.vim/plugin just to see if the issue is related to pathogen.

@drewrockshard
Copy link
Author

Ben:

Just let me know when you have time to debug the issue. By following your instructions, I moved ~/.vim/bundle/vimux/plugin/vimux.vim into ~/.vim/plugin and I get the same error.

@zaiste
Copy link

zaiste commented Jun 7, 2012

@drewrockshard post a link to your vimrc; it will help diagnose your issue

@drewrockshard
Copy link
Author

Here's my .vimrc:

"-- General --
set ruler               "Show the line and column number of the cursor position
set nocompatible                " Disable vi-compatibility
set nocp
set laststatus=2                " Always show the statusline
set encoding=utf-8              " Necessary to show unicode glyphs

"-- Pathogen --
call pathogen#infect()

"-- Cursors --
highlight Cursor guifg=white guibg=black
highlight iCursor guifg=white guibg=black
set guicursor=n-v-c:block-Cursor
set guicursor+=i:ver100-iCursor
set guicursor+=n-v-c:blinkoff0
set guicursor+=i:blinkwait10

"-- Programming --
syntax on

"-- Spaces/Tabs --
set noexpandtab         "Strictly use tabs when tab is pressed (this is the default)
set shiftwidth=4
set tabstop=4

"-- Searching --
set hlsearch            "Highlight search results
set incsearch                   " Search while typing
set ignorecase          "When doing a search, ignore the case of letters
set smartcase           "Override the ignorecase option if the search pattern contains upper case letters
"Clear the search highlight by pressing ENTER when in Normal mode (Typing commands)
:nnoremap <CR> :nohlsearch<CR>/<BS><CR>

"-- Tabbed Editing --
"Open a new (empty) tab by pressing CTRL-T. Prompts for name of file to edit
map <C-T> :tabnew<CR>:edit
"Open a file in a new tab by pressing CTRL-O. Prompts for name of file to edit
map <C-O> :tabfind
"Switch between tabs by pressing Shift-Tab
map <S-Tab> gt

"-- Tweaks --
"Add tweak for better backspace support
set backspace=indent,eol,start
" Remember cursor location
autocmd BufReadPost *
    \ if line("'\"") > 1 && line("'\"") <= line("$") |
    \   exe "normal! g`\"" |
    \ endif

@zaiste
Copy link

zaiste commented Jun 8, 2012

@drewrockshard

  1. how do you run vim ?
  2. do you see any error during vim startup ?
  3. what's the output of head ~/.vim/autoload/pathogen.vim

@drewrockshard
Copy link
Author

@zaiste

Thanks for the reply.

  1. I run vim as vi - there is an alias set up:
ddecker@ubuntu-ddecker:~$ alias | grep vi
alias vi='vim'
  1. No errors during vim startup.
  2. Here's the pathogen information you wanted:
ddecker@ubuntu-ddecker:~$ head ~/.vim/autoload/pathogen.vim
" pathogen.vim - path option manipulation
" Maintainer:   Tim Pope <http://tpo.pe/>
" Version:      2.0

" Install in ~/.vim/autoload (or ~\vimfiles\autoload).
"
" For management of individually installed plugins in ~/.vim/bundle (or
" ~\vimfiles\bundle), adding `call pathogen#infect()` to your .vimrc
" prior to `filetype plugin indent on` is the only other setup necessary.
"

@zaiste
Copy link

zaiste commented Jun 11, 2012

@drewrockshard Is any other plugin (among installed) working ? It looks like it is not related to Vimux.

@drewrockshard
Copy link
Author

@zaiste

Yes, I have a few plugins that work just fine, such as vim-powerline. I'm using pathogen.

@drewrockshard
Copy link
Author

@benmills

Have you had a chance to look into this? By the way, I'm using Ubuntu 12.04.

@drewrockshard
Copy link
Author

@benmills / @zaiste

I finally figure this out! Ben, I think you need to update your docs and/or your readme. While I have the correct version of Ruby on my system, a valid version of VIM, and a valid pathogen installation, it still wouldn't work. So, what I did was try to install even more plugins and your plugin was the only one that seems to not work. After looking closer to what I had been installing, it appears that vimux was the only one that had some Ruby code involved.

I'm using Ubuntu 12.04 and after installation I usually install the vim package (sudo apt-get install vim). Unfortunately, the regular vim package ships with NO RUBY SUPPORT. What a bummer and a simple overlooked item. Anyways, to resolve the issue, you have to (on Ubuntu) install vim-nox (sudo apt-get install vim-nox) - which apparently is the version that "contains a version of vim compiled with support for
scripting with Lua, Perl, Python, Ruby, and Tcl but no GUI."
.

To verify if Ruby is compiled into your version of vim just run vim --version | grep -i ruby - you should see something like +ruby - if not, you would get -ruby.

So, moral of the story is - "Make sure your VIM installation has Ruby support".

@benmills
Copy link
Collaborator

Ahh that makes a lot of sense. I'll make sure to clarify that your vim installation has ruby support. On top of that I'm going to look into generating some meaningful error message when vimux is loaded into a vim without ruby support. Right now I just stop the script from being loading completely[1] when I could raise an error so users can see exactly what is going wrong.

Another long term goal I have is to rewrite vimux in pure vimscript so it can be used with any vim installation. I'm glad you figured out the issue on your end and I'll leave this issue open until I update the docs.

[1] https://github.com/benmills/vimux/blob/master/plugin/vimux.vim#L6-8

@drewrockshard
Copy link
Author

@benmills - Great; sounds good.

@orpheuslummis
Copy link

I ran into the same issue a few minutes ago, had to go read the source to understand why the functions were not found.

Implementing vimux in vimscript is a great idea, although the process will be painful. Best of lucks with this. In the meanwhile, I'd be good to specify that vimux needs ruby support in the README.

@ghost
Copy link

ghost commented Sep 8, 2015

I have installed vimux using vundle but it's not working. When i try execute the command
:help vimux
it says Sorry, no help for Vimux

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

No branches or pull requests

4 participants