From 6077a6376f9a15eaf3d60a12caca57adb59028b5 Mon Sep 17 00:00:00 2001 From: chrisgrieser Date: Wed, 19 Jun 2024 10:47:11 +0000 Subject: [PATCH] chore: Auto-generate vimdocs --- doc/genghis.txt | 116 ++++++++++++------------------------------------ 1 file changed, 28 insertions(+), 88 deletions(-) diff --git a/doc/genghis.txt b/doc/genghis.txt index 2f8d408..f4cfd3f 100644 --- a/doc/genghis.txt +++ b/doc/genghis.txt @@ -7,10 +7,9 @@ Table of Contents *genghis-table-of-contents* - Features |genghis-nvim-genghis--features| - Installation and Setup |genghis-nvim-genghis--installation-and-setup| - Available Commands |genghis-nvim-genghis--available-commands| - - Cookbook |genghis-nvim-genghis--cookbook| - - Howis this different from vim.eunuch?|genghis-nvim-genghis--howis-this-different-from-vim.eunuch?| - - Why that name |genghis-nvim-genghis--why-that-name| - - About me |genghis-nvim-genghis--about-me| + - How is this different from vim.eunuch?|genghis-nvim-genghis--how-is-this-different-from-vim.eunuch?| + - Why that Name |genghis-nvim-genghis--why-that-name| + - About the Author |genghis-nvim-genghis--about-the-author| ============================================================================== 1. nvim-genghis *genghis-nvim-genghis-* @@ -26,12 +25,9 @@ Lightweightand quick file operations without being a full-blown file manager. - |genghis-utility-commands| - |genghis-path-copying-commands| - |genghis-disable-ex-commands| -- |genghis-cookbook| - - |genghis-use-telescope-for-`.movetofolderincwd`| - - |genghis-autocompletion-of-directories-for-`.moveandrenamefile`| - |genghis-how-is-this-different-from-`vim.eunuch`?| - |genghis-why-that-name| -- |genghis-about-me| +- |genghis-about-the-author| FEATURES *genghis-nvim-genghis--features* @@ -43,19 +39,18 @@ FEATURES *genghis-nvim-genghis--features* file (if the LSP supports `workspace/willRenameFiles`). - Lightweight: no file management UI or file tree. - Various quality-of-life improvements like automatically keeping the extensions - when no extension is given. -- Fully written in lua and makes use of up-to-date nvim features like - `vim.ui.input`. + when no extension is given, or the ability to use vim motions in the input + field. INSTALLATION AND SETUP *genghis-nvim-genghis--installation-and-setup* >lua - -- Packer - use {"chrisgrieser/nvim-genghis", requires = "stevearc/dressing.nvim"} - - -- Lazy + -- lazy.nvim {"chrisgrieser/nvim-genghis", dependencies = "stevearc/dressing.nvim"}, + + -- packer + use {"chrisgrieser/nvim-genghis", requires = "stevearc/dressing.nvim"} < `nvim-genghis` (and `dressing.nvim`) require no `.setup()` function. Just @@ -63,17 +58,16 @@ create keybindings for the commands you want to use: >lua local keymap = vim.keymap.set - local genghis = require("genghis") - keymap("n", "yp", genghis.copyFilepath) - keymap("n", "yn", genghis.copyFilename) - keymap("n", "cx", genghis.chmodx) - keymap("n", "rf", genghis.renameFile) - keymap("n", "mf", genghis.moveAndRenameFile) - keymap("n", "mc", genghis.moveToFolderInCwd) - keymap("n", "nf", genghis.createNewFile) - keymap("n", "yf", genghis.duplicateFile) - keymap("n", "df", genghis.trashFile) - keymap("x", "x", genghis.moveSelectionToNewFile) + keymap("n", "yp", function() require("genghis").copyFilepath() end) + keymap("n", "yn", function() require("genghis").copyFilename() end) + keymap("n", "cx", function() require("genghis").chmodx() end) + keymap("n", "rf", function() require("genghis").renameFile() end) + keymap("n", "mf", function() require("genghis").moveAndRenameFile() end) + keymap("n", "mc", function() require("genghis").moveToFolderInCwd() end) + keymap("n", "nf", function() require("genghis").createNewFile() end) + keymap("n", "yf", function() require("genghis").duplicateFile() end) + keymap("n", "df", function() require("genghis").trashFile() end) + keymap("x", "x", function() require("genghis").moveSelectionToNewFile() end) < @@ -126,13 +120,7 @@ PATH COPYING COMMANDS ~ - `.copyRelativeDirectoryPath` or `:CopyRelativeDirectoryPath`Copy the relative directory path. -When `clipboard="unnamed[plus]"` has been set, copies to the `+` register, -otherwise to `"`. To always use system clipboard, put this in your -configuration file: - ->lua - vim.g.genghis_use_systemclipboard = true -< +All commands use the system clipboard. DISABLE EX-COMMANDS ~ @@ -142,54 +130,7 @@ DISABLE EX-COMMANDS ~ < -COOKBOOK *genghis-nvim-genghis--cookbook* - - -USE TELESCOPE FOR .MOVETOFOLDERINCWD ~ - ->lua - require("dressing").setup { - select = { - backend = { "telescope" }, - }, - } -< - - -AUTOCOMPLETION OF DIRECTORIES FOR .MOVEANDRENAMEFILE ~ - -You can get autocompletion for directories by `nvim-cmp` and vim’s `omnifunc` - ->lua - -- packer - use { - "chrisgrieser/nvim-genghis", - requires = { - "stevearc/dressing.nvim", - "hrsh7th/nvim-cmp", - "hrsh7th/cmp-omni", - }, - } - -- lazy - { - "chrisgrieser/nvim-genghis", - dependencies = { - "stevearc/dressing.nvim", - "hrsh7th/nvim-cmp", - "hrsh7th/cmp-omni", - }, - }, -< - ->lua - -- required setup for cmp, somewhere after your main cmp-config - require("cmp").setup.filetype("DressingInput", { - sources = cmp.config.sources { { name = "omni" } }, - }) -< - - -HOWIS THIS DIFFERENT FROM VIM.EUNUCH?*genghis-nvim-genghis--howis-this-different-from-vim.eunuch?* +HOW IS THIS DIFFERENT FROM VIM.EUNUCH?*genghis-nvim-genghis--how-is-this-different-from-vim.eunuch?* - Various improvements like automatically keeping the extensions when no extension is given, or moving files to the trash instead of removing them. @@ -212,7 +153,7 @@ childless eunuchs, it is said that Genghis Khan has fathered thousands of children . -ABOUT ME *genghis-nvim-genghis--about-me* +ABOUT THE AUTHOR *genghis-nvim-genghis--about-the-author* In my day job, I am a sociologist studying the social mechanisms underlying the digital economy. For my PhD project, I investigate the governance of the app @@ -220,14 +161,13 @@ economy and how software ecosystems manage the tension between innovation and compatibility. If you are interested in this subject, feel free to get in touch. -**Blog** I also occasionally blog about vim: Nano Tips for Vim +I also occasionally blog about vim: Nano Tips for Vim -**Profiles** - Discord - -Academic Website - GitHub - - Twitter -- ResearchGate - -LinkedIn +- Academic Website +- Twitter +- ResearchGate +- LinkedIn