Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tjdevries/cyclist.vim
cycle + listchars
https://github.com/tjdevries/cyclist.vim
Last synced: about 2 months ago
JSON representation
cycle + listchars
- Host: GitHub
- URL: https://github.com/tjdevries/cyclist.vim
- Owner: tjdevries
- License: mit
- Created: 2020-06-26T01:33:03.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-04-16T20:34:44.000Z (over 3 years ago)
- Last Synced: 2024-06-17T17:12:34.340Z (3 months ago)
- Language: Vim script
- Size: 106 KB
- Stars: 50
- Watchers: 5
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# cyclist.vim
cycle + listchars = cyclist.vim
For general information, see `:help listchars`
![simple_example](./media/examples.png)
```
Colorscheme: https://github.com/tjdevries/gruvbuddy.nvim
Console : kitty
Font : JetBrains Mono
OS : Ubuntu
Developed : On my stream at https://twitch.tv/teej_dv
```## Cycling
![cycling](./media/cycling.svg)
## Usage
```vim
" Add a new named configuration
call cyclist#add_listchar_option_set('limited', {
\ 'eol': '↲',
\ 'tab': '» ',
\ 'trail': '·',
\ 'extends': '<',
\ 'precedes': '>',
\ 'conceal': '┊',
\ 'nbsp': '␣',
\ })" Cycle to the next configuration
nmap cn CyclistNext
nmap cp CyclistPrev" Set a specific configuration
call cyclist#activate_listchars('limited')" Reset to default configuration
call cyclist#activate_listchars('default')" Override just one value in a configuration
" Each of the `cyclist#set_*` is based on the names in `:help listchars`" TRAIL U+2591
call cyclist#set_trail('default', '░')" PRECEDES & EXTENDS
call cyclist#set_preceds('default', '☚')
call cyclist#set_extends('default', '☛')
```## Interesting Uses
```vim
" You can change it on autocmds, using saved configurations.
augroup ChangeListChars
au!
au FileType C :call cyclist#activate_listchars('c_listchars')
augroup END
```## Example configurations that I use
```vim
call cyclist#add_listchar_option_set('limited', {
\ 'eol': '↲',
\ 'tab': '» ',
\ 'trail': '·',
\ 'extends': '<',
\ 'precedes': '>',
\ 'conceal': '┊',
\ 'nbsp': '␣',
\ })call cyclist#add_listchar_option_set('busy', {
\ 'eol': '↲',
\ 'tab': '»·',
\ 'space': '␣',
\ 'trail': '-',
\ 'extends': '☛',
\ 'precedes': '☚',
\ 'conceal': '┊',
\ 'nbsp': '☠',
\ })```