vim-signit
Personalize your files with a custom header/footer.
Contents
About
I have seen a couple of youtubers such as DistroTube or MAKC who personalize their dot files with a custom header/footer that contains some ascii art of their initials and a description of the file or links to their social media:
# ____ _____
# | _ \_ _| Derek Taylor (DistroTube)
# | | | || | http://www.youtube.com/c/DistroTube
# | |_| || | http://www.gitlab.com/dwt1/
# |____/ |_|
#
#
#||\\ //||
#|| \// || Mackenzie Criswell
#|| //\ || https://makc.co
#|| \\|| https://github.com/makccr
#
In my opinion, these look really good and professional and I wanted to have one of my own. Additionally I wanted to start learning some vimscript, so I took the challenge to write Signit.
Examples
Preview
Signit will automatically comment out your header/footer for whatever file type, so that it doesn't conflict with your code.
Programming language: Python
Figlet's Font: slant
# _______ __
# / ____/ | / / Chris Walton
# / / | | /| / / (358) 940-1811
# / /___ | |/ |/ / 9000 Wrangler Drive Redford, MI 48239
# \____/ |__/|__/
#
Programming language: HTML
Figlet's Font: block
<!-- -->
<!-- _|_|_| _|_|_| Billy Dickinson -->
<!-- _| _| _| _| https://github.com/billydickinson -->
<!-- _|_|_| _| _| https://youtube.com/billydickinson -->
<!-- _| _| _| _| -->
<!-- _|_|_| _|_|_| -->
<!-- -->
<!-- -->
Programming language: C
Figlet's Font: shadow
/* ___| ____| */
/* \___ \ | Scott Fox */
/* | __| Physics */
/* _____/ _| Mechanical Engineering */
/* */
Installation
Install using your favorite Vim package manager.
vim-plug
Using Vim
- Add
Plug 'johannesthyssen/vim-signit'
to your .vimrc - Run
:PlugInstall
Using Neovim
- Add
Plug 'johannesthyssen/vim-signit'
to your init.vim - Run
:PlugInstall
Vundle
Using Vim
- Add
Plugin 'johannesthyssen/vim-signit'
to your .vimrc - Run
:PluginInstall
Using Neovim
- Add
Plugin 'johannesthyssen/vim-signit'
to your init.vim - Run
:PluginInstall
Pathogen
Using Vim
git clone https://github.com/johannesthyssen/vim-signit.git ${HOME}/.vim/bundle/vim-signit
Using Neovim
git clone https://github.com/johannesthyssen/vim-signit.git ${HOME}/.config/nvim/bundle/vim-signit
Dependencies
Usage
The plugin can run out of the box without any configuration. To use it simply run :Signit
. You will be prompted to enter your initials, your name and for two links/descriptions (Note: you can leave any of these prompts empty).
You can also set the following variables, so that you don't get prompted every time you run it (see Preview):
Variable | Example |
---|---|
let g:signit_initials |
= 'AR' |
let g:signit_name |
= 'Asher Russo' |
let g:signit_extra_1 |
= 'https://github.com/asherrusso' |
let g:signit_extra_2 |
= 'https://youtube.com/asherrusso' |
Additionally, you can specify the position and figlets's font and spacing with the following variables:
Variable | Example |
---|---|
let g:signit_position |
= 'header' or 'footer' |
let g:signit_ascii_font |
= 'italic.flf' |
let g:signit_ascii_spacing |
= 'wide' or 'narrow' or 'normal' |
Note: the default values for these variables are header, standard.flf and normal. You can download fonts for figlet here.
Contributing
Patches and suggestions are welcome! Please feel free to create an issue or submit a pull request.
TODO
- Add support for custom ascii art
- Add link/description length limit
Bugs
- When using with
set filetype=tex
the following error occurs:E767: Too many arguments to printf()
License
MIT