Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rapan931/lasterisk.nvim
This is vim-asterisk written in lua
https://github.com/rapan931/lasterisk.nvim
lua neovim-plugin
Last synced: 2 months ago
JSON representation
This is vim-asterisk written in lua
- Host: GitHub
- URL: https://github.com/rapan931/lasterisk.nvim
- Owner: rapan931
- License: mit
- Created: 2022-06-27T16:24:23.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-28T07:35:56.000Z (about 2 years ago)
- Last Synced: 2024-08-04T13:06:01.204Z (6 months ago)
- Topics: lua, neovim-plugin
- Language: Lua
- Homepage:
- Size: 23.4 KB
- Stars: 18
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lasterisk.nvim
The [vim-asterisk](https://github.com/haya14busa/vim-asterisk) is great plugin.
This is vim-asterisk written in lua## Install
[packer.nvim](https://github.com/wbthomason/packer.nvim)
[vim-jetpack](https://github.com/tani/vim-jetpack)```lua
use('rapan931/lasterisk.nvim')
```## Usage
```lua
vim.keymap.set('n', '*', function() require("lasterisk").search() end)
vim.keymap.set('n', 'g*', function() require("lasterisk").search({ is_whole = false }) end)
vim.keymap.set('x', 'g*', function() require("lasterisk").search({ is_whole = false }) end)-- not support visual asterisk & is_whole = true
-- vim.keymap.set('x', '*', function() require("lasterisk").search() end)
```not echo search characters
```lua
vim.keymap.set('n', '*', function() require("lasterisk").search({ silent = true }) end)
vim.keymap.set('n', 'g*', function() require("lasterisk").search({ is_whole = false, silent = true}) end)
vim.keymap.set('x', 'g*', function() require("lasterisk").search({ is_whole = false, silent = true}) end)
```use [nvim-hlslens](https://github.com/kevinhwang91/nvim-hlslens)
```lua
vim.keymap.set('n', '*', function()
require("lasterisk").search()
require('hlslens').start()
end)vim.keymap.set({'n', 'x'}, 'g*', function()
require("lasterisk").search({ is_whole = false })
require('hlslens').start()
end)
```## Todo
- [x] Stay asterisk(like `*`)
- [x] `is_whole = false` option(like `g*`)
- [x] Visual asterisk(by line)
- [x] Visual asterisk(by character)## Differences from vim-asterisk
- Not support visual asterisk and `is_whole = true`
- Not support backward(like `#`)
- Not support jump asterisk(like default `*`)
- Not support visual mode blockwise
- Not support `exclusive` in the selection option
- Not support keep cursor position