Presentations in vim
Vim can be used to give presentations. You need few plugins to do it.
vim-pandoc - vim pandoc doesnt come with syntax highlighting so you need to install vim-pandoc-syntax
You can create your own file extension for the slides, i have a file extension called
.rvpm
Goyo - this is to remove all the vim items like the line number.
Add the following lines to your
vimrc
nnoremap <silent> <leader>tm :TableModeToggle<CR>
' treat rvpm files as pandoc
augroup filetype_md
autocmd!
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')
Goyo
endif
endfunction
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
- Create a directory for your presentation.
cd
into the directory and open all files usingvim *
.- Now you use left and right arrow keys to navigate between the slides.
- 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