Skip to content

Commit

Permalink
fix(flash.nvim): always search in ignorecase mode (#710)
Browse files Browse the repository at this point in the history
  • Loading branch information
linrongbin16 authored Feb 21, 2025
1 parent e16aedd commit 2d0a82d
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 20 deletions.
14 changes: 2 additions & 12 deletions docs/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,20 @@
<source src="https://github.com/linrongbin16/lin.nvim/assets/6496887/ac082f93-b60d-452a-a339-bad30a08bca0" type="video/mp4">
</video>

## Outline Structure and Undotree
## Outline Structure

<video width="70%" controls>
<source src="https://github.com/linrongbin16/lin.nvim/assets/6496887/0adf8628-ccba-4082-a4ca-12490fce26b1" type="video/mp4">
</video>

## Float Terminal

<video width="70%" controls>
<source src="https://github.com/linrongbin16/lin.nvim/assets/6496887/ac1a98da-a56f-4396-a938-0c447f57f358" type="video/mp4">
</video>
> Warning: The `undotree` feature is not a built-in feature.
## Tabline/Buffers

<video width="70%" controls>
<source src="https://github.com/linrongbin16/lin.nvim/assets/6496887/7fbbb203-7591-4dc6-97b8-eaa21b2172ec" type="video/mp4">
</video>

## Highlight Words

<video width="70%" controls>
<source src="https://github.com/linrongbin16/lin.nvim/assets/6496887/30d12964-ac78-41e8-bb56-2f6f00ae6831" type="video/mp4">
</video>

## CSS Color

<img width="70%" alt="image" src="https://github.com/linrongbin16/lin.nvim/assets/6496887/e0df23f8-efe1-44ca-b442-7c177f06cfad">
Expand Down
2 changes: 1 addition & 1 deletion docs/user_guide/global_key_mappings.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ And for the **CMD** keys in mac system, key mappings are avoid as well:
- `CMD-Z`: Undo.
- ...

> Use `source $VIMRUNTIME/mswin.vim` to enable windows standard keys, `source $VIMRUNTIME/macmap.vim` to enable mac standard keys.
> You can use `source $VIMRUNTIME/mswin.vim` to enable windows standard keys, `source $VIMRUNTIME/macmap.vim` to enable mac standard keys.
## Plugin Commands

Expand Down
2 changes: 1 addition & 1 deletion init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local stdpath_config = vim.fn.stdpath("config")
local function vimloader(handle)
local vimfile = stdpath_config .. string.format("/%s.vim", handle)
if uv.fs_stat(vimfile) then
vim.fn.execute(string.format("source %s", vimfile), true)
vim.fn.execute(string.format("source %s", vimfile), "silent!")
end
end

Expand Down
13 changes: 13 additions & 0 deletions lua/configs/folke/flash-nvim/keys.lua
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
local set_lazy_key = require("builtin.utils.keymap").set_lazy_key

-- Always search in 'ignorecase' mode.
local M = {
set_lazy_key({ "n", "x", "o" }, "s", function()
local gi = vim.go.ignorecase
local gs = vim.go.smartcase
vim.go.ignorecase = true
vim.go.smartcase = false
require("flash").jump()
vim.go.ignorecase = gi
vim.go.smartcase = gs
end, { desc = "Jump" }),
set_lazy_key({ "o" }, "r", function()
local gi = vim.go.ignorecase
local gs = vim.go.smartcase
vim.go.ignorecase = true
vim.go.smartcase = false
require("flash").remote()
vim.go.ignorecase = gi
vim.go.smartcase = gs
end, { desc = "Jump in operator-pending" }),
}

Expand Down
9 changes: 9 additions & 0 deletions postinit_sample.vim
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
" Please copy this file to 'postinit.vim' to enable it.

" ctrl/cmd-?
if exists("$VIMRUNTIME/mswin.vim")
source $VIMRUNTIME/mswin.vim
end

if has("mac") && exists("$VIMRUNTIME/macmap.vim")
source $VIMRUNTIME/macmap.vim
end
6 changes: 0 additions & 6 deletions preinit_sample.vim
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
" Please copy this file to 'preinit.vim' to enable it.

" Enable windows standard keys
" source $VIMRUNTIME/mswin.vim

" Enable mac standard keys
" source $VIMRUNTIME/macmap.vim

let g:lin_nvim_builtin_constants = {
\ 'diagnostic': {
\ 'signs': {
Expand Down

0 comments on commit 2d0a82d

Please sign in to comment.