<?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 🍃 - Vim</title>
    <link>https://emresahin.net/tags/vim/</link>
    <description>Posts in the Vim 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/vim/rss.xml" rel="self" type="application/rss+xml"/>
    <item>
      <title>bits 12</title>
      <published>2024-08-12T09:50:51+00:00</published>
      <updated>2024-08-12T09:50:51+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Mon, 12 Aug 2024 09:50:51 +0000</pubDate>
      <link>https://emresahin.net/bits-12/</link>
      <guid isPermaLink="true">https://emresahin.net/bits-12/</guid>
      <description>I decided I needed a random colorscheme selector for those moments when you want to change things up but don’t want to make a specific choice. LazyVim already has &lt;leader&gt;uC for selecting a colorscheme, but it can be too mentally taxing as it requires you to manually select one. This script simpl...</description>
      <category>neovim</category>
      <category>productivity</category>
      <category>colorscheme</category>
      <category>random</category>
      <category>neovim</category>
      <category>lua</category>
      <category>vim</category>
      <content:encoded><![CDATA[<p>I decided I needed a random colorscheme selector for those moments when you want to change things up but don’t want to make a specific choice. LazyVim already has <code>&lt;leader&gt;uC</code> for selecting a colorscheme, but it can be too <em>mentally taxing</em> as it requires you to manually <em>select</em> one. This script simply switches to a random one.</p>
<p><code>RandomColorScheme</code> returns the name of a random colorscheme after searching through all available paths. <code>SetRandomColorScheme</code> sets the colorscheme to that choice. The keybinding is mapped to <code>&lt;leader&gt;uR</code>.</p>
<pre><code class="language-lua">function RandomColorScheme()
  local color_schemes = vim.fn.globpath(vim.o.rtp, "colors/*.vim", false, true)
  for i, fullpath in ipairs(color_schemes) do
    color_schemes[i] = fullpath:match(".*/(.*).vim$")
  end

  -- Generate a random index
  local index = math.random(#color_schemes)

  local random_color_scheme = color_schemes[index]

  vim.notify("Random Color Scheme: " .. random_color_scheme)
  -- Select a random color scheme
  return random_color_scheme
end

function SetRandomColorScheme()
  vim.cmd("colorscheme " .. RandomColorScheme())
end

vim.api.nvim_set_keymap("n", "&lt;leader&gt;uR", ":lua SetRandomColorScheme()&lt;CR&gt;", { noremap = true, silent = true })
</code></pre>]]></content:encoded>
    </item>
    <item>
      <title>TIL 11: Unhide Markdown Code Block Types in LazyVim</title>
      <published>2024-02-26T10:22:29+00:00</published>
      <updated>2024-02-26T10:22:29+00:00</updated>
      <author>Emre Şahin</author>
      <pubDate>Mon, 26 Feb 2024 10:22:29 +0000</pubDate>
      <link>https://emresahin.net/til-11/</link>
      <guid isPermaLink="true">https://emresahin.net/til-11/</guid>
      <description>To unhide Markdown code block types in LazyVim, you can set the conceallevel to 0 . Add the following to your configuration: vim.opt.conceallevel = 0</description>
      <category>Software Development</category>
      <category>Vim</category>
      <category>LazyVim</category>
      <category>Markdown</category>
      <category>Lua</category>
      <category>Neovim</category>
      <content:encoded><![CDATA[<p>To unhide Markdown code block types in LazyVim, you can set the <code>conceallevel</code> to <code>0</code>.</p>
<p>Add the following to your configuration:</p>
<pre><code class="language-lua">vim.opt.conceallevel = 0
</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>
  </channel>
</rss>
