Comments (3)
@YodaEmbedding, thanks for the idea!
This is now implemented (23fdffb).
After updating the plugin, the g:scrollview_base
and g:scrollview_column
variables can be used to control the scrollbar placement. The base specifies where the scrollbar is anchored. This can be 'left'
, 'right'
, or 'buffer'
. 'left'
and 'right'
anchor the scrollbar at the corresponding window edge ('right'
is the default value). 'buffer'
anchors the scrollbar to the buffer. g:scrollview_column
specifies the position (1-indexed) relative to the base.
The following settings correspond to the example you gave ("scrollbar to always appear on a fixed column, e.g. at 80 characters").
let g:scrollview_base = 'buffer' " or 'left' to position relative to window edge
let g:scrollview_column = 80
from nvim-scrollview.
@YodaEmbedding, thanks again! I hadn't considered that.
It's now possible to configure scrollview
's settings specifically per-window, per-tab, and/or per-buffer, in addition to globally.
For example, let w:scrollview_base = 'buffer'
would apply only for the window it's defined in. let b:scrollview_base = 'left'
would apply only for the buffer.
from nvim-scrollview.
Using g:
makes it difficult to set per-buffer. For example, consider a vim help window (80 columns) and a python file (79 columns) open in two split windows.
Perhaps better is b:
so that users can set per filetype:
autocmd FileType python let b:scrollview_column=79 | let b:scrollview_base = 'buffer'
autocmd FileType rust let b:scrollview_column=80 | let b:scrollview_base = 'buffer'
An alternative method of configuration is to depend on the buffer's colorcolumn
:
let g:scrollview_column = 'colorcolumn' " default
...though with multi-colorcolumns, the correct choice is undefined -- and requires manual control with b:scrollview_column
.
from nvim-scrollview.
Related Issues (20)
- Wrong sign background color for floating windows that use nvim_win_set_hl_ns
- Part of scrollbar wrong color when dragging from hidden HOT 1
- [question] disabling keybinds HOT 19
- Error related to Mappings. HOT 3
- Refresh mappings conflict with buffer-local mappings HOT 2
- Bug: E5108: Error executing lua [string ":lua"]:1: attempt to call field 'set_state' (a nil value) HOT 3
- Bug: Scrollview signs+null-ls causes nvim crash on ":set nu" or ":%s" replace HOT 1
- Issues with Winblend and Transparent Terminal Background HOT 6
- Feature Request: set some sign inside the scrollbars HOT 9
- `winblend` is not respected on hovering signs HOT 2
- Changing `list/nolist` or `listchars` crashes nvim with `trail` sign enabled at startup config HOT 3
- Add support for gitsigns HOT 4
- Pointer position is not adjusted when `winbar` is set HOT 1
- Signs won't go away HOT 4
- Search sign colors HOT 3
- opening a large file with a lot of error slows down nvim HOT 4
- [Question] How to add a horizontal scrollbar ? HOT 2
- nvim-scrollview not seeing diagnostics from coc.nvim HOT 2
- Compatibility with 0.10 extmark sign HOT 2
- Cursor positions changes undeterminably while scrolling past it HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvim-scrollview.