<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>tmux &#8211; Luxing Huang</title>
	<atom:link href="https://luxing.im/tag/tmux/feed/" rel="self" type="application/rss+xml" />
	<link>https://luxing.im</link>
	<description>Thoughs and things</description>
	<lastBuildDate>Wed, 22 May 2019 16:29:31 +0000</lastBuildDate>
	<language>en-CA</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
<site xmlns="com-wordpress:feed-additions:1">58771605</site>	<item>
		<title>tmux select then copy to clipboard</title>
		<link>https://luxing.im/tmux-select-then-copy/</link>
					<comments>https://luxing.im/tmux-select-then-copy/#comments</comments>
		
		<dc:creator><![CDATA[Luxing Huang]]></dc:creator>
		<pubDate>Sun, 25 Nov 2018 20:21:51 +0000</pubDate>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Techie Stuff]]></category>
		<category><![CDATA[clipboard]]></category>
		<category><![CDATA[paste]]></category>
		<category><![CDATA[tmux]]></category>
		<guid isPermaLink="false">https://luxing.im/?p=776</guid>

					<description><![CDATA[Using mouse to select text with tmux sometimes is inefficient. For my setup, I&#8217;ll have to press shift key during text selection and keyboard copy will convert empty line as spaces. The following 2 lines in the configuration file works with version 2.8 (latest at the time of writing). As I am using Linux, the &#8230; <p class="link-more"><a href="https://luxing.im/tmux-select-then-copy/" class="more-link">Continue reading<span class="screen-reader-text"> "tmux select then copy to clipboard"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>Using mouse to select text with tmux sometimes is inefficient. For my setup, I&#8217;ll have to press shift key during text selection and keyboard copy will convert empty line as spaces. The following 2 lines in the configuration file works with version 2.8 (latest at the time of writing).</p>
<p><span id="more-776"></span></p>
<p>As I am using Linux, the command line clipboard program is <code>xclip</code>. For mac users you need to use <code>pbcopy</code>.</p>
<p>Add those lines to your <code>~/.tmux.conf</code></p>
<pre>
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'y' send -X copy-pipe-and-cancel "xclip -i -sel c"
</pre>
<p>Now when you are on the select mode (<code>prefix+[</code>), hit v or space to start selecting. After, press y to yank lines to clipboard. You can paste it anywhere else.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://luxing.im/tmux-select-then-copy/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">776</post-id>	</item>
		<item>
		<title>Tmux configuration</title>
		<link>https://luxing.im/tmux-configuration/</link>
					<comments>https://luxing.im/tmux-configuration/#respond</comments>
		
		<dc:creator><![CDATA[Luxing Huang]]></dc:creator>
		<pubDate>Fri, 30 Jan 2015 13:16:31 +0000</pubDate>
				<category><![CDATA[Techie Stuff]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[tmux]]></category>
		<guid isPermaLink="false">https://luxing.im/?p=457</guid>

					<description><![CDATA[Tmux is a terminal multiplexer, the main feature of it for me is to split window side by side, one for doing debugging, the other for coding. I know there are some substitutions available, such as konsole and terminator but I find tmux handy. I&#8217;ve customed some configuration that happens to be useful for me. &#8230; <p class="link-more"><a href="https://luxing.im/tmux-configuration/" class="more-link">Continue reading<span class="screen-reader-text"> "Tmux configuration"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>Tmux is a terminal multiplexer, the main feature of it for me is to split window side by side, one for doing debugging, the other for coding. I know there are some substitutions available, such as konsole and terminator but I find tmux handy.</p>
<p><span id="more-457"></span></p>
<p>I&#8217;ve customed some configuration that happens to be useful for me. I will add comments about them below it.</p>
<pre>
unbind C-b
set -g prefix C-w
</pre>
<p>I have removed the default Ctrl+b key binding and made it to ctrl+w.</p>
<pre>
set -g default-terminal "screen-256color"
set -g status-utf8 on
set-option -g default-shell /bin/zsh
</pre>
<p>Charset and terminal colour setting.</p>
<pre>
#up
bind-key k select-pane -U
#down
bind-key j select-pane -D
#left
bind-key h select-pane -L
#right
bind-key l select-pane -R
</pre>
<p>With these settings done, when switching window, all I should do is ctrl+w+[kjhl]. Vim user, sound familiar?</p>
<p>Of course I&#8217;ve already set the vim keys to ctrl+[kjhl] so it&#8217;s not &#8220;conflicted&#8221; with the tmux key combination.</p>
<pre>
setw -g mode-keys vi
</pre>
<p>Enable vim mode.</p>
<pre>
bind '"' split-window -c "#{pane_current_path}"
bind '%' split-window -h -c "#{pane_current_path}"
</pre>
<p>When split window, create a shell session under the folder of the split session.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://luxing.im/tmux-configuration/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">457</post-id>	</item>
	</channel>
</rss>
