Skip to content

Commit

Permalink
Make Vim look good
Browse files Browse the repository at this point in the history
To make Vim look good, you can install extra color schemes. For the
purposes of this demo, I've chosen two: Solarized (the most widely used
color scheme) and Molokai (a port of the Textmate/Sublime color scheme).
Feel free to pick one by changing the

    colorscheme solarized

line to something else.

To make Solarized look the best, you're going to want to install the
corresponding colorscheme for your terminal:

    http://ethanschoonover.com/solarized

If you can't do this, just uncomment the line that says

    let g:solarized_termcolors=256

We're also installing a plugin called vim-airline that makes Vim look
pretty awesome. It adds tons of information to your Vim and adds style
too. It works best if you have what's called a "patched font". There are
a number of patched fonts that you can install, but the one I recommend
is

    https://github.com/abertsch/Menlo-for-Powerline

Once you've downloaded all the .ttf files, change your font in your
terminal emulator.

NOTE FOR WINDOWS USERS (you poor souls...)

Setting up Solarized and vim-airline is basically impossible on PuTTY.
Instead, you should go download mobaXterm, which is an SSH client that
lets you a) comes pre-installed with Solarized colors and b) lets you
choose a patched font:

    http://mobaxterm.mobatek.net/

For detailed installation instructions and a sneak peak at some of it's
more powerful features, see here

    http://blog.zimmerman.io/2014/09/28/setting-up-mobaxterm-for-ssh-on-windows/
  • Loading branch information
jez committed Feb 25, 2015
1 parent 1186be2 commit 457f2e2
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions vimrc.vim
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ call vundle#begin()

Plugin 'gmarik/Vundle.vim'

" ----- Making Vim look good ------------------------------------------
Plugin 'altercation/vim-colors-solarized'
Plugin 'tomasr/molokai'
Plugin 'bling/vim-airline'

This comment has been minimized.

Copy link
@jez

jez Apr 24, 2016

Author Owner

vim-airline has changed. Instead of this one line, it should now be these two:

Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'

call vundle#end()

filetype plugin indent on
Expand All @@ -23,3 +28,35 @@ set hlsearch
syntax on

set mouse=a

" ----- Plugin-Specific Settings --------------------------------------

" ----- altercation/vim-colors-solarized settings -----
" Toggle this to "light" for light colorscheme
set background=dark

" Uncomment the next line if your terminal is not configured for solarized
"let g:solarized_termcolors=256

" Set the colorscheme
colorscheme solarized


" ----- bling/vim-airline settings -----
" Always show statusbar
set laststatus=2

" Fancy arrow symbols, requires a patched font
" To install a patched font, run over to
" https://github.com/abertsch/Menlo-for-Powerline
" download all the .ttf files, double-click on them and click "Install"
" Finally, uncomment the next line
"let g:airline_powerline_fonts = 1

" Show PASTE if in paste mode
let g:airline_detect_paste=1

" Show airline for tabs too
let g:airline#extensions#tabline#enabled = 1


3 comments on commit 457f2e2

@jez
Copy link
Owner Author

@jez jez commented on 457f2e2 Feb 26, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(<-- prev step) ... (next step -->)

For this step, it's best if you have iTerm2 on OS X or mobaXterm on Windows. If you're using Linux, I'll leave it up to you to choose a sensible terminal emulator.

To install the solarized colorscheme in iTerm2,

For mobaXterm,

  • use the settings to the Solarized Dark colorscheme
  • add the line export TERM="xterm-256color" to your ~/.bashrc

Of course, feel free to mess around with other color schemes.

To install a patched font, find one online or use the one I linked to in the description above, install all the .ttf files, and then change your font from within your terminal emulator.

Once you install a patched font, remember to uncomment the line that enables fancier fonts (line 54 above).

@jez
Copy link
Owner Author

@jez jez commented on 457f2e2 Mar 14, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Broken link, the last line of the commit message should be:

http://blog.jez.io/2014/09/28/setting-up-mobaxterm-for-ssh-on-windows/

@GoudaOnBeamPro
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PuTTY Tray is a very useful fork of PuTTY for this situation since it can use the Solarized theme and vim-airline with the patched Menlo font. PuTTY Tray can be downloaded here and the files to make PuTTY/PuTTY Tray Solarized are found here.

Please sign in to comment.