]> Sergey Matveev's repositories - vimslides.git/commitdiff
Initial commit
authorSergey Matveev <stargrave@stargrave.org>
Sun, 6 Dec 2015 10:43:41 +0000 (13:43 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sun, 6 Dec 2015 10:43:41 +0000 (13:43 +0300)
README.slides [new file with mode: 0644]
vimslides.vim [new file with mode: 0644]

diff --git a/README.slides b/README.slides
new file mode 100644 (file)
index 0000000..cbcd4c4
--- /dev/null
@@ -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 <that wrapping characters>
+    * 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 (file)
index 0000000..ca854e1
--- /dev/null
@@ -0,0 +1,42 @@
+" vimslides -- presenation helper inside Vim
+" Copyright (C) 2015 Sergey Matveev <stargrave@stargrave.org>
+"
+" 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 <http://www.gnu.org/licenses/>.
+
+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 <leader>] zMzjzOz<CR>0
+nmap <leader>[ zMzkzO[zz<CR>0
+normal zMggzO
+
+nmap <leader>i /IMG:/e+2<CR>y$:silent execute "!display " . @"<CR>:nohlsearch<CR>