Showing posts with label Organization. Show all posts
Showing posts with label Organization. Show all posts

Tuesday, May 4, 2010

Install Vim-outliner on K/Ubuntu

I spoke of vim-outliner a few years ago and was recently reminded of it again while listening to the mintcast podcast regarding orgmode for emacs.

Orgmode seems to be fairly feature rich, but I never liked the whole key combination thing with emacs. To this day, I can't figured out how to close an emacs session. Vim just seems easier. It's a preference.

Vim-outliner doesn't seems to have all the features of orgmode on the great emacs OS, but it is good at what it does...outline. It seems to follow the Unix philosophy of doing one thing and doing it well, instead of the emacs philosophy of cram as much as possible into an app. So I attempted to install it on my Kubuntu 9.10 machine and it's not as simple as an aptitude install. So, here is how to get vim-outliner installed and set up on a current version of K/Ubuntu.

$ aptitude install vim-vimoutliner

Make sure you have vim-addon-manager installed. If not install it. Then,

$ sudo vim-addons -w install vimoutliner

Finally, make sure you have the following in your ~/.vimrc file, if you don't already,

filetype plugin indent on

To start vim-outliner, simply open vim with any file with the extention .otl, such as:

vim file.otl

and you're good to go. Please visit my prior post on vim-outliner for a quick tutorial or use vim's help to access the documentation by typing ":help vo" in an open vim session.

Friday, October 24, 2008

gcalcli - Google Calendar on the Command Line

gcalcli gives you access to your Google Calendar on the command line. You can retrieve your calendar information for multiple calendars and in various formats. gcalcli can be found in the repositories for Ubuntu Hardy and Ibex.

If your Distro does not have gcalcli in it's repositories, instructions can be found here. gcalcli is written in python and just has a few dependencies for an easy install.

Once installed you may need to create a .gcalclirc file in your home directory. The file should be configured like this:

[gcalcli]
<config-item>: <value>
<config-item>: <value>
...

Mine looks like this:

[gcalcli]
user: username@gmail.com
pw: password
cals: all

Obviously, use your own Google Calendar username and password in the file. I have several calendars that follow, like a US Holiday calendar, a family birthday calendar and my Wife's calendar. I wanted to have access to all the calendars so I indicated that as an option in the config file. There are several other options that can be included within this configuration file specifically having different colors for each calendar.

On my laptop running CrunchBang! Linux, gcalcli was not correctly reading
the .gcalclirc file. So, I created the following alias in my .bashrc file:

alias gcalcli = "/usr/bin/gcalcli --user=username@gmail.com --pw=password"

This seemed like a reasonable work around for now.

To view my calendar I simply type:

$ gcalcli agenda


Notice my calendar in blue and my wife's calendar in magenta.
Using the agenda option without parameters will list one week of calendar information. You can include a date range to customize the output.

$ gcalcli agenda 11/15 11/31

This will give you all calendar items between 11/15 and 11/31 of the current year.

To view your calendar in a matrix with borders, type the following:

$ gcalcli calw

The calw option without parameters will display the current week's calendar items. You can add parameters to increase your ranges view.

$ gcalcli calw 3


This will display the current week and the following 2 weeks.

You can post to your calendar as well using the quick option in the following syntax.

$ gcalcli quick "10/31 7 pm Halloween Party"


This will create a calendar for a Halloween Party on 10/31 at 7 pm.
Please see the gcalcli site for more things you can do with this neat little app, including adding calendar items to gnu screen and receiving notices. For all you GUI lovers you can even use gcalcli to display your calendar items in conky.

Now you can do all your scheduling and calendaring on the CLI.

Thursday, September 20, 2007

Get Organized with VIM....yes, VIM.

I've recently discovered and have become addicted to vim-outliner. If you've never used a note taker or outliner before then it's time to get organized. Outliners are great for organizing projects, planning events, meetings, presentations, talks, note taking and satisfying many other organizational needs. I wish I knew about vim-outliner when I was in college, it would have been the perfect tool for managing lecture note and class projects. I now use vim-outliner for organizing work tools and open source projects.

To install vim-outliner in Ubuntu is as easy as opening a terminal and typing:
sudo apt-get install vim-vimoutliner

Now you will need to edit the /etc/vim/vimoutlinerrc file to enable necessary features, so in a terminal type:
sudo vim /etc/vim/vimoutlinerrc

Press 'i' to enter insert mode then make sure the following 2 lines are uncommented:

let g:vo_modules_load = "checkbox:hoist"
and
let maplocalleader = ",,"

Also make sure that the following line ends with a zero, not a 1:

let g:use_space_colon=0

Now save the file by pressing the 'esc' key to exit insert mode and type:
:wq

Now, let's get outlining!
To open a vim-outliner file type:
vim filename.otl

You must have the '.otl' extension to your filename for vim to act as an outliner. To use the outline just start typing, remembering to press 'i' first to enter vim insert mode. Create categories and sub-categories by tabbing. Here is an example:

How to Back up Your Data

   CD-RW
      Storage
       Lifespan
   USB Drive
      Storage
      Lifespan
   Rsync


The above is an example of a 3 level outline, vim will automatically color code each level. To add text or notes to a category, start a new line under a heading and begin the new with a :(sp) (That's colon followed by a space). Here is an example:

How to Back up Your Data

   CD-RW
      Storage
         :  Make sure you store your CD's in fairly cool conditions
         :  Don't storage your CD's in direct sunlight
      Lifespan
Your text will automatically wrap as needed. Now comes the fun part....folding.
Exit vim's insert mode my pressing 'esc' and move your cursor to one of the newly
entered text lines and press the 'z' and 'a' keys (z-a) and you should get
something like the following:

How to Back up Your Data
   CD-RW
      Storage
         [TEXT] ------------------------- (2 lines)
      Lifespan
Pretty neat! There are some built-in keyboard shortcuts that unleashed the real
power of folding. Here are some of those handy commands:

Z-c


collapse a tree within command mode

Z-o


expand one level

z-O


expand all the way down

>>


Demote headline, collapse the tree to demote all children

<<

Promote headline, collapse the tree to promote all children

,#

Fold at level #, all set foldlevel=# (i.e. ,,3 will foldset at level 3)

,,-

Draw dashed line

,,f

Directory listing of the current directory

,,s

Sort sub-tree under cursor ascending

,,S

Sort sub-tree under cursor descending

,,t

Append timestamp (HH:MM:SS) to heading


There are several other commands. To learn more commands and other outliner
features you can access vim-outliner documentation while in vim, by typing:

:h vimoutliner

I know...... I know..... You are well impressed, but wait there's MORE!!!!!

You can add checkboxes and percentages of completion to each of your categories.
You do this by moving the cursor to the heading of choice and pressing the following
keys ",,c%" (that's "comma comma the letter 'c' and the percentage symbol")
This will create something like this:


[_] %How to Back up Your Data
[_] %CD-RW
[_] Storage
[TEXT] ------------------------- (2 lines)
[_] Lifespan

You can toggle a checkbox as checked or unchecked by pressing the following
keys ",,cx" (comma comma the letter 'c' and the letter 'x'). Here is a
screeenshot of a partially complete oultine with checkboxes and percentages:


Here is a list of checkbox commands:

,,cb

Insert a check box on the current line or each line


of the currently selected range (including lines in


selected but closed folds).

,,cx

Toggle check box state (percentage aware)

,,cd

Delete check boxes

,,c%

Create a check box with percentage placeholder

,,cp

Create a check box with % placeholder on all headings

,,cz

Compute % completion for the tree below the current heading.

Of course vim-outliner also has all the vim features and commands that
you've come to expect and love. So all vi controls and keyboard entries
work with outliner. You can find more information about vim-outliner at
http://www.vimoutliner.org.
At the vim-outliner site you'll find some neat scripts to convert .otl files
to .html and .sxi (OpenOffice.org Presentation format).


Now go get organized!