From 3d99879d4ec5578d7824f73ddc612fdacb61b8b9 Mon Sep 17 00:00:00 2001 From: LoricAndre Date: Mon, 2 Dec 2024 19:49:01 +0100 Subject: [PATCH] fix: revert README overwrite --- README.md | 120 ++++++++++++++++++++++++++++++++++------------------ bin/sk-tmux | 1 + 2 files changed, 81 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index 20dae772..36a6e773 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Crates.io - Build & Test + Build & Test Packaging status @@ -26,62 +26,65 @@ skim provides a single executable: `sk`. Anywhere you would want to use # Table of contents - [Installation](#installation) + * [Package Managers](#package-managers) + * [Manually](#manually) - [Usage](#usage) - - [As Filter](#as-filter) - - [As Interactive Interface](#as-interactive-interface) - - [Key Bindings](#key-bindings) - - [Search Syntax](#search-syntax) - - [Exit code](#exit-code) + * [As Vim plugin](#as-vim-plugin) + * [As filter](#as-filter) + * [As Interactive Interface](#as-interactive-interface) + * [Key Bindings](#key-bindings) + * [Search Syntax](#search-syntax) + * [exit code](#exit-code) +- [Tools compatible with `skim`](#tools-compatible-with-skim) + * [fzf-lua neovim plugin](#fzf-lua-neovim-plugin) + * [nu_plugin_skim](#nu_plugin_skim) - [Customization](#customization) - - [Keymap to redefine](#keymap) - - [Sort Criteria](#sort-criteria) - - [Color Scheme](#color-scheme) - - [Misc](#misc) -- [Advance Topics](#advance-topics) - - [Interactive Mode](#interactive-mode) - - [Executing external programs](#executing-external-programs) - - [Preview Window](#preview-window) - - [Fields Support](#fields-support) - - [Use as a Library](#use-as-a-library) + * [Keymap](#keymap) + * [Sort Criteria](#sort-criteria) + * [Color Scheme](#color-scheme) + * [Misc](#misc) +- [Advanced Topics](#advanced-topics) + * [Interactive mode](#interactive-mode) + + [How does it work?](#how-does-it-work) + * [Executing external programs](#executing-external-programs) + * [Preview Window](#preview-window) + + [How does it work?](#how-does-it-work-1) + * [Fields support](#fields-support) + * [Use as a library](#use-as-a-library) - [FAQ](#faq) - - [How to ignore files?](#how-to-ignore-files) - - [Some files are not shown in vim plugin](#some-files-are-not-shown-in-vim-plugin) -- [Differences to fzf](#differences-to-fzf) + * [How to ignore files?](#how-to-ignore-files) + * [Some files are not shown in Vim plugin](#some-files-are-not-shown-in-vim-plugin) +- [Differences from fzf](#differences-from-fzf) - [How to contribute](#how-to-contribute) +- [Troubleshooting](#troubleshooting) + * [No line feed issues with nix, FreeBSD, termux](#no-line-feed-issues-with-nix-freebsd-termux) # Installation The skim project contains several components: 1. `sk` executable -- the core. -2. **DEPRECATED in favor of `sk --tmux`** `sk-tmux` -- script for launching `sk` in a tmux pane. +2. `sk-tmux` -- script for launching `sk` in a tmux pane. 3. Vim/Nvim plugin -- to call `sk` inside Vim/Nvim. Check [skim.vim](https://github.com/skim-rs/skim/blob/master/plugin/skim.vim) for Vim support. ## Package Managers -| Distribution | Package Manager | Command | -| -------------- | ----------------- | ------------------------- | -| macOS | Homebrew | `brew install sk` | -| macOS | MacPorts | `sudo port install skim` | -| Fedora | dnf | `dnf install skim` | -| Alpine | apk | `apk add skim` | -| Arch | pacman | `pacman -S skim` | -| Gentoo | Portage | `emerge --ask app-misc/skim` | -| Guix | guix | `guix install skim` | +| OS | Package Manager | Command | +| -------------- | ----------------- | --------------------------- | +| macOS | Homebrew | `brew install sk` | +| macOS | MacPorts | `sudo port install skim` | +| Fedora | dnf | `dnf install skim` | +| Alpine | apk | `apk add skim` | +| Arch | pacman | `pacman -S skim` | +| Gentoo | Portage | `emerge --ask app-misc/skim | +| Guix | guix | `guix install skim` | | Void | XBPS | `xbps-install -S skim` | -See [repology](https://repology.org/project/skim-fuzzy-finder/versions) for a comprehensive overview of package availability. + + Packaging status + - -## Install as Vim plugin - -Via vim-plug (recommended): - -```vim -Plug 'skim-rs/skim', { 'dir': '~/.skim', 'do': './install' } -``` - -## Hard Core +## Manually Any of the following applies: @@ -106,6 +109,15 @@ Any of the following applies: skim can be used as a general filter (like `grep`) or as an interactive interface for invoking commands. +## As Vim plugin + +Via vim-plug (recommended): + +```vim +Plug 'skim-rs/skim', { 'dir': '~/.skim', 'do': './install' } +``` + + ## As filter Try the following: @@ -197,6 +209,34 @@ You can switch to `regex` mode dynamically by pressing `Ctrl-R` (Rotate Mode). | 1 | No Match found | | 130 | Aborted by Ctrl-C/Ctrl-G/ESC/etc... | +# Tools compatible with `skim` + +These tools are or aim to be compatible with `skim`: + +## [fzf-lua neovim plugin](https://github.com/ibhagwan/fzf-lua) + +A [neovim](https://neovim.io) plugin allowing fzf and skim to be used in a to navigate your code. + +Install it with your package manager, following the README. For instance, with `lazy.nvim`: + +```lua +{ + "ibhagwan/fzf-lua", + -- enable `sk` support instead of the default `fzf` + opts = {'skim'} +} +``` + +## [nu_plugin_skim](https://github.com/idanarye/nu_plugin_skim) + +A [nushell](https://www.nushell.sh/) plugin to allow for better interaction between skim and nushell. + +Following the instruction in the plugin's README, you can install it with cargo: +```nu +cargo install nu_plugin_skim +plugin add ~/.cargo/bin/nu_plugin_skim +``` + # Customization The doc here is only a preview, please check the man page (`man sk`) for a full diff --git a/bin/sk-tmux b/bin/sk-tmux index fc7456de..e7cc9ec4 100755 --- a/bin/sk-tmux +++ b/bin/sk-tmux @@ -27,6 +27,7 @@ # sk-tmux: starts sk in a tmux pane # usage: sk-tmux [LAYOUT OPTIONS] [--] [SK OPTIONS] +# echo "[WRN] This script is deprecated in favor or \`sk --tmux\` and will be removed in a later release" >&2 fail() { >&2 echo "$1"