Skip to content

Instantly share code, notes, and snippets.

@neninja
Created August 8, 2020 20:36
Show Gist options
  • Save neninja/4d39bb176dae1b9955de4a9ffa556e90 to your computer and use it in GitHub Desktop.
Save neninja/4d39bb176dae1b9955de4a9ffa556e90 to your computer and use it in GitHub Desktop.
Usar vim para slide

Slides:

Usando goyo

" THANKS: https://gist.github.com/davidmh/f4337f9ea9eca6789b3f8222b8333a35
" Presentation mode
function! s:enter_presentation()
    setl nospell
    setl scrolloff=0
    normal ggzjzO
    " nnoremap <buffer> <right> :call search("^##", 'W')<CR>zMzvzt
    nnoremap <silent><buffer> <right> :call search("^## ", 'W')<CR>zMzOzt
    " nnoremap <buffer> <left> :call search("^##", 'bW')<CR>zMzvzt
    nnoremap <silent><buffer> <left> :call search("^## ", 'bW')<CR>zMzOzt
endfunction

function! s:exit_presentation()
    set scrolloff=3
    nunmap <buffer> <left>
    nunmap <buffer> <right>
endfunction

autocmd! User GoyoEnter nested call <SID>enter_presentation()
autocmd! User GoyoLeave nested call <SID>exit_presentation()

Para facilitar a criaação de fluxogramas (como abaixo), lembrar de usar o comando :set virtualedit=all. Usar <c-v> e r

+----------+ +-----------------+     
| git init | | git clone <url> |
+----+-----+ +---+-------------+     
     |           |    
     v           v    
+-------------------+                       +----------------------+
|    cria/deleta    |<----------------------+ git push origin HEAD |
| modifica arquivos |<----------------+     +----------------------+
+-------+-----------+                 |           ^
        |                             |           |
        v                             |           |
+-------------------+     +-----------+-----------+----+
| git add <arquivo> +---->| git commit -m "<mensagem>" |
+-------------------+     +----------------------------+

O plugin boxdraw facilita o processo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment