Jaime Gago Condensing Information Systems From the Vapor Of Data

8Jul/141

VIM / Bash Prompt Setup For Day to Day Systems Engineering (Git as VCS)

tl;dr: grab my GIST for VIM and bash prompt setup.

In these days of highly automated systems, I work with several languages/DSLs and environments, Ruby, vimlogoPython,Puppet,Ansible, YAML, JSON, Ubuntu,CentOS. In order to optimize my workflow,  I've customized my  VIM and prompt setup quite a bit (all with open source code) and so I thought to share it. I usually work from an Os X laptop (as my host for Linux VMs managed via Vagrant)thus I'm including a couple of tricks for iTerm2, finally some bash prompt goodness.

Features

VIM

  • File browsing
  • Code indentation markers
  • Above 80 characters lines markers
  • Trailing spaces markers
  • Embedded Git (e.g. branch detection in status line)
  • Line numbers toggle
  • Vertical Cursor Line toggle
  • Horizontal cursor line
  • Code folding
  • Syntax linting (multiple languages)
  • Advanced status line (Powerline)
  • Syntax detection and coloring (multiple languages)

Prompt

  • Git autocompletion
  • Git status in prompt (e.g. current branch detection when in a git repository)
  • Command History search autocompletion (bound to arrows)
  • Command history time stamps
  • Line separation between each commands
  • Colored prompt
  • VIM as prompt commands edtior

 

VIM Screenshots

Screen Shot 2014-05-29 at 12.26.35

 

Screen Shot 2014-05-29 at 12.50.25 Screen Shot 2014-05-29 at 12.48.26

--

Prompt Screenshots

Screen Shot 2014-07-07 at 23.08.22

 

Screen Shot 2014-07-07 at 23.10.57

Additional Resources

Most of what you need to accomplish the same setup including links as seen in the screenshot is available on this gist , there are however some settings I could not include in this gist, here they are:

For VIM powerline to function properly you'll need specific "patched fonts" (at least I do for iTerm2), the color theme in the screenshots is liquidcarbon for iTerm2 (you'll need to select it in the iTerm2 preferences (load presets and then select as default).

It took me forever to use code folding but of all this plugins and custom settings I use it was the most straight forward to implement and start using thanks to this post.

I am leveraging a few percentage of the feature sets of all the VIM plugins, one of plugins I want to get more familiar with is vim-fugitive, I've found several video tutorials from vimcast.org.

I only recently started using NERDTree Bookmarks now I wonder how was I able to live without them!

 

Comments (1) Trackbacks (0)
  1. Just added Gundo plugin, pure awesomeness (updated the gist)!

    http://sjl.bitbucket.org/gundo.vim/


Leave a comment

No trackbacks yet.