Auto generate docs

remotes/origin/HEAD
chrisgrieser 2023-02-22 14:28:35 +00:00 committed by github-actions[bot]
parent 3ead1e4086
commit 5e7ec0ef32
1 changed files with 28 additions and 36 deletions

View File

@ -1,15 +1,15 @@
*genghis.txt* For NVIM v0.8.0 Last change: 2023 February 06
*genghis.txt* For NVIM v0.8.0 Last change: 2023 February 22
==============================================================================
Table of Contents *genghis-table-of-contents*
1. nvim-genghis |genghis-nvim-genghis|
- How is this different from `vim.eunuch`?|genghis-how-is-this-different-from-`vim.eunuch`?|
- Installation and Setup |genghis-installation-and-setup|
- Available commands |genghis-available-commands|
- Autocompletion of directories |genghis-autocompletion-of-directories|
- Why that name |genghis-why-that-name|
- About me |genghis-about-me|
- How is this different from vim.eunuch?|genghis-nvim-genghis-how-is-this-different-from-vim.eunuch?|
- Installation and Setup |genghis-nvim-genghis-installation-and-setup|
- Available commands |genghis-nvim-genghis-available-commands|
- Autocompletion of directories|genghis-nvim-genghis-autocompletion-of-directories|
- Why that name |genghis-nvim-genghis-why-that-name|
- About me |genghis-nvim-genghis-about-me|
==============================================================================
1. nvim-genghis *genghis-nvim-genghis*
@ -23,10 +23,9 @@ Convenience file operations for neovim, written in lua.
- |genghis-autocompletion-of-filenames|
- |genghis-why-that-name|
- |genghis-about-me|
<!--toc:end-->
HOW IS THIS DIFFERENT FROM `VIM.EUNUCH`?*genghis-how-is-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.
@ -36,9 +35,9 @@ HOW IS THIS DIFFERENT FROM `VIM.EUNUCH`?*genghis-how-is-this-different-from-`vim
- Written 100% in lua.
INSTALLATION AND SETUP *genghis-installation-and-setup*
INSTALLATION AND SETUP *genghis-nvim-genghis-installation-and-setup*
>
>lua
-- Packer
use {"chrisgrieser/nvim-genghis", requires = "stevearc/dressing.nvim"}
@ -46,11 +45,10 @@ INSTALLATION AND SETUP *genghis-installation-and-setup*
{"chrisgrieser/nvim-genghis", dependencies = "stevearc/dressing.nvim"},
<
`nvim-genghis` (and `dressign.nvim`) require no `.setup()` function. Just
create keybindings for the commands you want to use:
>
>lua
local keymap = vim.keymap.set
local genghis = require("genghis")
keymap("n", "<leader>yp", genghis.copyFilepath)
@ -65,7 +63,7 @@ create keybindings for the commands you want to use:
<
AVAILABLE COMMANDS *genghis-available-commands*
AVAILABLE COMMANDS *genghis-nvim-genghis-available-commands*
- `.createNewFile` or `:New`: Create a new file.
@ -75,18 +73,15 @@ AVAILABLE COMMANDS *genghis-available-commands*
- `.moveAndRenameFile` or `:Move`: Move and Rename the current file. Works like the UNIX `mv` command. Best used with |genghis-autocompletion-of-directories|.
**Note** The following applies to all commands above: - If no extension has
been provided, will use the extension of the original file. - If the new file
name includes a `/`, the new file is placed in the respective subdirectory,
creating any non-existing folders. Except for `.moveAndRenameFile`, all
operations take only place in the current working directory, so
`.moveAndRenameFile` is the only command that can move to a parent directory. -
All commands support |genghis-autocompletion-of-existing-directories|.
**Note** Applying to all commands above: - If no extension has been provided,
will use the extension of the original file. - If the new file name includes a
`/`, the new file is placed in the respective subdirectory, creating any
non-existing folders. Except for `.moveAndRenameFile`, all operations take only
place in the current working directory, so `.moveAndRenameFile` is the only
command that can move to a parent directory. - All commands support
|genghis-autocompletion-of-existing-directories|.
- `.trashFile{trashLocation = "your/path/"}` or `:Trash`: Move the current file the trash location. Defaults to location is `$HOME/.Trash/`. ⚠️ Any existing file in the trash location with the same name is overwritten, making that file irretrievable.
- `.trashFile{trashLocation = "/your/path/"}` or `:Trash`: Move the current file to the trash location. Defaults to the operating-system-specific trash directory. <https://github.com/chrisgrieser/nvim-genghis/blob/main/lua/genghis.lua#L164> ⚠️ Any existing file in the trash location with the same name is overwritten, making that file irretrievable.
- `.copyFilename` or `:CopyFilename`: Copy the file name. When `clipboard="unnamed[plus]"` has been set, copies to the `+` register, otherwise to `"`.
- `.copyFilepath` or `:CopyFilepath`: Copy the absolute file path. When `clipboard="unnamed[plus]"` has been set, copies to the `+` register, otherwise to `"`.
- `.chmodx` or `:Chmodx`: Makes current file executable. Equivalent to `chmod +x`.
@ -96,26 +91,23 @@ HOW TO DISABLE COMMAND-LINE COMMANDS ~
Put this in your configuration file:
>
>lua
-- lua
vim.g.genghis_disable_commands = true
<
or
>
>vim
-- viml
let g:genghis_disable_commands = v:true
<
AUTOCOMPLETION OF DIRECTORIES *genghis-autocompletion-of-directories*
AUTOCOMPLETION OF DIRECTORIES*genghis-nvim-genghis-autocompletion-of-directories*
You can get autocompletion for directories by using `dressing.nvim`,
`nvim-cmp`, and vims omnifunc:
>
>lua
-- packer
use { "chrisgrieser/nvim-genghis", requires = {
"stevearc/dressing.nvim",
@ -132,8 +124,7 @@ You can get autocompletion for directories by using `dressing.nvim`,
},
<
>
>lua
-- required setup for cmp, somewhere after your main cmp-config
require("cmp").setup.filetype("DressingInput", {
sources = cmp.config.sources { {name = "omni"} },
@ -141,13 +132,14 @@ You can get autocompletion for directories by using `dressing.nvim`,
<
WHY THAT NAME *genghis-why-that-name*
WHY THAT NAME *genghis-nvim-genghis-why-that-name*
A nod to vim.eunuch <https://github.com/tpope/vim-eunuch> - as opposed to
childless eunuchs, it is said that Genghis Khan has fathered thousands of
children <https://allthatsinteresting.com/genghis-khan-children>.
ABOUT ME *genghis-about-me*
ABOUT ME *genghis-nvim-genghis-about-me*
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