big update
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>12. Ještě lepší Neovim s Zellij terminálovým multiplexorem - 🚀 ApolloNvim</title>
|
||||
<title>Even better Neovim with Zellij terminal multiplexer - 🚀 ApolloNvim</title>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
@ -89,7 +89,7 @@
|
||||
</li>
|
||||
<li class="drac-box">
|
||||
<a href="../../.."
|
||||
class="
|
||||
class=" active
|
||||
drac-anchor btn-toggle d-inline-flex align-items-center border-0 drac-text-purple--hover collapsed"
|
||||
data-bs-toggle="collapse" data-bs-target="#📑-tutorials-collapse" aria-expanded="false">
|
||||
📑 Tutorials
|
||||
@ -128,6 +128,110 @@
|
||||
Telescope
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="drac-box-ternary">
|
||||
<a href="../05.%20Barevn%C3%A9%20sch%C3%A9ma/"
|
||||
class="
|
||||
drac-anchor d-inline-flex align-items-center border-0 drac-text-purple--hover">
|
||||
Color scheme
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="drac-box-ternary">
|
||||
<a href="../06.%20Autosave/"
|
||||
class="
|
||||
drac-anchor d-inline-flex align-items-center border-0 drac-text-purple--hover">
|
||||
Automatic saving
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="drac-box-ternary">
|
||||
<a href="../07.%20Kop%C3%ADrov%C3%A1n%C3%AD%20a%20Vkl%C3%A1d%C3%A1n%C3%AD%20do%20a%20z%20Neovim%20z%20extern%C3%ADch%20zdroj%C5%AF/"
|
||||
class="
|
||||
drac-anchor d-inline-flex align-items-center border-0 drac-text-purple--hover">
|
||||
Copying and Pasting to and from Neovim from external sources
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="drac-box-ternary">
|
||||
<a href="../08.%20Markdown_syntax/"
|
||||
class="
|
||||
drac-anchor d-inline-flex align-items-center border-0 drac-text-purple--hover">
|
||||
Markdown_syntax
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="drac-box-ternary">
|
||||
<a href="../09.%20init.vim%20z%C3%A1kladn%C3%AD%20nastaven%C3%AD/"
|
||||
class="
|
||||
drac-anchor d-inline-flex align-items-center border-0 drac-text-purple--hover">
|
||||
init.vim basic settings
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="drac-box-ternary">
|
||||
<a href="../10.%20vim-fugitive%20ovl%C3%A1dni%20Git%20v%20Neovim/"
|
||||
class="
|
||||
drac-anchor d-inline-flex align-items-center border-0 drac-text-purple--hover">
|
||||
vim-fugitive
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="drac-box-ternary">
|
||||
<a href="../11.%20Gitsigns%20drobn%C3%A9%20vylep%C5%A1en%C3%AD%20git%20v%20Neovim/"
|
||||
class="
|
||||
drac-anchor d-inline-flex align-items-center border-0 drac-text-purple--hover">
|
||||
Gitsigns minor improvements to git in Neovim
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="drac-box-ternary">
|
||||
<a href="./"
|
||||
class=" active
|
||||
drac-anchor d-inline-flex align-items-center border-0 drac-text-purple--hover">
|
||||
Even better Neovim with Zellij terminal multiplexer
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="drac-box-ternary">
|
||||
<a href="../13.%20Pou%C5%BE%C3%ADv%C3%A1n%C3%AD%20relativn%C3%ADch%20%C4%8D%C3%ADsel%20%C5%99%C3%A1dk%C5%AF/"
|
||||
class="
|
||||
drac-anchor d-inline-flex align-items-center border-0 drac-text-purple--hover">
|
||||
Using relative line numbers
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="drac-box-ternary">
|
||||
<a href="../15.%20Jak%20na%20kop%C3%ADrov%C3%A1n%C3%AD%20a%20vkl%C3%A1d%C3%A1n%C3%AD/"
|
||||
class="
|
||||
drac-anchor d-inline-flex align-items-center border-0 drac-text-purple--hover">
|
||||
How to copy and paste
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="drac-box-ternary">
|
||||
<a href="../17.%20Jak%20opravit%20nefunk%C4%8Dn%C3%AD%20Prettier/"
|
||||
class="
|
||||
drac-anchor d-inline-flex align-items-center border-0 drac-text-purple--hover">
|
||||
How to fix a broken Prettier
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="drac-box-ternary">
|
||||
<a href="../18.%20Konfigurace%20Lua/"
|
||||
class="
|
||||
drac-anchor d-inline-flex align-items-center border-0 drac-text-purple--hover">
|
||||
Configuring plagin in Lua file
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="drac-box-ternary">
|
||||
<a href="../20.%20N%C3%A1hledy%20markdown%20v%20nvim/"
|
||||
class="
|
||||
drac-anchor d-inline-flex align-items-center border-0 drac-text-purple--hover">
|
||||
How to show markdown preview in browser using coc-webview
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
@ -163,6 +267,22 @@
|
||||
<!-- block preview -->
|
||||
<li class="nav-item">
|
||||
|
||||
<div class="container">
|
||||
<div class="row row-preview">
|
||||
<div class="col">
|
||||
<a href="../11.%20Gitsigns%20drobn%C3%A9%20vylep%C5%A1en%C3%AD%20git%20v%20Neovim/"
|
||||
class="btn-preview drac-btn drac-btn-outline drac-text-white drac-text-cyan-green--hover">
|
||||
<i class="fa fa-arrow-left"></i> Previous
|
||||
</a>
|
||||
</div>
|
||||
<div class="col">
|
||||
<a href="../13.%20Pou%C5%BE%C3%ADv%C3%A1n%C3%AD%20relativn%C3%ADch%20%C4%8D%C3%ADsel%20%C5%99%C3%A1dk%C5%AF/"
|
||||
class="btn-preview drac-btn drac-btn-outline drac-text-white drac-text-cyan-green--hover" style="padding-left: 3%;">
|
||||
Next <i class="fa fa-arrow-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<!-- endblock -->
|
||||
|
||||
@ -193,45 +313,44 @@
|
||||
<!-- block content -->
|
||||
<section class="p-md-5 section-content">
|
||||
<article>
|
||||
<p><h1 id="12-jeste-lepsi-neovim-s-zellij-terminalovym-multiplexorem">12. Ještě lepší Neovim s Zellij terminálovým multiplexorem</h1>
|
||||
<p>Co mi chybí na Neovim, je způsob, jak z něj zavolat terminál a otevřít terminál (druhé okno terminálu pod oknem s Neovim, viz obrázek) stejnou cestou, na kterém pracuji.</p>
|
||||
<p>Abych toho dosáhl, používám <a href="https://zellij.dev/" target="_blank">Zellij</a> , což je terminálový multiplexor.</p>
|
||||
<h2 id="konfigurace-zellij">Konfigurace Zellij</h2>
|
||||
<p><a href="https://zellij.dev/" target="_blank">Zellij</a> vám umožňuje vytvářet vlastní rozvržení, která lze vyvolat při spuštění, abyste je lépe přizpůsobili práci, kterou budete dělat.</p>
|
||||
<p>Následuje konfigurace pro práci s textovým editorem Neovim. Tuto konfiguraci jsem uložil pod touto cestou <code>~/.config/zellij/layouts/nvim.kdl</code>: </p>
|
||||
<p><h1 id="12-even-better-neovim-with-zellij-terminal-multiplexer">12. Even better Neovim with Zellij terminal multiplexer</h1>
|
||||
<p>What I miss about Neovim is a way to call a terminal from it and open the terminal (the second terminal window below the Neovim window, see picture) the same way I'm working on.</p>
|
||||
<p>To achieve this, I use <a href="https://zellij.dev/" target="_blank">Zellij</a> , which is a terminal multiplexer.</p>
|
||||
<p>The ## Zellij</p>
|
||||
<p><a href="https://zellij.dev/" target="_blank">Zellij</a> configuration</p>
|
||||
<p>allows you to create custom layouts that can be invoked at startup to better tailor them to the work you'll be doing.</p>
|
||||
<p>The following is the configuration for working with the Neovi text editor. I saved this configuration under this path <code>~/.config/zellij/layouts/nvim.kdl</code>: </p>
|
||||
<div class="codehilite"><pre><span></span><code>layout {
|
||||
pane size=1 borderless=true {
|
||||
plugin location="zellij:tab-bar"
|
||||
}
|
||||
pane {
|
||||
command "nvim"
|
||||
args "."
|
||||
}
|
||||
pane split_direction="vertical" size="10%" {
|
||||
panel size=1 borderless=true {
|
||||
plugin location="zellij:tab-bar
|
||||
" }
|
||||
panel {
|
||||
command "nvim
|
||||
" args ".
|
||||
" }
|
||||
panel split_direction="vertical" size="10%" {
|
||||
|
||||
}
|
||||
pane size=2 borderless=true {
|
||||
plugin location="zellij:status-bar"
|
||||
}
|
||||
}
|
||||
panel size=2 borderless=true {
|
||||
plugin location="zellij:status-bar
|
||||
" }
|
||||
}
|
||||
</code></pre></div>
|
||||
|
||||
<p>Výsledkem je následující rozložení:
|
||||
<p>The result is the following layout:
|
||||
<img alt="" src="https://lukan.cz/wp-content/uploads/2024/03/HelixAndZellij-700x382.png" /></p>
|
||||
<p>Nvim běžící v horním podokně s terminálovou konzolí v jiném podokně dole, ve stejné cestě jako projekt, se kterým pracuji!! a přesně tohoto cíle jsem chtěl dosáhnout.</p>
|
||||
<h2 id="konfigurace-systemu">Konfigurace systému</h2>
|
||||
<p>Nyní ke spuštění zellij s vlastním rozložením a instancí Nvim musíte spustit: </p>
|
||||
<p>Nvim running in the top pane with the terminal console in another pane at the bottom, in the same path as the project I'm working with!!! and this is exactly the goal I wanted to achieve.</p>
|
||||
<h2 id="system-configuration">System Configuration</h2>
|
||||
<p>Now to run zellij with a custom layout and Nvim instance you need to run: </p>
|
||||
<div class="codehilite"><pre><span></span><code>zellij --layout ~/.config/zellij/layouts/nvim.kdl
|
||||
</code></pre></div>
|
||||
|
||||
<p>V míste (složce) v terminálu kde chcete spustit Neovim.</p>
|
||||
<p>Nyní pro zjednodušení tohoto příkazu jsem vytvořil alias <code>znv</code>a uložil to do mého <code>~/.bashrc</code>soubor. </p>
|
||||
<div class="codehilite"><pre><span></span><code>alias znv='zellij --layout $HOME/.config/zellij/layouts/nvim.kdl'
|
||||
</code></pre></div>
|
||||
|
||||
<p>S touto konfigurací pokaždé, když potřebuji vytvořit novou instanci Neovim, stačí zadat <em>znv</em> do adresáře, se kterým chci pracovat, a <a href="https://zellij.dev/" target="_blank">Zellij</a> mi zavolá Neovim a automaticky otevře projekt.</p>
|
||||
<p>In the location (folder) in the terminal where you want to run Neovim.</p>
|
||||
<p>Now to simplify this command, I created an alias <code>znv</code> and saved it in my <code>~/.bashrc</code> file. </p>
|
||||
<p><code>alias znv='zellij --layout $HOME/.config/zellij/layouts/nvim.kdl'</code></p>
|
||||
<p>With this configuration, every time I need to create a new instance of Neovim, I just type <em>znv</em> in the directory I want to work with, and <a href="https://zellij.dev/" target="_blank">Zellij</a> will call Neovim and automatically open the project.</p>
|
||||
<div style="text-align: center;">
|
||||
Copyright © 2024 - 2025 ApolloNvim
|
||||
Copyright © 2024 - 2025 🚀 ApolloNvim / Lukáš Kaňka
|
||||
</div></p>
|
||||
</article>
|
||||
</section>
|
||||
|
Reference in New Issue
Block a user