Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.
/ vim-prismo Public archive

A Vim plugin to decorate your commented titles

License

Notifications You must be signed in to change notification settings

guywaldman/vim-prismo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Prismo for Vim

Screencapture

Decorate section titles and separators in your code with ease using vim-prismo. This vim plugin centers your title beautifully and finally gives your OCD a well-deserved break.

Current state

vim-prismo was originally designed for much more, but for right now I'm settling for beautifying my inline comments. It is inspired by my previous plugin for Atom, AutoSect. I am a vim-script beginner and would be very open and excited for ideas and pull requests.

TODO

  • General improvements + proper documentation

  • Indentation-aware

  • Decoration pattern explicit declaration

    (meaning you would write: // ~ title, and it would expand to // ~~~~ TITLE ~~~~

Installation

Pathogen

$ cd ~/.vim/bundle
$ git clone https://github.com/guywald1/vim-prismo/

Alternatively, $ cd ~/.janus if you're using vim-janus like me (you totally should).

Vundle

Add...

Plugin 'guywald1/vim-prismo'

...between call vundle#begin() and call vundle#end() in your .vimrc.

Usage

Type the beginning of your inline comment, followed by a space, followed by your desired title. i.e. // your title here.

Call :Prismo and it will then become: // ------------- YOUR TITLE HERE ------------- (but spanning 80 characters wide - this is only for demonstration purposes).

Note: The inline comment style does not have to be //. As long as it a continuous sequence of characters, any inline comment style will do. For example, for BASH: # title will transform to # ------ TITLE ------.

The plugin will, by default, convert the title to uppercase.

Customization

Recommended mapping:

:nnoremap <leader>pr :Prismo<CR>

Settings

These are all customizable inside of your .vimrc:

let g:prismo_dash = '-' " the character to pad the title (dash by default)
let g:prismo_ruler = 80 " the rightmost edge to span your title
let g:prismo_toupper = 1 " whether to transform the title to uppercase

Contributions

...are absolutely welcome! 😊

Releases

No releases published

Packages

No packages published