From: Sergey Matveev Date: Sun, 6 Dec 2015 10:43:41 +0000 (+0300) Subject: Initial commit X-Git-Url: http://www.git.stargrave.org/?p=vimslides.git;a=commitdiff_plain;h=7b11af00f770a50ef3ce2445911d6e4dd2cd0e36 Initial commit --- 7b11af00f770a50ef3ce2445911d6e4dd2cd0e36 diff --git a/README.slides b/README.slides new file mode 100644 index 0000000..cbcd4c4 --- /dev/null +++ b/README.slides @@ -0,0 +1,27 @@ + vimslides -- presentation inside Vim +------------------------------------------------------------------------ + |What is it| + + * Trivial Vim predefined commands that will add some highlights + * Some keyboard mappings + * Nice outlook for displaying presentations +------------------------------------------------------------------------ + |Syntax highlights| + + * Emphased text made using |that wrapping characters| + * Bold text made using :that wrapping characters: + * And another emphasing using + * List "*" items are highlighted too +------------------------------------------------------------------------ + |Keyboard mappings| + + * :leader + ]: to close current fold, open next one and center on it + * :leader + [: same as above, but previous fold + * :leader + i: to jump to the next "IMG: path.png" and open that + image using external :display: utility +------------------------------------------------------------------------ + |How to use it| + + * Prepare text file: separate slides using "----" lines + * Each slide must be indented + * execute :source: /path/to/vimslides.vim ex-command diff --git a/vimslides.vim b/vimslides.vim new file mode 100644 index 0000000..ca854e1 --- /dev/null +++ b/vimslides.vim @@ -0,0 +1,42 @@ +" vimslides -- presenation helper inside Vim +" Copyright (C) 2015 Sergey Matveev +" +" This program is free software: you can redistribute it and/or modify +" it under the terms of the GNU General Public License as published by +" the Free Software Foundation, either version 3 of the License, or +" any later version. +" +" This program is distributed in the hope that it will be useful, +" but WITHOUT ANY WARRANTY; without even the implied warranty of +" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +" GNU General Public License for more details. +" +" You should have received a copy of the GNU General Public License +" along with this program. If not, see . + +setlocal textwidth=72 +setlocal nocursorline +setlocal foldmethod=indent +setlocal foldcolumn=0 +setlocal colorcolumn=0 +setlocal conceallevel=0 +setlocal norelativenumber +setlocal laststatus=0 + +highlight clear ExtraWhitespace +syntax region pEmph matchgroup=Ignore start="|\S"rs=s+1 end="\S|"re=e-1 concealends +syntax region pBold matchgroup=Ignore start=":\S"rs=s+1 end="\S:"re=e-1 concealends +syntax region pUndr matchgroup=Ignore start="\s<\S"rs=s+2 end="\S>"re=e-1 concealends +syntax match pItem "^ *\*" +syntax match pLine "^-\+$" +highlight link pEmph Statement +highlight link pBold Special +highlight link pItem String +highlight link pLine PreProc +highlight link pUndr Type + +nmap ] zMzjzOz0 +nmap [ zMzkzO[zz0 +normal zMggzO + +nmap i /IMG:/e+2y$:silent execute "!display " . @":nohlsearch