Showing posts with label vim. Show all posts
Showing posts with label vim. Show all posts

2020-01-23

use vim as a presenting tool, give presentations using vim

/I use vim and I don't like bloated pointy-clicky applications like PowerPoint and Impress. However, from time to time I need to give a presentation. Here is the solution I use.

presenting.vim


See presenting.vim source code repo

Preparing to install presenting.vim


Before presenting.vim can be used, one must install it. I chose to use pathogen for this:

Install pathogen:

mkdir -p ~/.vim/autoload ~/.vim/bundle && \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim

Add to bottom of ~/.vimrc

" pathogen
execute pathogen#infect()
syntax on
filetype plugin indent on

Installing presenting.vim


With pathogen enabled, installation becomes as simple as cloning the relevant git repo in the ~/.vim/bundle directory:

cd ~/.vim/bundle
git clone https://github.com/sotte/presenting.vim


Choose your slide separator


Your presentation will be a text file in a vim buffer. Apparently, the name of this file will determine the slide separator that presenting.vim looks for. I prefer the reStructuredText slide separator ~~~~ but consult https://github.com/sotte/presenting.vim#configuration if you don't like this.


Prepare and run a minimal presentation


Use vim to start editing a text filed called presentation.rst - the important thing here is the file extension:

$ vim presentation.rst

Inside that file, put the following text:

slide 1

~~~~

slide 2

~~~~

slide 3

Now, tell presenting.vim to start the presentation:

:PresentingStart

Use the following keys to control the presentation:

  • n - next slide
  • p - previous slide
  • q - stop the presentation


2013-11-03

Vim reading list

For years when I needed to search for something in 'vim', I would use the '/' command and type the search key. Usually this would be inefficient, because I would be typing the name of a function that was right there on the screen (sometimes I would use the mouse to copy-and-paste to save a few keystrokes, taxing my brain with yet another keyboard/mouse context switch and exacerbating my "mouse finger" syndrome). Imagine my surprise to learn that Vim has a '*' command to search for whatever word happens to be under the cursor! And then there are the 'n' and 'N' commands which search forwards and backwards, respectively, for the last search key.

2013-10-08

Change illegible blue color in /bin/ls output

On some LCD monitors, the default blue-on-black color used by /bin/ls for directories is unreadable. There are probably better ways of fixing this, but this one worked for me:

Edit ~/.bash_profile, add line:

 export LS_COLORS="di=01;36:"




The same problem occurs in vim; here, we put the following line in ~/.vimrc:

colorscheme desert