Skip to content

hwartig/vim-seeing-is-believing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

What is this?

vim-seeing-is-believing provides utility functions which make the following easy

  • insert/delete annotation mark # =>.
  • virtual keymap for marking and executing seeing-is-believing against current buffer.

seeing_is_believing is a gem and can be installed with

$ gem install seeing_is_believing

Key Mappings

  • <Plug>(seeing-is-believing-mark) - add mark (# =>) to the line.
  • <Plug>(seeing-is-believing-run) - run all marked lines.
  • <Plug>(seeing-is-believing-mark-and-run) - add mark to the line and run it. If line is already marked, then previous mark will be replaced.

Configuration

vim-seeing-is-believing doesn't provide any default keymap. Set following line in your .vimrc

" Enable seeing-is-believing mappings only for Ruby
augroup seeingIsBelievingSettings
  autocmd!

  autocmd FileType ruby nmap <buffer> <Enter> <Plug>(seeing-is-believing-mark-and-run)
  autocmd FileType ruby xmap <buffer> <Enter> <Plug>(seeing-is-believing-mark-and-run)

  autocmd FileType ruby nmap <buffer> <F4> <Plug>(seeing-is-believing-mark)
  autocmd FileType ruby xmap <buffer> <F4> <Plug>(seeing-is-believing-mark)
  autocmd FileType ruby imap <buffer> <F4> <Plug>(seeing-is-believing-mark)

  autocmd FileType ruby nmap <buffer> <F5> <Plug>(seeing-is-believing-run)
  autocmd FileType ruby imap <buffer> <F5> <Plug>(seeing-is-believing-run)
augroup END

Kudos

vim-seeing-is-believing is an adaption of https://github.com/t9md/vim-ruby-xmpfilter for seeing_is_believing.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published