Skip to content

sysid/rsnip-vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vim-rsnip

A Vim plugin for syntax highlighting and editing of rsnip snippet files.

Features

  • Syntax highlighting for rsnip files
  • Filetype detection
  • Folding by snippet sections
  • Basic snippets for creating new rsnip entries
  • Commands for working with rsnip files

Installation

Using Vim-Plug

Plug 'username/vim-rsnip'

Using Packer

use 'username/vim-rsnip'

Using Vundle

Plugin 'username/vim-rsnip'

Manual Installation

Clone this repository into your Vim's packages directory:

mkdir -p ~/.vim/pack/plugins/start
git clone https://github.com/username/vim-rsnip.git ~/.vim/pack/plugins/start/vim-rsnip

For Neovim:

mkdir -p ~/.config/nvim/pack/plugins/start
git clone https://github.com/username/vim-rsnip.git ~/.config/nvim/pack/plugins/start/vim-rsnip

Usage

Syntax Highlighting

The syntax highlighting will be automatically applied to files with a .rsnip extension.

Commands

  • :RsnipNewSection - Insert a new section template
  • :RsnipNewSnippet - Insert a new snippet template

Key Mappings

In rsnip files, the following mappings are available:

  • <leader>rs - Create a new section
  • <leader>rn - Create a new snippet

Configuration

You can customize the plugin by setting variables in your vimrc:

" Custom section markers (default: * name {{{ * and * }}} name *)
let g:rsnip_section_start = '* name {{{ *'
let g:rsnip_section_end = '* }}} name *'

" Custom snippet markers (default: --- name and ---)
let g:rsnip_snippet_start = '--- name'
let g:rsnip_snippet_end = '---'

License

MIT

About

vim plugin for rsnip

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published