Home

Awesome

samwise.nvim

Introduction

<!-- markdownlint-disable-next-line MD034 -->

https://user-images.githubusercontent.com/33557095/131362110-c5f1075e-3569-42c8-9c54-5905364caa34.mp4

samwise is a line-wise note-taking plugin for neovim that aims to provide a better note-taking enviroment by employing vim's concepts. It allows you to take notes in a different buffer (each samwise buffer is unique to its parent buffer) which is created automatically based on the current buffer's path and the current buffer's name.

If the current line in the buffer does not have a corresponding <EOL> character as the only content in the samwise buffer, the user is dropped to the corresponding line, and the samwise buffer scrolls sychronously with its parent buffer and vice versa. Users can make changes, or add new text entries for any line of the parent buffer in this manner and even commit those besides the parent buffer, as a "comment file" so as to not populate the parent buffer with extraneous comments and keep the codebase cleaner in general. This is just one of the many use cases where samwise can help.

It also allows highlighting hunks which correspond to the samwise buffer entries, navigating between them, and seeing those entries either in a floating window, or by echoing them.

To make it explicity clear, from this point on, a "samwise buffer" will mean the autogenerated buffer that stores all the line-wise notes corresponding to its companion buffer (or how I call it, it's Frodo).

Configuration

Globals

" Refer `nvim_open_win` for more details.
let g:samwise_floating_opts = {
                \ ...
                \ 'relative': 'cursor',
                \ 'focusable': v:false,
                \ 'style': 'minimal',
                \ 'border': 'shadow',
                \ 'noautocmd': v:true
                \ }

Commands

License

BSD-2-Clause