The i3 FAQ has migrated to All content here is read-only.
Ask Your Question


asked 2013-12-13 16:14:33 +0000

cg gravatar image

Hi, I just came across the autoswap_mac plugin for Vim by Damian Conway and was wondering if someone had already ported it to i3?

Short summary of what that plugin does (at least part of):

if you try to edit a file with Vim and it is already open in another Vim session in another terminal, it exits Vim and sets focus to the terminal containing the other Vim session.

If you search for OSCON 2013: "More Instantly Better Vim" - Damian Conway on YouTube you will get a better explanation by the author (from minute 12 on).

edit retag flag offensive close merge delete


Perhaps I can put the link in a comment, if not in the main post:

cg gravatar imagecg ( 2013-12-13 16:15:18 +0000 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2013-12-15 16:53:52 +0000

vandannen gravatar image

you can use, e.g., xdotoolto make it work with X, as you only need to change the detection of the active window and the focus switching. here is a diff:

edit flag offensive delete link more


thanks, but this doesn't bring the workspace in focus that window is on for me, I'll see if I can fix this in the next days (also: sorry cannot upvote you, for lack of karma)

cg gravatar imagecg ( 2013-12-17 14:21:36 +0000 )edit

oh, this seems to be a problem with xdotool, but it works with i3-msg. try this:

vandannen gravatar imagevandannen ( 2013-12-17 15:58:21 +0000 )edit

Question Tools

1 follower


Asked: 2013-12-13 16:14:33 +0000

Seen: 183 times

Last updated: Dec 15 '13