|||

Crouton for Kitz

The first step is to get your chromebook into developer mode. There are different methods for different machines so you may have to do some Googling. Mine was escape+refresh+power keys at the same time. Remember that ctl-D is your friend at restarts.

Go to https://github.com/dnschneid/crouton for the rundown of options and usage.

Get the Crouton file into the Downloads folder: https://goo.gl/fd3zc

Open a shell by pressing ctrl+alt+t all at the same time. Type shell at the prompt and you will get another prompt. Type sh ~/Downloads/crouton to see a help list.

To see a list of supported distros: sh ~/Downloads/crouton -r list. Ubuntu Xenial is the default. For me:

sudo sh ~/Downloads/crouton -t cli-extra -n kitz

Here is my essential checklist once the chroot is established:

  • wget
  • rsync
  • git
  • vim
  • ConTeXt
  • Fonts
  • Pandoc

Some optionals:

  • cmus
  • python3
  • lua
  • sqlite3
  • sc-im

wget, rsync, git

For the first three in the checklist use:

sudo apt install [script name]

They may already be current. rsync is needed for ConTeXt.

vim

Vim 8 is central to my workflow. The apt version is outdated, but the dependencies required can be obtained by:

sudo apt build-dep vim

It is a lot of stuff. I am not sure how much is actually needed. Next git vim:

git clone https://github.com/vim/vim.git

Then

cd vim
sudo make distclean
./configure --with-features=huge --prefex=/usr
make
sudo make install

The with-features=huge is to get clipboard support easily. The --prefix=/usr makes it accessible for non-root users. To finish up: make clean and make distclean

Now that vim is in, the .vimrc must be established. Here is mine:


set nocompatible

set clipboard=unnamed

"Font
set guifont=Consolas:h16

"Enable filetypes
filetype on
filetype plugin on
filetype indent on
syntax on

"filename and path in tab:
set title

"line numbers:
set number

"Display cursor position
set ruler

"Tab stuff
set tabstop=2
set shiftwidth=2
set softtabstop=2
set expandtab

"Indent stuff
set smartindent
set autoindent

"commands for moving lines
nnoremap <C-j> :m .+1<CR>==
nnoremap <C-k> :m .-2<CR>==
inoremap <C-j> <Esc>:m .+1<CR>==gi
inoremap <C-k> <Esc>:m .-2<CR>==gi
vnoremap <C-j> :m '>+1<CR>gv=gv
vnoremap <C-k> :m '<-2<CR>gv=gv

"write and process ConTeXt file
nmap <C-h> <Esc> :w <CR> :!context % <CR>

"write and process Lua file
nmap <C-l> :w <CR> :!lua % <CR>

"write and proces a Python file
nmap <C-p> :w <CR> :!python % <CR>

"insert blank line
nmap <CR> o<Esc>

"keep current line in vertical center of window?
set scrolloff=99

And the plugins. My only essential at this point is t-comment. Vim8 has a native package system which is as easy as setting up:

mkdir -p ~/.vim
cd .vim
mkdir pack
cd pack
mkdir myPlugins (or whatever name you chose)
cd myPlugins
mkdir start

From within ~/.vim/pack/myPlugins/start one can git clone https://github.com/tomtom/tcomment_vim.git etc. and it runs. Or one can get far more refined.

For documentation tags, run inside vim

:helptags ~/.vim/pack/plugins/start/foo

Lots of good vim advice can be found at: https://shapeshed.com/

ConTeXt

The TeX macro package. http://wiki.contextgarden.net/Main_Page

mkdir ~/context
cd ~/context
wget http://minimals.contextgarden.net/setup/first-setup.sh
sudo sh first-setup.sh --engine=luatex --modules=all

Then in ~/.profile add:

PATH="$HOME/context/tex/texmf-linux-64/bin:$HOME/bin:$HOME/.local/bin:$PATH"

…so ConTeXt can be found. With Pandoc we will see why the $HOME/.local/bin is there. Also be sure to update the texmf-local file.

I have a few specialty fonts for use primarily with ConTeXt: lydian, inconsolata, euler, lucida, chalkduster, and openDyslexic. Despite the encouraging chatter, font handling can be enigmatic. sudo fc-cache -fv is part of the magic, but first:

export OSFONTDIR="/usr/local/share/fonts;$HOME/.fonts"
sudo fc-cache -fv

So that ConTeXt (luaTeX) can see them:

mtxrun --script fonts --reload

If you want to see all the fonts that ConTeXt can see, which should be all available in your part of the sandbox:

mtxrun --script fonts --list --all --pattern=*

Pandoc

Again, apt is way old. Start here https://github.com/jgm/pandoc/releases/tag/2.2.1 to get the …linux.tar.gz binary package. Then unzip and place in ~/.local.bin.

sudo tar xvzf ~/Downloads/pandoc-2.2.1-linux.tar.gz --strip-components 1 -C ~/.local/
Up next Wildfire
Latest posts MECondoInsurance DECLARATION OF CONDOMINIUM BY-LAWS 1 ETW 9-11 ETW Accounting Outline World Cup Schedule Yogurt Google drive World Cup Groups A Mortgage Story KaTeX sans Crostini maps-2 Long Trail part 1 A Good Idea LT21Scorched2 LT21beaverDam AT Happy Hill A Gear Graphic Wildfire Crouton