Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Vim Plug | 30,869 | 6 months ago | 126 | mit | Vim Script | |||||
:hibiscus: Minimalist Vim Plugin Manager | ||||||||||
Vimrc | 29,349 | 4 days ago | 7 | mit | Vim Script | |||||
The ultimate Vim configuration (vimrc) | ||||||||||
Nnn | 17,061 | a day ago | 20 | July 26, 2022 | 1 | bsd-2-clause | C | |||
n³ The unorthodox terminal file manager | ||||||||||
Vim Go | 15,560 | 17 days ago | 12 | February 16, 2022 | 29 | other | Vim Script | |||
Go development plugin for Vim | ||||||||||
Vim Pathogen | 11,902 | a year ago | 27 | vim | Vim Script | |||||
pathogen.vim: manage your runtimepath | ||||||||||
Tmux Resurrect | 9,931 | 2 months ago | 214 | mit | Shell | |||||
Persists tmux environment across system restarts. | ||||||||||
Nvim Lspconfig | 8,090 | a day ago | 57 | apache-2.0 | Lua | |||||
Quickstart configs for Nvim LSP | ||||||||||
Ultisnips | 7,253 | 2 days ago | 116 | gpl-3.0 | Python | |||||
UltiSnips - The ultimate snippet solution for Vim. Send pull requests to SirVer/ultisnips! | ||||||||||
Dotfiles | 6,903 | 6 months ago | 3 | bsd-2-clause | Ruby | |||||
YADR - The best vim,git,zsh plugins and the cleanest vimrc you've ever seen | ||||||||||
Lightline.vim | 6,538 | 18 days ago | mit | Vim Script | ||||||
A light and configurable statusline/tabline plugin for Vim |
This plugin provides a command which, given a visual selection or buffer, will generate a neat looking and highly customizable image of the source code. The image generator is Aloxaf/silicon, which is similar to https://carbon.now.sh, but does not require an internet connection.
First, you need to install cargo and silicon:
# Install cargo
curl https://sh.rustup.rs -sSf | sh
# Install silicon
cargo install silicon
# Add cargo-installed binaries to the path
export PATH="$PATH:$CARGO_HOME/bin"
Then, if using vim-plug, add this to your ~/.vimrc
:
Plug 'segeljakt/vim-silicon'
This plugin provides a single command Silicon
:
" Generate an image of the current buffer and write it to /path/to/output.png
:Silicon /path/to/output.png
" Generate an image of the current buffer and write it to /path/to/output.png and clipboard.
:Silicon /path/to/output.png --to-clipboard
" Generate an image of the current buffer and write it to /path/to/<filename>.png
:Silicon /path/to/
" Generate an image of the current visual line selection and write it to /path/to/output.png
:'<,'>Silicon /path/to/output.png
" Generate an image of the current buffer, with the current visual line selection highlighted.
:'<,'>Silicon! /path/to/output.png
This is the default configuration:
let g:silicon = {
\ 'theme': 'Dracula',
\ 'font': 'Hack',
\ 'background': '#AAAAFF',
\ 'shadow-color': '#555555',
\ 'line-pad': 2,
\ 'pad-horiz': 80,
\ 'pad-vert': 100,
\ 'shadow-blur-radius': 0,
\ 'shadow-offset-x': 0,
\ 'shadow-offset-y': 0,
\ 'line-number': v:true,
\ 'round-corner': v:true,
\ 'window-controls': v:true,
\ }
Images are by default saved to the working directory with a unique filename, you can change this filepath by setting:
let g:silicon['output'] = '~/images/silicon-{time:%Y-%m-%d-%H%M%S}.png'
To get the list of available themes, you can run this in the terminal:
silicon --list-themes
Silicon internally uses bat
's themes and syntaxes. To get the list of supported languages, you could:
cargo install bat
bat --list-languages
For more details about options, see Aloxaf/silicon.
Instead of assigning values to flags in g:silicon, you can assign functions which expand into values right before generating the images.
For example, to save images into different directories depending on whether you are at work or not:
let s:workhours = {
\ 'Monday': [8, 16],
\ 'Tuesday': [9, 17],
\ 'Wednesday': [9, 17],
\ 'Thursday': [9, 17],
\ 'Friday': [9, 15],
\ }
function! s:working()
let day = strftime('%u')
if has_key(s:workhours, day)
let hour = strftime('%H')
let [start_hour, stop_hour] = s:workhours[day]
if start_hour <= hour && hour <= stop_hour
return "~/Work-Snippets/"
endif
endif
return "~/Personal-Snippets/"
endfunction
let g:silicon['output'] = function('s:working')
Credits goes to: