I’ve been using Vim for anywhere between 5 and 10 years, and my .vimrc is all grown up. I use {{{1 to annotate folds in my .vimrc, and use zM to close all folds and zR to open all folds (zc, zo, and za respectively close, open, and toggle individual folds). The --- lines are simply cosmetic.

" => Pre-load ------------------------------------------------------------- {{{1

set nocompatible  " Required for many plugins, ensures it's not compatible with 
                  " Vi, which nobody uses at this point.
filetype plugin indent on  " Great answer: https://vi.stackexchange.com/a/10125

Vundle is downright fantastic plugin manager. It allows one to install plugins with :PluginInstall and upgrade plugins with :PluginUpdate. Simple, easy, reliable. Of course you’ll need to have Vundle installed, which I normally have as a git submodule.

" Required Vundle setup.
set runtimepath+=~/.vim/bundle/vundle
set runtimepath+=$GOROOT/misc/vim
call vundle#rc()

" => Vundle plugins ------------------------------------------------------- {{{1

Plugin 'gmarik/vundle' " The Vundle itself, to keep itself updated.

" Colorschemes:
Plugin 'NLKNguyen/papercolor-theme'
Plugin 'ajh17/Spacegray.vim.git'
Plugin 'altercation/vim-colors-solarized'
Plugin 'squarefrog/tomorrow-night.vim'
Plugin 'vim-scripts/ScrollColors'  " Allows scrolling through colorschemes.

" Language/tool integration and support:
Plugin 'burnettk/vim-angular'
Plugin 'fatih/vim-go'
Plugin 'christoomey/vim-tmux-navigator'
Plugin 'mileszs/ack.vim'
Plugin 'motemen/git-vim'
Plugin 'nvie/vim-flake8'
Plugin 'pangloss/vim-javascript'
Plugin 'scrooloose/syntastic.git'  " Syntax checker.
Plugin 'tpope/vim-fugitive.git'    " Even better Git support.

" Quality of life:
Plugin 'EinfachToll/DidYouMean'    " For typos during opening files.
Plugin 'ciaranm/detectindent'      " Automatically detect indent.
Plugin 'ervandew/supertab'         " Smarter autocompletion.
Plugin 'junegunn/goyo.vim'         " A plugin for writing prose.
Plugin 'majutsushi/tagbar'         " List tags in a sidebar.
Plugin 'scrooloose/nerdtree'       " A directory tree in a sidebar.
Plugin 'tomtom/tcomment_vim'       " Easy comment blocks with <Leader>cc.
Plugin 'tpope/vim-abolish'         " Extended abbreviation/substition.
Plugin 'tpope/vim-repeat'          " Intelligent repeat with '.'
Plugin 'tpope/vim-surround'        " Work with pairs of quotes/anything.
Plugin 'tpope/vim-unimpaired.git'  " Handy bracket mappings.
Plugin 'tpope/vim-vinegar'         " Enhanced directory browser.
Plugin 'vim-scripts/DirDiff.vim'   " Directory level diff.

" New features:
Plugin 'Lokaltog/vim-easymotion'   " Easy navigation with <Leader><Leader>w.
Plugin 'kien/ctrlp.vim'            " Hit <C>p for a list of files/buffers.
Plugin 'vim-scripts/Gundo.git'     " Intelligent undo tree.
Plugin 'vim-scripts/vimwiki'       " A personal local Wiki.

if v:version > 703
  Plugin 'SirVer/ultisnips'        " Intricate snippets.
  Plugin 'chrisbra/vim-diff-enhanced'
endif

" => Plugins configuration ------------------------------------------------ {{{1

" NERDTree: auto close if last window.
function! s:CloseIfOnlyNerdTreeLeft()
  if exists("t:NERDTreeBufName")
    if bufwinnr(t:NERDTreeBufName) != -1
      if winnr("$") == 1
        q
      endif
    endif
  endif
endfunction

" Force Gundo preview to the bottom.
let g:gundo_preview_bottom = 1

" Map Gundo.
nnoremap <F5> :GundoToggle<cr>

" DetectIndent: Enable and configure.
augroup detectindent
  autocmd!
  autocmd BufReadPost * :DetectIndent
augroup END
let g:detectindent_preferred_expandtab = 1
let g:detectindent_preferred_indent = 2

" UltiSnips: Compatibility with YouCompleteMe via SuperTab.
let g:ycm_key_list_select_completion = ['<C-n>', '<Down>']
let g:ycm_key_list_previous_completion = ['<C-p>', '<Up>']
let g:SuperTabDefaultCompletionType = '<C-n>'
let g:UltiSnipsExpandTrigger = "<tab>"
let g:UltiSnipsJumpForwardTrigger = "<tab>"
let g:UltiSnipsJumpBackwardTrigger = "<s-tab>"

" VimWiki: default location.
let g:vimwiki_list = [{
  \ 'path': '$HOME/Dropbox/wiki',
  \ 'template_path': '$HOME/Dropbox/wiki/templates',
  \ 'template_default': 'default',
  \ 'template_ext': '.html'}]

" Map Tagbar.
nnoremap <F8> :TagbarToggle<cr>

" Synastic configuration.
let g:syntastic_always_populate_loc_list = 1  " Make :lnext work.
let g:syntastic_html_checkers = ['']
let g:syntastic_javascript_checkers = ['gjslint', 'jshint']
let g:syntastic_javascript_gjslint_args = '--strict'
let g:syntastic_python_checkers = ['gpylint']

Most plugins above change slightly change daily Vim workflow: the way one navigates files, replaying actions, working with snippets, minor tweaks to editing - and I highly recommend at least skimming through README of plugins you’re interested in so you can incorporate the changes in your workflow.

I have a set of simple defaults I use everywhere, major changes being changing : to ; and moving my leader key to a spacebar. Everything else are tiny quality of life tweaks.

" => Editing -------------------------------------------------------------- {{{1

syntax on

" Indentation settings.
set autoindent
set expandtab
set shiftwidth=4
set softtabstop=4
set tabstop=4

" Disable backups and .swp files.
set nobackup
set noswapfile
set nowritebackup

" Semicolon is too long to type.
nnoremap ; :
vnoremap ; :

" Map leader key.
let mapleader = "\<Space>"

" Use system clipboard.
set clipboard=unnamedplus

" Enable wild menu (tab command autocompletion).
set wildmenu
set wildmode=list:longest,full

" Don't complain about unsaved files when switching buffers.
set hidden

" Make soft line breaks much better looking.
if v:version > 703
  set breakindent
endif

" Pretty soft break character.
let &showbreak='↳ '

" => Looks ---------------------------------------------------------------- {{{1

set background=dark
colorscheme spacegray

" Set terminal window title and set it back on exit.
set title
let &titleold = getcwd()

" Shorten press ENTER to continue messages.
set shortmess=atI

" Show last command.
set showcmd

" Highlight cursor line.
set cursorline

" Ruler (line, column and % at the right bottom).
set ruler

" Display line numbers if terminal is wide enough.
if &co > 80
  set number
endif

" Soft word wrap.
set linebreak

" Prettier display of long lines of text.
set display+=lastline

" Always show statusline.
set laststatus=2

" => Movement and search -------------------------------------------------- {{{1

" Ignore case when searching.
set ignorecase
set smartcase

" Fast split navigation.
nnoremap <C-j> <C-W><C-J>
nnoremap <C-k> <C-W><C-K>
nnoremap <C-l> <C-W><C-L>
nnoremap <C-h> <C-W><C-H>

" Absolute movement for word-wrapped lines.
nnoremap j gj
nnoremap k gk

" => Misc ----------------------------------------------------------------- {{{1

" Use Unix as the standart file type.
set ffs=unix,dos,mac

" Ignore compiled files.
set wildignore=*.o,*~,*.pyc,*.pyo

" Ignore virtualenv directory.
set wildignore+=env

" Fold using {{{n, where n is fold level
set foldmethod=marker

" => Fixes and hacks ------------------------------------------------------ {{{1

" Ignore mouse (in GVIM).
set mouse=c

" Fix backspace behavior in GVIM.
set bs=2

" NERDTree arrows in Windows.
if has("win32") || has("win64") || has("win32unix")
  let g:NERDTreeDirArrows = 0
endif

" Increase lower status bar height in diff mode.
if &diff
  set cmdheight=2
endif

" Unfold all files by default.
au BufRead * normal zR

I have some custom commands and shortcuts I’m using, but not too many. I find that I mostly just forget to use shortcuts I make, and I end up deleting lines from this section regularly.

" => Custom commands ------------------------------------------------------ {{{1

" Trim trailing whitespace in the file.
command TrimWhitespace %s/\s\+$//e

" Command to close current buffer without closing the window.
command Bd :bp | :sp | :bn | :bd

" => Leader shortcuts ----------------------------------------------------- {{{1

nnoremap <Leader>] <C-]>          " Jump to ctags tag definition.
nnoremap <Leader>p :CtrlP<cr>     " Fuzzy complete for files.
nnoremap <Leader>t :CtrlPTag<cr>  " Fuzzy complete for tags.
nnoremap <Leader>r :redraw!<cr>   " Redraw the screen (for visual glitches).
nnoremap <Leader>w :w<cr>         " Write a file.

Hope you find this useful and take away a few bits and pieces for your own workflow.

I really like Octopress. It builds on top of Jekyll to address certain rough edges, and provides ready to go lighting fast blogging platform. It’s easily extendible if you know how to code (thanks to a rather clean and well organized code base), and posts are just plain Markdown files.

One issue though - I need to be near a computer to publish and preview the article. This becomes difficult if I’m traveling with, say, a tablet.

I have a low end AWS Lightsail instance I use for writing and publishing, but it’s not always fun to write when SSHing into a server, and I often write offline - making it even more difficult to move files between where I write and where I publish. And managing images is a nightmare. To resolve this, I set up a few directories I use in Dropbox, and wrote a few scripts to move things around when needed.

Here’s a directory structure in Dropbox:

- blog/
  - posts/
    - 2017-11-20-automatic-octopress-publishing.markdown
  - img/
    - input/
      - a-picture-of-a-flower.jpg
    - output/

I put Markdown files in Dropbox/blog/posts/ (and numerous offline editors sync with Dropbox - I’m writing this with StackEdit, and I use iA Writer on my tablet). I add my images to Dropbox/img/input/. I tend to strip metadata from my images and resize them to fit the maximum page width (I don’t really care for high resolution pictures, speed is preferred over ability to zoom into a picture). For this, two tools are needed:

sudo apt-get install imagemagick exiftool

When I’m done writing or want to preview an article, I SSH into my AWS Lightsail instance and run sync.sh, a small script which moves posts to a proper directory, processes images and places them in the desired location, as well as starts Octopress instance (this way I can preview my blog on the AWS Lightsail instance). Contents of sync.sh (don’t forget to chmod +x):

#!/bin/bash
cd $HOME/Dropbox/blog/img/input
mogrify -resize 832x620 -quality 100 -path $HOME/Dropbox/blog/img/output *.jpg
exiftool -all= $HOME/Dropbox/blog/img/output/*.jpg
cp $HOME/Dropbox/blog/posts/*.markdown $HOME/blog/source/_posts
cp $HOME/Dropbox/blog/img/output/*.jpg $HOME/blog/source/images/posts
cd $HOME/blog
rake generate
rake preview

I run the above script every time I want to preview the site. I’m sure it’s easy to set up a daemon to watch for changes in the Dropbox folders, but I don’t see the need for that yet. Also, I just statically resize images to a particular resolution (832x620) since all of the pictures I upload have the same aspect ratio, I’m sure there’s a way to calculate that number on the fly for this script to work with different aspect ratios.

Lastly, when I deployed and committed my changes (still commit and deploy manually out of a habit), I run archive.sh:

#!/bin/bash
mv $HOME/Dropbox/blog/posts/*.markdown $HOME/Dropbox/blog/published
rm $HOME/Dropbox/blog/img/input/*
rm $HOME/Dropbox/blog/img/output/*

It’s not much, but enough to save some manual labor involved in publishing to Octopress.

This article is a collaboration between my partner and I.

Since moving into a studio, I have missed the freedom of taking off randomly, getting to know a different city or state and overall not being tied down to a routine or a location. I love the idea of trivializing travel, so it was only natural to have a random trip at the end of the week.

My partner watches The Bucket List Family on a weekly basis and caught the traveling bug as well. Unfortunately, we are not yet at the level where we can afford a 5 star trip to international locals or have companies pay for our travels (one day!). Our goal was to spend a few days going out of state to break the work week and avoid living for the weekend.

We decided to leave Northern California on Thursday afternoon for Salt Lake City, Utah as soon as we were done with work. Roughly 800 miles each way, if one counts exits and driving around sightseeing. Inspired by an acquaintance who travels the world with a folding bike, my partner and we took our bikes with us: a borrowed Brompton folding bike for my partner in the back seat, and my ZycleFix Prime mounted on the rack in the rear.

Driving through California, Nevada, and Utah on I-80 was always one of my favorites - and it was nice to share the wonders of the world with my partner. She clocked in a lot more international travel than I did, but only been to a handful of states. It was her first time in Utah and each stop on the way to the Salt Flats exposed us to all kinds of people, different from the type of individuals we typically see inside the Silicon Valley tech bubble. We saw people with different lives, habits, hobbies, and worldviews, which to be perfectly honest, was refreshing.

Throughout the trip, we made it a point not to make any plans and go with the flow – be it our driving pace, entertainment or food options, or cities we decided to stay the night in. Traveling that way removed the stress associated with finding the perfect location and planning a fun trip. Don’t like the town we stopped at? Let’s keep driving. Enjoy a specific city? Let’s spend the night there. Having issues at a hotel? Back on the road we go.

We found a hotel while driving on the I-80 and settled there for the night. Unfortunately the place did not have a strong enough WiFi, which led us to drive to the next town over for coffee and internet to work remotely. We ended up spending 6 hours in the coffee shop making sure that we kept ourselves well caffeinated and the servers well tipped. After a somewhat productive day, we decided to explore the city’s downtown and save the Salt Flats drive for the daytime.

Our Super 8 Motel in Wendover cost us around $70 for the night and was more comfortable than expected. We ended up passing out as soon as we got to the room, exhausted from the day. We tried to stay at cheaper hotels/motels, while avoiding shady looking places. We would most often pick the 2nd or 3rd cheapest option. We never stayed in one place for more than a night and lucked out every time we got ourselves a room. Every room we slept in was clean and we even managed to squeeze in a daily workout before the start of each day.

Keeping a healthy diet on the other hand was a whole other challenge. Between cafes, restaurants and late night cravings, we failed at maintaining proper eating habits and saving on food. We spent around $300 on food alone. Eating is definitely one area for improvement, especially as we decide to travel more. Dieting is hard and dieting on the road is even harder.

On Saturday, we finally headed to Utah and stopped at a rest stop by the Salt Flats. The view was marvelous and cold for an October day. We left the Salt Flats for a mall, City Creek Center, in Salt Lake City where we had another amazingly delicious and unhealthy lunch. To feel better about our life choices, we used our bikes to get some cardio and discover the city on two-wheels. We biked through Memory Grove Park, crashed a wedding, and biked almost to the Capitol. Almost. Due to Salt Lake’s incredible, deadly hills. Next time, SLC, next time we shall conquer you.

After a day of biking and testing each other’s patience, we decided to go for a date night and talk through our attempts at making life on the road work. Traveling solo is a very different experience than traveling with a partner. We chatted over Brazilian BBQ, another unhealthy choice, and agreed that we needed to include time alone as part of our travel routine and constantly check in with each other.

We headed to the hotel and decided to leave back for California after breakfast on Sunday. Oh, and on the topic of car, the subject of staying in the Prius or camping came up a few times. We even prepared our tents in that event but the cold weather and the thought of a hot shower took priority… Oh well, hotel Prius will get more use some other time.

In one day, we drove from Utah back to Northern California. We have different memories of the road back. For her, it was long and slow. For me as a driver, it passed within a blink of an eye. Overall, our trip to Utah was a success and we learned a lot:

  1. Nothing can replace the freedom associated with the absence of a plan. When there’s no agenda or times to be at specific places - you’re never late, never in a hurry, and you’ve always seen more than you planned for. It allowed us to be surprised and delighted by places we encountered without imposing our pace on said locations.
  2. Taking time for oneself is a necessity when traveling with someone else. Time alone does not always mean actually being alone. It can be whatever works for you as a couple. For us, it’s spending time on our devices while sitting next to each other.
  3. Approaching each location with an open mind. You are not always going to get to travel to exotic places like the Bahamas, but the opportunity to fall in love with a place or its people is always there.

Living in a car for nearly a year made me pick up number of travel-related skills, here and there. Having limited available space forced “less is more” philosophy on me, and it’s something I carried over into more stationary life. Right now I’m taking a break from car dwelling and living in a small apartment in Bay Area. It didn’t stop my love for travel though, as I’m writing this entry on my flight to Nassau, Bahamas. 5 days at the destination, leisure. One of the many weekends I’m not home.

I’m not traveling alone this time, and my traveling partner has a similar outlook on travel.

Him

Less is more. Every trip starts with packing. I use my eBags Motherlode Weekender backpack, which is about the perfect size for me when it’s compressed tightly. I can probably fit in double the stuff I packed in the backpack, but I love having room in case I pick something up at the destination.

I never have to check in my bag, and it’s light enough to carry on my back without any strain. I can explore my destination as soon as I arrive, without the need to find arrangement for my bags.

I pack minimally, only having two-three sets of each type of clothing. I hand-wash the clothes I wear before I go to bed. I cycle through a total of 3 pairs of undergarments - most dry overnight as I sleep.

Furthermore, all my outfits can be mixed and matched together, so I don’t have to worry about pairing tops, bottoms, and shoes. I like to think I have some sense of style to, for those wondering. Most people I meet won’t likely see me for more then one-two days in a row, and those who do are not likely to pay attention to my small wardrobe - as long as it looks clean and sharp.

Here’s what the clothing items for this trip look like:

  • Business-casual dress-shirt.
  • Two T-shirts.
  • Pair of shorts.
  • Icebreaker merino underwear, 2 pairs.
  • Darn Tough socks, 2 pairs.
  • Jacket.
  • Swimming trunks.
  • Travel towel, for the beach.
  • Flip flops.
  • Workout outfit:
    • Tank top.
    • Shorts.
    • Sports underwear.
    • Running sneakers.

All of the above is contained within a single packing cube and a travel shoe bag.

Doesn’t sound like a lot, but it’s plenty (add the outfit I’m wearing on the plane - pants, T-shirt, sweater, shoes, pair of underwear, socks). The above lets me have outfits for all kinds of events, activities, and anticipated weather at the destination.

My personal hygiene stuff fits in a dettachable bag which comes with the backpack. Not much special here:

For entertainment and downtime I have my trusty Google Pixel C (with attached keyboard) and a pair of cheap apple ear buds. Bonus point for USB C standard - I only need to use a single charger for my tablet and a phone.

Her

Traveling with a space obsessed partner (him: Hey!) has forced me to look at packing in a different way. I first experimented with the idea of minimalism after watching The BucketList Family and avoiding airline fees is always a bonus. With every trips, I refined my set up. While I am not as lightweight and nimble as my partner, I have made significant improvements to my travel routine and picked up a few tips and tricks from him.

For example, the eBag Weekender was my first real travel purchase, which I made sure to always have ready for use, meaning that it’s always stocked with toiletries, travel documents and packing cubes. Given my propensity for sweating, I upgraded to a clean/dirty packing cube and a charcoal odor remover for my workout outfit.

For this trip, this is what is inside my bag including the clothes I am wearing to travel:

On me:

  • A tank top.
  • A hoodie.
  • A denim jacket.
  • Lululemon leggings.
  • Bra and underwear.
  • Sandals

In my luggage:

  • Button on shirt.
  • Tank top.
  • T-shirt.
  • Pair of pants.
  • Pair of shorts.
  • Rain jacket.
  • 5 pairs of underwear (one is never too prepared in terms of underwear, and this is where I refuse to become a minimalist).
  • Workout oufit:
    • Leggings.
    • Dry fit T-shirt.
    • One pair of socks.
    • Workout bra.
    • Sports sneakers.
    • Bikini

Toiletries:

  • Foundation.
  • Makeup brush.
  • Travel-friendly lotion.
  • Natural oil for face washing purposes.
  • Feminine hygiene soap
  • Ingrown hair serum.
  • L’Instant de Guerlain perfume (while the current bottle takes a lot of space and adds weight, I have yet to find a travel friendly way to carry it).

If you haven’t noticed, my backpack is bigger, and my setup is a bit heavier. To be perfectly honest, I am not yet fully on board with this whole minimalistic travel but I have got to say, my shoulders are thankful.

Making Yourself at Home

We’ve learned from the bucket list family that it’s really important to unpack as soon as we get to a hotel. Especially since it’s easy to do when there’s little clothing in the bags. This way we feel at home whenever we go, even if we’re just staying at a hotel for a single night. Every item is in it’s place, and there’s no digging through the bags for clothes or gadgets.

We’ve also found that we really value downtime, every day we travel. Taking time to unwind (however long it needs to be) in the hotel room, a coffee shop, or anywhere else helps take the edge off flying and booking accommodations and the subconscious pressure to have fun as a pair.

We’ve learned this the hard way on our first trip together. Our days were packed with activities and sightseeing stops, and we were at each other’s throats by the end of the trip. Lesson learned.

For the past year or two I’ve been working in the cloud. I use Chrome Secure Shell to connect to my machines, and it works rather well. In fact, I moved away from my work Linux/Mac laptops towards an HP Chromebook, which fullfilled both requirements I had: a browser and a terminal. One thing I missed about a Linux machine though is lack of notify-send-like functionality, especially when working with long-running builds.

Yesterday I pinged hterm team for assistance with this matter, and turns out recent release of Secure Shell supports Chrome desktop notifications! Furthermore, two amazing engineers (thanks Andrew and Mike!) crafted an hterm-notify script, which propagates notifications to Chrome, and by extent to desktop!

I made a few tiny changes, mainly since I don’t use screen, and tmux sets my $TERM to screen-256color for some reason:

#!/bin/sh
# Copyright 2017 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# Write an error message and exit.
# Usage: <message>
die() {
  echo "ERROR: $*"
  exit 1
}

# Send a notification.
# Usage: [title] [body]
notify() {
  local title="${1-}" body="${2-}"

  case ${TERM-} in
  screen*)  # This one's really tmux
    printf '\ePtmux;\e\e]777;notify;%s;%s\a\e\\' "${title}" "${body}"
    ;;
  *)        # This one's plain hterm
    printf '\e]777;notify;%s;%s\a' "${title}" "${body}"
    ;;
  esac
}

# Write tool usage and exit.
# Usage: [error message]
usage() {
  if [ $# -gt 0 ]; then
    exec 1>&2
  fi
  cat <<EOF
Usage: hterm-notify [options] <title> [body]

Send a notification to hterm.

Notes:
- The title should not have a semi-colon in it.
- Neither field should have escape sequences in them.
  Best to stick to plain text.
EOF

  if [ $# -gt 0 ]; then
    echo
    die "$@"
  else
    exit 0
  fi
}

main() {
  set -e

  while [ $# -gt 0 ]; do
    case $1 in
    -h|--help)
      usage
      ;;
    -*)
      usage "Unknown option: $1"
      ;;
    *)
      break
      ;;
    esac
  done

  if [ $# -eq 0 ]; then
    die "Missing message to send"
  fi
  if [ $# -gt 2 ]; then
    usage "Too many arguments"
  fi

  notify "$@"
}
main "$@"

Throwing this in as ~/bin/notify (not forgetting to chmod +x and having ~/bin in the $PATH) I can get a notification when a particular long running command is complete:

sleep 30 && notify Hooray "The sleep's done!"