Vi – cheat sheet

the vi editor
Vi with line numbers, dark background and colored syntax in a markup environment.

Vi is a very powerfull editor, that is … for the initiated. Here are some of my favorite vi commands:

Colors, syntax, write, quit

  • :syn on – colored syntax
  • :syn off – no colored syntax
  • :set number – line numbers
  • :set background=dark – better color contrast in a dark terminal window
  • :q! – quit without saving
  • :w – save
  • :wq – save and quit

Copy / Paste

First mark some text. Move the cursor to the beginning of whatever should be copied. Then press v. Now you can mark something. Press Y to yank or d to delete (= cut). Move the cursor to where you want to put the clipping or copy. Then press p.

Save Your Favorite Settings

You may want to save your favorite settings. Vi use the file .vimrc – my .vimrc looks like this:


set number
set background=dark
syn on
set autoindent
set shiftwidth=4

Bootstrap Menu Builder

Bootstrap Menu Builder
Bootstrap Menu Builder

Building menus in Bootstrap is complicated. And boring because you’ll have to write the same stuff over and over again. Perhaps you could write some PHP functions to do the trick. But what is somebody else developed the tools?

So I began to google for Bootstrap tools. Here’s a usefull tool for menu building:

In this builder you can build the menus. Drag and drop to submenus ( the menu item will indent a bit ). The HTML and CSS will be made automaticly. There are even some gradient options. But here I’d prefer to craft the stuff myself via SASS / Compass or even plain CSS.

If you build a menu, you can download the HTML and CSS. Include this via PHP and you’re up and running in no time.

So why not try the Bootstrap Design Tools?