<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>emre şahin's digital garden 🍃 - Configuration</title>
    <link>https://emresahin.net/tags/configuration/</link>
    <description>Posts in the Configuration tag</description>
    <language>en</language>
    <managingEditor>contact@emresahin.net (Emre Şahin)</managingEditor>
    <lastBuildDate>Tue, 15 Sep 2026 19:46:32 +0000</lastBuildDate>
    <atom:link href="https://emresahin.net/tags/configuration/rss.xml" rel="self" type="application/rss+xml"/>
    <item>
      <title>Nushell $env.PATH in tmux</title>
      <published>2025-05-30T16:09:29+00:00</published>
      <updated>2025-05-30T16:09:29+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Fri, 30 May 2025 16:09:29 +0000</pubDate>
      <link>https://emresahin.net/nushell--env-path-in-tmux/</link>
      <guid isPermaLink="true">https://emresahin.net/nushell--env-path-in-tmux/</guid>
      <description>I noticed that when I use: set -g default-shell nu in .tmux.conf to specify Nushell as the shell, it doesn’t load $env.PATH . It is necessary to specify the shell with: set -g default-command nu -l (using the full path to nu ) to ensure the shell reads your configuration file.</description>
      <category>Shell</category>
      <category>Nushell</category>
      <category>Tmux</category>
      <category>Terminal</category>
      <category>Configuration</category>
      <content:encoded><![CDATA[<p>I noticed that when I use:</p>
<pre><code class="language-tmux">set -g default-shell nu
</code></pre>
<p>in <code>.tmux.conf</code> to specify Nushell as the shell, it doesn’t load <code>$env.PATH</code>. It is necessary to specify the shell with:</p>
<pre><code class="language-tmux">set -g default-command nu -l
</code></pre>
<p>(using the full path to <code>nu</code>) to ensure the shell reads your configuration file.</p>]]></content:encoded>
    </item>
    <item>
      <title>devlog 24</title>
      <published>2025-04-24T02:54:54+00:00</published>
      <updated>2025-04-24T02:54:54+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Thu, 24 Apr 2025 02:54:54 +0000</pubDate>
      <link>https://emresahin.net/devlog-24/</link>
      <guid isPermaLink="true">https://emresahin.net/devlog-24/</guid>
      <description>🐇 Is there a way to implement Default for CLI structs? 🐢 There is a way if we start from the configuration, not just files. The default configuration is a TOML document. We can make it an XvcConfiguration struct and load and store it with confy . 🐇 We have a cascading set of configurations, but m...</description>
      <category>XVC</category>
      <category>Development</category>
      <category>XVC</category>
      <category>Rust</category>
      <category>Configuration</category>
      <category>confy</category>
      <category>CLI</category>
      <content:encoded><![CDATA[<p>🐇 Is there a way to implement <code>Default</code> for CLI structs?</p>
<p>🐢 There is a way if we start from the configuration, not just files. The default
configuration is a TOML document. We can make it an <code>XvcConfiguration</code> struct and
load and store it with <code>confy</code>.</p>
<p>🐇 We have a cascading set of configurations, but maybe we can start from the
struct and serialize/deserialize it on demand.</p>
<p>🐲 I don’t think we need to update <code>xvc-config</code> at the moment. It’s working, and
we don’t need to alter its inner workings in the near future.</p>
<p>🐢 I agree. We can use the <a href="https://docs.rs/config/"><code>config</code></a> crate when we need to update and have
enough time to work on this.</p>]]></content:encoded>
    </item>
    <item>
      <title>Global .gitignore</title>
      <published>2023-10-17T13:11:34+00:00</published>
      <updated>2023-10-17T13:11:34+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Tue, 17 Oct 2023 13:11:34 +0000</pubDate>
      <link>https://emresahin.net/gitignore_global/</link>
      <guid isPermaLink="true">https://emresahin.net/gitignore_global/</guid>
      <description>You can configure a global .gitignore file to ignore files or directories (e.g., .vscode/ ) in all your repositories. Write it as a standard .gitignore file and save it somewhere, like ~/.gitignore_global . Then, you can use the following configuration to set this as an excludes file : git config...</description>
      <category>til</category>
      <category>git</category>
      <category>git</category>
      <category>configuration</category>
      <category>tips</category>
      <content:encoded><![CDATA[<p>You can configure a global <code>.gitignore</code> file to ignore files or directories (e.g., <code>.vscode/</code>) in all your repositories. Write it as a standard <code>.gitignore</code> file and save it somewhere, like <code>~/.gitignore_global</code>. Then, you can use the following configuration to set this as an <em>excludes file</em>:</p>
<pre><code class="language-bash">git config --global core.excludesfile ~/.gitignore_global
</code></pre>
<p>Note that the path given to <code>git config</code> should be an absolute path.</p>]]></content:encoded>
    </item>
    <item>
      <title>Feature flags in Rust</title>
      <published>2022-10-01T14:09:00+00:00</published>
      <updated>2022-10-01T14:09:00+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Sat, 01 Oct 2022 14:09:00 +0000</pubDate>
      <link>https://emresahin.net/Feature-flags-in-Rust/</link>
      <guid isPermaLink="true">https://emresahin.net/Feature-flags-in-Rust/</guid>
      <description>Rust allows you to define feature flags to compile certain parts of a binary conditionally. The Cargo Book has an extensive section on them. The Cargo.toml file can have a [features] section. In this section, features can be defined, and they can enable other features. [features] my-feature = [] ...</description>
      <category>Rust</category>
      <category>Software Development</category>
      <category>Rust</category>
      <category>Cargo</category>
      <category>Feature Flags</category>
      <category>Conditional Compilation</category>
      <category>Configuration</category>
      <content:encoded><![CDATA[<p>Rust allows you to define feature flags to compile certain parts of a binary conditionally.
The Cargo Book has an extensive <a href="https://doc.rust-lang.org/cargo/reference/features.html">section</a> on them.</p>
<p>The <code>Cargo.toml</code> file can have a <code>[features]</code> section.
In this section, features can be defined, and they can enable other features.</p>
<pre><code class="language-toml">[features]
my-feature = []
another-feature = ["my-feature"]
</code></pre>
<p>These markers are used in the code as follows:</p>
<pre><code class="language-rust">
#[cfg(feature = "my-feature")]
pub mod my_module;
</code></pre>
<p>The default features are listed under the <code>default</code> key of the <code>[features]</code> section.
If it’s not defined, it’s considered empty, so <code>cargo build</code> supplies no features to the build system by default.</p>
<p>If you don’t want <code>default</code> features added automatically, you can use the <code>--no-default-features</code> option with <code>cargo</code>.</p>
<p>Starting from Rust 1.60, dependencies can be tied to features.
When you define a dependency in the <code>[dependencies]</code> section, add <code>optional = true</code> to its options. Then, in <code>[features]</code>, use the <code>dep:package</code> syntax.</p>
<pre><code class="language-toml">
[dependencies]

pack = { version = "1.0", optional = true }

[features]

my-feature = ["dep:pack"]
</code></pre>
<p>This way, Cargo doesn’t compile <code>pack</code> if <code>my-feature</code> is not enabled.</p>
<p>A caveat to using features is that they should be additive.
There shouldn’t be a <code>no-std</code> feature to remove the standard library dependency; instead, you should define a <code>std</code> feature and enable it by default.
The reason behind this is that Cargo ensures there is a single copy of a package with <em>all</em> the requested features enabled for the entire dependency graph.
If you have a <code>no-x</code> feature that removes functionality, it breaks the additive logic of Cargo’s feature resolution.</p>]]></content:encoded>
    </item>
    <item>
      <title>Activate left window when the current one is closed in tmux</title>
      <published>2022-02-16T07:08:25+00:00</published>
      <updated>2022-02-16T07:08:25+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Wed, 16 Feb 2022 07:08:25 +0000</pubDate>
      <link>https://emresahin.net/Activate-left-window-when-the-current-one-is-closed-in-tmux/</link>
      <guid isPermaLink="true">https://emresahin.net/Activate-left-window-when-the-current-one-is-closed-in-tmux/</guid>
      <description>When I close a window in tmux, it typically activates the window to its right. I prefer the previously active window to be activated instead. I couldn’t find a direct setting for this, but tmux provides hooks for various events. By setting the window-unlinked hook to trigger last-window , I can a...</description>
      <category>CLI</category>
      <category>Tools</category>
      <category>tmux</category>
      <category>configuration</category>
      <category>hooks</category>
      <category>productivity</category>
      <content:encoded><![CDATA[<p>When I close a window in tmux, it typically activates the window to its right. I
prefer the previously active window to be activated instead. I couldn’t find a
direct setting for this, but tmux provides <a href="https://man7.org/linux/man-pages/man1/tmux.1.html#HOOKS">hooks</a>
for various events. By setting the <code>window-unlinked</code> hook to trigger <code>last-window</code>,
I can achieve the desired behavior.</p>
<p>Add the following to your <code>.tmux.conf</code>:</p>
<pre><code class="language-conf">set-hook -g window-unlinked 'last-window'
</code></pre>]]></content:encoded>
    </item>
    <item>
      <title>Configuring Vim Undotree</title>
      <published>2021-01-02T16:16:59+00:00</published>
      <updated>2021-01-02T16:16:59+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Sat, 02 Jan 2021 16:16:59 +0000</pubDate>
      <link>https://emresahin.net/configuring-vim-undotree/</link>
      <guid isPermaLink="true">https://emresahin.net/configuring-vim-undotree/</guid>
      <description>To enable persistent undo and configure the undotree plugin, add the following settings to your vimrc file: " Save undo trees in files set undofile set undodir=~/.vim/undo " Number of undo levels saved set undolevels=10000 For more information on intermediate Vim usage, see this guide .</description>
      <category>Vim</category>
      <category>Tools</category>
      <category>Vim</category>
      <category>Undotree</category>
      <category>Productivity</category>
      <category>Configuration</category>
      <category>Vimrc</category>
      <content:encoded><![CDATA[<p>To enable persistent undo and configure the <a href="https://github.com/mbbill/undotree">undotree</a> plugin, add the following settings to your <code>vimrc</code> file:</p>
<pre><code class="language-vim">" Save undo trees in files
set undofile
set undodir=~/.vim/undo

" Number of undo levels saved
set undolevels=10000
</code></pre>
<p>For more information on intermediate Vim usage, see <a href="https://thevaluable.dev/vim-intermediate/">this guide</a>.</p>]]></content:encoded>
    </item>
    <item>
      <title>Syncing IdeaVim with the System Clipboard</title>
      <published>2018-02-14T10:15:21+00:00</published>
      <updated>2018-02-14T10:15:21+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Wed, 14 Feb 2018 10:15:21 +0000</pubDate>
      <link>https://emresahin.net/ideavim-to-use-system-clipboard-14093-73034/</link>
      <guid isPermaLink="true">https://emresahin.net/ideavim-to-use-system-clipboard-14093-73034/</guid>
      <description>I began using the IdeaVim plugin for Android Studio some time ago. It is a great tool, but as a Vim newbie, I was not aware that Vim does not use the system clipboard (Windows, macOS, Linux, etc.) for copy and paste operations by default. As a result, when you use the y (yank) command in IdeaVim,...</description>
      <category>til</category>
      <category>vim</category>
      <category>ideavim</category>
      <category>jetbrains</category>
      <category>clipboard</category>
      <category>configuration</category>
      <content:encoded><![CDATA[<p>I began using the <a href="https://github.com/JetBrains/ideavim">IdeaVim</a> plugin for Android Studio some time ago. It is a great tool, but as a Vim newbie, I was not aware that Vim does not use the system clipboard (Windows, macOS, Linux, etc.) for copy and paste operations by default. As a result, when you use the <code>y</code> (yank) command in IdeaVim, the text is not available to paste into other applications.</p>
<p>The solution is simple: add the following line to your <code>~/.ideavimrc</code> file:</p>
<pre><code class="language-vim">set clipboard+=unnamed
</code></pre>]]></content:encoded>
    </item>
  </channel>
</rss>
