Closed PhilRunninger closed 3 years ago
@sotte , I've heard it said that software is never finished; it's just released. With that in mind, I made a few changes after creating the pull request, but I'm done now. Go ahead and merge this if you approve it.
Wow @PhilRunninger, this is quite the PR! Thank you and I'm glad you're enjoying the presenting.vim. Also thanks for the small commits with proper commit messages! I'll try to review it this weekend.
Can you please add some screenshots to the PR showing off the new features especially figlet.
I'm thinking of re-recording the asciicast in the README.
@sotte, I created an animated GIF of the new Markdown formatting. It is embedded in the README and (now) in the PR description.
Thank you so much. This is a really nice feature, I'm impressed!
I also like the attention to detail ;)
I'm trying it out now. Do you plan to add any more features to this PR or is it feature complete? @PhilRunninger
I don't get any of the cool new features. I think vimwiki (when using markdown) collides with presenting.vim. Debugging...
Yes, it was vimwiki. Without vimwiki I get the new features. But I still have some issues with figlet.
I'm done with this PR. If I think of anything else, I'll create another one.
My Mac installation of figlet includes the figlist
command which shows all the installed figlet fonts. Alternatively you can try figlet -I 2
to display the folder where fonts are installed. You can then specify a different font by putting, for example, let g:presenting_font_small = 'mini'
in your .vimrc
.
Hey @PhilRunninger, thanks for the quick response and the help!
Two things:
Please add a section "Known issues" to the README and the docs and mention that presenting.vim and vimwiki are not playing well together
Please change straight
figlet font to something else. straight
is not available on Ubuntu by default. We should pick a font that is available on many platforms. Here is a list of the available ones on Ubuntu.
Default font: standard
Font directory: /usr/share/figlet
Figlet fonts in this directory:
banner
big
block
bubble
digital
ivrit
lean
mini
mnemonic
script
shadow
slant
small
smscript
smshadow
smslant
standard
term
After that I'll merge it.
@sotte I'll do you one better on that vimwiki issue. I added a simple check for the vimwiki filetype, and changed that back to markdown when preparing the slide show.
The more direct replacement for straight would have been mini, but I decided that I like the blocky fonts better, so I picked standard and small for the defaults.
@PhilRunninger great feature and great commits! I'm excited to use it for my next presentation.
Thank you so much!
My pleasure. I'm interested to see if anyone else implements this custom formatting for the other file types.
Me too. I created a ticket for it: #27
There is a lot to unpack in this one. I wanted to make my presentations a bit spiffier, as if rendered to HTML. Of course, we're limited by what we can do with mono-spaced characters in a Vim buffer. So here's what I did.
Markdown-specific Changes
#
and##
headings are used as slide separators now.#
,##
, and###
headings are replaced by the output of the program figlet, if it's installed andg:presenting_figlets
is1
. The fonts for both large and small headings can be overridden by the user.#
,##
,###
, and####
headings are centered in the window. This at least partially addresses #22.∙
□
and■
┃
━
//
will not be displayed when presenting.Here is an animated GIF showing the changes. It is also embedded in the README.
General Changes
ftplugin/*.vim
) as opposed to autocommands. This puts the code in a location that better matches its purpose. If additional statements are needed, they fit better in these files than in an autocommand.s:Format()
function and the relatedautoload/markdown.vim
file. Following the pattern set forth therein, custom formatting can be implemented for other filetypes as well. For example, to enable custom formatting for RST files, do the following:rst#format(text, state)
in the new fileautoload/rst.vim
. This function takes the current line oftext
and astate
dictionary that describes the current state of the process.state
can be used to remember such things as "We're inside a code block," which would change how the currenttext
is formatted. An updatedstate
is returned by this function, and is passed back in for the next line oftext
.syntax/presenting_rst.vim
, and include the appropriatesyntax
andhighlight
commands in it.