big update
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>10. vim-fugitive ovládni Git v Neovim - 🚀 ApolloNvim</title>
|
||||
<title>vim-fugitive - 🚀 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="./"
|
||||
class=" active
|
||||
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="../12.%20Je%C5%A1t%C4%9B%20lep%C5%A1%C3%AD%20Neovim%20s%20Zellij%20termin%C3%A1lov%C3%BDm%20multiplexorem/"
|
||||
class="
|
||||
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="../09.%20init.vim%20z%C3%A1kladn%C3%AD%20nastaven%C3%AD/"
|
||||
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="../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" style="padding-left: 3%;">
|
||||
Next <i class="fa fa-arrow-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<!-- endblock -->
|
||||
|
||||
@ -193,9 +313,9 @@
|
||||
<!-- block content -->
|
||||
<section class="p-md-5 section-content">
|
||||
<article>
|
||||
<p><h1 id="10-vim-fugitive-ovladni-git-v-neovim">10. vim-fugitive ovládni Git v Neovim</h1>
|
||||
<p>Vim-fugitive je plugin pro textový editor Vim a Neovim, který poskytuje sadu funkcí pro práci se systémem správy verzí Git přímo z editoru Vim. Tento plugin usnadňuje úlohy, jako je procházení historie commitů, porovnávání verzí souborů, přidávání změn do indexu, vytváření commitů a řešení konfliktů při slučování verzí. Vim-fugitive je populární mezi vývojáři, kteří preferují práci přímo z příkazové řádky a cení si efektivity a rychlosti.</p>
|
||||
<p>Pojďme si ho nainstalovat. Nejprve si vim-fugitive přidáme do init.vim: </p>
|
||||
<p><h1 id="10-vim-fugitive">10. vim-fugitive</h1>
|
||||
<p>Vim-fugitive is a plugin for the Vim and Neovim text editor that provides a set of features for working with the Git version control system directly from the Vim editor. This plugin facilitates tasks such as browsing commit history, comparing file versions, adding changes to the index, creating commits, and resolving version merge conflicts. Vim-fugitive is popular among developers who prefer to work directly from the command line and value efficiency and speed.</p>
|
||||
<p>Let's install it. First, add vim-fugitive to init.vim: </p>
|
||||
<div class="codehilite"><pre><span></span><code><span class="k">call</span><span class="w"> </span><span class="nl">plug</span>#<span class="nv">begin</span><span class="ss">(</span><span class="s1">'~/.config/nvim/plugged'</span><span class="ss">)</span>
|
||||
|
||||
|
||||
@ -205,46 +325,44 @@
|
||||
<span class="err">call plug#end()</span>
|
||||
</code></pre></div>
|
||||
|
||||
<p>Pro tento plugin není nutná žádná konfigurace. Stačí uložit zdroj, nainstalovat a můžeš ho začít používat.</p>
|
||||
<p>Dovol, abych Ti dal několik užitečných tipů pro začátek s vim-fugitive.</p>
|
||||
<p>No configuration is required for this plugin. Just save the source, install it and you can start using it.</p>
|
||||
<p>Let me give you some useful tips for getting started with vim-fugitive.</p>
|
||||
<p><code>:Git</code></p>
|
||||
<p>Jak jste možná poznali u těchto typů příkazů, můžete je použít <code><Tab></code>automatické doplňování, abyste viděli, co ještě umí: </p>
|
||||
<p>As you may have seen with these types of commands, you can use <code><Tab></code> autocomplete to see what else it can do: </p>
|
||||
<div class="codehilite"><pre><span></span><code>:Git <Tab>
|
||||
</code></pre></div>
|
||||
|
||||
<p>A je toho hodně, co můžete v <code>vim-fugitive</code> dělat, ale pokud znáte Git, <code>vim-fugitive</code> bude pro tebe hračka: </p>
|
||||
<div class="codehilite"><pre><span></span><code>" zobrazí aktuálni stav branch
|
||||
:Git status
|
||||
<p>And there's a lot you can do in <code>vim-fugitive</code>, but if you know Git, <code>vim-fugitive</code> will be a breeze for you: </p>
|
||||
<div class="codehilite"><pre><span></span><code><span class="err">" show current branch status</span>
|
||||
<span class="err">:Git status</span>
|
||||
|
||||
" zobrazí dostupné branches
|
||||
:Git branch
|
||||
<span class="err">" show available branches</span>
|
||||
<span class="err">:Git branch</span>
|
||||
|
||||
" práce s ůložným prostorem
|
||||
:Git stash
|
||||
<span class="err">" work with storage</span>
|
||||
<span class="err">:Git stash</span>
|
||||
|
||||
|
||||
:Git add
|
||||
<span class="err">:Git add</span>
|
||||
|
||||
|
||||
:Git commit
|
||||
<span class="err">:Git commit</span>
|
||||
|
||||
|
||||
:Git push
|
||||
</code></pre></div>
|
||||
|
||||
<p>Zadání <code>:Git</code> vyvolá <a href="https://github.com/tpope/vim-fugitive/blob/69f5fcbd459c113181d18a0ea2641cd47c9e0318/doc/fugitive.txt#L50" target="_blank">bez příkazu <code>fugitive-summary</code>okno</a> . Vlastně se mi tato funkce hodně líbí. Zobrazí se seznam nesledovaných, připravených a nepřiřazených souborů spolu s aktuálním názvem větve. Umístěním kurzoru na tyto soubory vám umožní spouštět určité „mapy“, jako je příprava/odstaging, zahození změn, přepínání vložených rozdílů atd.</p>
|
||||
<p>Pro více informací o tom, jaké mapy jsou v rámci <code>fugitive-summary</code>okno, zadejte: </p>
|
||||
<div class="codehilite"><pre><span></span><code>:h fugitive-maps
|
||||
</code></pre></div>
|
||||
|
||||
<p>Nebo <a href="https://github.com/tpope/vim-fugitive/blob/69f5fcbd459c113181d18a0ea2641cd47c9e0318/doc/fugitive.txt#L258" target="_blank">se podívejte na tento odkaz</a> .</p>
|
||||
<p><code>vim-fugitive</code> se zobrazuje i vespodní liště. Máte informace o tom v jáké větvi jste či kolik změn jsi v kódu provedl.</p>
|
||||
<p>Pro více informací na <code>vim-fugitive</code>zadejte do Neovimu následující příkaz: </p>
|
||||
<div class="codehilite"><pre><span></span><code>:h fugitive
|
||||
<span class="err">:Git push</span>
|
||||
</code></pre></div>
|
||||
|
||||
<p>Typing <code>:Git</code> will bring up <a href="https://github.com/tpope/vim-fugitive/blob/69f5fcbd459c113181d18a0ea2641cd47c9e0318/doc/fugitive.txt#L50" target="_blank">without the <code>fugitive-summary</code> window</a> . I actually like this feature a lot. It displays a list of untracked, staging, and unassigned files along with the current branch name. Placing the cursor on these files allows you to run certain ‘maps’ such as preparing/unstaging, discarding changes, toggling embedded diffs, etc.</p>
|
||||
<p>For more information on what maps are within the <code>fugitive-summary</code> window, type: </p>
|
||||
<p><code>:h fugitive-maps</code></p>
|
||||
<p>Or <a href="https://github.com/tpope/vim-fugitive/blob/69f5fcbd459c113181d18a0ea2641cd47c9e0318/doc/fugitive.txt#L258" target="_blank">see this link</a> .</p>
|
||||
<p><code>vim-fugitive</code> is also displayed in the footer. You have information about what branch you're in or how many changes you've made to the code.</p>
|
||||
<p>For more information on <code>vim-fugitive</code> enter the following command in Neovim: </p>
|
||||
<p>``
|
||||
:h fugitive
|
||||
```</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