Presentations in vim

Cover image

Vim can be used to give presentations. You need few plugins to do it.

  1. vim-pandoc - vim pandoc doesnt come with syntax highlighting so you need to install vim-pandoc-syntax
  2. You can create your own file extension for the slides, i have a file extension called .rvpm
  3. Goyo - this is to remove all the vim items like the line number.
  4. Add the following lines to your vimrc
nnoremap <silent> <leader>tm :TableModeToggle<CR>

" treat rvpm files as pandoc 
augroup filetype_md
  autocmd bufread,bufnew *.rvpm set filetype=pandoc
augroup end

" Open rvmp files as presentation
autocmd BufNewFile,BufRead *.rvpm call SetRakshithsVimPresentaionMode()
function SetRakshithsVimPresentaionMode()
  nnoremap <buffer> <Right> :n<CR>
  nnoremap <buffer> <Left> :N<CR>

  if !exists('#goyo')

let g:pandoc#syntax#codeblocks#embeds#langs = ["javascript", "go", "bash=sh"]

" Hide ~ on empty lines
hi! EndOfBuffer ctermbg=bg ctermfg=bg guibg=bg guifg=bg
  1. Create a directory for your presentation.
  2. cd into the directory and open all files using vim *.
  3. Now you use left and right arrow keys to navigate between the slides.
  4. You can also install a plugin called vim-table-mode - this lets you create tables as shown in the image which is a screenshot of a slide