• Stars
    star
    99
  • Rank 343,315 (Top 7 %)
  • Language
    Go
  • License
    GNU Lesser Genera...
  • Created over 7 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Seamlessly navigate i3 windows and vim splits

i3-vim-nav

Seamlessly change focus between i3 windows and Vim splits using the same hotkey.

Installation

Dependencies

This depends on you having a couple packages installed. Most notably, xdotool/libxdo, the second of which should be installed as a dependency of the first. If you want to build the binary from source and you're on Fedora, you'll also need the libxdo-devel package. We also currently require you to be using a version of vim with either python or python3 support.

Vim plugin

First, install the Vim plugin.

Using vim-plug

In your .vimrc (vim) or .config/nvim/init.vim (neovim):

Plug 'termhn/i3-vim-nav'
	
" i3 integration
nnoremap <silent> <c-l> :call Focus('right', 'l')<CR>
nnoremap <silent> <c-h> :call Focus('left', 'h')<CR>
nnoremap <silent> <c-k> :call Focus('up', 'k')<CR>
nnoremap <silent> <c-j> :call Focus('down', 'j')<CR>

Using Pathogen

  1. cd ~/.vim/bundle
  2. git clone https://github.com/termhn/i3-vim-nav
  3. add the following to your .vimrc
" i3 integration
nnoremap <silent> <c-l> :call Focus('right', 'l')<CR>
nnoremap <silent> <c-h> :call Focus('left', 'h')<CR>
nnoremap <silent> <c-k> :call Focus('up', 'k')<CR>
nnoremap <silent> <c-j> :call Focus('down', 'j')<CR>

Binary

Next, install the binary on your PATH. If you have go installed, this can be done simply by

go get -u github.com/termhn/i3-vim-nav

If not, you can symlink the binary from its downloaded directory (this changes based on which plugin manager you used and if you're using vim or neovim) into /usr/local/bin. For example, if you used Pathogen on default Vim, this would be:

ln -s ~/.vim/bundle/i3-vim-nav/i3-vim-nav /usr/local/bin

Then, in your i3 config (adjust the path to the executable as necessary if you installed it differently). Feel free to change the key bind as you please.

bindsym --release $mod+h exec --no-startup-id "i3-vim-nav h"
bindsym --release $mod+j exec --no-startup-id "i3-vim-nav j"
bindsym --release $mod+k exec --no-startup-id "i3-vim-nav k"
bindsym --release $mod+l exec --no-startup-id "i3-vim-nav l"

Note: I've gotten a bug where in some installations of i3, it seems to not respect user $PATH additions, even though it seems to recognize them in the variable. If it doesn't work when placed in a user $PATH directory, try hard-coding the path to the binary in the exec commands.

More Repositories

1

ultraviolet

A wide linear algebra crate for games and graphics.
Rust
738
star
2

rayn

A small path tracing renderer written in Rust.
Rust
529
star
3

rendy-pbr

PBR rendering example/experiment with rendy
Rust
224
star
4

sdfu

Signed Distance Field Utilities
Rust
116
star
5

colstodian

An opinionated, practical color management library for games and graphics.
Rust
34
star
6

nano-rs

An implementation of Nano in Rust using Tokio
Rust
28
star
7

ggez_snake

Rust
25
star
8

cint

A lean, minimal, and stable set of types for color interoperation between crates in Rust.
Rust
19
star
9

CCBullet3D

An easy-to-use wrapper in the Cocos/Objective-C style to integrate the robust, C++ physics library "Bullet" with Cocos3D.
C++
16
star
10

gfx-hal-tutorial

Rust
15
star
11

hot

A mid-level Vulkan abstraction library for the experts and the masses.
Rust
10
star
12

rgba

Reasonably Good Bluetooth Audio - A tiny, inline Bluetooth audio receiver for IEMs.
8
star
13

rmpt2d

A 2d ray-marching path-tracer in Processing
Processing
7
star
14

luluu

A cute and smart arm warmer sleeve ^_^
Rust
6
star
15

CCBullet3D-Sample

Sample use of the CCBullet3D wrapper.
C++
5
star
16

giftrogue

Small roguelike in rust/tcod as part of a gift to someone.
Rust
4
star
17

rayn2d

Rust
4
star
18

dotfiles

My dotfiles managed by yadm
Lua
4
star
19

nanopow-rs-node

A JavaScript wrapper for nanopow-rs to provide fast, safe, fully multithreaded Nano proof-of-work generation in Node.js.
Rust
4
star
20

egui-color-picker-oklab

Rust
3
star
21

simple-rayn

A simple raytracing renderer written in Rust.
Rust
3
star
22

thunderclap

A ray marching experiment in Zig
C
3
star
23

nano-base32

A small, quick, self-contained implementation of the Base32 encoding/decoding scheme used by the cryptocurrency Nano.
JavaScript
3
star
24

linmath.zig

Small, computer-graphics focused linear algebra library for Zig
Zig
3
star
25

fu5ha

2
star
26

vsps

Casing & power supply design for VSPS (Very Simple Phono Stage) by RJM Audio
2
star
27

nanowarpwallet

A Nano brain wallet generator that uses scrypt.
JavaScript
2
star
28

p5.Asteroids

Asteroids implementation in p5.js
JavaScript
1
star
29

TicTacToe-Ruby

A simple, two-player, command-line Tic Tac Toe game.
Ruby
1
star
30

grayolson.me

JavaScript
1
star
31

graphics-experiments

C#
1
star
32

rust-toh

A simple, terminal-interface Towers of Hanoi simulator in Rust
Rust
1
star
33

CheckpointTitler

An OpenPlanet plugin to automatically update your Twitch stream title with your current checkpoint status when playing RPG or trial maps.
AngelScript
1
star