Coder Social home page Coder Social logo

i3-vim-focus's People

Contributors

cjen1 avatar jwilm avatar max-b 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

Watchers

 avatar  avatar  avatar  avatar

i3-vim-focus's Issues

i3-vim-focus: command not found

Followed the instructions by adding the settings in .vimrc, .bashrc and compiled the rust package.

$ cd ~/.vim/bundle/i3-vim-focus/i3-vim-focus/src
$ i3-vim-focus left
-bash: i3-vim-focus: command not found

Not an issue :) rather potential improvement

First of I want to thank you for this wonderful plugin! It does the job perfectly and I am super happy with it.

I ran into an interesting situation today.
I had to run VIM on remote server, which I was connected to via SSH with X forwarding.
When I tried to move away from my remote VIM instance I got stuck.

The reason for that is that i3-msg was executing on remote host and could not do IPC communication via socket that was opened on my local machine.
This happens because VIM part of the plugin executes on whatever host VIM is running, in my case remote host.

And so I was thinking and realized that you don't really need VIM plugin portion at all, rather you can replace it with something like this in your rust program:

        let remoteexpr = format!(
            "execute('exe \"let oldw = winnr() | wincmd {} | let neww = winnr() | echo oldw - neww \"')",
            direction.to_vim_direction()
            );

        let vim_result = 
            Command::new(&vim) // XXX hard-coded path
            .args(&["--servername", &servername[..], "--remote-expr", &remoteexpr[..]])
            .stdout(Stdio::piped())
            .output()
            .expect("ran vim command")
            .stdout;

        let vim_window_diff : i32 =
            String::from_utf8(vim_result)
            .unwrap()
            .trim()
            .parse()
            .unwrap();
            
        if vim_window_diff != 0 {
            return;
        }

And now based on the vim_window_diff you either done or you falling through to call i3 from rust program.
This way i3 part always executes on the hosts where i3 is running.

Not working, what to try?

Hi!

Unfortunately it doesn't seem to work on my configuration.

I made sure to have the vim bindings configured (`gw+direction) as well as setting the window name to VIM (set titlestring=VIM). I also have the bindings on i3 config, and my vim is compiled with python support.

Anything else I could check/try?

Thanks!
Antonio

/usr/bin/ld: cannot find -lxdo

Hi

$ cd ~/.vim/bundle/i3-vim-focus/i3-vim-focus
$ cargo build --release

Returns

  = note: /usr/bin/ld: cannot find -lxdo
          collect2: error: ld returned 1 exit status
          

error: aborting due to previous error

error: Could not compile `i3-vim-focus`.

Stops working if vim is focused

Hi

As soon as vim/gvim gets focus, the function stops working. Any idea what else I could try?

My .vimrc

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"                                  Plugins                                   "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set rtp+=~/.vim/bundle/Vundle.vim " set the runtime path to include Vundle and initialize
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'     " let Vundle manage Vundle, required
                                  " Keep Plugin commands between vundle#begin/end.
                                  " plugin on GitHub repo
Plugin 'jwilm/i3-vim-focus'
" Put your non-Plugin stuff after this line
call vundle#end()            " required
filetype plugin indent on    " required
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"                               PluginSettings                               "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"" i3/vim navigation
map gwl :call Focus('right', 'l')<CR>
map gwh :call Focus('left', 'h')<CR>
map gwk :call Focus('up', 'k')<CR>
map gwj :call Focus('down', 'j')<CR>

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.